/* ================================================================
   I've Quit Better Games — Modern Gaming Wiki
   ================================================================ */

:root {
  --bg:          #0b0b13;
  --surface:     #13131f;
  --surface-2:   #1c1c2c;
  --surface-3:   #242438;
  --border:      #2a2a3e;
  --border-2:    #363654;

  --accent:      #7c3aed;
  --accent-2:    #8b5cf6;
  --accent-3:    #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.25);

  --cyan:        #22d3ee;
  --cyan-dim:    rgba(34, 211, 238, 0.15);
  --green:       #10b981;
  --green-dim:   rgba(16, 185, 129, 0.15);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245, 158, 11, 0.15);
  --red:         #ef4444;
  --red-dim:     rgba(239, 68, 68, 0.15);
  --blue:        #3b82f6;
  --blue-dim:    rgba(59, 130, 246, 0.15);
  --violet:      #8b5cf6;
  --violet-dim:  rgba(139, 92, 246, 0.15);

  --text:        #e8e8f2;
  --text-2:      #a8a8c0;
  --muted:       #6b6b88;
  --dim:         #3a3a50;

  --font-display: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --nav-h:   64px;
  --radius:  8px;
  --radius-lg: 12px;
  --shadow:  0 4px 32px rgba(0,0,0,0.5);
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

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

/* ── Navigation ───────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(11,11,19,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.nav-brand:hover { color: var(--accent-3); }
.brand-icon { font-size: 1.3rem; }

.nav-links { display: flex; align-items: center; gap: 6px; }

.nav-link {
  padding: 6px 12px;
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-2);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-admin { color: var(--accent-3); }
.nav-admin:hover { background: var(--violet-dim); }

.nav-link-btn {
  background: none; border: none;
  padding: 6px 12px; font-size: 0.88rem; font-weight: 500;
  color: var(--text-2); border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-link-btn:hover { color: var(--text); background: var(--surface-2); }

.admin-nav { border-bottom-color: rgba(124,58,237,0.35); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 60px;
  text-align: center;
}
.hero-inner { max-width: 680px; margin: 0 auto; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-2);
  margin-bottom: 36px;
}

.search-form { display: flex; gap: 10px; justify-content: center; }
.search-wrap {
  position: relative;
  flex: 1; max-width: 460px;
}
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 14px 10px 42px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-input::placeholder { color: var(--muted); }
.search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.85rem;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: color 0.15s, background 0.15s;
}
.search-clear:hover { color: var(--text); background: var(--surface-3); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}
.btn-outline:hover { color: var(--text); border-color: var(--border-2); background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text-2); background: var(--surface-2); }

.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #059669; border-color: #059669; }

.btn-danger { background: transparent; border-color: rgba(239,68,68,0.4); color: var(--red); }
.btn-danger:hover { background: var(--red-dim); border-color: var(--red); }

.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ── Section ──────────────────────────────────────────────────── */
.section { padding: 48px 0 64px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; gap: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.02em;
}
.section-title-sm {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: -0.01em;
}
.section-count {
  font-size: 0.82rem; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 20px;
}

/* ── Games Grid ───────────────────────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(124,58,237,0.18);
}

.game-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--surface-2);
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.game-card:hover .game-cover img { transform: scale(1.04); }
.game-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(11,11,19,0.7) 0%, transparent 50%);
}
.game-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  font-family: var(--font-display);
  font-size: 4rem; font-weight: 800;
  color: var(--dim);
}
.guide-count-badge {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(124,58,237,0.85);
  color: #fff; font-size: 0.72rem; font-weight: 600;
  padding: 3px 8px; border-radius: 20px;
  backdrop-filter: blur(4px);
}

.game-info { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.game-name {
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.game-desc { font-size: 0.8rem; color: var(--text-2); line-height: 1.45; }
.game-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.meta-badge {
  font-size: 0.72rem; font-weight: 600;
  background: var(--violet-dim);
  color: var(--accent-3);
  padding: 2px 8px; border-radius: 20px;
  border: 1px solid rgba(139,92,246,0.3);
}
.meta-year { font-size: 0.72rem; color: var(--muted); }
.meta-item { font-size: 0.78rem; color: var(--text-2); }

/* ── Platform Badges ──────────────────────────────────────────── */
.platform-list { display: flex; flex-wrap: wrap; gap: 5px; }
.platform-list-lg { margin-top: 12px; align-items: center; }
.platforms-label { font-size: 0.75rem; color: var(--muted); margin-right: 4px; }
.platform-badge {
  font-size: 0.68rem; font-weight: 600;
  background: var(--surface-3); border: 1px solid var(--border-2);
  color: var(--text-2);
  padding: 2px 7px; border-radius: 4px;
}

