    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: -apple-system,'PingFang SC','Microsoft YaHei',sans-serif; background: #0d1117; color: #e6edf3; min-height: 100vh; display: flex; }
    .sidebar { width: 180px; background: #161b22; border-right: 1px solid #21262d; padding: 20px 0; flex-shrink: 0; }
    .sidebar-brand { text-align: center; padding: 0 12px 20px; border-bottom: 1px solid #21262d; }
    .sidebar-brand h1 { font-size: 18px; }
    .sidebar-brand small { color: #484f58; font-size: 11px; }
    .sidebar-item { display: flex; align-items: center; gap: 8px; padding: 10px 20px; cursor: pointer; color: #8b949e; font-size: 14px; border-left: 3px solid transparent; }
    .sidebar-item:hover { color: #e6edf3; background: #1c2128; }
    .sidebar-item.active { color: #fff; background: #1c2128; border-left-color: #58a6ff; }
    .sidebar-divider { border-top: 1px solid #21262d; margin: 12px 16px; }
    .main { flex: 1; min-width: 0; }
    .topbar { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: #161b22; border-bottom: 1px solid #21262d; }
    .era-tag { display: inline-block; padding: 4px 14px; border-radius: 20px; font-weight: 600; font-size: 14px; }
    .topbar-stats { display: flex; gap: 16px; font-size: 13px; color: #8b949e; margin-left: auto; }
    .content { overflow-y: auto; padding: 20px 24px; }
    .loading { text-align: center; padding: 80px; color: #484f58; font-size: 16px; }
    .era-imperial { background: linear-gradient(135deg,#f0b400,#d49a00); color: #000; }
    .era-castle { background: #2ea043; color: #fff; }
    .era-feudal { background: #d29922; color: #000; }
    .era-dark { background: #da3633; color: #fff; }
    .card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; margin-bottom: 16px; }
    .card-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #21262d; font-weight: 600; }
    .card-body { padding: 16px; }
    .params-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
    .param-item { background: #0d1117; border-radius: 8px; padding: 10px; text-align: center; }
    .param-item .label { color: #8b949e; font-size: 11px; }
    .param-item .value { font-size: 18px; font-weight: 600; margin-top: 2px; }
    .param-item .gold { color: #f0b400; }
    .scout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
    .scout-card { background: #0d1117; border: 1px solid #21262d; border-radius: 8px; padding: 12px; transition: 0.15s; }
    .scout-card:hover { border-color: #58a6ff; }
    .scout-card .row1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
    .scout-card .name { font-weight: 600; font-size: 15px; cursor: pointer; }
    .scout-card .name:hover { color: #58a6ff; }
    .scout-card .price { font-size: 18px; font-weight: 600; }
    .scout-card .cp { font-size: 13px; margin-left: 6px; }
    .scout-card .row2 { display: flex; gap: 8px; margin-top: 6px; font-size: 12px; color: #8b949e; flex-wrap: wrap; }
    .scout-card .row2 span { background: #12171f; padding: 2px 8px; border-radius: 4px; }
    .up { color: #f85149; }
    .down { color: #3fb950; }
    .modal-overlay { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.7); align-items: center; justify-content: center; }
    .modal-overlay.show { display: flex; }
    .modal { background: #161b22; border: 1px solid #30363d; border-radius: 12px; width: 90%; max-width: 700px; max-height: 85vh; display: flex; flex-direction: column; }
    .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #21262d; }
    .modal-header h2 { font-size: 18px; }
    .modal-close { background: none; border: none; color: #8b949e; font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
    .modal-close:hover { background: #21262d; color: #fff; }
    .modal-body { flex: 1; overflow-y: auto; padding: 20px; }
    .chart-wrapper canvas { width: 100%; height: 160px; display: block; background: #0d1117; border: 1px solid #21262d; border-radius: 6px; }
    .chart-macd { height: 100px; }
    .modal-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
    .modal-stats .item { background: #0d1117; border-radius: 6px; padding: 8px; text-align: center; }
    .modal-stats .item .l { font-size: 11px; color: #8b949e; }
    .modal-stats .item .v { font-size: 14px; font-weight: 600; margin-top: 2px; }
    .login-overlay { position: fixed; inset: 0; z-index: 9999; background: #0d1117; display: flex; align-items: center; justify-content: center; }
    .login-overlay.hidden { display: none; }
    .login-box { max-width: 320px; width: 90%; text-align: center; }
    .login-box h1 { font-size: 32px; }
    .login-box p { color: #8b949e; margin: 8px 0 20px; font-size: 14px; }
    .login-box input { width: 100%; padding: 10px 14px; background: #0d1117; border: 1px solid #30363d; border-radius: 8px; color: #e6edf3; font-size: 16px; outline: none; }
    .login-box input:focus { border-color: #58a6ff; }
    .login-box button { width: 100%; padding: 10px; background: #238636; border: none; border-radius: 8px; color: #fff; font-size: 16px; cursor: pointer; margin-top: 8px; }
    .login-box button:hover { background: #2ea043; }
    .signal-item { padding: 8px 12px; border-bottom: 1px solid #21262d; font-size: 13px; }
    .filter-bar { display: flex; gap: 8px; padding: 10px 16px; flex-wrap: wrap; align-items: center; }
    .filter-bar input { flex: 1; min-width: 120px; background: #0d1117; border: 1px solid #30363d; border-radius: 6px; color: #e6edf3; padding: 6px 10px; font-size: 13px; }
    .filter-bar button { background: #21262d; border: 1px solid #30363d; border-radius: 6px; color: #e6edf3; padding: 6px 12px; cursor: pointer; font-size: 13px; }
    .filter-bar .count { margin-left: auto; color: #8b949e; font-size: 12px; }
    @media (max-width: 768px) { .sidebar { width: 48px; } .sidebar-brand h1, .sidebar-brand small { display: none; } .sidebar-item span { display: none; } .sidebar-item { justify-content: center; padding: 12px; } .scout-grid { grid-template-columns: 1fr; } }
.bt-4col{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:16px}
.bt-3col{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}
.bt-cell{background:#0d1117;border-radius:8px;padding:12px;text-align:center}
.bt-lbl{color:#8b949e;font-size:11px}
.bt-val{font-size:20px;font-weight:600}
.val-pos{color:#3fb950}
.val-neg{color:#f85149}
.val-neu{color:#d29922}
  /* 策略挖掘卡片 */
.strategy-summary { background: #1a1a2e; padding: 12px 16px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; line-height: 1.7; }
.strategy-summary pre { margin: 0; white-space: pre-wrap; }
.rules-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rule-card { background: #16213e; padding: 12px; border-radius: 8px; border-left: 4px solid #555; }
.rule-card.rule-good { border-left-color: #2ea043; }
.rule-card.rule-bad { border-left-color: #da3633; }
.rule-card.rule-neutral { border-left-color: #888; }
.rule-header { font-size: 15px; margin-bottom: 4px; }
.rule-header strong { margin-right: 8px; }
.rule-cond { font-size: 12px; color: #8b949e; margin-bottom: 2px; font-family: monospace; }
.rule-desc { font-size: 13px; color: #c9d1d9; margin-bottom: 6px; }
.rule-stocks { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.stock-tag { background: #0d1117; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.stock-tag.up { color: #f85149; }
.stock-tag.down { color: #58a6ff; }
.factor-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.factor-table th { background: #0d1117; padding: 6px 8px; text-align: left; border-bottom: 1px solid #30363d; position: sticky; top: 0; }
.factor-table td { padding: 4px 8px; border-bottom: 1px solid #21262d; }
.factor-table .up { color: #f85149; font-weight: bold; }
.factor-table .down { color: #58a6ff; font-weight: bold; }
.era-badge { background: #238636; color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
</style>
