/* =============================================
   Spelling Bee Game — Premium UI
   https://spellbeegame.org
   ============================================= */

/* ── Google Font ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Design Tokens ───────────────────────────── */
:root {
  /* Surfaces */
  --bg:          #FFFFFF;
  --bg-surface:  #FFFFFF;
  --bg-elevated: #FAFAFA;
  --bg-subtle:   #F5F5F5;

  /* Text */
  --text:        #111111;
  --text-2:      #333333;
  --text-muted:  #737373;
  --text-faint:  #A3A3A3;

  /* Borders */
  --border:      #E5E5E5;
  --border-2:    #D4D4D4;

  /* Brand — Honey Gold */
  --honey:       #FACC15;
  --honey-2:     #EAB308;
  --honey-3:     #CA8A04;
  --honey-light: #FEF9C3;
  --amber:       #F59E0B;
  --amber-2:     #D97706;
  --amber-glow:  rgba(245,158,11,0.35);

  /* Semantic */
  --hex-outer:   #FACC15;
  --hex-center:  #F59E0B;
  --hex-text:    #1A1200;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 8px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 12px 24px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
  --shadow-xl:   0 24px 48px rgba(0,0,0,.10), 0 8px 16px rgba(0,0,0,.05);
  --modal-shadow:0 32px 64px rgba(0,0,0,.18), 0 8px 24px rgba(0,0,0,.10);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

/* ── Dark Mode Tokens ────────────────────────── */
body.dark {
  --bg:          #0C0C0C;
  --bg-surface:  #141414;
  --bg-elevated: #1A1A1A;
  --bg-subtle:   #222222;

  --text:        #F5F5F5;
  --text-2:      #D4D4D4;
  --text-muted:  #A3A3A3;
  --text-faint:  #737373;

  --border:      #2A2A2A;
  --border-2:    #3A3A3A;

  --shadow-xs:   0 1px 2px rgba(0,0,0,.3);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md:   0 4px 8px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg:   0 12px 24px rgba(0,0,0,.6), 0 4px 8px rgba(0,0,0,.4);
  --shadow-xl:   0 24px 48px rgba(0,0,0,.7), 0 8px 16px rgba(0,0,0,.5);
  --modal-shadow:0 32px 64px rgba(0,0,0,.8), 0 8px 24px rgba(0,0,0,.5);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  transition: background .3s var(--ease), color .3s var(--ease);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--amber-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}

/* gold accent line at top */
.site-header::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--honey), var(--amber), var(--honey));
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

body.dark .site-header {
  background: rgba(12,12,12,.9);
}

.header-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 6px 8px 6px 4px;
  border-radius: var(--r-sm);
  transition: background .15s;
}

.header-logo:hover {
  background: var(--bg-subtle);
  text-decoration: none;
}

.logo-hex {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.logo-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--text);
  line-height: 1;
}

.logo-name span {
  color: var(--amber-2);
}

.header-divider {
  width: 1px;
  height: 20px;
  background: var(--border-2);
  margin: 0 6px;
}

.header-mode-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: inherit;
  transition: background .15s, color .15s;
  letter-spacing: -.1px;
}

.header-mode-btn:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.header-mode-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-nav-links {
  display: flex;
  align-items: center;
  margin-right: 6px;
}

.header-nav-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  transition: background .15s, color .15s;
}

.header-nav-links a:hover {
  background: var(--bg-subtle);
  color: var(--text);
  text-decoration: none;
}

.icon-btn {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.icon-btn svg { width: 20px; height: 20px; }

/* ═══════════════════════════════════════════
   PREMIUM GAME INTERFACE
   ═══════════════════════════════════════════ */

/* ── Outer wrapper ───────────────────────── */
.game-section {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 12px 32px;
}

/* ── Game card ───────────────────────────── */
.game-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow:
    0 1px 2px rgba(0,0,0,.04),
    0 4px 16px rgba(0,0,0,.08),
    0 16px 48px rgba(0,0,0,.06),
    0 0 0 1px rgba(0,0,0,.02);
  overflow: hidden;
  padding: 0;
}

.game-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--honey), var(--amber), var(--honey));
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

body.dark .game-card {
  box-shadow:
    0 1px 2px rgba(0,0,0,.4),
    0 4px 20px rgba(0,0,0,.5),
    0 16px 48px rgba(0,0,0,.4),
    0 0 0 1px rgba(255,255,255,.03);
}

/* ── Divider line ────────────────────────── */
.gc-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── Progress section ────────────────────── */
.gc-progress {
  padding: 16px 18px 14px;
  cursor: pointer;
  transition: background .15s;
  border-radius: 24px 24px 0 0;
}

.gc-progress:hover { background: var(--bg-elevated); }

.gcp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.gcp-rank-block {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.gcp-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-faint);
}

.gcp-rank-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--text);
}

.gcp-score-badge {
  display: flex;
  align-items: baseline;
  gap: 3px;
  background: linear-gradient(135deg, rgba(250,204,21,.18), rgba(245,158,11,.1));
  border: 1px solid rgba(250,204,21,.3);
  border-radius: var(--r-full);
  padding: 3px 11px;
}