/* ── Game Header Banner ───────────────────────────────────────── */
.game-header-banner {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.game-header-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(30px) brightness(0.3);
  transform: scale(1.05);
}
.game-header-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,11,19,0.96) 0%, rgba(11,11,19,0.7) 100%);
}
.game-header-inner { position: relative; z-index: 1; padding: 28px 24px 36px; }
.game-header-layout { display: flex; gap: 32px; align-items: flex-start; margin-top: 16px; }
.game-header-art { width: 140px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.game-header-art img { width: 100%; }
.game-header-details { flex: 1; }
.game-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.game-header-desc { color: var(--text-2); font-size: 0.95rem; margin-top: 12px; line-height: 1.6; max-width: 640px; }

/* ── Page Content ─────────────────────────────────────────────── */
.page-content { padding: 36px 24px 64px; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.1;
}
.page-subtitle { color: var(--text-2); margin-top: 8px; font-size: 0.95rem; max-width: 600px; }

.wiki-section { margin-bottom: 40px; }
.wiki-prose { color: var(--text-2); line-height: 1.7; font-size: 0.95rem; max-width: 760px; }

/* ── Breadcrumb ───────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-2); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent-3); }

/* ── Guide List ───────────────────────────────────────────────── */
.guide-list { display: flex; flex-direction: column; gap: 8px; }

.guide-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.guide-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateX(4px);
}
.guide-card-main { display: flex; align-items: flex-start; gap: 14px; flex: 1; min-width: 0; }
.guide-title { font-size: 0.95rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.guide-desc { font-size: 0.82rem; color: var(--text-2); margin-top: 4px; line-height: 1.45; }
.guide-card-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.guide-author { font-size: 0.78rem; color: var(--text-2); }
.guide-date { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.guide-arrow { width: 16px; height: 16px; color: var(--muted); transition: color 0.15s, transform 0.15s; }
.guide-card:hover .guide-arrow { color: var(--accent-3); transform: translateX(3px); }

/* ── Type Badges ──────────────────────────────────────────────── */
.type-badge {
  display: inline-flex; align-items: center;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0;
}
.type-cyan   { background: var(--cyan-dim);   color: var(--cyan);  border: 1px solid rgba(34,211,238,0.3); }
.type-blue   { background: var(--blue-dim);   color: var(--blue);  border: 1px solid rgba(59,130,246,0.3); }
.type-red    { background: var(--red-dim);    color: var(--red);   border: 1px solid rgba(239,68,68,0.3); }
.type-violet { background: var(--violet-dim); color: var(--violet); border: 1px solid rgba(139,92,246,0.3); }
.type-gray   { background: var(--surface-2);  color: var(--muted); border: 1px solid var(--border); }

/* ── Status Badges ────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
}
.status-pending  { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.3); }
.status-approved { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.status-rejected { background: var(--red-dim);   color: var(--red);   border: 1px solid rgba(239,68,68,0.3); }

/* ── Guide Layout ─────────────────────────────────────────────── */
.guide-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.guide-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.guide-page-title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  line-height: 1.3; margin-bottom: 8px;
}
.guide-page-desc { font-size: 0.82rem; color: var(--text-2); margin-bottom: 16px; line-height: 1.45; }

.guide-sidebar-meta { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.sidebar-meta-row { display: flex; flex-direction: column; gap: 3px; }
.sidebar-meta-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.sidebar-meta-value { font-size: 0.85rem; color: var(--text-2); }
.sidebar-meta-link { font-size: 0.85rem; color: var(--accent-3); transition: color 0.15s; }
.sidebar-meta-link:hover { color: var(--accent-2); }

/* ── Guide Body (rendered content) ───────────────────────────── */
.guide-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.75;
}
.guide-body h1, .guide-body h2, .guide-body h3,
.guide-body h4, .guide-body h5, .guide-body h6 {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2;
  color: var(--text); margin: 1.8em 0 0.6em;
}
.guide-body h1 { font-size: 1.8rem; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.guide-body h2 { font-size: 1.35rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.guide-body h3 { font-size: 1.1rem; }
.guide-body h4 { font-size: 0.95rem; }
.guide-body p { margin: 0.9em 0; }
.guide-body ul, .guide-body ol { padding-left: 1.5em; margin: 0.9em 0; }
.guide-body li { margin: 0.3em 0; }
.guide-body a { color: var(--accent-3); border-bottom: 1px solid rgba(167,139,250,0.3); transition: color 0.15s; }
.guide-body a:hover { color: var(--cyan); }
.guide-body strong { color: var(--text); font-weight: 700; }
.guide-body em { font-style: italic; color: var(--text-2); }
.guide-body code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: var(--surface-3); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 4px; color: var(--cyan);
}
.guide-body pre {
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  overflow-x: auto; margin: 1.2em 0;
}
.guide-body pre code {
  background: none; border: none; padding: 0;
  font-size: 0.88rem; color: var(--text);
}
.guide-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  color: var(--text-2); margin: 1.2em 0;
  font-style: italic;
}
.guide-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.9rem; }
.guide-body th, .guide-body td { padding: 8px 14px; border: 1px solid var(--border); text-align: left; }
.guide-body th { background: var(--surface-2); font-weight: 600; color: var(--text); }
.guide-body td { color: var(--text-2); }
.guide-body tr:hover td { background: var(--surface-2); }
.guide-body img { max-width: 100%; border-radius: var(--radius); margin: 1.2em 0; border: 1px solid var(--border); }
.guide-body hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* ── PDF / Video Wrappers ─────────────────────────────────────── */
.guide-pdf-wrap, .guide-video-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.pdf-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 0.88rem; color: var(--text-2);
}
.pdf-viewer { width: 100%; height: 80vh; border: none; display: block; }
.guide-video { width: 100%; max-height: 70vh; display: block; background: #000; }
.guide-youtube { width: 100%; aspect-ratio: 16/9; display: block; border: none; }

/* ── Submit CTA ───────────────────────────────────────────────── */
.submit-cta {
  margin-top: 32px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
}
.submit-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.submit-cta-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.submit-cta-sub { font-size: 0.88rem; color: var(--text-2); margin-top: 4px; }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-label {
  font-size: 0.85rem; font-weight: 600; color: var(--text-2);
}
.form-optional { font-weight: 400; color: var(--muted); }
.required { color: var(--red); }

.form-input, .form-select, .form-textarea {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted); }
.form-select { appearance: none; cursor: pointer; }
.form-mono { font-family: var(--font-mono); font-size: 0.88rem; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.78rem; color: var(--muted); }

