/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #0A0B14;
  color: #E2E8F0;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

:root {
  --primary: #7C6FF7;
  --primary-end: #C471ED;
  --grad: linear-gradient(135deg, #7C6FF7, #C471ED);
  --accent: #00D4FF;
  --bg-dark: #0A0B14;
  --bg-card: #111827;
  --bg-card2: #1A2035;
  --border: rgba(255,255,255,0.08);
  --text-main: #F1F5F9;
  --text-sub: #94A3B8;
  --text-muted: #64748B;
  --sidebar-w: 240px;
  --radius: 12px;
  --radius-lg: 16px;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: #0D0F1C;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
  transition: transform 0.3s;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sl-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sl-icon svg { width: 18px; height: 18px; color: #fff; }
.sidebar-logo span {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem; font-weight: 800;
  color: var(--text-main);
}
.sidebar-logo em { font-style: normal; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.sidebar-nav { flex: 1; padding: 20px 12px; }
.snav-group { margin-bottom: 24px; }
.snav-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 0 8px; margin-bottom: 6px;
}
.snav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 0.875rem; font-weight: 500; color: var(--text-sub);
  transition: all 0.2s; margin-bottom: 2px;
}
.snav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.snav-link:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.snav-link.active { color: var(--primary); background: rgba(124,111,247,0.12); }
.snav-link.active svg { stroke: var(--primary); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.sf-update { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-muted); }
.sf-dot { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 6px #22C55E; flex-shrink: 0; }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,11,20,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 12px 32px;
}
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-sub); border-radius: 2px; }
.topbar-search {
  flex: 1; max-width: 400px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px;
}
.topbar-search svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.topbar-search input {
  background: none; border: none; outline: none;
  font-size: 0.875rem; color: var(--text-main);
  font-family: inherit; width: 100%;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-right { margin-left: auto; }
.tb-tag { font-size: 0.82rem; color: var(--text-sub); }
.tb-tag strong { color: var(--primary); }

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 60px 32px 48px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
  border-bottom: 1px solid var(--border);
}
.hero-bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(124,111,247,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,111,247,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 600; color: var(--primary);
  margin-bottom: 16px; letter-spacing: 0.3px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.hero h1 {
  font-family: 'Sora', 'PingFang SC', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; line-height: 1.15;
  color: var(--text-main); margin-bottom: 16px;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 0.95rem; color: var(--text-sub); margin-bottom: 32px; line-height: 1.7; }
.hero-stats { display: flex; align-items: center; gap: 0; }
.hs-item { text-align: center; padding: 0 24px; }
.hs-item:first-child { padding-left: 0; }
.hs-num {
  display: block; font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.hs-num small { font-size: 1rem; }
.hs-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; display: block; }
.hs-divider { width: 1px; height: 36px; background: var(--border); }

/* Hero Visual */
.hero-visual { position: relative; }
.hv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.hvc-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card2);
}
.hvc-dots { display: flex; gap: 6px; }
.hvc-dots span { width: 10px; height: 10px; border-radius: 50%; }
.hvc-dots span:nth-child(1) { background: #FF5F57; }
.hvc-dots span:nth-child(2) { background: #FEBC2E; }
.hvc-dots span:nth-child(3) { background: #28C840; }
.hvc-title { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-muted); }
.hvc-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.speed-row { display: flex; align-items: center; gap: 10px; }
.sr-label { font-size: 0.78rem; color: var(--text-sub); width: 90px; flex-shrink: 0; }
.sr-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.sr-fill { height: 100%; background: var(--grad); border-radius: 3px; animation: fillBar 1.5s ease forwards; transform-origin: left; }
.sr-val { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--accent); width: 90px; text-align: right; flex-shrink: 0; }
@keyframes fillBar { from { width: 0 !important; } }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-wrap: wrap;
}
.filter-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ftab {
  padding: 6px 16px; border-radius: 20px;
  font-size: 0.82rem; font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-sub); cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.ftab:hover { border-color: var(--primary); color: var(--primary); }
.ftab.active { background: var(--grad); border-color: transparent; color: #fff; }

/* ===== RANKING LIST ===== */
.ranking-list { padding: 24px 32px; display: flex; flex-direction: column; gap: 16px; }

.rank-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 56px 100px 1fr auto;
  gap: 20px; align-items: start;
  padding: 24px;
  transition: all 0.3s;
  position: relative; overflow: hidden;
}
.rank-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--border);
  border-radius: 3px 0 0 3px;
}
.rank-card.rank-1::before { background: var(--grad); }
.rank-card:hover { border-color: rgba(124,111,247,0.3); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }

.rc-rank { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.rcr-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem; font-weight: 700; line-height: 1;
  color: var(--text-muted);
}
.rank-1 .rcr-num { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.rcr-crown { font-size: 1rem; margin-top: 4px; }

.rc-logo {
  width: 100px; height: 64px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.85rem;
  text-align: center; line-height: 1.4; flex-shrink: 0;
}

.rc-info { min-width: 0; }
.rc-header { margin-bottom: 16px; }
.rc-name {
  font-family: 'Sora', 'PingFang SC', sans-serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--text-main); display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap; margin-bottom: 4px;
}
.rc-badge {
  font-size: 0.68rem; font-weight: 700; padding: 2px 8px;
  border-radius: 4px; letter-spacing: 0.3px;
}
.rc-badge.editor { background: rgba(124,111,247,0.2); color: var(--primary); }
.rc-badge.best { background: rgba(196,113,237,0.2); color: #C471ED; }
.rc-badge.speed { background: rgba(255,75,43,0.2); color: #FF6B6B; }
.rc-badge.security { background: rgba(0,212,255,0.2); color: var(--accent); }
.rc-badge.streaming { background: rgba(247,151,30,0.2); color: #F7971E; }
.rc-badge.free { background: rgba(34,197,94,0.2); color: #22C55E; }
.rc-badge.gaming { background: rgba(168,85,247,0.2); color: #A855F7; }
.rc-badge.budget { background: rgba(251,191,36,0.2); color: #FBBF24; }

.rc-tagline { font-size: 0.82rem; color: var(--text-sub); }

.rc-scores { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.rcs-item { display: flex; align-items: center; gap: 10px; }
.rcs-label { font-size: 0.75rem; color: var(--text-muted); width: 60px; flex-shrink: 0; }
.rcs-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.rcs-fill { height: 100%; background: var(--grad); border-radius: 2px; width: 0; transition: width 1.2s ease; }
.rcs-fill.animated { width: var(--w); }
.rcs-val { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-main); font-weight: 600; width: 28px; text-align: right; flex-shrink: 0; }

.rc-pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.rcp-title { font-size: 0.75rem; font-weight: 700; margin-bottom: 6px; }
.rc-pros .rcp-title { color: #22C55E; }
.rc-cons .rcp-title { color: #F87171; }
.rc-pros li, .rc-cons li { font-size: 0.78rem; color: var(--text-sub); padding: 2px 0; }
.rc-pros li::before { content: ''; }
.rc-cons li::before { content: ''; }

.rc-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.rc-meta span { font-size: 0.75rem; color: var(--text-muted); }

.rc-action {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; min-width: 140px;
}
.rc-score-big { text-align: center; margin-bottom: 4px; }
.rsb-stars { color: #FBBF24; font-size: 0.75rem; letter-spacing: 2px; }
.rsb-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem; font-weight: 700; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.rsb-label { font-size: 0.7rem; color: var(--text-muted); }

.btn-primary {
  display: block; width: 100%; text-align: center;
  padding: 10px 20px; border-radius: 8px;
  background: var(--grad); color: #fff;
  font-size: 0.875rem; font-weight: 700;
  font-family: 'Sora', sans-serif;
  transition: opacity 0.2s; white-space: nowrap;
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
  display: block; width: 100%; text-align: center;
  padding: 10px 20px; border-radius: 8px;
  border: 1px solid rgba(124,111,247,0.5); color: var(--primary);
  font-size: 0.875rem; font-weight: 600;
  font-family: 'Sora', sans-serif;
  transition: all 0.2s; white-space: nowrap;
}
.btn-outline:hover { background: rgba(124,111,247,0.1); }
.btn-ghost {
  display: block; width: 100%; text-align: center;
  padding: 8px 20px; border-radius: 8px;
  color: var(--text-sub); font-size: 0.82rem; font-weight: 500;
  transition: color 0.2s; white-space: nowrap;
}
.btn-ghost:hover { color: var(--text-main); }
.rc-free-tag {
  font-size: 0.72rem; color: #22C55E; font-weight: 600;
  text-align: center;
}

/* ===== COMPARE SECTION ===== */
.compare-section { padding: 48px 32px; border-top: 1px solid var(--border); }
.cs-header { margin-bottom: 28px; }
.cs-badge {
  display: inline-block; background: rgba(124,111,247,0.15);
  color: var(--primary); font-size: 0.72rem; font-weight: 700;
  padding: 3px 12px; border-radius: 20px; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.cs-header h2 {
  font-family: 'Sora', 'PingFang SC', sans-serif;
  font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 6px;
}
.cs-header p { font-size: 0.875rem; color: var(--text-sub); }
.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.875rem;
}
.compare-table th {
  padding: 12px 16px; text-align: left;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.compare-table td {
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-sub);
}
.ct-highlight td { background: rgba(124,111,247,0.06); color: var(--text-main); }
.ct-yes { color: #22C55E; font-weight: 700; }
.ct-no { color: var(--text-muted); }
.compare-table tr:hover td { background: rgba(255,255,255,0.03); }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px;
  background: var(--bg-card);
}
.footer-inner { max-width: 800px; }
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.fl-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
}
.fl-icon svg { width: 14px; height: 14px; color: #fff; }
.footer-logo span {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem; font-weight: 800; color: var(--text-main);
}
.footer-logo em { font-style: normal; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-disclaimer { font-size: 0.78rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.82rem; color: var(--text-sub); transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }

/* ===== REVEAL ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .rank-card { grid-template-columns: 48px 80px 1fr; }
  .rc-action { display: none; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-240px); }
  .sidebar.open { transform: translateX(0); --sidebar-w: 240px; }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }
  .hero { grid-template-columns: 1fr; padding: 32px 20px; }
  .hero-visual { display: none; }
  .ranking-list { padding: 16px 20px; }
  .rank-card { grid-template-columns: 40px 72px 1fr; padding: 16px; gap: 12px; }
  .compare-section { padding: 32px 20px; }
  .footer { padding: 24px 20px; }
  .filter-bar { padding: 16px 20px; }
  .topbar { padding: 10px 20px; }
}