.gcp-score-badge span:first-child {
  font-size: 1rem;
  font-weight: 900;
  color: var(--amber-2);
  letter-spacing: -.5px;
}

.gcp-pts {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--amber-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.gcp-next {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  min-height: 16px;
}

.gcp-next b { color: var(--amber-2); }
.gcp-next em { font-style: normal; color: var(--text-2); }

.gcp-track-wrap {
  position: relative;
  padding: 7px 0 3px;
}

.gcp-track {
  position: absolute;
  top: 50%; left: 10px; right: 10px;
  height: 4px;
  background: var(--bg-subtle);
  border-radius: 2px;
  transform: translateY(-50%);
  overflow: hidden;
}

.gcp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--honey), var(--amber));
  border-radius: 2px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

.gcp-dots {
  position: relative;
  display: flex;
  justify-content: space-between;
}

.gcp-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-2);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background .2s var(--ease), border-color .2s, transform .2s var(--ease-spring);
}

.gcp-dot[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  pointer-events: none;
  z-index: 20;
}

.gcp-dot.reached { background: var(--honey); border-color: var(--honey-2); }

.gcp-dot.active {
  background: var(--amber);
  border-color: var(--amber-2);
  transform: scale(1.3);
  box-shadow: 0 0 0 4px var(--amber-glow);
}

.gcp-dot--genius { border-color: rgba(245,158,11,.5); }
.gcp-dot--genius.reached {
  background: linear-gradient(135deg, var(--honey), var(--amber));
  border-color: var(--amber-2);
  box-shadow: 0 0 12px var(--amber-glow);
}

/* ── Words area ──────────────────────────── */
.gc-words {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 8px;
  min-height: 48px;
}

.gcw-bar {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.gcw-empty-hint {
  font-size: 0.82rem;
  color: var(--text-faint);
  font-style: italic;
  white-space: nowrap;
}

.gcw-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  width: 100%;
}

.gcw-strip::-webkit-scrollbar { display: none; }

.gcw-chip {
  display: inline-flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  letter-spacing: .1px;
  animation: chipIn .18s var(--ease-spring);
  flex-shrink: 0;
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(.7) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.gcw-chip--pangram {
  background: linear-gradient(135deg, var(--honey), #FDE68A);
  border-color: var(--honey-2);
  font-weight: 800;
  color: var(--honey-3);
}

.gcw-expand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-color .12s;
  min-width: 36px;
  justify-content: center;
}

.gcw-expand:hover { background: var(--bg-subtle); border-color: var(--border-2); }

.gcw-expand svg {
  width: 12px; height: 12px;
  flex-shrink: 0;
  transition: transform .25s var(--ease);
}

/* Dropdown panel */
.word-list-panel {
  border-top: 1px solid var(--border);
  padding: 10px 14px 12px;
  display: none;
  background: var(--bg-surface);
  max-height: 140px;
  overflow-y: auto;
}

.word-list-panel.open { display: block; }

.word-list-panel ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.word-list-panel li {
  background: var(--bg-elevated);
  border-radius: var(--r-xs);
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-2);
}

.word-list-panel li.pangram {
  background: linear-gradient(135deg, var(--honey), #FDE68A);
  border-color: var(--honey-2);
  font-weight: 700;
  color: var(--honey-3);
}

/* ── Notification ────────────────────────── */
.notification-area {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
}

.notification {
  display: none;
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .1px;
  animation: notifPop .22s var(--ease-spring);
}

.notification.show { display: inline-flex; align-items: center; gap: 6px; }

.notification.error { background: var(--text); color: var(--bg); }

body.dark .notification.error {
  background: var(--bg-subtle);
  color: var(--text);
  border: 1px solid var(--border-2);
}

.notification.good { background: #2D2D2D; color: #fff; }
body.dark .notification.good { background: var(--bg-subtle); color: var(--text); border: 1px solid var(--border-2); }

.notification.great {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 4px 12px rgba(245,158,11,.4);
}

.notification.pangram {
  background: linear-gradient(135deg, var(--honey), var(--amber));
  color: #1C1200;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(245,158,11,.5);
}

@keyframes notifPop {
  from { opacity: 0; transform: scale(.75) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Input display ───────────────────────── */
.gc-input-wrap {
  padding: 4px 18px 0;
}

.gc-input {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  font-family: inherit;
  padding: 8px 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}

.gc-input:focus-within,
.gc-input:not(:empty) {
  border-color: rgba(245,158,11,.5);
  box-shadow: 0 0 0 4px rgba(245,158,11,.10), 0 2px 8px rgba(245,158,11,.12);
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-surface));
}

.gc-input .cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--amber);
  font-weight: 300;
  font-size: 1.7rem;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.gc-input .center-letter { color: var(--amber); }

/* ── Hive container ──────────────────────── */
.gc-hive {
  display: flex;
  justify-content: center;
  padding: 20px 0 24px;
}

.hex-grid {
  position: relative;
  width: 280px;
  height: 258px;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Game Controls ────────────────────────── */
.gc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 22px;
  gap: 12px;
}

.gc-ctrl-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-full);
  background: var(--bg-surface);
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition:
    background .15s var(--ease),
    border-color .15s,
    box-shadow .2s var(--ease),
    transform .15s var(--ease-spring),
    color .15s;
  white-space: nowrap;
  letter-spacing: -.1px;
  box-shadow: var(--shadow-xs);
  -webkit-tap-highlight-color: transparent;
}

