/* ============================================================================
   Guitar Lick Lab — Practice Arcade shared styles
   Matches the GLL v2.x design system (warm dark, amber accent, Fraunces +
   IBM Plex). Used by the arcade hub and every game.
   ============================================================================ */

:root {
  --bg: #0d0a08;
  --bg-deep: #060403;
  --surface: #17110c;
  --surface-2: #1f1811;
  --surface-3: #281f15;
  --border: #2b2017;
  --border-light: #3d2d20;
  --text: #f4ead8;
  --text-dim: #ad9c80;
  --text-faint: #6f6049;
  --accent: #d4a04c;
  --accent-bright: #f0c068;
  --accent-deep: #8c6a2e;
  --accent-soft: rgba(212, 160, 76, 0.12);
  --error: #d96b4a;
  --success: #46c882;
  --info: #6fb8e0;
  --shadow-deep: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(140% 100% at 0% 0%, rgba(212, 160, 76, 0.05) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: #fff; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---- Header / footer (matches the tools) --------------------------------- */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; max-width: 1140px; margin: 0 auto; padding: 22px;
  flex-wrap: wrap;
}
.brand-link { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 54px; height: 54px; object-fit: contain; opacity: 0.95; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-title { font-family: var(--font-serif); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; color: var(--text); line-height: 1.1; }
.brand-tagline { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); }
.brand-tagline:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-link {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim);
  padding: 8px 12px; border-radius: 8px; transition: all 0.2s ease;
}
.nav-link:hover { color: var(--accent-bright); background: var(--accent-soft); }
.nav-link.current { color: var(--accent); background: var(--accent-soft); pointer-events: none; }
.nav-divider { width: 1px; height: 18px; background: var(--border-light); margin: 0 4px; }

/* Compact belt + XP indicator in the header (every arcade page) */
.belt-mini {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 8px; border-radius: 30px;
  border: 1px solid var(--border-light); background: var(--surface-2);
  transition: all 0.2s ease; text-decoration: none;
}
.belt-mini:hover { border-color: var(--accent-deep); background: var(--surface-3); }
.belt-mini .bm-belt { width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }
.belt-mini .bm-belt svg { width: 100%; height: 100%; display: block; }
.belt-mini .bm-text { display: flex; flex-direction: column; line-height: 1.15; }
.belt-mini .bm-name { font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--text); }
.belt-mini .bm-xp { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 0.04em; }
@media (max-width: 560px) {
  .belt-mini .bm-text { display: none; }
  .belt-mini { padding: 4px; }
}
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  color: var(--text-dim); transition: all 0.2s ease;
}
.social-link:hover { color: var(--accent-bright); background: var(--accent-soft); transform: translateY(-1px); }
.social-link svg { width: 18px; height: 18px; }

.footer {
  max-width: 1140px; margin: 72px auto 0; padding: 28px 22px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-faint);
}
.footer-links { display: flex; gap: 18px; }
.footer-social { display: flex; gap: 6px; }

/* ---- Hero / breadcrumb --------------------------------------------------- */
.breadcrumb {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint);
  margin: 8px 0 22px;
}
.breadcrumb a:hover { color: var(--accent); }
.hero-eyebrow {
  color: var(--accent); font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  margin-bottom: 18px; display: flex; align-items: center; gap: 14px;
}
.hero-eyebrow::before { content: ''; width: 36px; height: 1px; background: var(--accent); }
.hero h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(32px, 6vw, 54px); line-height: 1.05;
  letter-spacing: -0.025em; color: var(--text); margin: 0 0 16px;
}
.hero h1 em { font-style: italic; color: var(--accent); font-variation-settings: "opsz" 144; }
.hero-sub { font-size: 17px; color: var(--text-dim); max-width: 640px; line-height: 1.6; }

/* ---- Belt widget --------------------------------------------------------- */
.belt-widget {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow-deep);
}
.belt-badge {
  flex-shrink: 0;
  width: 68px; height: 68px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.4));
}
.belt-badge svg { width: 100%; height: 100%; display: block; }
.belt-info { flex: 1; min-width: 0; }
.belt-name {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: 20px; color: var(--text); font-variation-settings: "opsz" 36;
}
.belt-name em { color: var(--accent-bright); font-style: normal; }
.belt-xp-line {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  letter-spacing: 0.04em; margin-top: 2px;
}
.belt-bar-track {
  height: 8px; border-radius: 5px; background: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,0,0,0.3); overflow: hidden; margin-top: 10px;
}
.belt-bar-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  padding: 11px 22px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border-light); background: var(--surface-2);
  color: var(--text); transition: all 0.15s ease;
}
.btn:hover { border-color: var(--accent-deep); color: var(--accent-bright); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #1a1208; border: none;
}
.btn-primary:hover { filter: brightness(1.08); color: #1a1208; }
.btn-ghost { background: transparent; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }

/* ---- Arcade card / panel ------------------------------------------------- */
.panel {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-deep);
}

