/* Shared views stylesheet */

.view-body {
  background-color: #0c1017;
  color: #e6edf3;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav links in header */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #171d27;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #232b3b;
}

.nav-link {
  color: #8b949e;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #ffffff;
  background: #1f6feb;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ==========================================================
   VIEW 2: 日赛道竞速 (Race Track) Styling
   ========================================================== */
.race-container {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
}

.race-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 24px;
}

.race-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #eff34d;
  text-shadow: 0 0 12px rgba(239, 243, 77, 0.3);
}

.race-time-badge {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #3d4659;
  background: #131822;
  color: #e6edf3;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
}

.race-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.race-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.race-section-label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  padding-bottom: 4px;
  border-bottom: 1px solid #1a2230;
}

.inflow-label { color: #ff7875; }
.outflow-label { color: #5cdbd3; }

.race-bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.race-row {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s;
  cursor: pointer;
  padding: 2px 0;
}

.race-row:hover {
  transform: scale(1.015);
}

.race-name {
  width: 90px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: #e6edf3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.race-bar-track {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.race-bar-fill {
  height: 100%;
  border-radius: 12px;
  width: 0%;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.race-val {
  width: 95px;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  font-family: "SF Mono", Consolas, monospace;
  color: #ffffff;
  flex-shrink: 0;
}

.race-divider {
  height: 20px;
}

/* ==========================================================
   VIEW 3: 日资金气泡 (Bubble View) Styling
   ========================================================== */
.bubble-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  position: relative;
  overflow: hidden;
  background-color: #090d14;
}

.bubble-header {
  padding: 16px 24px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.bubble-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #eff34d;
  text-shadow: 0 0 12px rgba(239, 243, 77, 0.3);
}

.bubble-canvas-area {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bubble-divider-bar {
  position: absolute;
  top: 50%;
  left: 30px;
  right: 30px;
  transform: translateY(-50%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 5;
}

.bubble-inflow-stat {
  font-size: 16px;
  font-weight: 700;
  color: #f6465d;
  letter-spacing: 0.5px;
  transform: translateY(-22px);
}

.bubble-outflow-stat {
  font-size: 16px;
  font-weight: 700;
  color: #0ecb81;
  letter-spacing: 0.5px;
  transform: translateY(6px);
}

.bubble-node {
  position: absolute;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  z-index: 6;
}

.bubble-node:hover {
  transform: scale(1.12);
  z-index: 20;
}

.bubble-node.inflow-bubble {
  background: radial-gradient(circle at 35% 35%, #ff7875, #d4380d 70%, #820014);
  box-shadow: 0 0 25px rgba(245, 34, 45, 0.45);
}

.bubble-node.outflow-bubble {
  background: radial-gradient(circle at 35% 35%, #5cdbd3, #0ecb81 65%, #00474f);
  box-shadow: 0 0 25px rgba(14, 203, 129, 0.45);
}

.bubble-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  padding: 0 4px;
}

.bubble-val {
  font-size: 12px;
  font-family: "SF Mono", Consolas, monospace;
  font-weight: 600;
  margin-top: 3px;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ==========================================================
   VIEW 4: 板块跨日资金堆积图 (Streamgraph) Styling
   ========================================================== */
.stream-container {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  height: calc(100vh - 56px);
  overflow: hidden;
  background-color: #0b0e14;
}

.stream-chart-area {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid #1f2636;
}

.stream-header {
  padding: 16px 24px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.stream-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #eff34d;
  text-shadow: 0 0 12px rgba(239, 243, 77, 0.3);
}

.stream-badge-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #303e55;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 700;
  color: #e6edf3;
  letter-spacing: 0.5px;
}

#stream-chart {
  flex: 1;
  width: 100%;
  height: 100%;
}

.stream-legend-panel {
  display: flex;
  flex-direction: column;
  background: #111622;
  height: 100%;
  overflow-y: auto;
  padding: 14px 16px;
  gap: 6px;
  border-left: 1px solid #1f2636;
}

.stream-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid #1f2636;
}

.section-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.section-badge.positive-badge {
  color: #ff7875;
}

.section-badge.negative-badge {
  color: #5cdbd3;
}

.section-sum {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
}

.stream-items-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stream-leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px;
  font-size: 12.5px;
  border-radius: 4px;
  transition: background 0.15s;
}

.stream-leaderboard-row:hover {
  background: #182030;
}

.leaderboard-item-left {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.leaderboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.leaderboard-name {
  color: #e6edf3;
  font-weight: 600;
}

.leaderboard-dotted-line {
  flex: 1;
  border-bottom: 1px dotted #2e3b52;
  margin: 0 6px;
  min-width: 12px;
}

.leaderboard-val {
  font-family: monospace;
  font-weight: 700;
  white-space: nowrap;
  font-size: 12px;
}

.positive-text {
  color: #ff4d4f;
}

.negative-text {
  color: #5cdbd3;
}

.stream-zero-separator {
  margin: 6px 0;
  padding: 3px 6px;
  background: rgba(56, 139, 253, 0.1);
  border: 1px dashed rgba(56, 139, 253, 0.35);
  border-radius: 4px;
  text-align: center;
}

.zero-line-label {
  font-size: 11px;
  font-weight: 600;
  color: #58a6ff;
  letter-spacing: 0.5px;
}

.stream-summary-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #1f2636;
}

.summary-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: #161e2b;
  border-radius: 4px;
  border: 1px solid #232c3d;
}

.summary-footer-label {
  font-size: 12px;
  font-weight: 600;
  color: #8b949e;
}

.summary-footer-val {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
}

/* ==========================================================
   VIEW 5: 产业链资金流向 (Chain View) Styling
   ========================================================== */
.chain-container {
  flex: 1;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chain-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.chain-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #eff34d;
  text-shadow: 0 0 12px rgba(239, 243, 77, 0.3);
}

.chain-selector-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.chain-btn {
  background: #171d28;
  border: 1px solid #283347;
  color: #8b949e;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chain-btn.active {
  background: #1f6feb;
  color: #fff;
  border-color: #58a6ff;
}

.chain-card {
  background: #10151e;
  border: 1.5px solid #232b3a;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
}

.chain-card-header {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.chain-card-header strong {
  margin-left: 6px;
  color: #ff7875;
}

.chain-bubbles-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  padding: 10px;
}

/* ==========================================================
   VIEW 6: 资金复盘 (Daily Review) Styling
   ========================================================== */
.review-container {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 50px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #388bfd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.review-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.review-session-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-session-btn {
  background: #161c27;
  border: 1px solid #242e40;
  color: #8b949e;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.review-session-btn.active {
  background: #1f6feb;
  color: #fff;
  border-color: #388bfd;
}

.review-disclaimer {
  font-size: 12px;
  color: #d48806;
  background: rgba(212, 136, 6, 0.12);
  border: 1px solid rgba(212, 136, 6, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
}

.review-breadth-bar {
  background: #131822;
  border: 1px solid #21293a;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 14px;
  font-weight: 600;
}

.review-atmosphere-box {
  background: #131822;
  border: 1px solid #21293a;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.review-atmo-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 8px;
}

.tag-atmo { background: #163866; color: #58a6ff; }
.tag-inflow { background: #4d1c24; color: #ff7875; }
.tag-outflow { background: #163e32; color: #5cdbd3; }
.tag-feat { background: #543912; color: #ffd666; }

.review-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.review-col-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.review-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-deep-card {
  background: #131822;
  border: 1px solid #21293a;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-card-name-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-card-rank {
  font-size: 14px;
  font-weight: 700;
  color: #8b949e;
}

.review-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.review-card-tags {
  display: flex;
  gap: 4px;
}

.badge-tag {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #1c2433;
  color: #8b949e;
  border: 1px solid #2a354a;
}

.badge-tag.highlight {
  color: #ff7875;
  border-color: #5c2223;
  background: #381a1d;
}

.badge-tag.downlight {
  color: #5cdbd3;
  border-color: #1a423d;
  background: #122926;
}

.review-card-nums {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
}

.review-news-title {
  font-size: 13px;
  color: #58a6ff;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.review-news-title:hover {
  text-decoration: underline;
}

.review-news-desc {
  font-size: 12px;
  color: #8b949e;
  line-height: 1.4;
}

.review-news-source {
  font-size: 11px;
  color: #484f58;
}

/* ==========================================================
   VIEW 7: 两市成交额与量比多日走势 (Market Turnover) Styling
   ========================================================== */
.turnover-container {
  flex: 1;
  max-width: 1720px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.turnover-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #121722;
  border: 1px solid #212a3a;
  border-radius: 10px;
  padding: 12px 18px;
}

.turnover-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.turnover-icon {
  font-size: 24px;
}

.turnover-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.turnover-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #8b949e;
}

.turnover-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Metric Cards Grid */
.turnover-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.turnover-card {
  background: #111622;
  border: 1px solid #212a3c;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color 0.2s;
}

.turnover-card:hover {
  border-color: #388bfd;
}

.turnover-card-header {
  font-size: 12px;
  font-weight: 500;
  color: #8b949e;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.turnover-card-val {
  font-family: "SF Mono", Consolas, "PingFang SC", monospace;
  font-size: 26px;
  font-weight: 800;
  color: #f0f6fc;
  margin: 6px 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.turnover-card-val .unit {
  font-size: 13px;
  font-weight: 500;
  color: #8b949e;
}

.turnover-card-sub {
  font-size: 12px;
  color: #7d8590;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.turnover-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.turnover-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #8b949e;
  line-height: 1.4;
}

.breakdown-amt {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12px;
  color: #c9d1d9;
}

.breakdown-idx {
  font-size: 11px;
  color: #8b949e;
}

.metric-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-up {
  background: rgba(248, 81, 73, 0.16);
  color: #ff7875;
  border: 1px solid rgba(248, 81, 73, 0.32);
}

.badge-down {
  background: rgba(46, 160, 67, 0.16);
  color: #5cdbd3;
  border: 1px solid rgba(46, 160, 67, 0.32);
}

.badge-neutral {
  background: rgba(139, 148, 158, 0.16);
  color: #c9d1d9;
  border: 1px solid rgba(139, 148, 158, 0.32);
}

/* Breadth progress bar */
.breadth-bar-container {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: #21262d;
  margin-top: 8px;
  gap: 2px;
}

.breadth-seg-up {
  background: #f85149;
  transition: width 0.3s ease;
}

.breadth-seg-flat {
  background: #6e7681;
  transition: width 0.3s ease;
}

.breadth-seg-down {
  background: #2ea043;
  transition: width 0.3s ease;
}

/* Chart panels */
.turnover-chart-panel {
  background: #111622;
  border: 1px solid #212a3c;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.turnover-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.turnover-chart-title {
  font-size: 14px;
  font-weight: 700;
  color: #e6edf3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.turnover-chart-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.turnover-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.turnover-chart-box {
  width: 100%;
}