.gc-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.gc-btn:active { transform: scale(.93); box-shadow: none; }

.gc-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
  pointer-events: none;
}

.gc-btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* Ghost — Delete */
.gc-btn--ghost { padding: 0 14px; font-size: 0.84rem; }
.gc-btn--ghost svg { width: 15px; height: 15px; }

/* Icon-only — Shuffle / Hints */
.gc-btn--icon { padding: 0; width: 44px; }

/* Enter / Submit */
.gc-btn--enter {
  background: linear-gradient(135deg, var(--honey), var(--amber));
  border-color: var(--honey-2);
  color: #1C1200;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0 28px;
  box-shadow: 0 2px 8px rgba(245,158,11,.28), var(--shadow-xs);
  letter-spacing: .15px;
}

.gc-btn--enter svg { width: 14px; height: 14px; }

.gc-btn--enter:hover {
  background: linear-gradient(135deg, var(--honey-2), var(--amber-2));
  border-color: var(--amber-2);
  box-shadow: 0 4px 16px rgba(245,158,11,.44), var(--shadow-sm);
  color: #1C1200;
}

.gc-btn--enter:disabled {
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
}

/* ── Share ────────────────────────────────── */
.gc-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 36px);
  margin: 2px 18px 20px;
  height: 42px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-full);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .2s var(--ease), color .15s;
  letter-spacing: -.1px;
}

.gc-share svg { width: 15px; height: 15px; flex-shrink: 0; }

.gc-share:hover {
  background: var(--bg-subtle);
  border-color: rgba(245,158,11,.3);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(245,158,11,.1);
}

/* ── Progress Bar ─────────────────────────────── */
.progress-bar-wrap {
  cursor: pointer;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .2s var(--ease);
}

.progress-bar-wrap:hover {
  box-shadow: var(--shadow-sm);
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-rank {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--text);
}

.progress-score-pill {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--honey-light);
  color: var(--honey-3);
  padding: 2px 9px;
  border-radius: var(--r-full);
  letter-spacing: .2px;
}

body.dark .progress-score-pill {
  background: rgba(250,204,21,.12);
  color: var(--honey);
}

.progress-next {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
}

/* Connected track */
.progress-track-outer {
  position: relative;
  padding: 8px 0 4px;
}

.progress-track-line {
  position: absolute;
  top: 50%;
  left: 11px;
  right: 11px;
  height: 3px;
  background: var(--bg-subtle);
  border-radius: 2px;
  transform: translateY(-50%);
  overflow: hidden;
}

.progress-track-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--honey), var(--amber));
  border-radius: 2px;
  transition: width .5s var(--ease);
  width: 0%;
}

.progress-dots {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0px; /* hide text, show as visual dot */
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease-spring);
  flex-shrink: 0;
  position: relative;
}

.progress-dot[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  pointer-events: none;
  z-index: 10;
}

.progress-dot.reached {
  background: var(--honey);
  border-color: var(--honey-2);
}

.progress-dot.active {
  background: var(--amber);
  border-color: var(--amber-2);
  transform: scale(1.25);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.progress-dot.genius {
  background: var(--bg-subtle);
  border-color: var(--amber-2);
}

.progress-dot.genius.reached {
  background: linear-gradient(135deg, var(--honey), var(--amber));
  border-color: var(--amber-2);
  box-shadow: 0 0 10px var(--amber-glow);
}

/* ── Word List ────────────────────────────────── */
.word-display {
  margin-bottom: 4px;
}

.word-display-toggle {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .2s var(--ease);
  box-shadow: var(--shadow-xs);
}

.word-display-toggle:hover {
  background: var(--bg-elevated);
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
}

.word-display-toggle.open {
  border-radius: var(--r-md) var(--r-md) 0 0;
  border-bottom-color: transparent;
  box-shadow: none;
}

.toggle-label {
  font-weight: 600;
  color: var(--text-muted);
  flex: 1;
  text-align: left;
}

.toggle-count-badge {
  background: var(--honey);
  color: var(--honey-3);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: var(--r-full);
  letter-spacing: .2px;
  min-width: 24px;
  text-align: center;
}

.toggle-count-badge:empty { display: none; }

body.dark .toggle-count-badge {
  background: rgba(250,204,21,.15);
  color: var(--honey);
}

.word-display-toggle svg {
  width: 15px;
  height: 15px;
  color: var(--text-faint);
  transition: transform .25s var(--ease);
  flex-shrink: 0;
}

.word-display-toggle.open svg { transform: rotate(180deg); }

.word-list-panel {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 12px 14px;
  display: none;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  max-height: 160px;
  overflow-y: auto;
}

.word-list-panel.open { display: block; }

.word-list-panel ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.word-list-panel li {
  background: var(--bg-elevated);
  border-radius: var(--r-xs);
  padding: 3px 9px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-2);
  letter-spacing: .3px;
  text-transform: lowercase;
}

