*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #00E5FF;
  --primary-dim: #00B8D4;
  --accent: #FF3D71;
  --accent-glow: rgba(255, 61, 113, 0.25);
  --neon-green: #00F5A0;
  --neon-green-dim: #00C97B;
  --bg: #0A0E1A;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-header: #060A14;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(0, 229, 255, 0.2);
  --text: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --success: #00F5A0;
  --success-bg: rgba(0, 245, 160, 0.08);
  --success-border: rgba(0, 245, 160, 0.2);
  --warn-bg: rgba(255, 61, 113, 0.08);
  --warn-border: rgba(255, 61, 113, 0.25);
  --warn: #FF6B8A;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 229, 255, 0.05);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 229, 255, 0.08);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 2px rgba(0, 229, 255, 0.1);
  --glow-primary: 0 0 20px rgba(0, 229, 255, 0.15), 0 0 60px rgba(0, 229, 255, 0.05);
  --glow-accent: 0 0 20px rgba(255, 61, 113, 0.15), 0 0 60px rgba(255, 61, 113, 0.05);
  --transition: 200ms ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Gradient orbs */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; text-decoration: none; }

/* ===== Header ===== */
.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-dim), transparent);
  opacity: 0.4;
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.header-brand { display: flex; align-items: center; gap: 14px; }
.brand-icon { font-size: 24px; filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.3)); }
.header-brand h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 600;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}
.header-sub {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}
.header-right { display: flex; align-items: center; gap: 10px; }
.update-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--primary-dim);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.12);
  padding: 4px 12px; border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.gh-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 7px 16px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
}
.gh-btn:hover {
  background: rgba(0, 229, 255, 0.06);
  border-color: var(--glass-border-hover);
  color: var(--primary);
  box-shadow: var(--glow-primary);
  text-decoration: none;
}

main {
  max-width: 1440px; margin: 0 auto;
  padding: 32px 24px;
  position: relative; z-index: 1;
}

html.embed-mode .site-footer,
html.embed-mode .mobile-nav,
html.embed-mode .back-to-top {
  display: none !important;
}

html.embed-mode body {
  padding-top: 56px;
}

html.embed-mode .site-header {
  top: 0;
}

html.embed-mode main {
  max-width: none;
  padding: 12px 20px 28px;
}
.section { margin-bottom: 32px; }
.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--primary-dim);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ''; display: inline-block;
  width: 3px; height: 16px;
  background: linear-gradient(180deg, var(--primary), transparent);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-border), transparent);
}

/* ===== Ratings ===== */
.ratings-row { display: flex; flex-wrap: wrap; gap: 12px; }
.rating-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 210px; flex: 1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.rating-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.02), transparent 60%);
  pointer-events: none;
}
.rating-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--glow-primary);
  transform: translateY(-2px);
}
.rating-card.top {
  border-color: rgba(0, 229, 255, 0.15);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.04), var(--bg-card));
}
.rating-card.top::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--primary), transparent);
  border-radius: 2px;
}
.rc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rc-name {
  font-weight: 600; font-size: 14px; color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}
.rc-stars { color: #FBBF24; font-size: 12px; letter-spacing: 2px; text-shadow: 0 0 8px rgba(251, 191, 36, 0.3); }
.rc-reasons { list-style: none; }
.rc-reasons li {
  font-size: 12px; color: var(--text-secondary);
  padding: 3px 0;
  position: relative;
  padding-left: 12px;
}
.rc-reasons li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 4px;
  background: var(--primary-dim);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}

/* ===== Filter Bar ===== */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}
.filter-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.01), transparent 40%);
  border-radius: var(--radius);
  pointer-events: none;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; position: relative; }
