﻿/* ==========================================================================
   鑲＄エ鍔╂墜 路 瑙嗚鏍峰紡
   椋庢牸: 绉戞妧鎰熸繁鑹茬幓鐠冩嫙鎬?+ 绾㈡定缁胯穼 + 鍔ㄦ晥
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-0: #0a0e1a;
  --bg-0-rgb: 10, 14, 26;
  --bg-1: #111827;
  --bg-1-rgb: 17, 24, 39;
  --bg-2: #1a2238;
  --bg-2-rgb: 26, 34, 56;
  --bg-3: #232d44;
  --bg-3-rgb: 35, 45, 68;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e5e7eb;
  --text-soft: #94a3b8;
  --text-dim: #64748b;
  --red: #ef4444;        /* A股 红涨 */
  --green: #10b981;      /* A股 绿跌 */
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --gold: #fbbf24;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glow: 0 0 24px rgba(56, 189, 248, 0.15);
}

/* === 主题覆盖 === */
[data-theme="light"] {
  --bg-0: #f5f7fa;
  --bg-0-rgb: 245, 247, 250;
  --bg-1: #ffffff;
  --bg-1-rgb: 255, 255, 255;
  --bg-2: #eef2f7;
  --bg-2-rgb: 238, 242, 247;
  --bg-3: #e4eaf2;
  --bg-3-rgb: 228, 234, 242;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text: #1f2937;
  --text-soft: #4b5563;
  --text-dim: #9ca3af;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --glow: 0 0 24px rgba(56, 189, 248, 0.10);
}

[data-theme="eye"] {
  --bg-0: #cce8cf;
  --bg-0-rgb: 204, 232, 207;
  --bg-1: #d8ecd9;
  --bg-1-rgb: 216, 236, 217;
  --bg-2: #e3efd9;
  --bg-2-rgb: 227, 239, 217;
  --bg-3: #d5e6c5;
  --bg-3-rgb: 213, 230, 197;
  --border: rgba(60, 90, 40, 0.12);
  --border-strong: rgba(60, 90, 40, 0.22);
  --text: #2e3b1f;
  --text-soft: #4b5b35;
  --text-dim: #7a8a5e;
  --shadow: 0 8px 32px rgba(60, 90, 40, 0.10);
  --glow: 0 0 24px rgba(120, 180, 80, 0.15);
}


