/* ═══════════════════════════════════════════════
   AI Know Theme v3 · Design System
   ═══════════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  /* Backgrounds */
  --bg: #0a0a0a;
  --bg-card: #111118;
  --bg-card-hover: #1a1a24;
  --bg-soft: rgba(255,255,255,0.03);
  --bg-nav: rgba(10,10,10,0.92);
  --bg-analysis: linear-gradient(135deg,rgba(59,130,246,0.08),rgba(139,92,246,0.04));
  --bg-section: rgba(255,255,255,0.02);

  /* Text */
  --text: #e4e4e7;
  --text-muted: #8a8a90;
  --text-soft: #71717a;
  --text-faint: #52525b;

  /* Borders */
  --border: rgba(255,255,255,0.06);
  --border-soft: rgba(255,255,255,0.03);
  --border-hover: rgba(255,255,255,0.12);

  /* Accent */
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;
  --accent-gradient: linear-gradient(135deg,#3b82f6,#8b5cf6);

  /* Misc */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --line-color: rgba(255,255,255,0.04);
  --tag-bg: rgba(59,130,246,0.1);
  --tag-text: #60a5fa;
}

/* ── Light Theme (manual toggle) ── */
[data-theme="light"] {
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f1f3;
  --bg-soft: rgba(0,0,0,0.02);
  --bg-nav: rgba(255,255,255,0.95);
  --bg-analysis: linear-gradient(135deg,rgba(59,130,246,0.04),rgba(139,92,246,0.02));
  --bg-section: rgba(0,0,0,0.015);
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-soft: #6b7280;
  --text-faint: #9ca3af;
  --border: rgba(0,0,0,0.08);
  --border-soft: rgba(0,0,0,0.04);
  --border-hover: rgba(0,0,0,0.15);
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-purple: #7c3aed;
  --line-color: rgba(0,0,0,0.06);
  --tag-bg: rgba(37,99,235,0.08);
  --tag-text: #2563eb;
}

/* ── Light Theme (system preference, no manual override) ── */
@media (prefers-color-scheme: light) {
:root:not([data-theme="dark"]):not([data-theme="light"]) {
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f1f3;
  --bg-soft: rgba(0,0,0,0.02);
  --bg-nav: rgba(255,255,255,0.95);
  --bg-analysis: linear-gradient(135deg,rgba(59,130,246,0.04),rgba(139,92,246,0.02));
  --bg-section: rgba(0,0,0,0.015);
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-soft: #6b7280;
  --text-faint: #9ca3af;
  --border: rgba(0,0,0,0.08);
  --border-soft: rgba(0,0,0,0.04);
  --border-hover: rgba(0,0,0,0.15);
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-purple: #7c3aed;
  --line-color: rgba(0,0,0,0.06);
  --tag-bg: rgba(37,99,235,0.08);
  --tag-text: #2563eb;
}
}