.word-list-panel li::first-letter { text-transform: uppercase; }

.word-list-panel li.pangram {
  background: linear-gradient(135deg, var(--honey), #FDE68A);
  border-color: var(--honey-2);
  font-weight: 700;
  color: var(--honey-3);
}

/* ── Notification ────────────────────────────── */
.notification-area {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
}

.notification {
  display: none;
  padding: 7px 18px;
  border-radius: var(--r-full);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .1px;
  animation: notifPop .22s var(--ease-spring);
}

.notification.show { display: inline-flex; align-items: center; gap: 6px; }

.notification.error {
  background: var(--text);
  color: var(--bg);
}

body.dark .notification.error {
  background: var(--bg-subtle);
  color: var(--text);
  border: 1px solid var(--border-2);
}

.notification.good {
  background: #404040;
  color: #fff;
}

.notification.great {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 4px 12px rgba(245,158,11,.35);
}

.notification.pangram {
  background: linear-gradient(135deg, var(--honey), var(--amber));
  color: #1C1200;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(245,158,11,.45);
}

@keyframes notifPop {
  from { opacity: 0; transform: scale(.75) translateY(-8px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

/* ── Word Input Display ───────────────────────── */
.word-input-display {
  text-align: center;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text);
  margin: 2px 0 4px;
  line-height: 1;
  font-family: inherit;
}

.word-input-display .cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--amber);
  font-weight: 300;
  margin-left: 1px;
  font-size: 1.6rem;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.word-input-display .center-letter { color: var(--amber); }

/* ── Hex Grid ─────────────────────────────────── */
.hex-grid-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
  padding: 8px 0;
}

.hex-grid {
  position: relative;
  width: 280px;
  height: 258px;
  user-select: none;
  -webkit-user-select: none;
}

/*
  Hex size: W=88px H=102px (s≈51px)
  Vert step: 1.5s ≈ 76px
  Row offset: W/2 = 44px
*/
.hex-cell {
  position: absolute;
  width: 88px;
  height: 102px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--honey);
  transition: filter .15s var(--ease), transform .15s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.12));
}

.hex-cell:hover {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.16)) brightness(1.04);
  transform: translateY(-2px);
}

.hex-cell:active {
  transform: scale(.93);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.1)) brightness(.96);
}

.hex-cell.center {
  background: linear-gradient(145deg, #FDE68A, var(--amber));
  filter: drop-shadow(0 4px 14px rgba(245,158,11,.5));
}

.hex-cell.center:hover {
  filter: drop-shadow(0 6px 18px rgba(245,158,11,.6)) brightness(1.05);
  transform: translateY(-2px);
}

.hex-cell.center:active {
  transform: scale(.93);
}

.hex-letter {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--hex-text);
  text-transform: uppercase;
  pointer-events: none;
  line-height: 1;
  letter-spacing: -.5px;
}

/* 2-3-2 layout — slightly larger cells */
.hex-cell:nth-child(1) { left: 47px;  top: 0px; }
.hex-cell:nth-child(2) { left: 137px; top: 0px; }
.hex-cell:nth-child(3) { left: 2px;   top: 74px; }
.hex-cell:nth-child(4) { left: 92px;  top: 74px; }
.hex-cell:nth-child(5) { left: 182px; top: 74px; }
.hex-cell:nth-child(6) { left: 47px;  top: 148px; }
.hex-cell:nth-child(7) { left: 137px; top: 148px; }

/* ── Game Buttons ─────────────────────────────── */
.game-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.btn {
  padding: 0 20px;
  height: 44px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border-2);
  background: var(--bg-surface);
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .2s var(--ease), transform .15s var(--ease-spring), color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  letter-spacing: -.1px;
  box-shadow: var(--shadow-xs);
}

.btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.btn:active {
  transform: scale(.95);
  box-shadow: none;
}

/* Square icon buttons */
.btn-icon {
  padding: 0;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.btn-icon svg { width: 19px; height: 19px; }

/* Delete */
.btn-delete svg { width: 16px; height: 16px; }

/* Submit / Enter */
.btn-submit {
  background: linear-gradient(135deg, var(--honey), var(--amber));
  border-color: var(--honey-2);
  color: #1C1200;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0 28px;
  box-shadow: 0 2px 8px rgba(245,158,11,.3), var(--shadow-xs);
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--honey-2), var(--amber-2));
  border-color: var(--amber-2);
  box-shadow: 0 4px 14px rgba(245,158,11,.4), var(--shadow-sm);
  color: #1C1200;
}