html, body {
  background: var(--bg-0);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  min-height: 100vh;
  padding-bottom: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
input { font-family: inherit; }

/* ============== 顶栏 ============== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.brand {
  display: flex; align-items: baseline; gap: 8px;
}
.brand-icon {
  font-size: 22px;
}
.brand-name {
  font-size: 18px; font-weight: 600; letter-spacing: 0.5px;
  color: var(--text);
}
.brand-sub { font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }

.topbar-tools { display: flex; align-items: center; gap: 10px; }
.clock {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; color: var(--text-soft);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--border);
}
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: blink 1.6s ease-in-out infinite;
}
.status-dot.idle { background: var(--text-dim); box-shadow: none; animation: none; }

.icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px; height: 34px;
  border-radius: 8px;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.icon-btn:active { transform: translateY(0); }
/* 褰撳墠椤靛鑸寜閽珮浜?*/
.icon-btn.active {
  background: linear-gradient(135deg, rgba(56,189,248,0.32), rgba(129,140,248,0.28));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.icon-btn.active:hover { background: linear-gradient(135deg, rgba(56,189,248,0.42), rgba(129,140,248,0.38)); }

/* ============== 顶栏账号菜单 ============== */
.user-menu { position: relative; }
.user-menu-wrap { position: relative; }
.user-menu-button {
  min-height: 34px;
  max-width: 150px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  transition: all 0.2s;
}
.user-menu-button:hover,
.user-menu-wrap:focus-within .user-menu-button {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
}
.user-menu-icon { font-size: 15px; line-height: 1; }
.user-menu-avatar {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  flex: 0 0 24px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
}
.user-menu-text {
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-caret { color: var(--text-dim); font-size: 11px; }
.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 132px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--bg-2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}
.user-menu-wrap:hover .user-menu-dropdown,
.user-menu-wrap:focus-within .user-menu-dropdown { display: flex; flex-direction: column; }
.user-menu-dropdown a,
.user-menu-dropdown button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  text-decoration: none;
  font-size: 12px;
}
.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--text);
}
.user-menu-dropdown button { color: #f87171; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============== 资金总览 ============== */
.summary-card {
  margin: 20px 24px 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  box-shadow: var(--shadow);
}
.sum-item { padding: 0 8px; }
.sum-label { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.sum-value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.sum-divider { width: 1px; height: 32px; background: var(--border); }
.up { color: var(--red); }
.down { color: var(--green); }
.flat { color: var(--text-soft); }

/* ============== 大盘指数 ============== */
.index-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px;
  margin-bottom: 20px;
}
.index-row > .skeleton { min-width: 0; }
@media (max-width: 1280px) {
  .index-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .index-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.index-pill {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.index-pill:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.index-name { font-size: 12px; color: var(--text-soft); margin-bottom: 4px; }
.index-price { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.index-pct { font-size: 13px; font-variant-numeric: tabular-nums; margin-top: 4px; font-weight: 500; }
.skeleton {
  background: var(--bg-3);
  border-radius: var(--radius);
  height: 72px;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ============== 绔犺妭澶?============== */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 24px; margin-top: 8px;
}
.section-header h2 { font-size: 16px; font-weight: 600; color: var(--text); }
.section-actions { display: flex; gap: 8px; }

.primary-btn {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(56, 189, 248, 0.5); }
.primary-btn:active { transform: translateY(0); }

.ghost-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s;
}
.ghost-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--accent); }

/* ============== 鎸佷粨鍗＄墖 ============== */
.holdings-container {
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}
.holding-card {
  background: linear-gradient(180deg, rgba(var(--bg-3-rgb), 0.85), rgba(var(--bg-1-rgb), 0.95));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.holding-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(56, 189, 248, 0.1);
}
.holding-card.up::before,
.holding-card.down::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.holding-card.up::before { background: linear-gradient(180deg, var(--red), transparent); }
.holding-card.down::before { background: linear-gradient(180deg, var(--green), transparent); }

/* 鍗＄墖澶撮儴 */
.hc-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px;
}
.hc-name {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.hc-code { font-size: 11px; color: var(--text-dim); font-family: "SF Mono", monospace; }
.hc-cn { font-size: 16px; font-weight: 700; }
.hc-market-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(56, 189, 248, 0.15); color: var(--accent); }
.hc-price-block { text-align: right; }
.hc-price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hc-pct { font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 600; }

/* 鎸佷粨淇℃伅琛?*/
.hc-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}
.hc-meta-item { display: flex; flex-direction: column; }
.hc-meta-label { color: var(--text-dim); font-size: 10px; }
.hc-meta-val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hc-pnl { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* K绾垮尯鍩?*/
.hc-kline-wrap {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 8px;
  position: relative;
}
.hc-kline-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.hc-period-tabs { display: flex; gap: 4px; }
.period-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
  transition: all 0.15s;
}
.period-tab.active,
.period-tab:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.hc-kline-canvas-wrap {
  position: relative;
  width: 100%;
  height: 240px;
}
.hc-kline-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}
.hc-kline-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 12px;
}
.kline-hover-tip {
  position: absolute; pointer-events: none;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.6;
  display: none;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.kline-cross {
  position: absolute; pointer-events: none;
  width: 1px;
  background: rgba(56, 189, 248, 0.45);
  display: none;
  z-index: 5;
}
.hc-kline-canvas-wrap { height: 240px; }

/* 鎿嶄綔鎸夐挳 */
.hc-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 10px;
}
.hc-btn {
  flex: 1;
  min-width: 70px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 8px;
  font-size: 11px;
  border-radius: 6px;
  transition: all 0.15s;
}
.hc-btn:hover { background: rgba(56, 189, 248, 0.12); border-color: var(--accent); color: var(--accent); }
.hc-btn.ai { background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(56, 189, 248, 0.2)); border-color: var(--accent-2); }
.hc-btn.del:hover { background: rgba(239, 68, 68, 0.15); border-color: var(--red); color: var(--red); }

