:root {
  --bg: #090d16;
  --bg-card: #111827;
  --bg-card-hover: #172033;
  --bg-elevated: #1e293b;
  --border: #1f2937;
  --border-light: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.14);
  --rose: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.14);
  --cyan: #06b6d4;
  --cyan-bg: rgba(6, 182, 212, 0.14);
  --indigo: #6366f1;
  --radius: 14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #041014;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.nav-links a:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 48px 0 32px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.12), transparent 60%);
}

.hero-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--emerald-bg);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 24px;
  font-size: 1.05rem;
}

/* Search & Filter Bar */
.search-box-wrap {
  max-width: 640px;
  margin: 0 auto 20px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover { border-color: var(--cyan); color: var(--text); }
.filter-pill.active {
  background: var(--emerald-bg);
  border-color: var(--emerald);
  color: var(--emerald);
}

/* Cards Grid */
.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.game-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.game-title {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.25;
}

.game-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.game-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-yes { background: var(--emerald-bg); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-warn { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-no { background: var(--rose-bg); color: var(--rose); border: 1px solid rgba(244, 63, 94, 0.25); }
.badge-info { background: var(--cyan-bg); color: var(--cyan); border: 1px solid rgba(6, 182, 212, 0.25); }
.badge-neutral { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border-light); }

/* Lists / Hub Grid */
.hubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: border-color 0.15s;
}

.hub-card:hover { border-color: var(--cyan); }
.hub-card h3 { font-size: 1rem; margin-bottom: 4px; }
.hub-card p { font-size: 0.84rem; color: var(--text-muted); }

/* Game Detail Page */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 18px 0 8px;
}

.breadcrumb a:hover { color: var(--text); }

.game-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.game-hero-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.game-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  color: var(--text);
  transition: all 0.15s;
}

.btn:hover { border-color: var(--emerald); }
.btn-primary {
  background: var(--emerald);
  color: #03130d;
  border-color: var(--emerald);
}
.btn-primary:hover { filter: brightness(1.08); }

/* 6-Pillar Tabs */
.pillar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pillar-tab {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.15s;
}

.pillar-tab:hover { color: var(--text); background: var(--bg-elevated); }
.pillar-tab.active {
  background: var(--emerald-bg);
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.35);
}

/* Matrix Tables */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.table-wrap { overflow-x: auto; }

table.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.matrix th, table.matrix td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.matrix th {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(15, 23, 42, 0.5);
}

table.matrix tr:last-child td { border-bottom: none; }

/* Interactive Tools */
.tool-box {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-top: 16px;
}

.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

select.ui-select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-light);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.calc-result {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px;
  margin-top: 10px;
}

.tip-callout {
  background: var(--amber-bg);
  border-left: 4px solid var(--amber);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-top: 14px;
  font-size: 0.9rem;
}

/* Quick Verdict Grid */
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
}

.verdict-tile {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.verdict-tile .label { font-size: 0.76rem; color: var(--text-dim); text-transform: uppercase; font-weight: 700; }
.verdict-tile .val { font-size: 0.98rem; font-weight: 800; margin-top: 4px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 48px;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.footer-grid h4 { color: var(--text); margin-bottom: 10px; font-size: 0.95rem; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-grid a:hover { color: var(--emerald); }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .panel { padding: 16px; }
  table.matrix th, table.matrix td { padding: 10px; font-size: 0.85rem; }
}

/* TL;DR Featured Snippet Box (Position 0 Target) */
.tldr-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 0.96rem;
}
.tldr-box strong { color: var(--emerald); }

/* Header Shortlist & Quick Search Trigger */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kbd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
}
.kbd-btn:hover { border-color: var(--cyan); color: var(--text); }
.kbd-key {
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  border: 1px solid var(--border-light);
}

/* Command Palette Modal (Ctrl+K) */
.cmd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.cmd-modal-backdrop.open { display: flex; }
.cmd-modal {
  width: min(580px, 92vw);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.cmd-input {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.cmd-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}
.cmd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
}
.cmd-item:hover { background: var(--bg-elevated); }

/* Finder / Match Score */
.finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.finder-check {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  user-select: none;
}
.finder-check input { accent-color: var(--emerald); width: 16px; height: 16px; }

/* Vote & Shortlist Bar */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Consumer Score Pill */
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.score-pill.mid { background: var(--amber-bg); color: var(--amber); border-color: rgba(245, 158, 11, 0.35); }
.score-pill.low { background: var(--rose-bg); color: var(--rose); border-color: rgba(244, 63, 94, 0.35); }

/* Print-Friendly Checklist Mode */
@media print {
  .site-header, .site-footer, .action-btns, .pillar-nav, .trust-bar, .cmd-modal-backdrop, .tool-controls {
    display: none !important;
  }
  body { background: #fff !important; color: #000 !important; }
  .panel, .game-hero, .tldr-box { border: 1px solid #ccc !important; background: #fff !important; color: #000 !important; }
  .badge { border: 1px solid #999 !important; color: #000 !important; background: #f3f4f6 !important; }
}

/* Pre-Play Interactive Checklist */
.checklist-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.checklist-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}
.checklist-item input:checked + span {
  text-decoration: line-through;
  color: var(--emerald);
}

/* View Toggle & Back to Top */
.view-toggle-group {
  display: inline-flex;
  gap: 6px;
}
.back-to-top {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 40;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.back-to-top.show { display: inline-flex; }
.back-to-top:hover { border-color: var(--emerald); color: var(--emerald); }