.btn-submit:active { transform: scale(.94); }

/* Share */
.share-btn {
  display: block;
  margin: 18px auto 0;
  padding: 0 32px;
  height: 44px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-2);
  letter-spacing: -.1px;
  transition: background .15s, box-shadow .2s var(--ease), color .15s;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-btn::before {
  content: '↑';
  font-size: 1rem;
  font-weight: 700;
}

.share-btn:hover {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

/* ── Modals ───────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .2s var(--ease);
}

.modal-overlay.open { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: var(--bg-surface);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--modal-shadow);
  border: 1px solid var(--border);
  animation: slideUp .28s var(--ease-spring);
  overscroll-behavior: contain;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  z-index: 1;
}

.modal-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.3px;
}

.modal-close {
  width: 30px;
  height: 30px;
  background: var(--bg-subtle);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--border-2);
  color: var(--text);
}

.modal-body {
  padding: 20px;
}

.modal-body p {
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.modal-body h3 {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -.1px;
  margin: 14px 0 6px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.modal-body ul {
  padding-left: 18px;
  margin: 6px 0 14px;
}

.modal-body li {
  margin-bottom: 7px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Rankings */
.rankings-list { list-style: none; padding: 0; }

.rankings-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  margin-bottom: 4px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: background .15s;
}

.rankings-list li:hover { background: var(--bg-elevated); }

.rankings-list li .rank-name {
  font-weight: 700;
  color: var(--text-2);
}

.rankings-list li .rank-pts {
  font-weight: 600;
  font-size: 0.82rem;
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--r-full);
  color: var(--text-muted);
}

.rankings-list li.current-rank {
  background: linear-gradient(135deg, rgba(250,204,21,.15), rgba(245,158,11,.1));
  border: 1px solid rgba(250,204,21,.3);
}

.rankings-list li.current-rank .rank-name { color: var(--amber-2); }

.rankings-list li.current-rank .rank-pts {
  background: var(--honey);
  color: var(--honey-3);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 14px 12px;
  text-align: center;
  border: 1px solid var(--border);
}

.stat-box .stat-val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.5px;
}

.stat-box .stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-faint);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Mode */
.mode-options { display: flex; gap: 10px; }

.mode-btn {
  flex: 1;
  padding: 18px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  cursor: pointer;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-2);
  transition: border-color .15s, background .15s, box-shadow .2s var(--ease);
  text-decoration: none;
  display: block;
  box-shadow: var(--shadow-xs);
}

.mode-btn:hover {
  border-color: var(--honey-2);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.mode-btn.active,
.mode-btn:active {
  border-color: var(--amber);
  background: linear-gradient(135deg, rgba(250,204,21,.12), rgba(245,158,11,.08));
  color: var(--amber-2);
}

.mode-btn .mode-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.mode-btn .mode-label { font-weight: 800; display: block; margin-bottom: 4px; }
.mode-btn .mode-desc { font-size: 0.78rem; font-weight: 400; color: var(--text-muted); }

/* Yesterday / Hints */
.yesterday-letters {
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 6px;
  color: var(--text);
}

.yesterday-letters .center { color: var(--amber); }

.yesterday-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.yesterday-words .yw {
  padding: 4px 11px;
  border-radius: var(--r-xs);
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s, border-color .12s;
  color: var(--text-2);
  letter-spacing: .2px;
}

.yesterday-words .yw:hover {
  background: var(--bg-subtle);
  border-color: var(--border-2);
}

.yesterday-words .yw.pangram {
  font-weight: 800;
  background: linear-gradient(135deg, var(--honey), #FDE68A);
  border-color: var(--honey-2);
  color: var(--honey-3);
}

/* Hint table */
.hint-table-wrap { overflow-x: auto; margin-bottom: 12px; }

.hint-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.82rem;
}

.hint-table th,
.hint-table td {
  border: 1px solid var(--border);
  padding: 7px 8px;
  text-align: center;
  min-width: 30px;
}

.hint-table th {
  background: linear-gradient(135deg, var(--honey), var(--amber));
  color: #1C1200;
  font-weight: 800;
  border-color: var(--honey-2);
}

.hint-table td.found {
  background: rgba(250,204,21,.2);
  color: var(--honey-3);
  font-weight: 700;
}

.hint-table td.row-label {
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--text-2);
}

/* Win modal */
.win-modal .confetti-row { text-align: center; font-size: 2.5rem; margin-bottom: 14px; }

.win-stats {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.win-stats p {
  margin: 5px 0;
  font-size: 0.9rem;
}

/* Settings */
.settings-section { margin-bottom: 16px; }

.settings-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}

.radio-group { display: flex; gap: 8px; }

.radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color .15s, background .15s;
  color: var(--text-2);
}

.radio-option input[type="radio"] { display: none; }

.radio-option.selected {
  border-color: var(--amber);
  background: linear-gradient(135deg, rgba(250,204,21,.1), rgba(245,158,11,.07));
  color: var(--amber-2);
}