/* Type Picker */
.type-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.type-option { cursor: pointer; }
.type-option input { display: none; }
.type-option-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 12px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.type-option:hover .type-option-inner { border-color: var(--accent); }
.type-option input:checked + .type-option-inner {
  border-color: var(--accent);
  background: var(--violet-dim);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.type-option-icon { font-size: 1.6rem; }
.type-option-label { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.type-option-desc { font-size: 0.72rem; color: var(--muted); }

/* Markdown toolbar */
.md-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: var(--surface-3); border: 1px solid var(--border-2);
  border-bottom: none; border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 10px;
}
.md-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.78rem; font-family: var(--font-mono);
  padding: 3px 8px; border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}
.md-btn:hover { background: var(--surface-2); color: var(--text); }
.md-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.md-preview-btn { margin-left: auto; }

#markdown_content { border-radius: 0 0 var(--radius) var(--radius) !important; }
.md-preview {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 20px; min-height: 200px;
  font-family: var(--font-body); line-height: 1.7; font-size: 0.92rem;
}

/* File drop zone */
.file-drop {
  position: relative;
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.file-drop:hover { border-color: var(--accent); background: var(--surface-3); }
.file-drop.drag-over { border-color: var(--accent); background: var(--violet-dim); }
.file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.file-drop-inner {
  padding: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; pointer-events: none;
}
.file-drop-icon { font-size: 2.5rem; }
.file-drop-inner p { font-size: 0.9rem; color: var(--text-2); }
.file-drop-cta { color: var(--accent-3); font-weight: 600; }
.file-drop-hint { font-size: 0.78rem; color: var(--muted) !important; }
.file-selected {
  padding: 14px 16px;
  font-size: 0.88rem; color: var(--green);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}

/* Form actions */
.form-actions { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions-note { font-size: 0.8rem; color: var(--muted); }

/* Flash messages */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.flash-success { background: var(--green-dim); border: 1px solid rgba(16,185,129,0.3); color: var(--green); }
.flash-error   { background: var(--red-dim);   border: 1px solid rgba(239,68,68,0.3);   color: var(--red); }

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 24px;
}
.empty-state-sm { padding: 48px 24px; }
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.empty-sub { font-size: 0.88rem; color: var(--muted); margin-bottom: 20px; }

/* ── 404 ──────────────────────────────────────────────────────── */
.center-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.error-page { text-align: center; }
.error-code {
  font-family: var(--font-display); font-size: 8rem; font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
}
.error-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; }
.error-sub { color: var(--text-2); max-width: 440px; margin: 0 auto 28px; }
.error-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  text-align: center;
}
.footer-brand { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.footer-sub { font-size: 0.78rem; color: var(--muted); margin-bottom: 16px; }
.footer-links { display: flex; justify-content: center; gap: 20px; }
.footer-links a { font-size: 0.82rem; color: var(--text-2); transition: color 0.15s; }
.footer-links a:hover { color: var(--accent-3); }

/* ── Admin ────────────────────────────────────────────────────── */
.admin-main { padding: 32px 0 64px; }

.admin-page-header { margin-bottom: 28px; }
.admin-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; }
.admin-sub { color: var(--text-2); font-size: 0.88rem; margin-top: 4px; }