.filter-item { display: flex; flex-direction: column; gap: 6px; }
.filter-item label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.filter-item select {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3); color: var(--text);
  min-width: 110px; cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.filter-item select option {
  background: var(--bg-surface);
  color: var(--text);
}
.filter-item select:hover { border-color: var(--primary-dim); }
.filter-item select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}
.reset-btn {
  padding: 8px 20px; font-size: 13px; font-weight: 500;
  font-family: 'Space Grotesk', sans-serif;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
  align-self: flex-end;
}
.reset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--warn-bg);
}
.filter-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--text-muted);
  align-self: flex-end; margin-left: auto;
}

/* ===== Table ===== */
.table-section { margin-bottom: 28px; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}
.table-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.01), transparent 20%);
  border-radius: var(--radius);
  pointer-events: none;
  z-index: 0;
}
table { width: 100%; border-collapse: collapse; white-space: nowrap; position: relative; z-index: 1; }

thead th {
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-muted);
  padding: 12px 14px;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase;
  cursor: pointer; user-select: none;
  transition: all var(--transition);
  border-right: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}
thead th:last-child { border-right: none; }
thead th:hover {
  background: rgba(0, 229, 255, 0.04);
  color: var(--text);
}
thead th.sorted-asc,
thead th.sorted-desc {
  color: var(--primary);
}
thead th.sorted-asc::after,
thead th.sorted-desc::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}
.sort-icon { opacity: 0.3; font-size: 10px; }
thead th.sorted-asc .sort-icon::after { content: ' ↑'; opacity: 1; }
thead th.sorted-desc .sort-icon::after { content: ' ↓'; opacity: 1; }

tbody tr {
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover {
  background: rgba(0, 229, 255, 0.03);
}
tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  color: var(--text-secondary);
}

.sticky-col {
  position: sticky; left: 0; z-index: 2;
  background: var(--bg-surface);
  border-right: 1px solid var(--glass-border);
}
tbody tr:hover .sticky-col { background: rgba(0, 229, 255, 0.05); }
thead .sticky-col {
  background: rgba(0, 0, 0, 0.5);
  border-right: 1px solid var(--glass-border);
  z-index: 3;
}

.num-col { text-align: right; }
td.num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

.platform-cell {
  font-weight: 700; font-size: 13px;
  color: #fff !important;
  font-family: 'Space Grotesk', sans-serif;
}
.price-main {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 15px;
  color: #fff;
}
.price-na { color: var(--text-muted); opacity: 0.5; }
.price-yearly {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 14px;
  color: var(--neon-green);
  text-shadow: 0 0 12px rgba(0, 245, 160, 0.2);
}

.badge-first {
  display: inline-block; font-size: 10px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  background: var(--warn-bg); color: var(--warn);
  border: 1px solid var(--warn-border);
  padding: 2px 8px; border-radius: 4px;
  margin-left: 6px; vertical-align: middle;
  text-shadow: 0 0 8px rgba(255, 61, 113, 0.15);
}

.model-tag {
  display: inline-block; font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 229, 255, 0.06);
  color: var(--primary);
  border: 1px solid rgba(0, 229, 255, 0.12);
  padding: 3px 8px; border-radius: 4px;
  margin: 2px 3px;
  transition: all var(--transition);
}
.model-tag:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.25);
}
.model-tag-more {
  color: var(--text-muted);
  border-style: dashed;
}
.benefit-tag {
  display: inline-block; font-size: 10px;
  font-family: 'Space Grotesk', sans-serif;
  background: var(--success-bg); color: var(--success);
  border: 1px solid var(--success-border);
  padding: 3px 8px; border-radius: 4px;
  margin: 2px 3px;
}
.note-text { color: var(--text-muted); font-size: 12px; }
.token-quota { color: var(--primary); font-weight: 500; font-size: 12px; }
.token-5h { color: var(--text-muted); font-size: 11px; }

.open-btn {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  padding: 6px 16px; border-radius: var(--radius-sm);
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
  white-space: nowrap;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.open-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15));
  opacity: 0;
  transition: opacity var(--transition);
}
.open-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3), 0 4px 12px rgba(0, 229, 255, 0.15);
  text-decoration: none;
  color: var(--bg);
}
.open-btn:hover::before { opacity: 1; }