/* ── SEO Content ──────────────────────────────── */
.seo-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 16px 60px;
  border-top: 1px solid var(--border);
}

.seo-content h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -.3px;
}

.seo-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 22px 0 8px;
  letter-spacing: -.2px;
}

.seo-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.72;
}

.seo-content ul { padding-left: 20px; margin-bottom: 14px; }

.seo-content li {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.65;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.faq-question {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
  cursor: pointer;
  color: var(--text);
  letter-spacing: -.1px;
}

.faq-answer {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.68;
}

/* ── Footer ───────────────────────────────────── */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 28px 16px;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}

.footer-links a:hover {
  color: var(--text);
  background: var(--bg-subtle);
  text-decoration: none;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ── Blog ─────────────────────────────────────── */
.blog-header {
  background: linear-gradient(135deg, var(--honey) 0%, var(--amber) 100%);
  padding: 56px 16px 48px;
  text-align: center;
}

.blog-header h1 {
  font-size: 2rem;
  font-weight: 900;
  color: #1C1200;
  margin-bottom: 10px;
  letter-spacing: -.5px;
}

.blog-header p { font-size: 1rem; color: rgba(28,18,0,.65); max-width: 480px; margin: 0 auto; }

.blog-grid {
  max-width: 900px;
  margin: 36px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-surface);
  transition: box-shadow .25s var(--ease), transform .2s var(--ease-spring), border-color .2s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border-2);
  text-decoration: none;
  color: var(--text);
}

.blog-card-image {
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--honey-light), rgba(250,204,21,.4));
  flex-shrink: 0;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--ease);
}

.blog-card:hover .blog-card-image img { transform: scale(1.06); }

body.dark .blog-card-image {
  background: linear-gradient(135deg, rgba(250,204,21,.08), rgba(245,158,11,.05));
}

.blog-card-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }

.blog-card-meta {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 7px;
  display: flex;
  gap: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.blog-card-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -.2px;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.62;
  flex: 1;
  margin-bottom: 14px;
}

.blog-card-readmore {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--amber-2);
  letter-spacing: -.1px;
}

/* Blog post page */
.blog-post-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 36px 16px 64px;
}

.blog-post-header { margin-bottom: 30px; }

.blog-post-cat {
  display: inline-block;
  background: var(--honey-light);
  color: var(--honey-3);
  padding: 3px 11px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

body.dark .blog-post-cat {
  background: rgba(250,204,21,.1);
  color: var(--honey);
}

.blog-post-title {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.5px;
  margin-bottom: 14px;
}

.blog-post-meta {
  font-size: 0.8rem;
  color: var(--text-faint);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.blog-post-content { font-size: 1rem; line-height: 1.78; }

.blog-post-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 34px 0 12px;
  letter-spacing: -.3px;
}

.blog-post-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 24px 0 10px;
  letter-spacing: -.2px;
}

.blog-post-content p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.blog-post-content ul,
.blog-post-content ol { padding-left: 24px; margin-bottom: 16px; }

.blog-post-content li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.blog-post-content blockquote {
  border-left: 3px solid var(--amber);
  margin: 20px 0;
  padding: 12px 18px;
  background: rgba(245,158,11,.06);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

.blog-post-content .callout {
  background: linear-gradient(135deg, rgba(250,204,21,.12), rgba(245,158,11,.07));
  border: 1px solid rgba(250,204,21,.3);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin: 24px 0;
  color: var(--text-2);
}

.blog-post-content .callout strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--amber-2);
}

.blog-cta {
  background: linear-gradient(135deg, var(--honey), var(--amber));
  border-radius: var(--r-lg);
  padding: 28px 24px;
  text-align: center;
  margin: 36px 0;
}

.blog-cta h3 { font-size: 1.2rem; font-weight: 800; color: #1C1200; margin-bottom: 8px; }
.blog-cta p  { font-size: 0.9rem; color: rgba(28,18,0,.65); margin-bottom: 18px; }

.blog-cta a {
  display: inline-block;
  background: #1C1200;
  color: var(--honey);
  padding: 11px 28px;
  border-radius: var(--r-full);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background .15s;
}

.blog-cta a:hover {
  background: #333;
  text-decoration: none;
}

.related-posts { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); }

.related-posts h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -.2px;
}

.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.related-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  text-decoration: none;
  color: var(--text-2);
  display: block;
  background: var(--bg-elevated);
  transition: border-color .15s, box-shadow .2s var(--ease);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.42;
}