.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 24px;
}
.stat-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-pending .stat-num { color: var(--amber); }
.stat-approved .stat-num { color: var(--green); }
.stat-rejected .stat-num { color: var(--red); }

.admin-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.admin-tab {
  padding: 10px 18px;
  font-size: 0.88rem; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--accent-3); border-bottom-color: var(--accent); }
.tab-badge {
  background: var(--amber-dim); color: var(--amber);
  border: 1px solid rgba(245,158,11,0.3);
  font-size: 0.68rem; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
}

.admin-guide-list { display: flex; flex-direction: column; gap: 8px; }
.admin-guide-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
.admin-guide-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.admin-guide-title { font-size: 0.95rem; font-weight: 600; }
.admin-guide-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-2); }
.admin-guide-meta strong { color: var(--text); }
.admin-guide-desc { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.admin-notes { font-size: 0.78rem; color: var(--amber); margin-top: 6px; }
.admin-guide-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

.admin-two-col {
  display: grid; grid-template-columns: 420px 1fr; gap: 32px; align-items: start;
}
.admin-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.admin-card-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 20px; }

.platform-checkbox-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-2); cursor: pointer;
}
.checkbox-label input { accent-color: var(--accent); width: 14px; height: 14px; }
.checkbox-label:hover { color: var(--text); }