/* ---- Hub game grid ------------------------------------------------------- */
.arcade-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 28px;
}
@media (max-width: 860px) { .arcade-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .arcade-grid { grid-template-columns: 1fr; } }
.game-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  transition: all 0.2s ease; overflow: hidden;
}
.game-card.playable:hover {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,0.7);
}
.game-card-icon { font-size: 26px; line-height: 1; }
.game-card h3 {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: 20px; color: var(--text); margin: 4px 0 0;
  font-variation-settings: "opsz" 36;
}
.game-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; margin: 0; flex: 1; }
.game-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint);
}
.game-card-cta { color: var(--accent); font-weight: 600; }
/* Locked / coming-soon (covered) card */
.game-card.locked { opacity: 0.55; }
.game-card.locked:hover { transform: none; border-color: var(--border); }
.game-card-lock {
  position: absolute; top: 14px; right: 16px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-faint);
  border: 1px solid var(--border-light); border-radius: 20px; padding: 3px 9px;
}
.game-card-best {
  font-family: var(--font-mono); font-size: 10px; color: var(--accent);
}

/* ---- Game shell: difficulty / play / results ----------------------------- */
.shell { max-width: 760px; margin: 0 auto; }

.diff-screen { text-align: center; padding: 8px 0 0; }
.diff-rules {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  letter-spacing: 0.02em; margin: 10px auto 26px; max-width: 520px; line-height: 1.7;
}
.diff-preview { width: 100%; margin: 0 auto 26px; }
.diff-preview svg { width: 100%; height: auto; display: block; }
.diff-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
@media (max-width: 560px) { .diff-options { grid-template-columns: 1fr; } }
.diff-btn {
  background: var(--surface-2); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 20px 16px; cursor: pointer;
  transition: all 0.15s ease; text-align: center;
}
.diff-btn:hover { border-color: var(--accent-deep); transform: translateY(-2px); }
.diff-btn.selected { border-color: var(--accent); background: var(--accent-soft); }
.diff-btn-name {
  font-family: var(--font-serif); font-style: italic; font-size: 20px;
  color: var(--text); font-variation-settings: "opsz" 24;
}
.diff-btn-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-top: 4px; letter-spacing: 0.04em; }
.diff-btn-best { font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin-top: 8px; min-height: 14px; }

/* play screen */
.play-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-dim);
}
.play-qnum { color: var(--accent-bright); font-weight: 600; }
.play-score { color: var(--text-dim); }
.timer-track {
  height: 6px; border-radius: 4px; background: rgba(0,0,0,0.45);
  overflow: hidden; margin-bottom: 24px; border: 1px solid rgba(0,0,0,0.3);
}
.timer-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.1s linear;
}
.timer-fill.warn { background: linear-gradient(90deg, #e0913a, var(--error)); }
.question-host { min-height: 220px; }
.q-prompt {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(22px, 4vw, 30px); color: var(--text);
  text-align: center; margin: 8px 0 24px; line-height: 1.3;
}
.q-prompt em { font-style: italic; color: var(--accent-bright); }

/* multiple-choice buttons */
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 480px) { .choices { grid-template-columns: 1fr; } }
.choice-btn {
  background: var(--surface-2); border: 1px solid var(--border-light);
  border-radius: 12px; padding: 18px; cursor: pointer;
  font-family: var(--font-sans); font-size: 17px; font-weight: 600; color: var(--text);
  transition: all 0.12s ease;
}
.choice-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-3); }
.choice-btn:disabled { cursor: default; }
.choice-btn.chosen { border-color: var(--accent-bright); background: var(--accent-soft); }

/* timeout notice */
.timeout-note {
  text-align: center; padding: 24px;
}
.timeout-note .tn-title {
  font-family: var(--font-serif); font-style: italic; font-size: 24px;
  color: var(--error); margin-bottom: 8px;
}
.timeout-note .tn-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }

/* results screen */
.results { text-align: center; }
.results-score {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(44px, 9vw, 72px); color: var(--accent-bright);
  line-height: 1; margin: 8px 0 4px; font-variation-settings: "opsz" 144;
}
.results-score small { font-size: 0.4em; color: var(--text-dim); }
.results-sub { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); letter-spacing: 0.04em; }
.results-xp {
  display: inline-flex; align-items: center; gap: 8px; margin: 18px 0;
  font-family: var(--font-mono); font-size: 15px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-deep);
  border-radius: 30px; padding: 8px 20px;
}
.results-avgtime {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
  margin: -4px 0 18px; letter-spacing: 0.02em;
}
.results-avgtime strong { color: var(--accent-bright); }
.results-avgtime .rat-sub { color: var(--text-faint); }
.review-time {
  flex-shrink: 0; align-self: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  font-variant-numeric: tabular-nums; min-width: 42px; text-align: right;
}
.beltup-banner {
  background: linear-gradient(180deg, rgba(212,160,76,0.16), rgba(212,160,76,0.05));
  border: 1px solid var(--accent); border-radius: 14px;
  padding: 16px 20px; margin: 8px 0 22px;
  font-family: var(--font-serif); font-style: italic; font-size: 19px; color: var(--accent-bright);
}
.results-actions { display: flex; gap: 12px; justify-content: center; margin: 8px 0 30px; flex-wrap: wrap; }

/* review list */
.review { text-align: left; margin-top: 20px; }
.review h3 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-faint); margin: 0 0 14px;
}
.review-entry { border-bottom: 1px solid rgba(212,160,76,0.09); }
.review-entry:last-child { border-bottom: none; }
.review-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
}
.review-item.expandable { cursor: pointer; padding: 12px 8px; margin: 0 -8px; border-radius: 8px; transition: background 0.12s; }
.review-item.expandable:hover { background: rgba(212,160,76,0.05); }
.review-item.expandable:focus-visible { outline: 1px solid var(--accent-deep); }
.review-chevron {
  flex-shrink: 0; align-self: center; color: var(--text-faint);
  font-size: 30px; line-height: 1; transition: transform 0.18s, color 0.15s;
}
.review-item.open .review-chevron { transform: rotate(180deg); color: var(--accent); }
.review-visual { padding: 4px 0 16px; }
.review-visual .fretboard-wrap { max-width: 640px; margin: 0 auto; }
.review-visual svg { width: 100%; height: auto; display: block; }
.review-visual .rv-caption {
  text-align: center; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-dim); margin-top: 8px; letter-spacing: 0.03em;
}
.review-mark {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; margin-top: 2px;
}
.review-mark.ok { background: rgba(70,200,130,0.15); color: var(--success); }
.review-mark.no { background: rgba(217,107,74,0.15); color: var(--error); }
.review-mark.timeout { background: rgba(111,96,73,0.2); color: var(--text-dim); }
.review-body { flex: 1; min-width: 0; }
.review-q { font-size: 14px; color: var(--text); margin-bottom: 2px; }
.review-a { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.review-a .correct { color: var(--success); }
.review-a .yours { color: var(--error); }

/* ---- Export / import + storage notice ------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 100;
}
.modal {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: 18px; padding: 28px; max-width: 520px; width: 100%;
  box-shadow: var(--shadow-deep);
}
.modal h2 {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: 24px; color: var(--text); margin: 0 0 6px;
}
.modal p { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin: 0 0 16px; }
.modal textarea {
  width: 100%; min-height: 90px; resize: vertical;
  background: var(--bg-deep); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 12px; color: var(--text);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.5;
}
.modal textarea:focus { outline: none; border-color: var(--accent-bright); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.modal-msg { font-family: var(--font-mono); font-size: 12px; margin-top: 10px; }
.modal-msg.ok { color: var(--success); }
.modal-msg.err { color: var(--error); }

.storage-warn {
  background: rgba(217,107,74,0.08); border: 1px solid rgba(217,107,74,0.4);
  border-radius: 12px; padding: 14px 18px; margin-top: 20px;
  font-size: 13px; color: var(--text-dim); line-height: 1.5;
}
.storage-warn strong { color: var(--error); }

/* ---- Section headers ----------------------------------------------------- */
.section-header { margin: 56px 0 8px; }
.section-eyebrow {
  color: var(--accent); font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  margin-bottom: 10px; display: flex; align-items: center; gap: 14px;
}
.section-eyebrow::before { content: ''; width: 30px; height: 1px; background: var(--accent); }
.section-title {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(24px, 4vw, 32px);
  color: var(--text); letter-spacing: -0.01em; margin: 0;
}

.mono-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-faint);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