/* ===== Notes ===== */
.section-update-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--primary-dim);
  margin: 0 0 8px 0;
  opacity: 0.7;
}
.notes-section {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.notes-section::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-dim), transparent);
  border-radius: 0 2px 2px 0;
}
.notes-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.notes-list li {
  font-size: 12px; color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.notes-list li::before {
  content: '◇ ';
  color: var(--primary-dim);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: 24px;
  text-align: center;
  font-size: 12px; color: var(--text-muted);
  position: relative; z-index: 1;
  font-family: 'JetBrains Mono', monospace;
}
.site-footer a { color: var(--primary-dim); }
.site-footer a:hover { color: var(--primary); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 229, 255, 0.25); }

/* ===== Selection ===== */
::selection {
  background: rgba(0, 229, 255, 0.2);
  color: #fff;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ratings-section { animation: fadeInUp 500ms ease both; }
.filter-bar { animation: fadeInUp 500ms ease 100ms both; }
.table-section { animation: fadeInUp 500ms ease 200ms both; }
.notes-section { animation: fadeInUp 500ms ease 300ms both; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-sub, .update-chip { display: none; }
  .header-brand h1 { font-size: 14px; }
  main { padding: 16px 12px; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-count { margin-left: 0; }
  .reset-btn { width: 100%; }
  .ratings-row { flex-direction: column; }
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  padding: 0;
}
.theme-toggle:hover {
  background: rgba(0, 229, 255, 0.06);
  border-color: var(--glass-border-hover);
  color: var(--primary);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* ===== Light Theme ===== */
[data-theme="light"] {
  --primary: #2563EB;
  --primary-dim: #3B82F6;
  --accent: #DC2626;
  --accent-glow: rgba(220, 38, 38, 0.12);
  --neon-green: #059669;
  --neon-green-dim: #047857;
  --bg: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-header: #FFFFFF;
  --glass: rgba(0, 0, 0, 0.02);
  --glass-border: rgba(0, 0, 0, 0.07);
  --glass-border-hover: rgba(37, 99, 235, 0.25);
  --text: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.06);
  --success-border: rgba(5, 150, 105, 0.18);
  --warn-bg: rgba(220, 38, 38, 0.05);
  --warn-border: rgba(220, 38, 38, 0.18);
  --warn: #DC2626;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  --glow-primary: 0 2px 12px rgba(37, 99, 235, 0.12);
  --glow-accent: 0 2px 12px rgba(220, 38, 38, 0.12);
}

[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.025) 1px, transparent 1px);
}
[data-theme="light"] body::after {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
}

[data-theme="light"] a:hover { color: var(--primary-dim); }

/* Header */
[data-theme="light"] .site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .site-header::after {
  background: linear-gradient(90deg, transparent, var(--primary-dim), transparent);
  opacity: 0.2;
}
[data-theme="light"] .header-brand h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .brand-icon { filter: none; }
[data-theme="light"] .update-chip {
  color: var(--primary-dim);
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .gh-btn {
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .gh-btn:hover {
  background: rgba(37, 99, 235, 0.04);
  color: var(--primary);
}

/* Section title */
[data-theme="light"] .section-title::before {
  background: linear-gradient(180deg, var(--primary), transparent);
  box-shadow: none;
}
[data-theme="light"] .section-title::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.06), transparent);
}

/* Ratings */
[data-theme="light"] .rating-card::before {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), transparent 60%);
}
[data-theme="light"] .rating-card.top {
  border-color: rgba(37, 99, 235, 0.15);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), var(--bg-card));
}
[data-theme="light"] .rating-card.top::after {
  background: linear-gradient(180deg, var(--primary), transparent);
}
[data-theme="light"] .rc-name { color: var(--text); }
[data-theme="light"] .rc-stars { text-shadow: none; }
[data-theme="light"] .rc-reasons li::before {
  box-shadow: none;
}