/* ── Reset & Base ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);color:var(--text);
  font-family:-apple-system,'PingFang SC','Noto Sans SC','Microsoft YaHei',sans-serif;
  line-height:1.7;min-height:100vh
}
a{text-decoration:none;color:inherit}
img{max-width:100%;height:auto}

/* ── Typography ── */
.gradient-text{
  background:linear-gradient(135deg,var(--accent) 0%,var(--accent-purple) 50%,#34d399 100%);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text
}

/* ── Container ── */
.container{max-width:900px;margin:0 auto;padding:0 24px}

/* ==============================
   NAVIGATION
   ============================== */
nav{
  display:flex;align-items:center;height:56px;padding:0 24px;
  border-bottom:1px solid var(--border);
  position:sticky;top:0;z-index:100;
  background:var(--bg-nav);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)
}
.nav-inner{
  display:flex;align-items:center;width:100%;max-width:900px;margin:0 auto;gap:8px
}
.nav-logo{
  display:flex;align-items:center;gap:8px;
  font-weight:800;font-size:15px;white-space:nowrap;flex-shrink:0;color:var(--text)
}
.nav-logo img{width:26px;height:26px;border-radius:6px}
.nav-logo span{
  background:var(--accent-gradient);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text
}
.nav-links{
  display:flex;align-items:center;justify-content:center;gap:2px;
  flex:1;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none
}
.nav-links::-webkit-scrollbar{display:none}
.nav-link{
  padding:6px 12px;border-radius:8px;font-size:13px;
  color:var(--text-muted);white-space:nowrap;transition:all .15s;font-weight:500
}
.nav-link:hover,.nav-link.active{color:var(--text);background:var(--bg-soft)}
.nav-link.active{color:var(--accent);background:rgba(59,130,246,0.1)}
.nav-cta{
  margin-left:auto;padding:7px 16px;border-radius:8px;
  font-size:12px;font-weight:600;background:var(--accent);
  color:#fff;white-space:nowrap;transition:opacity .15s;flex-shrink:0
}
.nav-cta:hover{opacity:.85}
.theme-toggle{
  width:28px;height:28px;border-radius:6px;flex-shrink:0;
  border:1px solid var(--border);background:transparent;
  color:var(--text-muted);cursor:pointer;font-size:14px;
  display:flex;align-items:center;justify-content:center;transition:all .2s
}
.theme-toggle:hover{background:var(--bg-soft);color:var(--text)}

/* ==============================
   HERO
   ============================== */
.hero{
  text-align:center;padding:72px 24px 52px;position:relative;overflow:hidden
}
.hero-glow{
  position:absolute;top:-120px;left:50%;transform:translateX(-50%);
  width:700px;height:400px;
  background:radial-gradient(ellipse at center,rgba(59,130,246,0.08) 0%,transparent 70%);
  pointer-events:none
}
.hero-badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 14px;border-radius:20px;
  border:1px solid rgba(59,130,246,0.22);
  background:var(--tag-bg);font-size:12px;
  color:var(--accent-light);margin-bottom:20px;font-weight:600
}
.hero-badge-dot{
  width:6px;height:6px;border-radius:50%;
  background:#22c55e;display:inline-block;
  animation:pulse 2s ease-in-out infinite
}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
.hero h1{
  font-size:clamp(28px,4.5vw,48px);font-weight:800;
  letter-spacing:-1.5px;line-height:1.12;margin-bottom:16px;color:var(--text)
}
.hero-desc{
  font-size:15px;color:var(--text-muted);
  max-width:520px;margin:0 auto 28px;line-height:1.7
}
.hero-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}

/* ==============================
   BUTTONS
   ============================== */
.btn-primary,.btn-secondary{
  display:inline-flex;align-items:center;gap:6px;
  padding:11px 22px;border-radius:9px;font-size:14px;font-weight:600;
  transition:all .2s;cursor:pointer
}
.btn-primary{
  background:var(--accent);color:#fff;
  box-shadow:0 0 16px rgba(59,130,246,.2)
}
.btn-primary:hover{
  background:#2563eb;transform:translateY(-1px);
  box-shadow:0 0 24px rgba(59,130,246,.35)
}
.btn-secondary{
  border:1px solid var(--border);background:var(--bg-soft);color:var(--text-muted)
}
.btn-secondary:hover{
  border-color:var(--border-hover);color:var(--text);transform:translateY(-1px)
}

/* ==============================
   STATS ROW
   ============================== */
.stats-row{
  display:flex;gap:36px;justify-content:center;
  margin-top:40px;padding-top:24px;border-top:1px solid var(--border)
}
.stat-item{text-align:center}
.stat-item strong{
  display:block;font-size:21px;font-weight:800;color:var(--text);letter-spacing:-.4px
}
.stat-item span{font-size:12px;color:var(--text-muted)}

/* ==============================
   SECTIONS
   ============================== */