.admin-games-list { display: flex; flex-direction: column; gap: 8px; }
.admin-game-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; align-items: center; gap: 14px;
}
.admin-game-thumb {
  width: 44px; height: 58px; object-fit: cover;
  border-radius: 4px; flex-shrink: 0;
}
.admin-game-thumb-placeholder {
  width: 44px; height: 58px; flex-shrink: 0;
  background: var(--surface-3); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--dim);
}
.admin-game-info { flex: 1; min-width: 0; }
.admin-game-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.admin-game-name:hover { color: var(--accent-3); }
.admin-game-slug { font-size: 0.75rem; margin-left: 8px; }

/* Review layout */
.review-layout { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.review-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }
.review-sidebar-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.review-guide-desc { font-size: 0.82rem; color: var(--text-2); margin-top: 12px; }
.review-preview-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.review-action-form { margin-top: 16px; }

/* Admin login */
.admin-login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
}
.login-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  margin-bottom: 28px;
}
.login-logo span { font-size: 1.6rem; }
.login-form { margin-bottom: 16px; }
.login-back { font-size: 0.82rem; color: var(--muted); text-align: center; }
.login-back a { color: var(--text-2); }
.login-back a:hover { color: var(--accent-3); }

.muted { color: var(--muted); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .guide-layout, .review-layout, .admin-two-col {
    grid-template-columns: 1fr;
  }
  .guide-sidebar, .review-sidebar { position: static; }
}

@media (max-width: 700px) {
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .game-header-layout { flex-direction: column; }
  .game-header-art { width: 100px; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .type-picker { grid-template-columns: 1fr 1fr; }
  .nav-brand .brand-text { display: none; }
  .guide-card { flex-direction: column; align-items: flex-start; }
  .search-form { flex-direction: column; }
}

/* ── Affiliate buy links ─────────────────────────────────────────────────── */
.buy-links { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.72rem; }
.buy-label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.buy-sep   { color: var(--dim); }
.buy-link  { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--dim); padding-bottom: 1px; transition: color 0.15s, border-color 0.15s; }
.buy-link:hover { color: var(--accent-3); border-color: var(--accent-3); }

/* ═════════════════════════════════════════════════════════════════
   Guide components (gx-*): richer building blocks for staff guides.
   Used as raw HTML inside markdown guide bodies. Wrap a guide in
   <div class="gx gx-theme-…"> to give it a per-game accent.
   ═════════════════════════════════════════════════════════════════ */
.gx { --gx-accent: var(--accent-2); --gx-accent-dim: var(--accent-glow); --gx-ink: var(--text); }
.gx-theme-metaphor { --gx-accent: #e2334a; --gx-accent-dim: rgba(226, 51, 74, 0.16); --gx-ink: #f4ead8; }

.guide-body .gx-hero {
  position: relative; margin: -36px -40px 28px; min-height: 260px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden;
  background: #000 center / cover no-repeat; display: flex; align-items: flex-end;
}
.guide-body .gx-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,19,0) 20%, rgba(11,11,19,.55) 55%, var(--surface) 100%);
}
.guide-body .gx-hero-inner { position: relative; z-index: 1; padding: 0 40px 26px; }
.guide-body .gx-kicker {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: var(--gx-accent); padding: 3px 10px; border-radius: 3px; margin-bottom: 10px;
}
.guide-body .gx-hero h1 {
  margin: 0; border: 0; padding: 0; font-size: 2.2rem; line-height: 1.1; color: var(--gx-ink);
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
}
.guide-body .gx-hero p { margin: 8px 0 0; color: var(--text-2); max-width: 640px; }