/* Filter */
[data-theme="light"] .filter-item select {
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
[data-theme="light"] .filter-item select option {
  background: #fff;
  color: var(--text);
}
[data-theme="light"] .filter-item select:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .reset-btn:hover {
  background: var(--warn-bg);
}

/* Table */
[data-theme="light"] .table-wrap {
  background: var(--bg-card);
}
[data-theme="light"] .table-wrap::before {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.01), transparent 10%);
}
[data-theme="light"] thead th {
  background: #F1F5F9;
  color: var(--text-muted);
  border-right-color: rgba(0, 0, 0, 0.04);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] thead th:hover {
  background: #E2E8F0;
  color: var(--text);
}
[data-theme="light"] thead th.sorted-asc::after,
[data-theme="light"] thead th.sorted-desc::after {
  box-shadow: none;
}
[data-theme="light"] tbody tr:hover {
  background: rgba(37, 99, 235, 0.03);
}
[data-theme="light"] .sticky-col {
  background: #fff;
}
[data-theme="light"] tbody tr:hover .sticky-col {
  background: rgba(37, 99, 235, 0.03);
}
[data-theme="light"] thead .sticky-col {
  background: #F1F5F9;
}
[data-theme="light"] .platform-cell {
  color: var(--text) !important;
}
[data-theme="light"] .price-main {
  color: var(--text);
}
[data-theme="light"] .price-yearly {
  text-shadow: none;
}
[data-theme="light"] .badge-first {
  text-shadow: none;
}

/* Tags */
[data-theme="light"] .model-tag {
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.12);
}
[data-theme="light"] .model-tag:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}

/* Open button */
[data-theme="light"] .open-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dim));
}
[data-theme="light"] .open-btn:hover {
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25);
}

/* Notes */
[data-theme="light"] .notes-section::before {
  background: linear-gradient(180deg, var(--primary-dim), transparent);
}

/* Footer */
[data-theme="light"] .site-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.15);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.25);
}

/* Selection */
[data-theme="light"] ::selection {
  background: rgba(37, 99, 235, 0.15);
  color: var(--text);
}

/* Theme toggle icon state */
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
}

/* ===== Page Routing ===== */
.page-content { display: none; }
.page-content.active { display: block; animation: fadeInUp 400ms ease both; }

/* ===== Header Nav ===== */
.header-nav { display: flex; gap: 4px; }
.nav-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  padding: 6px 16px; border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--text);
  background: var(--glass);
  text-decoration: none;
}
.nav-link.active {
  color: var(--primary);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.1);
}
.header-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-brand:hover { text-decoration: none; }
.header-brand h1 { pointer-events: none; }

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 64px 24px 48px;
  position: relative;
}
.hero-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.15);
  padding: 6px 20px; border-radius: 20px;
  margin-bottom: 24px;
}
.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px; font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 60%, var(--neon-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}
.hero-desc {
  font-size: 16px; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-stats {
  display: flex; justify-content: center; gap: 48px;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}
.stat-label {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ===== Category Grid ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  padding: 0 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.category-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.category-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.02), transparent 60%);
  pointer-events: none;
}
.category-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--glow-primary);
  transform: translateY(-3px);
  text-decoration: none;
}
.cat-icon {
  font-size: 36px;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.1);
  flex-shrink: 0;
}
.cat-video .cat-icon {
  background: rgba(255, 61, 113, 0.06);
  border-color: rgba(255, 61, 113, 0.1);
}
.cat-image .cat-icon {
  background: rgba(168, 85, 247, 0.06);
  border-color: rgba(168, 85, 247, 0.1);
}
.cat-audio .cat-icon {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.1);
}
.cat-api .cat-icon {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.1);
}
.cat-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.cat-body p {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}
.cat-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(0, 229, 255, 0.06);
  color: var(--primary);
  border: 1px solid rgba(0, 229, 255, 0.1);
}
.cat-video .cat-tags span {
  background: rgba(255, 61, 113, 0.06);
  color: var(--accent);
  border-color: rgba(255, 61, 113, 0.1);
}
.cat-image .cat-tags span {
  background: rgba(168, 85, 247, 0.06);
  color: #A855F7;
  border-color: rgba(168, 85, 247, 0.1);
}
.cat-audio .cat-tags span {
  background: rgba(34, 197, 94, 0.06);
  color: #22C55E;
  border-color: rgba(34, 197, 94, 0.1);
}
.cat-api .cat-tags span {
  background: rgba(245, 158, 11, 0.06);
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.1);
}
.cat-arrow {
  font-size: 20px; color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}