.section{padding:44px 0}
.section+.section{border-top:1px solid var(--border)}
.section-header{
  display:flex;align-items:baseline;justify-content:space-between;margin-bottom:20px
}
.section-badge{
  display:inline-block;font-size:10px;font-weight:700;letter-spacing:1.2px;
  text-transform:uppercase;color:var(--accent);margin-bottom:4px
}
.section-title{
  font-size:20px;font-weight:700;color:var(--text);letter-spacing:-.3px
}
.section-sub{
  font-size:13px;color:var(--text-muted);margin-top:2px
}
.section-more{
  font-size:12px;color:var(--text-muted);display:flex;align-items:center;gap:4px;
  padding:6px 12px;border-radius:6px;border:1px solid var(--border);
  transition:all .15s;flex-shrink:0;cursor:pointer
}
.section-more:hover{border-color:var(--border-hover);color:var(--text)}

/* ==============================
   HOT NEWS LIST
   ============================== */
.hot-list{display:flex;flex-direction:column;gap:8px}
.hot-item{
  display:flex;align-items:flex-start;gap:12px;
  padding:14px 18px;background:var(--bg-card);border:1px solid var(--border);
  border-radius:var(--radius);transition:all .15s;cursor:pointer
}
.hot-item:hover{
  background:var(--bg-card-hover);border-color:var(--border-hover);
  transform:translateY(-1px);box-shadow:0 4px 14px rgba(0,0,0,.25)
}
.hot-rank{
  font-size:13px;font-weight:700;color:var(--text-faint);
  min-width:24px;text-align:center;flex-shrink:0;margin-top:2px
}
.hot-rank.top3{color:var(--accent-orange)}
.hot-body{flex:1;min-width:0}
.hot-title{font-size:14px;font-weight:600;color:var(--text);margin-bottom:4px;line-height:1.4}
.hot-meta{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--text-muted)}
.hot-source{
  padding:1px 6px;border-radius:3px;background:var(--bg-soft);
  font-size:10.5px;color:var(--text-faint)
}
.hot-score{
  font-size:10.5px;padding:1px 6px;border-radius:3px;
  background:rgba(59,130,246,.1);color:var(--accent-light)
}
.hot-time{color:var(--text-faint)}
.hot-tag{
  font-size:10px;padding:1px 6px;border-radius:3px;
  background:rgba(139,92,246,.1);color:#c4b5fd;margin-left:auto;flex-shrink:0
}

/* ==============================
   CHANNEL GRID (Categories)
   ============================== */
.channel-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:12px
}
.channel-card{
  background:var(--bg-card);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:20px;transition:all .2s;cursor:pointer
}
.channel-card:hover{
  background:var(--bg-card-hover);border-color:var(--border-hover);
  transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.3)
}
.card-icon{font-size:24px;margin-bottom:10px;display:block}
.card-title{font-size:15px;font-weight:700;color:var(--text);margin-bottom:5px}
.card-desc{font-size:12.5px;color:var(--text-muted);line-height:1.5;margin-bottom:12px}
.card-tags{display:flex;flex-wrap:wrap;gap:4px}
.tag{
  padding:2px 8px;border-radius:3px;font-size:10.5px;
  background:var(--bg-soft);color:var(--text-muted);border:1px solid var(--border)
}

/* ==============================
   TODAY'S CARD
   ============================== */
.today-section{padding:0 24px 40px}
.today-card{
  background:linear-gradient(135deg,rgba(59,130,246,0.08),rgba(139,92,246,0.04));
  border:1px solid rgba(59,130,246,0.18);
  border-radius:var(--radius-lg);padding:28px 32px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  transition:all .3s;cursor:pointer
}
.today-card:hover{
  border-color:rgba(59,130,246,.35);transform:translateY(-2px)
}
.today-card-left{flex:1}
.today-card-label{
  font-size:11px;font-weight:600;color:var(--accent-light);
  text-transform:uppercase;letter-spacing:1px;margin-bottom:6px
}
.today-card h2{
  font-size:20px;font-weight:700;color:var(--text);margin-bottom:6px
}
.today-card p{font-size:14px;color:var(--text-muted);line-height:1.6}
.today-card .arrow{font-size:20px;color:var(--accent);flex-shrink:0;transition:transform .2s}
.today-card:hover .arrow{transform:translateX(6px)}

/* ==============================
   WEEK / RECENT REPORTS
   ============================== */