.guide-body .gx-callout {
  display: flex; gap: 14px; align-items: flex-start; margin: 1.3em 0; padding: 14px 18px;
  border: 1px solid var(--border-2); border-left: 4px solid var(--gx-accent);
  background: var(--gx-accent-dim); border-radius: var(--radius);
}
.guide-body .gx-callout > b:first-child {
  flex: none; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px; background: var(--gx-accent); color: #fff; margin-top: 3px;
}
.guide-body .gx-callout p { margin: 0; }
.guide-body .gx-callout.tip  { border-left-color: var(--green); background: var(--green-dim); }
.guide-body .gx-callout.tip > b:first-child  { background: var(--green); }
.guide-body .gx-callout.warn { border-left-color: var(--amber); background: var(--amber-dim); }
.guide-body .gx-callout.warn > b:first-child { background: var(--amber); color: #1a1205; }
.guide-body .gx-callout.info { border-left-color: var(--cyan); background: var(--cyan-dim); }
.guide-body .gx-callout.info > b:first-child { background: var(--cyan); color: #04212a; }

.guide-body .gx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 1.2em 0; }
.guide-body .gx-card {
  background: var(--surface-2); border: 1px solid var(--border); border-top: 3px solid var(--gx-accent);
  border-radius: var(--radius); padding: 14px 16px; line-height: 1.5;
}
.guide-body .gx-card h4 { margin: 0 0 4px; font-size: 1rem; color: var(--gx-ink); }
.guide-body .gx-card .gx-sub { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.guide-body .gx-card p, .guide-body .gx-card ul { margin: 6px 0 0; font-size: .88rem; color: var(--text-2); }
.guide-body .gx-card ul { padding-left: 1.1em; }

.guide-body .gx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 1.2em 0; }
.guide-body .gx-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.guide-body .gx-stat b { display: block; font-size: 1.5rem; line-height: 1.1; color: var(--gx-accent); }
.guide-body .gx-stat span { font-size: .78rem; color: var(--text-2); }

.guide-body .gx-tier {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 6px;
  border-radius: 4px; font-size: .78rem; font-weight: 800; color: #111; vertical-align: middle;
}
.guide-body .gx-tier.s { background: #ff5a6e; } .guide-body .gx-tier.a { background: #f59e0b; }
.guide-body .gx-tier.b { background: #facc15; } .guide-body .gx-tier.c { background: #94a3b8; }

.guide-body .gx-chip {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: 2px 8px;
  border-radius: 999px; border: 1px solid currentColor; margin: 1px 2px; white-space: nowrap; vertical-align: middle;
}
.guide-body .gx-chip.slash { color: #e5e7eb; } .guide-body .gx-chip.strike { color: #d6a36b; }
.guide-body .gx-chip.pierce { color: #a3e635; } .guide-body .gx-chip.fire { color: #fb7185; }
.guide-body .gx-chip.ice { color: #7dd3fc; } .guide-body .gx-chip.elec { color: #fde047; }
.guide-body .gx-chip.wind { color: #6ee7b7; } .guide-body .gx-chip.light { color: #fef3c7; }
.guide-body .gx-chip.dark { color: #c4b5fd; } .guide-body .gx-chip.almighty { color: #f0abfc; }

.guide-body .gx-steps { list-style: none; counter-reset: gx; padding: 0; margin: 1.2em 0; }
.guide-body .gx-steps > li {
  counter-increment: gx; position: relative; padding: 2px 0 14px 48px; margin: 0;
  border-left: 2px solid var(--border-2); margin-left: 15px; padding-left: 30px;
}
.guide-body .gx-steps > li:last-child { border-left-color: transparent; }
.guide-body .gx-steps > li::before {
  content: counter(gx); position: absolute; left: -16px; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: var(--gx-accent);
  box-shadow: 0 0 0 4px var(--surface);
}
.guide-body .gx-steps > li > b:first-child { display: block; color: var(--gx-ink); }

.guide-body .gx-figure { margin: 1.4em 0; }
.guide-body .gx-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.guide-body .gx-figure figcaption { font-size: .78rem; color: var(--muted); margin-top: 6px; }

.guide-body .gx-table th { background: var(--gx-accent-dim); }
.guide-body .gx-toc { columns: 2; column-gap: 28px; font-size: .9rem; }
.guide-body .gx-toc li { break-inside: avoid; }

@media (max-width: 700px) {
  .guide-body .gx-hero { min-height: 200px; }
  .guide-body .gx-hero-inner { padding: 0 18px 18px; }
  .guide-body .gx-hero h1 { font-size: 1.6rem; }
  .guide-body .gx-toc { columns: 1; }
  .guide-body .gx-table { display: block; overflow-x: auto; }
}