.category-card:hover .cat-arrow {
  color: var(--primary);
  transform: translateX(4px);
}

/* ===== Home Features ===== */
.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 0 24px 40px;
  max-width: 1000px;
  margin: 0 auto;
}
.feature-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature-icon { font-size: 24px; flex-shrink: 0; }
.feature-item strong {
  font-size: 14px; color: var(--text);
  display: block; margin-bottom: 4px;
}
.feature-item p {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Price Free ===== */
.price-free {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 15px;
  color: var(--neon-green);
  text-shadow: 0 0 12px rgba(0, 245, 160, 0.2);
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  right: 24px; bottom: 32px;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 700;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease, background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
  color: var(--primary);
}

/* ===== Light Theme — New Components ===== */
[data-theme="light"] .nav-link { color: var(--text-muted); }
[data-theme="light"] .nav-link:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .nav-link.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.12);
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 60%, var(--neon-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .hero-badge {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.12);
}
[data-theme="light"] .stat-num {
  text-shadow: none;
}

[data-theme="light"] .category-card {
  background: var(--bg-card);
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .category-card::before {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), transparent 60%);
}
[data-theme="light"] .category-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow);
}
[data-theme="light"] .cat-icon {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .cat-video .cat-icon {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.1);
}
[data-theme="light"] .cat-image .cat-icon {
  background: rgba(168, 85, 247, 0.05);
  border-color: rgba(168, 85, 247, 0.1);
}
[data-theme="light"] .cat-audio .cat-icon {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.1);
}
[data-theme="light"] .cat-api .cat-icon {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.1);
}
[data-theme="light"] .cat-body h3 { color: var(--text); }
[data-theme="light"] .cat-arrow { color: var(--text-muted); }
[data-theme="light"] .category-card:hover .cat-arrow { color: var(--primary); }

[data-theme="light"] .cat-tags span {
  background: rgba(37, 99, 235, 0.05);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .cat-video .cat-tags span {
  background: rgba(220, 38, 38, 0.05);
  color: var(--accent);
  border-color: rgba(220, 38, 38, 0.1);
}
[data-theme="light"] .cat-image .cat-tags span {
  background: rgba(168, 85, 247, 0.05);
  color: #9333EA;
  border-color: rgba(168, 85, 247, 0.1);
}
[data-theme="light"] .cat-audio .cat-tags span {
  background: rgba(34, 197, 94, 0.05);
  color: #16A34A;
  border-color: rgba(34, 197, 94, 0.1);
}
[data-theme="light"] .cat-api .cat-tags span {
  background: rgba(245, 158, 11, 0.05);
  color: #D97706;
  border-color: rgba(245, 158, 11, 0.1);
}

[data-theme="light"] .feature-item {
  background: var(--bg-card);
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .feature-item strong { color: var(--text); }

[data-theme="light"] .price-free { text-shadow: none; }

[data-theme="light"] .back-to-top {
  background: rgba(255,255,255,0.9);
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .back-to-top:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(37,99,235,0.15);
}

/* ===== Responsive — New Components ===== */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .hero { padding: 40px 16px 32px; }
  .hero-title { font-size: 28px; }
  .hero-desc { font-size: 14px; }
  .hero-stats { gap: 28px; }
  .stat-num { font-size: 22px; }
  .category-grid { grid-template-columns: 1fr; padding: 0 16px 32px; }
  .category-card { padding: 20px; }
  .cat-body h3 { font-size: 16px; }
  .home-features { grid-template-columns: 1fr; padding: 0 16px 32px; }
}

/* ===== Mobile Nav (bottom bar) ===== */
@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-header);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    z-index: 100;
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
  }
  .mobile-nav a {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding: 8px 0;
    text-decoration: none;
    transition: color var(--transition);
  }
  .mobile-nav a.active {
    color: var(--primary);
  }
  .mobile-nav a span {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
  }
  .site-footer { padding-bottom: 80px; }
  .back-to-top { right: 16px; bottom: 80px; }
}
@media (min-width: 769px) {
  .mobile-nav { display: none; }
}