.related-card:hover {
  border-color: var(--honey-2);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 500px) {
  .hex-grid {
    width: 248px;
    height: 228px;
  }

  .hex-cell { width: 78px; height: 90px; }
  .hex-cell:nth-child(1) { left: 42px;  top: 0px;   }
  .hex-cell:nth-child(2) { left: 122px; top: 0px;   }
  .hex-cell:nth-child(3) { left: 2px;   top: 66px;  }
  .hex-cell:nth-child(4) { left: 82px;  top: 66px;  }
  .hex-cell:nth-child(5) { left: 162px; top: 66px;  }
  .hex-cell:nth-child(6) { left: 42px;  top: 132px; }
  .hex-cell:nth-child(7) { left: 122px; top: 132px; }

  .hex-letter { font-size: 1.35rem; }
  .word-input-display { font-size: 1.6rem; }
  .blog-post-title { font-size: 1.55rem; }
  .header-nav-links { display: none; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .hex-grid {
    transform: scale(0.86);
    transform-origin: center top;
  }

  .btn { padding: 0 14px; height: 40px; font-size: 0.84rem; }
  .btn-submit { padding: 0 20px; }
  .game-buttons { gap: 7px; }
}

/* ── Utilities ────────────────────────────────── */
.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;
}

/* ═══════════════════════════════════════════
   HOME PAGE SECTIONS
   ═══════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────── */
.home-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.home-section--alt {
  background: var(--bg-elevated);
}

body.dark .home-section--alt {
  background: var(--bg-surface);
}

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

/* ── Section header ──────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--amber-2);
  margin-bottom: 8px;
}

.section-label::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--amber);
  border-radius: 1px;
  flex-shrink: 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -.5px;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 28px;
}

/* ── How it Works: step cards ─────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 18px 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s var(--ease-spring), box-shadow .22s var(--ease), border-color .18s;
}

.step-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--honey), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-2);
}

.step-card:hover::after { transform: scaleX(1); }

.step-num {
  position: absolute;
  top: 14px; right: 16px;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--border);
  pointer-events: none;
  user-select: none;
  transition: color .2s;
}

.step-card:hover .step-num { color: rgba(250,204,21,.25); }

.step-icon {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 14px;
  transition: transform .3s var(--ease-spring);
}

.step-card:hover .step-icon { transform: scale(1.15) rotate(-5deg); }

.step-card h3 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.2px;
  margin-bottom: 8px;
  color: var(--text);
}

.step-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Scoring section ──────────────────────── */
.scoring-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.score-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-rule {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  transition: box-shadow .2s var(--ease), border-color .15s;
}

.score-rule:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-2);
}

.score-rule--pangram {
  background: linear-gradient(135deg, rgba(250,204,21,.07), rgba(245,158,11,.04));
  border-color: rgba(250,204,21,.3);
}

.score-rule--pangram:hover { border-color: rgba(250,204,21,.5); }

.score-rule-pts {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--amber-2);
  background: rgba(250,204,21,.15);
  border-radius: var(--r-full);
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  letter-spacing: .1px;
  border: 1px solid rgba(250,204,21,.25);
}

body.dark .score-rule-pts {
  background: rgba(250,204,21,.1);
  border-color: rgba(250,204,21,.2);
  color: var(--honey);
}

.score-rule strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -.1px;
  margin-bottom: 3px;
  color: var(--text);
}

.score-rule p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; margin: 0; }

/* ── Rank ladder ──────────────────────────── */
.ranks-ladder {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}

.ranks-ladder-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.rank-rung {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  margin-bottom: 3px;
  position: relative;
  overflow: hidden;
  transition: background .15s;
}

/* Animated fill bar via CSS custom property */
.rank-rung::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250,204,21,.22), rgba(245,158,11,.1));
  border-radius: var(--r-sm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}

.rank-rung.rr-visible::before {
  transform: scaleX(var(--fill, 0));
}

.rank-rung--top {
  border: 1px solid rgba(250,204,21,.4);
  background: linear-gradient(135deg, rgba(250,204,21,.12), rgba(245,158,11,.06));
}

.rank-rung--top::before { background: none; }

.rr-badge {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.rr-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-2);
  position: relative;
  z-index: 1;
  flex: 1;
}

.rr-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  position: relative;
  z-index: 1;
}

/* ── Tips grid ────────────────────────────── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-xs);
  transition: transform .2s var(--ease-spring), box-shadow .2s var(--ease), border-color .15s;
}

.tip-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-2);
}

.tip-icon-wrap {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(250,204,21,.18), rgba(245,158,11,.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform .3s var(--ease-spring);
}

.tip-card:hover .tip-icon-wrap { transform: scale(1.12) rotate(-4deg); }

.tip-card h3 {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -.15px;
  margin-bottom: 5px;
  color: var(--text);
}

.tip-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ── FAQ accordion ────────────────────────── */
.faq-accordion {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.15px;
  transition: background .15s;
  line-height: 1.4;
}

.faq-q:hover { background: var(--bg-elevated); }

.faq-q[aria-expanded="true"] {
  background: linear-gradient(135deg, rgba(250,204,21,.07), rgba(245,158,11,.04));
  color: var(--amber-2);
}

.faq-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: background .22s var(--ease), border-color .22s, color .22s, transform .35s var(--ease-spring);
  flex-shrink: 0;
  line-height: 1;
}

.faq-q[aria-expanded="true"] .faq-icon {
  background: var(--honey);
  border-color: var(--honey-2);
  color: var(--honey-3);
  transform: rotate(45deg);
}

/* Smooth open/close */
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .38s cubic-bezier(.4,0,.2,1);
}

