﻿*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:#0f1117;color:#e1e4e8;min-height:100vh;padding-bottom:70px}

/* ===== Header ===== */
.header{background:linear-gradient(135deg,#1a1f35,#2d1f3d);padding:12px 16px;border-bottom:1px solid #2d333b}
.header h1{font-size:18px;font-weight:700;background:linear-gradient(90deg,#58a6ff,#bc8cff);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.header .sub{font-size:10px;color:#8b949e;margin-top:1px;line-height:1.3}
.header-link{font-size:11px;color:#58a6ff;text-decoration:none;padding:3px 10px;border:1px solid #1f6feb;border-radius:6px}
.header-link:hover{background:#1b2b34}
.container{max-width:800px;margin:0 auto;padding:12px}

/* ===== Date Banner ===== */
.date-banner{background:linear-gradient(135deg,#1a1f35,#0d1f2d);border:2px solid #1f6feb;border-radius:12px;padding:14px 16px;margin-bottom:10px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.date-big{font-size:42px;font-weight:900;color:#58a6ff;line-height:1}
.date-info{flex:1;min-width:120px}
.date-info #date-status{font-size:14px;font-weight:700;color:#c9d1d9}
.date-subtitle{font-size:11px;color:#8b949e;margin-top:2px}
.countdown{background:#0d2b1a;border:1px solid #2ea043;border-radius:10px;padding:10px 16px;text-align:center;min-width:70px}
.countdown-num{font-size:28px;font-weight:900;color:#3fb950;line-height:1}
.countdown-label{font-size:10px;color:#3fb950;margin-top:1px}

/* ===== Strategy bar ===== */
.strategy-bar{display:flex;align-items:center;gap:6px;margin-bottom:10px;font-size:11px;color:#8b949e;flex-wrap:wrap}
.strat-tag{background:#1f6feb;color:#fff;padding:2px 8px;border-radius:10px;font-size:10px;font-weight:600;white-space:nowrap}
.strat-detail{font-size:10px;color:#8b949e}

/* ===== Main signal ===== */
.signal-main{margin-bottom:12px}
.buy-cards{display:flex;flex-wrap:nowrap;gap:8px;margin-bottom:10px;overflow-x:auto}
.buy-card{flex:1 1 0;min-width:80px;max-width:200px;background:linear-gradient(135deg,#1b3a2a,#0d2b1a);border:2px solid #2ea043;border-radius:12px;padding:12px 8px;text-align:center;position:relative;overflow:hidden}
.buy-card::before{content:'';position:absolute;top:-18px;right:-18px;width:50px;height:50px;background:#2ea043;opacity:0.1;border-radius:50%}
.buy-card .buy-emoji{font-size:30px;margin-bottom:4px}
.buy-card .buy-name{font-size:14px;font-weight:700;color:#3fb950;margin-bottom:2px}
.buy-card .buy-code{font-size:12px;color:#58a6ff;font-weight:600;margin-bottom:4px}
.buy-card .buy-weight{font-size:24px;font-weight:900;color:#3fb950;margin-bottom:1px}
.buy-card .buy-weight-label{font-size:10px;color:#8b949e}
.buy-card .buy-price{font-size:11px;color:#8b949e;margin-top:4px}
.buy-card .buy-momentum{font-size:12px;color:#d29922;margin-top:3px;font-weight:600}

.bond-reminder{background:#1b2b34;border:1px solid #30363d;border-radius:10px;padding:12px 14px;text-align:center}
.bond-reminder .reminder-icon{font-size:16px;margin-bottom:2px}
.bond-reminder .reminder-text{font-size:11px;color:#8b949e}
.bond-reminder .reminder-highlight{color:#58a6ff;font-weight:600}

.signal-big{text-align:center;padding:12px;border-radius:10px;margin-bottom:10px;font-size:13px;font-weight:700}
.signal-big.buy{background:#1b3a2a;border:1px solid #2ea043;color:#3fb950}
.signal-big.hold{background:#2a1b1b;border:1px solid #f85149;color:#f85149}
.signal-big.warn{background:#2a2e1b;border:1px solid #bb8009;color:#d29922}

/* ===== Action bar ===== */
.action-bar{background:#0d1117;border:1px solid #21262d;border-radius:10px;padding:12px;margin-bottom:10px}
.action-bar h4{font-size:12px;color:#58a6ff;margin-bottom:8px}
.action-steps{display:flex;gap:8px;flex-wrap:wrap}
.action-step{flex:1;min-width:100px;background:#161b22;border:1px solid #30363d;border-radius:8px;padding:10px;text-align:center}
.action-step .step-num{display:inline-block;width:22px;height:22px;background:#1f6feb;color:#fff;border-radius:50%;font-size:11px;font-weight:700;line-height:22px;margin-bottom:4px}
.action-step .step-text{font-size:11px;color:#c9d1d9;font-weight:500;line-height:1.3}
.action-step .step-sub{font-size:9px;color:#8b949e;margin-top:2px}

/* ===== Detail section ===== */
.detail-section{margin-bottom:10px}
.detail-summary{font-size:11px;color:#8b949e;cursor:pointer;padding:6px 0;user-select:none}
.detail-summary:hover{color:#c9d1d9}

/* ===== Asset list ===== */
.asset-list{display:flex;flex-direction:column;gap:3px;margin-top:6px}
.asset-row{display:flex;align-items:center;padding:7px 10px;border-radius:8px;background:#0d1117;border:1px solid #21262d;font-size:11px;gap:8px;flex-wrap:nowrap}
.asset-row.selected{background:#1b2b34;border-color:#1f6feb}
.asset-row .rank{width:20px;font-size:11px;color:#8b949e;text-align:center;flex-shrink:0;font-weight:500}
.asset-row .asset-name{width:85px;flex-shrink:0;font-weight:600;font-size:12px;color:#e1e4e8}
.asset-row .asset-code{width:50px;flex-shrink:0;font-size:10px;color:#8b949e;font-family:monospace}
.asset-cat{width:55px;flex-shrink:0;font-size:9px;color:#8b949e;text-align:center}
.asset-row .asset-metrics{display:flex;gap:6px;flex-shrink:0;justify-content:flex-end}
.asset-row .am-item{text-align:center;width:50px;flex-shrink:0}
.asset-row .am-val{font-weight:700;font-size:11px}
.asset-row .am-lbl{font-size:8px;color:#8b949e;margin-top:1px}
.metric-up{color:#3fb950}.metric-down{color:#f85149}.metric-neutral{color:#8b949e}
.badge-pass{font-size:9px;padding:2px 7px;border-radius:10px;background:#1b3a2a;color:#3fb950;font-weight:700;white-space:nowrap;flex-shrink:0;text-align:center;min-width:36px}
.badge-fail{font-size:9px;padding:2px 7px;border-radius:10px;background:#3a1b1b;color:#f85149;font-weight:700;white-space:nowrap;flex-shrink:0;text-align:center;min-width:36px}

/* ===== Cards ===== */
.card{background:#161b22;border:1px solid #30363d;border-radius:10px;padding:14px;margin-bottom:12px}
.card-title{font-size:13px;font-weight:600;color:#c9d1d9;margin-bottom:10px}

/* ===== Tabs ===== */
.tabs{display:flex;gap:2px;margin-bottom:10px;background:#0d1117;border-radius:8px;padding:2px;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}
.tab{padding:7px 10px;border-radius:6px;font-size:10px;font-weight:500;cursor:pointer;color:#8b949e;transition:all 0.2s;border:none;background:none;white-space:nowrap;flex-shrink:0;text-align:center;min-width:52px}
.tab.active{background:#1f6feb;color:#fff}
.tab-content{display:none}
.tab-content.active{display:block}

/* ===== Metrics grid ===== */
.metrics-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
.metric-card{background:#0d1117;border-radius:8px;padding:10px;text-align:center;border:1px solid #21262d}
.metric-card .mval{font-size:18px;font-weight:700;margin-bottom:2px}
.metric-card .mlbl{font-size:9px;color:#8b949e}
.metric-card.positive .mval{color:#3fb950}
.metric-card.warning .mval{color:#d29922}

/* ===== Chart ===== */
.chart-container{height:240px;margin:12px 0}

/* ===== Yearly table ===== */
.ytable{width:100%;border-collapse:collapse;font-size:11px}
.ytable th{text-align:left;padding:6px 8px;color:#8b949e;font-weight:500;border-bottom:1px solid #21262d}
.ytable td{padding:6px 8px;border-bottom:1px solid #0d1117}
.yr-up{color:#3fb950}.yr-down{color:#f85149}
.yr-bar{display:inline-block;height:6px;border-radius:3px;margin-left:6px;vertical-align:middle}

/* ===== History ===== */
.history-table{width:100%;border-collapse:collapse;font-size:10px;margin-top:6px}
.history-table th{text-align:left;padding:5px 8px;color:#8b949e;font-weight:500;border-bottom:2px solid #21262d;background:#0d1117;position:sticky;top:0;white-space:nowrap}
.history-table td{padding:5px 8px;border-bottom:1px solid #0d1117}
.history-table tr:hover{background:#1b2b34}
.history-table .ret-up{color:#3fb950;font-weight:600}
.history-table .ret-down{color:#f85149;font-weight:600}
.history-scroll{max-height:450px;overflow-y:auto;border:1px solid #21262d;border-radius:8px;overflow-x:auto}

/* ===== Summary cards ===== */
.summary-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}
.summary-card{background:#0d1117;border:1px solid #21262d;border-radius:8px;padding:10px;text-align:center}
.summary-card .sval{font-size:15px;font-weight:700;margin-bottom:2px}
.summary-card .slbl{font-size:9px;color:#8b949e}

/* ===== Perf compare ===== */
.perf-compare{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.perf-compare .strat-pick{background:#0d1117;border:1px solid #21262d;border-radius:10px;padding:12px;text-align:center;cursor:pointer;transition:all 0.2s}
.perf-compare .strat-pick.active{border-color:#1f6feb;background:#1b2b34}
.perf-compare .strat-pick:hover{border-color:#58a6ff}
.perf-compare .sname{font-size:12px;font-weight:600;color:#c9d1d9;margin-bottom:4px}
.perf-compare .smetrics{font-size:10px;color:#8b949e;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.perf-compare .smetrics span{color:#3fb950;font-weight:600}

/* ===== Calendar ===== */
.calendar-list{display:flex;flex-direction:column;gap:6px}
.cal-item{display:flex;align-items:center;padding:8px 12px;background:#0d1117;border-radius:8px;border:1px solid #21262d;font-size:11px}
.cal-item.current{background:#1b2b34;border-color:#1f6feb}
.cal-date{font-size:16px;font-weight:700;width:42px;text-align:center}
.cal-date .day{font-size:9px;color:#8b949e}
.cal-info{flex:1;margin-left:10px}
.cal-info .month{font-weight:500}
.cal-info .wd{font-size:10px;color:#8b949e}
.cal-badge{font-size:9px;padding:2px 6px;border-radius:10px;background:#1f6feb;color:#fff}
.ret-up{color:#3fb950}.ret-down{color:#f85149}

/* ===== Loading ===== */
.loading{text-align:center;padding:30px;color:#8b949e}
.spinner{display:inline-block;width:18px;height:18px;border:2px solid #30363d;border-top-color:#58a6ff;border-radius:50%;animation:spin 0.8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== Bottom bar ===== */
.footer{position:fixed;bottom:0;left:0;right:0;background:#0d1117;border-top:2px solid #21262d;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;z-index:50;flex-wrap:wrap}
.footer .next-date{color:#58a6ff;font-weight:700;font-size:13px}
.footer .next-holdings{color:#3fb950;font-weight:600;font-size:11px}
.footer .footer-hint{color:#8b949e;font-size:10px}

/* ===== Strategy selector in header ===== */
#strategy-select-desk{background:#1b2b34;border:1px solid #1f6feb;color:#58a6ff;font-weight:600;padding:5px 8px;border-radius:6px;font-size:11px;cursor:pointer;max-width:160px}

/* ===== About page embedded styles ===== */
#about-content h2{font-size:18px;font-weight:700;color:#58a6ff;margin:24px 0 12px;padding-bottom:6px;border-bottom:2px solid #1f6feb}
#about-content h3{font-size:15px;font-weight:600;color:#c9d1d9;margin:16px 0 8px}
#about-content p{font-size:14px;color:#c9d1d9;line-height:1.8;margin:8px 0}
#about-content .highlight{background:#1b2b34;border-left:3px solid #58a6ff;padding:12px 16px;border-radius:4px;margin:12px 0;font-size:13px;line-height:1.6}
#about-content .highlight-red{background:#2a1b1b;border-left:3px solid #f85149;padding:12px 16px;border-radius:4px;margin:12px 0;font-size:13px;line-height:1.6}
#about-content .highlight-green{background:#1b3a2a;border-left:3px solid #3fb950;padding:12px 16px;border-radius:4px;margin:12px 0;font-size:13px;line-height:1.6}
#about-content .highlight-amber{background:#2a2e1b;border-left:3px solid #d29922;padding:12px 16px;border-radius:4px;margin:12px 0;font-size:13px;line-height:1.6}
#about-content table{width:100%;border-collapse:collapse;margin:12px 0;font-size:13px}
#about-content th{background:#0d1117;text-align:left;padding:10px 14px;color:#8b949e;font-weight:600;border-bottom:2px solid #21262d;font-size:12px}
#about-content td{padding:10px 14px;border-bottom:1px solid #0d1117;color:#c9d1d9;font-size:13px}
#about-content tr:hover{background:#1b2b34}
#about-content .num-up{color:#3fb950;font-weight:600}
#about-content .num-down{color:#f85149;font-weight:600}
#about-content .num-bold{color:#58a6ff;font-weight:700}
#about-content .num-amber{color:#d29922;font-weight:600}
#about-content .gradient-bar{height:3px;background:linear-gradient(90deg,#58a6ff,#3fb950,#bc8cff);border-radius:2px;margin:8px 0 16px}
#about-content .footer-note{text-align:center;color:#484f58;font-size:11px;margin-top:32px;padding-top:16px;border-top:1px solid #21262d;line-height:1.8}
#about-content strong{color:#e1e4e8}
#about-content em{color:#8b949e;font-style:italic}
/* ===== Mobile responsive ===== */
@media (max-width:480px) {
  .header{padding:10px 12px}
  .header h1{font-size:16px}
  .container{padding:8px}
  
  .date-banner{padding:10px 12px;gap:10px;border-radius:10px}
  .date-big{font-size:32px}
  .date-info #date-status{font-size:12px}
  .date-subtitle{font-size:10px}
  .countdown{padding:8px 12px;min-width:60px}
  .countdown-num{font-size:24px}
  .countdown-label{font-size:9px}
  
  .buy-cards{flex-wrap:wrap}
  .buy-card{padding:14px}
  .buy-card .buy-emoji{font-size:26px}
  .buy-card .buy-name{font-size:13px}
  .buy-card .buy-weight{font-size:22px}
  
  .action-steps{flex-direction:column;gap:6px}
  .action-step{min-width:auto}
  
  .summary-cards{grid-template-columns:repeat(2,1fr)}
  .metrics-grid{grid-template-columns:repeat(2,1fr)}
  
  .perf-compare{grid-template-columns:1fr}
  
  .tabs{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tab{padding:5px 10px;font-size:10px}
  
  .history-scroll{max-height:350px}
  .history-table{font-size:9px}
  .history-table th,.history-table td{padding:4px 5px}
  
  .card{padding:10px}
  .card-title{font-size:12px}
  
  .chart-container{height:200px}
  
  .footer{padding:8px 10px;font-size:10px;gap:6px}
  .footer .next-date{font-size:11px}
  .footer .next-holdings{font-size:10px}
  
  .asset-row{padding:5px 6px;gap:3px;flex-wrap:wrap;font-size:10px}
  .asset-row .rank{width:16px;font-size:9px}
  .asset-row .asset-name{width:auto;flex:1;font-size:10px;min-width:50px}
  .asset-row .asset-code{width:auto;font-size:8px}
  .asset-cat{display:none}
  .asset-row .am-item{width:40px}
  .asset-row .am-val{font-size:9px}
  .asset-row .am-lbl{font-size:7px}
  .badge-pass,.badge-fail{font-size:7px;padding:1px 4px;min-width:28px}
  .asset-row .asset-name{font-size:10px;min-width:40px}
  .asset-row .am-val{font-size:9px}
  .cal-date{font-size:14px}
  .cal-item{font-size:10px}
  #about-content h2{font-size:15px;margin:16px 0 8px}
  #about-content h3{font-size:13px}
  #about-content p{font-size:12px}
  #about-content table{font-size:10px}
  #about-content th{font-size:10px;padding:6px 7px}
  #about-content td{font-size:10px;padding:6px 7px}
  #about-content .highlight{font-size:11px;padding:8px 10px}
  #about-content .highlight-red{font-size:11px;padding:8px 10px}
  #about-content .highlight-green{font-size:11px;padding:8px 10px}
  #about-content .highlight-amber{font-size:11px;padding:8px 10px}
  .perf-compare{grid-template-columns:1fr}
  .summary-cards{grid-template-columns:repeat(2,1fr)}
  .metrics-grid{grid-template-columns:repeat(2,1fr)}
  .action-steps{flex-direction:column;gap:6px}
  .action-step{min-width:auto}
  .tabs{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tab{padding:5px 8px;font-size:9px;min-width:44px}
  .history-scroll{max-height:350px}
  .history-table{font-size:9px}
  .history-table th,.history-table td{padding:4px 5px}
  .card{padding:10px}
  .card-title{font-size:12px}
  .chart-container{height:200px}
  .footer{padding:8px 10px;font-size:10px;gap:6px}
  .footer .next-date{font-size:11px}
  .footer .next-holdings{font-size:10px}
  .header{padding:10px 12px}
  .header h1{font-size:16px}
  .container{padding:8px}
  .date-banner{padding:10px 12px;gap:10px;border-radius:10px}
  .date-big{font-size:32px}
  .date-info #date-status{font-size:12px}
  .date-subtitle{font-size:10px}
  .countdown{padding:8px 12px;min-width:60px}
  .countdown-num{font-size:24px}
  .countdown-label{font-size:9px}
  .buy-cards{flex-wrap:wrap}
  .buy-card{padding:14px}
  .buy-card .buy-emoji{font-size:26px}
  .buy-card .buy-name{font-size:13px}
  .buy-card .buy-weight{font-size:22px}
  .asset-row .rank{width:16px;font-size:9px}
  .asset-row .asset-name{width:auto;flex:1;font-size:10px;min-width:50px}
  .asset-row .asset-code{width:auto;font-size:8px}
  .asset-cat{display:none}
  .asset-row .am-item{width:40px}
  .asset-row .am-val{font-size:9px}
  .asset-row .am-lbl{font-size:7px}
  .badge-pass,.badge-fail{font-size:7px;padding:1px 4px;min-width:28px}
  .asset-row .asset-name{font-size:10px;min-width:50px}
  .asset-row .am-val{font-size:9px}
  .asset-row .am-item{min-width:32px}
}

@media (min-width:481px) and (max-width:768px) {
  .container{max-width:100%}
  .buy-cards{grid-template-columns:repeat(2,1fr)}
}