/* ===== API Page ===== */
.api-hero {
  text-align: center;
  padding: 48px 24px 32px;
}
.api-hero-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
  padding: 6px 20px; border-radius: 20px;
  margin-bottom: 20px;
}
.api-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px; font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, #F59E0B 60%, #F97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.api-hero-desc {
  font-size: 15px; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto;
  line-height: 1.7;
}

.api-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  padding: 0 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.api-platform-card {
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.api-platform-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.02), transparent 60%);
  pointer-events: none;
}
.api-platform-card:hover {
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.1), 0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
  text-decoration: none;
}
.api-card-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
}
.api-card-icon {
  font-size: 32px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.1);
  flex-shrink: 0;
}
.api-card-logo {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
  padding: 10px;
  overflow: hidden;
}
.api-card-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.api-platform-card.api-card-featured {
  border-color: rgba(0, 229, 255, 0.2);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.04), var(--bg-card));
}
.api-platform-card.api-card-featured::before {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.04), transparent 60%);
}
.api-platform-card.api-card-featured:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.15), 0 8px 32px rgba(0, 0, 0, 0.3);
}
.api-platform-card.api-card-featured .api-card-logo {
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.15);
}
.api-card-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 700;
  color: #fff;
  margin: 0;
}
.api-card-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--text-muted);
  display: block; margin-top: 2px;
}
.api-card-desc {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  flex: 1;
}
.api-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.api-card-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(245, 158, 11, 0.06);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.1);
}
.api-card-arrow {
  position: absolute;
  top: 28px; right: 24px;
  font-size: 20px; color: var(--text-muted);
  transition: all var(--transition);
}
.api-platform-card:hover .api-card-arrow {
  color: #F59E0B;
  transform: translateX(4px);
}

/* ===== Light Theme — API Page ===== */
[data-theme="light"] .api-hero-title {
  background: linear-gradient(135deg, var(--text) 0%, #D97706 60%, #EA580C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .api-hero-badge {
  color: #D97706;
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.12);
}
[data-theme="light"] .api-platform-card {
  background: var(--bg-card);
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .api-platform-card::before {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.02), transparent 60%);
}
[data-theme="light"] .api-platform-card:hover {
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .api-card-icon {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.1);
}
[data-theme="light"] .api-card-logo {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .api-platform-card.api-card-featured {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), var(--bg-card));
}
[data-theme="light"] .api-platform-card.api-card-featured:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .api-platform-card.api-card-featured .api-card-logo {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.15);
}
[data-theme="light"] .api-card-header h3 {
  color: var(--text);
}
[data-theme="light"] .api-card-tags span {
  background: rgba(245, 158, 11, 0.05);
  color: #D97706;
  border-color: rgba(245, 158, 11, 0.1);
}
[data-theme="light"] .api-card-arrow { color: var(--text-muted); }
[data-theme="light"] .api-platform-card:hover .api-card-arrow { color: #D97706; }

/* ===== Responsive — API Page ===== */
@media (max-width: 768px) {
  .api-platform-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 32px;
  }
  .api-platform-card { padding: 20px; }
  .api-card-header h3 { font-size: 16px; }
  .api-hero { padding: 32px 16px 24px; }
  .api-hero-title { font-size: 26px; }
}