.faq-a.open { max-height: 320px; }

.faq-a-inner {
  padding: 16px 20px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.72;
  border-top: 1px solid var(--border);
}

.faq-a-inner strong { color: var(--text-2); }

/* ── Blog teasers ─────────────────────────── */
.blog-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.blog-teaser-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: transform .22s var(--ease-spring), box-shadow .22s var(--ease), border-color .15s;
  position: relative;
  overflow: hidden;
}

.blog-teaser-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--honey), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.blog-teaser-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-2);
  text-decoration: none;
  color: var(--text);
}

.blog-teaser-card:hover::before { transform: scaleX(1); }

.btc-img-wrap {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--honey-light), rgba(250,204,21,.35));
  flex-shrink: 0;
}

.btc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--ease);
}

.blog-teaser-card:hover .btc-img { transform: scale(1.06); }

.btc-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.btc-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -.1px;
  color: var(--text);
  flex: 1;
}

.btc-arrow {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber-2);
  margin-top: auto;
  letter-spacing: -.1px;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--amber-2);
  border: 1.5px solid var(--border-2);
  padding: 10px 22px;
  border-radius: var(--r-full);
  background: var(--bg-surface);
  transition: border-color .15s, background .15s, box-shadow .2s var(--ease), color .15s;
  text-decoration: none;
  letter-spacing: -.1px;
}

.view-all-btn:hover {
  border-color: var(--amber);
  background: linear-gradient(135deg, rgba(250,204,21,.08), rgba(245,158,11,.05));
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--amber-2);
}

/* ── Rating Section ──────────────────────── */
.rate-section {
  padding: 60px 0 64px;
  background: linear-gradient(160deg, rgba(250,204,21,.06) 0%, rgba(245,158,11,.03) 100%);
  border-top: 1px solid var(--border);
  text-align: center;
}

.rate-section .section-title { margin-bottom: 10px; }

.rate-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 auto 32px;
  max-width: 420px;
  line-height: 1.65;
}

.rate-widget { max-width: 360px; margin: 0 auto; }

.star-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 18px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 2.6rem;
  cursor: pointer;
  color: var(--border-2);
  transition: color .15s var(--ease), transform .18s var(--ease-spring);
  line-height: 1;
  padding: 4px 6px;
  -webkit-tap-highlight-color: transparent;
}

.star-btn.lit   { color: var(--honey); transform: scale(1.15); }
.star-btn.rated { color: var(--amber); }

.rate-thankyou {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amber-2);
  background: linear-gradient(135deg, rgba(250,204,21,.14), rgba(245,158,11,.08));
  border: 1px solid rgba(250,204,21,.3);
  border-radius: var(--r-full);
  padding: 10px 24px;
  letter-spacing: -.1px;
}

.rate-thankyou.show { display: inline-flex; animation: notifPop .25s var(--ease-spring); }

/* ── Responsive for home sections ──────────── */
@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr; gap: 12px; }
  .scoring-inner { grid-template-columns: 1fr; gap: 32px; }
  .tips-grid { grid-template-columns: 1fr; }
  .blog-teaser-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 1.45rem; }
  .home-section { padding: 48px 0; }
}

@media (min-width: 480px) and (max-width: 640px) {
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-teaser-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 640px) and (max-width: 780px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .scoring-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ═══════════════════════════════════════════
   PLAY OTHER GAMES SECTION
   ═══════════════════════════════════════════ */

.games-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 56px 0 60px;
}

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

.games-header {
  margin-bottom: 32px;
}

/* Grid: auto-fill with min 130px per card */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

/* ── Game card ──────────────────────────── */
.game-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition:
    transform .2s var(--ease-spring),
    box-shadow .2s var(--ease),
    border-color .15s;
  position: relative;
}

.game-item::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--honey), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.game-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-2);
  text-decoration: none;
  color: var(--text);
}

.game-item:hover::after { transform: scaleX(1); }

/* ── Image container ──────────────────── */
.game-item__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(250,204,21,.12), rgba(245,158,11,.07));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.game-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s var(--ease);
}

.game-item:hover .game-item__img img {
  transform: scale(1.06);
}

/* Fallback when image fails to load */
.game-item__img img[src=""] ,
.game-item__img img:not([src]) {
  display: none;
}

/* ── Info area ────────────────────────── */
.game-item__info {
  padding: 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.game-item__title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -.15px;
  color: var(--text);
  line-height: 1.2;
}

.game-item__text {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
}

.game-item__play {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber-2);
  margin-top: 6px;
  opacity: 1;
  letter-spacing: .1px;
  transition: color .15s;
}

.game-item:hover .game-item__play { color: var(--amber); }

/* ── Responsive ───────────────────────── */
@media (max-width: 640px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
  }

  .game-item__info { padding: 8px; }
  .game-item__title { font-size: 0.78rem; }
  .game-item__text { display: none; }
}

@media (max-width: 400px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

@media (min-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (min-width: 700px) and (max-width: 899px) {
  .games-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