/* ============== 妯℃€佹 ============== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s;
}
.modal-card {
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  width: 90%; max-width: 480px;
  max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.25s;
}
.modal-card.wide { max-width: 760px; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
.modal-tabs {
  display: flex;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-soft);
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-pane { padding-top: 8px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ============== 琛ㄥ崟 ============== */
.modal-body label {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin: 10px 0 4px;
}
.modal-body input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.15s;
}
.modal-body input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1); }

.search-input { position: relative; }
.suggest-list {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 5;
  display: none;
  margin-top: 4px;
}
.suggest-list.show { display: block; }
.suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-size: 13px;
}
.suggest-item:hover { background: rgba(56, 189, 248, 0.1); }
.suggest-item:last-child { border-bottom: none; }
.suggest-code { color: var(--text-dim); font-family: monospace; }

.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 18px;
}

/* ============== 鍏徃浠嬬粛鍐呭 ============== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.info-cell {
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.info-cell-label { font-size: 11px; color: var(--text-dim); margin-bottom: 2px; }
.info-cell-val { font-size: 14px; font-weight: 600; color: var(--text); }

.section-title {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  margin: 14px 0 8px;
  padding-left: 8px;
  border-left: 3px solid var(--accent);
}
.desc-text {
  font-size: 13px; line-height: 1.7;
  color: var(--text-soft);
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 8px;
  white-space: pre-wrap;
}

/* 鑲′笢琛ㄦ牸 */
.holder-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.holder-table th,
.holder-table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.holder-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.25);
}
.holder-table tr:hover td { background: rgba(56, 189, 248, 0.05); }
.holder-rank {
  display: inline-block;
  width: 22px; height: 22px;
  text-align: center; line-height: 22px;
  background: var(--bg-3);
  border-radius: 4px;
  font-weight: 700;
}
.holder-rank.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #111; }
.holder-rank.r2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #111; }
.holder-rank.r3 { background: linear-gradient(135deg, #cd7c2f, #92400e); color: #fff; }
.holder-bar {
  position: relative; height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.holder-bar > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* AI 杈撳嚭 */
.ai-stream {
  font-size: 13px; line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.25);
  padding: 14px;
  border-radius: 8px;
  min-height: 100px;
}
.ai-stream::after {
  content: '▋';
  color: var(--accent);
  animation: blink 1s infinite;
}

/* ============== 鍔犺浇 / 绌?============== */
.loading-tip {
  text-align: center;
  padding: 32px;
  color: var(--text-dim);
  font-size: 13px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; margin-bottom: 16px; }

/* ============== 椤佃剼 ============== */
.app-footer {
  text-align: center;
  padding: 20px;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 30px;
}

/* ============== 鍔熻兘涓蹇?Feature Hub ============== */
.feature-hub {
  margin: 18px 24px 12px;
  background: linear-gradient(180deg, rgba(var(--bg-3-rgb), 0.6), rgba(var(--bg-1-rgb), 0.6));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 16px 16px;
  position: relative;
  overflow: hidden;
}
.feature-hub::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.10), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.10), transparent 40%);
  pointer-events: none;
}
.fh-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px; position: relative;
}
.fh-title { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }
.fh-sub { font-size: 11.5px; color: var(--text-dim); }
.fh-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  position: relative;
}
.fh-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  text-align: center;
  color: var(--text);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.fh-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), transparent 50%);
  opacity: 0; transition: opacity 0.2s;
}
.fh-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.18);
}
.fh-card:hover::before { opacity: 1; }
.fh-icon { font-size: 22px; line-height: 1; margin-bottom: 2px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.fh-name { font-size: 12px; font-weight: 600; }
.fh-desc { font-size: 10.5px; color: var(--text-dim); }
@media (max-width: 1280px) { .fh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .fh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .fh-card { padding: 10px 4px; } .fh-icon { font-size: 18px; } .fh-name { font-size: 11px; } }

/* ============== 鑲辨彃鐘舵€佹潯 ============== */
.status-bar {
  margin: 0 24px 16px;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px;
  background: rgba(var(--bg-2-rgb), 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
}
.status-block { display: flex; align-items: center; gap: 6px; }
.status-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
}
.status-pulse.live { background: #10b981; animation: statusPulse 2s infinite; }
.status-pulse.pre { background: #fbbf24; animation: statusPulse 2s infinite; }
.status-pulse.closed { background: #64748b; }
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.status-text { font-weight: 600; color: var(--text); }
.status-divider { width: 1px; height: 14px; background: var(--border); }
.status-meta-label { color: var(--text-dim); font-size: 11px; }
.status-meta-val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .status-bar { padding: 8px 12px; gap: 10px; flex-wrap: wrap; } }

/* ============== 鎸佷粨鎺掑簭涓嬫媺 ============== */
.sort-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s;
}
.sort-select:hover { border-color: var(--accent); }
.sort-select option { background: var(--bg-2); color: var(--text); }
@media (max-width: 600px) { .sort-select { display: none; } }

/* ============== 鍝嶅簲寮?============== */
@media (max-width: 768px) {
  .topbar { padding: 12px 16px; }
  .brand-sub { display: none; }
  .clock { display: none; }
  .user-menu-text { display: none; }
  .user-menu-button { width: 34px; padding: 0; }
  .user-menu-caret { display: none; }
  .summary-card {
    margin: 16px;
    grid-template-columns: 1fr 1fr;
    gap: 12px 0;
  }
  .sum-divider { display: none; }
  .holdings-container {
    padding: 0 16px;
    grid-template-columns: 1fr;
  }
  .index-row {
    padding: 0 16px;
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-card { width: 95%; }
  .info-grid { grid-template-columns: 1fr; }
}


/* ==========================================================================
   鎹㈡墜鎴愪氦閲忚鎯?+ 璇勮鍖?(v1) 
   杩藉姞浜庡師 css 鏈熬, 鑷姩缁ф壙璋冭壊鏉垮彉閲?
   ========================================================================== */
/* ---- 鎹㈡墜鎴愪氦閲忓崱鐗?---- */
.t-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}
.t-summary {
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(129,140,248,0.06));
}
.t-price-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.t-price { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.t-price.up, .t-change.up, .up { color: var(--red); }
.t-price.down, .t-change.down, .down { color: var(--green); }
.t-change { font-size: 16px; font-weight: 600; opacity: 0.92; }
.t-meta {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  color: var(--text-soft); font-size: 13px;
  border-top: 1px dashed var(--border); padding-top: 10px;
}
.t-meta b { color: var(--text); font-weight: 600; }
.t-meta b.up { color: var(--red); }
.t-meta b.down { color: var(--green); }
/* 鍏抽敭鎸囨爣缃戞牸 */
.t-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.t-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
  transition: transform 0.15s, border-color 0.2s;
}
.t-cell:hover { border-color: var(--border-strong); }
.t-cell-label { font-size: 12px; color: var(--text-dim); }
.t-cell-val { font-size: 15px; font-weight: 600; color: var(--text); }
.t-cell.hot {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.04));
}
.t-cell.hot .t-cell-val { color: #fca5a5; }
.t-cell.warm {
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(135deg, rgba(251,191,36,0.10), rgba(251,191,36,0.03));
}
.t-cell.warm .t-cell-val { color: var(--gold); }
.t-cell.cold {
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(56,189,248,0.02));
}
.t-cell.cold .t-cell-val { color: var(--accent); }
/* 閲忚兘姹囨€?*/
.t-stat-title { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 10px; letter-spacing: 0.02em; }
.t-stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.t-stat-row > div {
  background: rgba(255,255,255,0.03); border-radius: 8px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.t-stat-label { font-size: 11px; color: var(--text-dim); }
.t-stat-val { font-size: 14px; font-weight: 600; color: var(--text); }
.t-stat-val.up { color: var(--red); }
.t-stat-val.down { color: var(--green); }
/* 浜ゆ槗璇︽儏琛?*/
.t-table { overflow-x: auto; }
.t-tb {
  width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 520px;
}
.t-tb th, .t-tb td {
  padding: 7px 8px; text-align: right;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.t-tb th { color: var(--text-dim); font-weight: 500; font-size: 11.5px; }
.t-tb th:first-child, .t-tb td:first-child { text-align: left; color: var(--text-soft); }
.t-tb td.up { color: var(--red); font-weight: 500; }
.t-tb td.down { color: var(--green); font-weight: 500; }
.t-tb tbody tr:hover { background: rgba(255,255,255,0.03); }
/* 鏌辩姸鍥惧鍣?*/
.t-canvas-wrap {
  width: 100%; height: 160px; background: rgba(0,0,0,0.25); border-radius: 10px; padding: 4px;
}
.t-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
/* 瑙ｈ鎻愮ず */
.t-tip {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(56,189,248,0.08), transparent);
  font-size: 13px; color: var(--text-soft); line-height: 1.7;
}
.t-chart .t-stat-title { color: var(--accent-2); }
/* ==========================================================================
   璇勮鍖?
   ========================================================================== */
.comment-section {
  margin: 24px 0; padding: 0 16px;
}
.comment-section .section-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.comment-section .section-header h2 { font-size: 18px; font-weight: 600; }
.comment-section .section-actions { display: flex; align-items: center; gap: 10px; }
.comment-count {
  font-size: 12px; color: var(--text-dim); padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}
.comment-list {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 16px; max-height: 600px; overflow-y: auto;
  padding-right: 4px;
}
.comment-list::-webkit-scrollbar { width: 6px; }
.comment-list::-webkit-scrollbar-track { background: transparent; }
.comment-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
/* 鍗曟潯璇勮 */
.cmt {
  display: flex; gap: 12px; padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.15s;
}
.cmt:hover { border-color: var(--border-strong); }
.cmt-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 15px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}
.cmt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cmt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmt-name { font-size: 13px; font-weight: 600; color: var(--text); }
.cmt-time { font-size: 11.5px; color: var(--text-dim); }
.cmt-delete {
  margin-left: auto; padding: 2px 7px; border-radius: 6px;
  color: var(--text-dim); background: transparent;
  border: 1px solid var(--border); font: inherit; font-size: 11px;
  cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.cmt-delete:hover {
  color: #ef4444; border-color: rgba(239,68,68,0.5);
  background: rgba(239,68,68,0.08);
}
.cmt-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: rgba(56,189,248,0.12); color: var(--accent);
  border: 1px solid rgba(56,189,248,0.25);
}
.cmt-text {
  font-size: 14px; color: var(--text-soft); line-height: 1.65; white-space: pre-wrap; word-wrap: break-word;
}
.cmt-avatar-image { overflow: hidden; padding: 0; background: var(--bg-2); }
.cmt-avatar-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cmt-reply {
  margin-left: 34px; border-left: 2px solid rgba(56,189,248,0.2);
  background: rgba(56,189,248,0.035);
}
.cmt-reply-btn {
  padding: 2px 8px; border-radius: 6px; color: var(--accent);
  background: transparent; border: 1px solid rgba(56,189,248,0.25);
  font: inherit; font-size: 11px; transition: background 0.2s, border-color 0.2s;
}
.cmt-reply-btn:hover { background: rgba(56,189,248,0.1); border-color: var(--accent); }
.cmt-image {
  display: inline-block; max-width: min(100%, 520px); margin-top: 2px;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--bg-2); line-height: 0;
}
.cmt-image img { display: block; width: auto; max-width: 100%; max-height: 420px; object-fit: contain; }
.comment-media-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.secondary-btn {
  padding: 7px 12px; border-radius: 8px; color: var(--text-soft);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  font: inherit; font-size: 12px; transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.secondary-btn:hover:not(:disabled) { color: var(--accent); border-color: rgba(56,189,248,0.4); background: rgba(56,189,248,0.08); }
.secondary-btn:disabled, .primary-btn:disabled { cursor: not-allowed; opacity: 0.5; transform: none; box-shadow: none; }
.image-picker-btn { white-space: nowrap; }
.comment-image-preview {
  position: relative; width: fit-content; max-width: 100%; padding: 5px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2);
}
.comment-image-preview[hidden] { display: none !important; }
.comment-image-preview img { display: block; max-width: 260px; max-height: 180px; border-radius: 6px; object-fit: contain; }
.image-remove-btn {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: #ef4444; border: 2px solid var(--bg-1);
  border-radius: 50%; font-size: 13px; line-height: 1;
}
.reply-composer {
  margin-top: 12px; padding: 14px; border: 1px solid rgba(56,189,248,0.3);
  border-radius: 12px; background: rgba(56,189,248,0.06);
  display: flex; flex-direction: column; gap: 10px;
}
.reply-composer[hidden] { display: none !important; }
.reply-composer-head { display: flex; justify-content: space-between; align-items: center; color: var(--accent); font-size: 13px; }
.reply-close-btn { color: var(--text-dim); background: transparent; border: 0; font-size: 16px; padding: 2px 6px; }
.reply-close-btn:hover { color: var(--text); }
.reply-composer textarea {
  width: 100%; padding: 9px 12px; border-radius: 8px; resize: vertical;
  color: var(--text); background: rgba(0,0,0,0.22); border: 1px solid var(--border);
  font: inherit; font-size: 13.5px; line-height: 1.55;
}
.reply-composer textarea:focus { outline: none; border-color: var(--accent); }
.reply-composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
/* 璇勮缂栬緫鍣?*/
.comment-composer {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.comment-auth-status,
.comment-login-prompt {
  display: flex; align-items: center; gap: 10px; min-height: 34px;
}
.comment-auth-status[hidden],
.comment-login-prompt[hidden] { display: none !important; }
.comment-auth-label { font-size: 12px; color: var(--text-dim); }
.comment-author { font-size: 13px; color: var(--accent); }
.comment-login-prompt {
  padding: 8px 10px; border-radius: 8px;
  color: var(--text-soft); font-size: 13px;
  background: rgba(56,189,248,0.06); border: 1px solid rgba(56,189,248,0.18);
}
.comment-login-prompt > span { margin-right: auto; }
.auth-link {
  color: var(--accent); font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.auth-link:hover { text-decoration: underline; }
.comment-composer input, .comment-composer textarea {
  width: 100%; padding: 9px 12px; border-radius: 8px;
  background: rgba(0,0,0,0.25); border: 1px solid var(--border);
  color: var(--text); font-size: 13.5px;
  font-family: inherit; resize: vertical;
  transition: border-color 0.2s;
}
.comment-composer input:focus, .comment-composer textarea:focus {
  outline: none; border-color: var(--accent);
  background: rgba(56,189,248,0.05);
}
.comment-composer textarea:disabled {
  cursor: not-allowed; opacity: 0.55;
  background: rgba(0,0,0,0.16);
}
.comment-composer-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.comment-tip { font-size: 11.5px; color: var(--text-dim); }
/* 绌虹姸鎬?*/
.empty-state {
  padding: 36px 16px; text-align: center;
  color: var(--text-dim); background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border); border-radius: 12px;
}
.empty-state-icon { font-size: 38px; margin-bottom: 6px; opacity: 0.7; }
.empty-state-text { font-size: 13.5px; color: var(--text-soft); }
/* 个人中心 */
.account-page { width: min(100% - 28px, 960px); margin: 24px auto; display: flex; flex-direction: column; gap: 16px; }
.account-hero {
  display: flex; align-items: center; gap: 20px; padding: 22px;
  background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(129,140,248,0.06));
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.account-avatar-wrap { position: relative; flex: 0 0 auto; }
.account-avatar {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 34px; font-weight: 700; border: 3px solid rgba(255,255,255,0.14);
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-avatar-edit {
  position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  color: #fff; background: var(--accent); border: 3px solid var(--bg-1); font-size: 15px;
}
.account-info { min-width: 0; flex: 1; }
.account-info h1 { font-size: 22px; margin-bottom: 6px; }
.account-meta { color: var(--text-dim); font-size: 12px; }
.account-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.account-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.account-stat {
  padding: 16px; text-align: center; background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px;
}
.account-stat strong { display: block; color: var(--accent); font-size: 24px; margin-bottom: 3px; }
.account-stat span { color: var(--text-dim); font-size: 12px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.account-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.account-card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.account-card-head h2 { font-size: 15px; }
.account-card-head span { color: var(--text-dim); font-size: 12px; }
.account-content-list { display: flex; flex-direction: column; }
.account-content-item { display: flex; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.account-content-item:last-child { border-bottom: 0; }
.account-content-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--accent-2); font-weight: 600; }
.account-content-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-content-main { min-width: 0; flex: 1; }
.account-content-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.account-content-type { font-size: 10px; padding: 1px 6px; border-radius: 5px; color: var(--accent); background: rgba(56,189,248,0.1); }
.account-content-time { color: var(--text-dim); font-size: 11px; }
.account-content-text { color: var(--text-soft); font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.account-content-image { display: block; margin-top: 8px; max-width: 100%; max-height: 320px; border-radius: 9px; border: 1px solid var(--border); }
.account-holdings { display: flex; flex-direction: column; }
.account-holding { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.account-holding:last-child { border-bottom: 0; }
.account-holding-main { min-width: 0; }
.account-holding-name { color: var(--text); font-size: 13px; font-weight: 600; }
.account-holding-code { color: var(--accent); font-size: 11px; margin-top: 3px; }
.account-holding-amount { color: var(--text-soft); font-size: 12px; text-align: right; white-space: nowrap; }
.account-message { padding: 28px 16px; text-align: center; color: var(--text-dim); font-size: 13px; }
/* 鍝嶅簲寮?*/
@media (max-width: 768px) {
  .t-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-stat-row { grid-template-columns: repeat(2, 1fr); }
  .t-price { font-size: 30px; }
  .comment-section { padding: 0 14px; }
  .cmt { padding: 12px; }
  .cmt-avatar { width: 34px; height: 34px; font-size: 14px; }
  .cmt-reply { margin-left: 16px; }
  .comment-composer-actions, .reply-composer-actions { align-items: flex-start; flex-direction: column; }
  .comment-composer-actions > .primary-btn, .reply-composer-actions > .primary-btn { align-self: flex-end; }
  .account-page { width: min(100% - 20px, 960px); margin-top: 14px; }
  .account-hero { padding: 16px; gap: 14px; }
  .account-avatar { width: 76px; height: 76px; font-size: 27px; }
  .account-info h1 { font-size: 18px; }
  .account-stats { gap: 8px; }
  .account-stat { padding: 12px 6px; }
  .account-stat strong { font-size: 20px; }
  .account-grid { grid-template-columns: 1fr; }
}