.week-list{display:flex;flex-direction:column;gap:6px}
.week-item{
  display:flex;align-items:center;gap:12px;
  padding:14px 20px;background:var(--bg-card);border:1px solid var(--border);
  border-radius:var(--radius);transition:all .2s;cursor:pointer
}
.week-item:hover{
  background:var(--bg-card-hover);border-color:var(--border-hover);
  transform:translateX(3px)
}
.week-day{
  font-size:12px;font-weight:600;color:var(--accent-light);min-width:32px
}
.week-date{
  font-size:12px;color:var(--text-faint);min-width:48px;
  font-variant-numeric:tabular-nums
}
.week-summary{
  font-size:14px;color:var(--text-soft);flex:1;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
.week-arrow{font-size:12px;color:var(--text-faint);flex-shrink:0}

.report-list{border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}
.report-item{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 20px;border-bottom:1px solid var(--line-color);transition:background .15s
}
.report-item:last-child{border-bottom:none}
.report-item:hover{background:var(--bg-soft)}
.report-item .date{
  font-size:14px;font-weight:500;color:var(--text);flex-shrink:0
}
.report-item .dayofweek{
  font-size:11px;color:var(--text-faint);margin-left:8px;flex-shrink:0
}
.report-item .summary{
  font-size:13px;color:var(--text-soft);flex:1;margin:0 16px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
.report-item .arrow{
  font-size:12px;color:var(--text-faint);flex-shrink:0
}

.morning-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}

/* ==============================
   ANALYSIS SECTION
   ============================== */
.analysis-section{
  background:var(--bg-analysis);
  border:1px solid rgba(59,130,246,0.15);
  border-radius:var(--radius-lg);padding:32px 36px;margin:0 24px 40px
}
.analysis-section h2{
  font-size:1.3em;font-weight:700;color:var(--text);
  margin-bottom:20px;padding-bottom:10px;border-bottom:1px solid var(--line-color)
}
.analysis-section h3{
  font-size:1.1em;font-weight:600;color:var(--accent-light);margin:24px 0 10px
}
.analysis-section p{
  color:var(--text-soft);font-size:0.95em;margin-bottom:14px;
  text-align:justify;line-height:1.8
}
.analysis-section blockquote{
  border-left:3px solid var(--accent);margin:20px 0;padding:10px 18px;
  color:var(--text-muted);font-style:italic;
  background:rgba(139,92,246,0.04);
  border-radius:0 8px 8px 0
}
.analysis-section blockquote strong{color:var(--text)}

/* ==============================
   FOOTER
   ============================== */
.footer{
  text-align:center;padding:44px 24px;border-top:1px solid var(--line-color);margin-top:48px
}
.footer p{font-size:12px;color:var(--text-faint);line-height:2}
.footer a{color:var(--text-muted);transition:color .15s}
.footer a:hover{color:var(--accent)}
.footer .icp{margin-top:8px;font-size:11px;color:var(--text-faint)}
.footer .icp a{font-size:11px;color:var(--text-faint)}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width:768px){
  nav{padding:0 16px;height:50px}
  .container{padding:0 18px}
  .hero{padding:48px 18px 36px}
  .hero h1{font-size:clamp(24px,6vw,32px)}
  .today-card{padding:20px 22px;flex-direction:column;text-align:center}
  .today-card .arrow{display:none}
  .analysis-section{padding:24px 20px;margin:0 18px 30px}
  .nav-links{gap:0}
  .nav-link{padding:4px 9px;font-size:12px}
  .stats-row{gap:20px;flex-wrap:wrap}
  .channel-grid{grid-template-columns:1fr 1fr}
  .morning-list{grid-template-columns:1fr}
  .hot-item{padding:12px 14px}
}
@media (max-width:480px){
  .channel-grid{grid-template-columns:1fr}
  .stats-row{gap:16px}
  .stat-item strong{font-size:18px}
  .report-item{flex-direction:column;align-items:flex-start;gap:6px}
  .report-item .summary{margin:4px 0}
}
