/* ============================================================
   GetUnicornValue — Premium CSS
   Palette: Anthracite · White · Gold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --gold: #C9A84C;
  --gold-light: #FFD700;
  --gold-glow: rgba(201, 168, 76, 0.25);
  --anthracite: #2B2B2B;
  --anthracite-deep: #1A1A1A;
  --anthracite-mid: #3A3A3A;

  /* Light theme */
  --bg: #FAFAFA;
  --bg-2: #F0F0F0;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #555555;
  --text-3: #888888;
  --border: #E4E4E4;
  --header-bg: #2B2B2B;
  --header-text: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
  --danger: #D93025;
  --success: #1E8E3E;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --nav-height: 70px;
  --header-height: 58px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-dark {
  --bg: #141414;
  --bg-2: #1E1E1E;
  --bg-card: #242424;
  --text: #F0F0F0;
  --text-2: #AAAAAA;
  --text-3: #666666;
  --border: #333333;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  overscroll-behavior: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  width: 100%;
  position: relative;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(0,0,0,0.1);
  margin: 0 auto;
}

/* ─── Header ────────────────────────────────────────────────── */
#header {
  height: var(--header-height);
  background: var(--anthracite);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.unicorn-logo-svg {
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.4));
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.3px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.score-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  padding: 4px 10px;
  margin-right: 4px;
}

.score-star { font-size: 14px; }

#score-display {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
  min-width: 18px;
  text-align: center;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: rgba(255,255,255,0.8);
}
.icon-btn:hover { background: rgba(255,255,255,0.1); }
.icon-btn:active { transform: scale(0.92); }

/* ─── Main ──────────────────────────────────────────────────── */
#main {
  flex: 1;
  width: 100%;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: calc(var(--nav-height) + 8px);
  background: var(--bg);
  box-sizing: border-box;
}

/* ─── Bottom Nav ────────────────────────────────────────────── */
#bottom-nav {
  height: var(--nav-height);
  background: var(--anthracite);
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 8px 4px;
  transition: var(--transition);
  color: rgba(255,255,255,0.45);
  position: relative;
}

.nav-btn.active { color: var(--gold); }
.nav-btn.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--gold);
  border-radius: 0 0 2px 2px;
}

.nav-icon { font-size: 20px; }
.nav-label { font-size: 10px; font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; }
.nav-btn:active { transform: scale(0.9); }

/* ─── HOME ──────────────────────────────────────────────────── */
.home-hero {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
}

.hero-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 0 10px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.hero-slogan {
  font-size: 14px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mode-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.mode-card:hover, .mode-card:active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-glow), var(--shadow-md);
  transform: translateY(-1px);
}

.mode-card.hot10 { border-left: 4px solid #FF6B35; }
.mode-card.hot100 { border-left: 4px solid var(--gold); opacity: 0.7; }
.mode-card.theme { border-left: 4px solid #6C63FF; }
.mode-card.adventure { border-left: 4px solid #00B894; }

.mode-icon { font-size: 28px; flex-shrink: 0; }
.mode-info { flex: 1; }
.mode-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 3px;
}
.mode-desc { font-size: 13px; color: var(--text-2); line-height: 1.4; }

.mode-badge {
  background: var(--anthracite);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.mode-badge.coming { background: var(--gold); color: var(--anthracite); }
.mode-arrow { font-size: 22px; color: var(--text-3); flex-shrink: 0; }

.home-stats {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding-bottom: 10px;
}

.stat-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

/* ─── Theme Selector ────────────────────────────────────────── */
.theme-selector { padding: 16px; }
.theme-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.theme-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.theme-item:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }

.theme-item-icon { font-size: 26px; flex-shrink: 0; }
.theme-item-info { flex: 1; }
.theme-item-name { font-weight: 700; font-size: 15px; color: var(--text); }
.theme-item-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.theme-item-arrow { font-size: 20px; color: var(--text-3); }
.theme-item-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.theme-item-prog { font-size: 13px; font-weight: 700; color: var(--gold); }

/* Hero favicon */
.hero-favicon { border-radius: 18px; display: block; box-shadow: 0 4px 20px rgba(201,168,76,0.3); }

/* ─── Game Screen ───────────────────────────────────────────── */
.game-screen {
  padding: 0 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding: 10px 14px;
  margin: -14px -14px 0;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.game-progress {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.progress-mode { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.progress-count { font-weight: 700; font-size: 15px; color: var(--text); }

.game-lives {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.life-heart {
  font-size: 18px;
  transition: var(--transition);
}
.life-heart.alive { color: #E74C3C; filter: drop-shadow(0 0 3px rgba(231,76,60,0.4)); }
.life-heart.lost { color: var(--border); opacity: 0.4; }

/* ─── Clue Card ─────────────────────────────────────────────── */
.clue-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.clue-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.clue-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.clue-emoji { font-size: 32px; flex-shrink: 0; }
.clue-meta { flex: 1; }
.clue-since { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.clue-cats { font-size: 13px; color: var(--gold); font-weight: 600; margin-top: 2px; }
.clue-flag { font-size: 22px; flex-shrink: 0; }

.clue-story-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  margin-bottom: 8px;
}

.clue-story {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 15px;
}

.clue-funding-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.clue-funding-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  margin-bottom: 4px;
}
.clue-funding-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ─── Guess Area ─────────────────────────────────────────────── */
.guess-area {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.guess-label {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 500;
}

.guess-hint-note {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 14px;
  line-height: 1.4;
}

.guess-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.guess-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}
.guess-history-item.lower,
.guess-history-item.higher { background: var(--bg-2); color: var(--text-2); }
.guess-history-item.exact,
.guess-history-item.almost { background: rgba(30, 142, 62, 0.12); color: var(--success); }

.guess-history-result { font-weight: 700; }

.feedback-msg {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: var(--transition);
}
.feedback-hint { background: var(--bg-2); color: var(--text); }
.feedback-win { background: rgba(30, 142, 62, 0.12); color: var(--success); }

.guess-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-prefix, .input-suffix {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-2);
  flex-shrink: 0;
}

.guess-input {
  flex: 1;
  background: var(--bg-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--text);
  transition: var(--transition);
  min-width: 0;
  appearance: textfield; /* standard */
}
.guess-input::-webkit-outer-spin-button,
.guess-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.guess-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.guess-input.shake {
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.btn-guess {
  flex-shrink: 0;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
}

.guess-actions {
  margin-top: 12px;
}

.btn-superpower {
  width: 100%;
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(201,168,76,0.05));
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  flex-direction: column;
}
.btn-superpower:hover { background: rgba(201,168,76,0.15); }
.sp-detail { font-size: 11px; font-weight: 400; opacity: 0.8; }

.superpower-used {
  text-align: center;
  padding: 10px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
}

/* ─── Reveal Screen ──────────────────────────────────────────── */
.reveal-screen {
  padding: 14px;
  animation: slideUp 0.3s ease;
}

.reveal-win-badge {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--success);
  padding: 8px;
  background: rgba(30, 142, 62, 0.1);
  border-radius: 20px;
  margin-bottom: 12px;
}

.reveal-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}

.reveal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(135deg, var(--anthracite) 0%, var(--anthracite-mid) 100%);
  position: relative;
}
.reveal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.reveal-emoji { font-size: 36px; flex-shrink: 0; }
.reveal-title-block { flex: 1; }
.reveal-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
}
.reveal-nationality { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 2px; }

.reveal-valuation { text-align: right; flex-shrink: 0; }
.val-amount {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
}
.val-label { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }

.reveal-section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.reveal-section:last-child { border-bottom: none; }

.reveal-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  margin-bottom: 6px;
  font-weight: 600;
}

.reveal-description { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.reveal-founders, .reveal-ceo { font-size: 14px; font-weight: 600; color: var(--text); }

.reveal-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.reveal-funding-table { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.funding-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
}
.funding-round { font-weight: 600; color: var(--text); flex: 1; }
.funding-year { color: var(--text-3); width: 45px; text-align: center; font-size: 12px; }
.funding-amount { font-weight: 700; color: var(--gold); }

.last-investors { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.last-inv-label { font-weight: 600; color: var(--text-2); }

.reveal-sources { display: flex; flex-direction: column; gap: 8px; }
.source-link {
  display: block;
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.source-link:hover { text-decoration: underline; opacity: 0.8; }

.reveal-actions {
  text-align: center;
  padding: 0 4px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.btn-next {
  width: 100%;
  font-size: 16px;
  padding: 16px;
}

.reveal-session { font-size: 13px; color: var(--text-3); }

/* ─── Victory Screen ─────────────────────────────────────────── */
.victory-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  min-height: calc(100dvh - var(--header-height) - var(--nav-height));
  animation: slideUp 0.4s ease;
}

.victory-confetti { font-size: 36px; animation: bounce 1s ease infinite; }
.victory-trophy { font-size: 64px; margin: 10px 0; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.victory-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}
.victory-subtitle { font-size: 15px; color: var(--text-2); margin-bottom: 14px; }
.victory-score {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.victory-quote {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 28px;
  max-width: 100%;
}
.victory-quote-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 10px;
  display: block;
}
.victory-quote-author { font-size: 13px; color: var(--gold); font-weight: 600; display: block; }

.victory-actions { display: flex; gap: 12px; }

/* ─── Startupdex ─────────────────────────────────────────────── */
.startupdex { padding: 16px; width: 100%; box-sizing: border-box; }

.dex-header {
  margin-bottom: 18px;
}

.dex-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dex-title-row h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.dex-progress-badge {
  background: var(--gold);
  color: var(--anthracite);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}

.dex-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.dex-stat {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.dex-stat-icon { font-size: 20px; display: block; }
.dex-stat-val { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); display: block; }
.dex-stat-lbl { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; display: block; }

.btn-lives-reward {
  width: 100%;
  background: linear-gradient(135deg, var(--anthracite), var(--anthracite-mid));
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-lives-reward:hover { opacity: 0.85; transform: translateY(-1px); }

.lives-maxed {
  text-align: center;
  font-size: 14px;
  color: var(--success);
  font-weight: 600;
  padding: 12px;
  background: rgba(30,142,62,0.1);
  border-radius: var(--radius);
  border: 1px solid rgba(30,142,62,0.2);
}

.dex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dex-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dex-card.found {
  border-color: var(--gold);
  cursor: pointer;
}
.dex-card.found:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dex-card.found::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.dex-card.unknown { opacity: 0.55; cursor: default; }

.dex-card-emoji { font-size: 28px; }
.dex-card-name { font-size: 13px; font-weight: 700; color: var(--text); }
.dex-card-val { font-size: 12px; font-weight: 700; color: var(--gold); }
.dex-card-flag { font-size: 16px; }

/* ─── Section Header ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.back-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
  flex-shrink: 0;
}
.back-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ─── Donate ─────────────────────────────────────────────────── */
.donate-page { padding: 20px 16px; }

.donate-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 20px 0 24px;
}

.donate-hero h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.donate-tagline { font-size: 14px; color: var(--text-2); line-height: 1.6; }

.donate-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.donate-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.donate-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-glow), var(--shadow-md);
}

.donate-tier-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--anthracite);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
}
.donate-tier-icon { font-size: 32px; margin-bottom: 8px; }
.donate-tier-name { font-weight: 700; font-size: 16px; color: var(--text); margin-bottom: 4px; }
.donate-tier-price {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}
.donate-tier-desc { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }

.btn-donate-action { width: 100%; }

.donate-footer { text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.6; }

/* ─── Settings ───────────────────────────────────────────────── */
.settings-page { padding: 16px; }

.settings-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.settings-section {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.settings-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}
.settings-row:last-child { border-bottom: none; }
.settings-row.action-row { flex-direction: row; }
.settings-row.danger-row .settings-action-title { color: var(--danger); }

.settings-action-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.settings-action-desc { font-size: 12px; color: var(--text-3); }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--gold); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

.settings-about {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.about-app-name { font-weight: 700; font-size: 16px; color: var(--text); }
.about-version { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.about-slogan { font-size: 13px; color: var(--gold); font-weight: 600; margin-top: 2px; }

.settings-source-note {
  padding: 12px 16px;
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.6;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--anthracite-deep);
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 3px 12px rgba(201, 168, 76, 0.35);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 5px 20px rgba(201, 168, 76, 0.45); }
.btn-gold:active { transform: scale(0.97); }

.btn-outline {
  background: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-danger:hover { opacity: 0.85; }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-full { width: 100%; }

/* ─── Overlay & Modals ───────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.overlay.hidden { display: none; }

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

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: min(420px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.close-btn {
  background: var(--bg-2);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.close-btn:hover { background: var(--border); }

.modal-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }

.tutorial-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.tut-icon { font-size: 24px; flex-shrink: 0; margin-top: 1px; }
.tutorial-step strong { display: block; font-size: 15px; color: var(--text); margin-bottom: 3px; }
.tutorial-step p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 2px; }
.tutorial-step em { color: var(--success); font-style: normal; font-weight: 600; }

#start-tutorial { margin: 16px 20px 20px; }

/* Ad overlay */
.ad-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: min(340px, 90vw);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalUp 0.3s ease;
}

.ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--anthracite);
}
.ad-tag { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
#ad-timer {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
}

.ad-content { padding: 30px 20px; background: var(--bg-2); text-align: center; }
.ad-brand { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ad-content p { font-size: 13px; color: var(--text-2); }

.ad-footer { padding: 14px 18px; }
.ad-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
}
.ad-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  border-radius: 2px;
  transition: width 1s linear;
  width: 0%;
}
#ad-subtitle { font-size: 12px; color: var(--text-3); text-align: center; }

/* Game Over */
.gameover-box {
  text-align: center;
  padding-bottom: 20px;
}
.gameover-emoji { font-size: 52px; padding: 20px 0 8px; }
.gameover-box h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.gameover-quote {
  padding: 0 20px 16px;
  text-align: left;
}
.gameover-quote blockquote {
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  border-left: 3px solid var(--gold);
  padding-left: 14px;
  margin-bottom: 6px;
}
.gameover-quote cite { font-size: 12px; color: var(--gold); font-weight: 600; display: block; padding-left: 17px; }

.gameover-ad { padding: 0 20px 16px; }
.ad-banner {
  background: var(--bg-2);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

.gameover-buttons {
  display: flex;
  gap: 12px;
  padding: 0 20px;
}
.gameover-buttons .btn-gold { flex: 1; }
.gameover-buttons .btn-outline { flex-shrink: 0; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
#main::-webkit-scrollbar { width: 4px; }
#main::-webkit-scrollbar-track { background: transparent; }
#main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── Utilities ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Responsive Breakpoints ────────────────────────────────── */

/* Tablet: 600px+ → center with max-width */
@media (min-width: 600px) {
  body {
    background: var(--bg-2);
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  #app {
    max-width: 600px;
    box-shadow: 0 0 60px rgba(0,0,0,0.2);
  }
  .mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .dex-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .donate-options {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .donate-card {
    flex: 1 1 160px;
    min-width: 140px;
  }
  .home-stats {
    justify-content: center;
  }
}

/* Desktop: 900px+ → wider */
@media (min-width: 900px) {
  #app {
    max-width: 720px;
  }
  .dex-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .clue-story {
    font-size: 14px;
  }
  .reveal-card {
    padding: 24px;
  }
  .home-hero {
    padding: 28px 24px;
  }
  .game-screen {
    padding: 0 20px 24px;
  }
  .guess-area {
    padding: 18px 20px 24px;
  }
}

/* All tab containers must fill #main consistently */
.home-hero,
.startupdex,
.donate-page,
.settings-page,
.theme-selector,
.reveal-screen,
.victory-screen,
.game-screen {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ─── PARTICLE CANVAS ──────────────────────────────────────── */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
#app { position: relative; z-index: 1; }

/* ─── PAGE TRANSITION ──────────────────────────────────────── */
#page-transition {
  position: fixed;
  inset: 0;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;
  z-index: 9000;
  transition: opacity 0.18s ease;
}
#page-transition.pt-active {
  opacity: 0.12;
  pointer-events: all;
}
#page-transition.pt-fade {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* ─── TAB TRANSITIONS ──────────────────────────────────────── */
#main { transition: opacity 0.15s ease, transform 0.15s ease; }
#main.tab-exit { opacity: 0; transform: translateY(6px); }
#main.tab-enter { animation: tabEnter 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

@keyframes tabEnter {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ─── SCREEN SHAKE ─────────────────────────────────────────── */
@keyframes screenShake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  15%  { transform: translate(-6px, 2px) rotate(-1deg); }
  30%  { transform: translate(6px, -2px) rotate(1deg); }
  45%  { transform: translate(-4px, 2px) rotate(-0.5deg); }
  60%  { transform: translate(4px, -1px) rotate(0.5deg); }
  75%  { transform: translate(-2px, 1px) rotate(0deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.shake-screen { animation: screenShake 0.5s cubic-bezier(.36,.07,.19,.97) both; }

/* ─── VIGNETTE FLASHES ─────────────────────────────────────── */
.vignette-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8000;
  border-radius: 0;
  animation: vignetteIn 0.6s ease forwards;
}
.red-flash {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(200, 30, 30, 0.55) 100%);
}
.gold-flash {
  background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.18) 0%, rgba(201, 168, 76, 0.4) 60%, transparent 100%);
}
.theme-flash {
  background: rgba(201, 168, 76, 0.08);
}
@keyframes vignetteIn {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ─── CONFETTI ─────────────────────────────────────────────── */
.confetti-piece {
  position: fixed;
  top: -10px;
  z-index: 7000;
  pointer-events: none;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── PAYPAL DONATE ────────────────────────────────────────── */
.donate-paypal {
  margin: 20px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.paypal-label {
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
}
.btn-paypal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0070BA;
  color: white;
  border-radius: 40px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0,112,186,0.35);
}
.btn-paypal:hover { background: #005ea6; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,112,186,0.45); }
.btn-paypal:active { transform: scale(0.97); }
.paypal-handle {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

/* ─── INPUT — no spin buttons, clean ───────────────────────── */
.guess-input::-webkit-outer-spin-button,
.guess-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.guess-input[type=number] { appearance: textfield; /* standard */ }
@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-8px); }
  40%  { transform: translateX(8px); }
  60%  { transform: translateX(-5px); }
  80%  { transform: translateX(5px); }
}
.guess-input.shake { animation: inputShake 0.5s ease; border-color: var(--danger) !important; }

/* ─── ANIMATION UTILITIES ──────────────────────────────────── */
@keyframes popIn {
  0%   { transform: scale(0.7); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes bounceIn {
  0%   { transform: translateY(-30px) scale(0.8); opacity: 0; }
  60%  { transform: translateY(8px) scale(1.05); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes spinIn {
  0%   { transform: rotate(-180deg) scale(0.5); opacity: 0; }
  100% { transform: rotate(0deg) scale(1); opacity: 1; }
}
.anim-pop  { animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.anim-bounce { animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.1s; }
.anim-spin  { animation: spinIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ─── SCORE BADGE POP ──────────────────────────────────────── */
@keyframes scorePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); color: var(--gold-light); }
  100% { transform: scale(1); }
}
.score-pop { animation: scorePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ─── LOGO BOUNCE ──────────────────────────────────────────── */
@keyframes logoBounce {
  0%   { transform: rotate(0deg) scale(1); }
  30%  { transform: rotate(-12deg) scale(1.15); }
  60%  { transform: rotate(8deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}
.logo-bounce { animation: logoBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.unicorn-logo-wrap {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.unicorn-logo-svg { border-radius: 8px; display: block; }

/* ─── VOLUME SLIDERS ───────────────────────────────────────── */
.settings-row.vol-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
}
.vol-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.vol-icon { font-size: 16px; flex-shrink: 0; }
.vol-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(201,168,76,0.4);
  cursor: pointer;
  transition: transform 0.15s;
}
.vol-slider::-webkit-slider-thumb:active { transform: scale(1.25); }
.vol-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
}
.vol-pct {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  min-width: 34px;
  text-align: right;
}

/* ─── MODE CARD STAGGER ANIMATION ─────────────────────────── */
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.mode-card.card-slide-in { animation: cardSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ─── HERO DATA DATE BADGE ─────────────────────────────────── */
.hero-data-date {
  font-size: 11px;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 20px;
  padding: 3px 10px;
  margin-top: 6px;
  display: inline-block;
  letter-spacing: 0.02em;
}

/* ─── REVEAL VALUATION DISPLAY FIX ────────────────────────── */
.val-label { font-size: 10px; color: var(--text-3); margin-top: 2px; }

/* ─── CLUE CARD ENTRANCE ───────────────────────────────────── */
.clue-card {
  margin-top: 14px;
  animation: tabEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.guess-area { animation: tabEnter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.08s; }

/* ─── FEEDBACK MSG ENHANCED ────────────────────────────────── */
.feedback-msg {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feedback-win  {
  background: linear-gradient(135deg, rgba(30,142,62,0.15), rgba(201,168,76,0.15));
  border-left: 3px solid var(--success);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feedback-hint {
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--gold);
  animation: tabEnter 0.3s ease;
}

/* ─── LIFE HEARTS ANIMATION ────────────────────────────────── */
@keyframes heartLost {
  0%   { transform: scale(1); color: #e74c3c; }
  50%  { transform: scale(1.4) rotate(-10deg); }
  100% { transform: scale(1); opacity: 0.3; }
}
.life-heart.lost { animation: heartLost 0.35s ease forwards; }

/* ─── BTN GUESS PULSE ──────────────────────────────────────── */
.btn-guess {
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-guess::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-guess:active::after { opacity: 1; }
.btn-guess:active { transform: scale(0.97); }

/* ─── REVEAL WIN BADGE ENHANCED ────────────────────────────── */
.reveal-win-badge {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
  margin-bottom: 12px;
  text-align: center;
}

/* ─── VICTORY SCREEN ENHANCED ──────────────────────────────── */
.victory-trophy {
  font-size: 56px;
  margin: 8px 0;
  display: block;
  text-align: center;
  filter: drop-shadow(0 0 16px rgba(255,215,0,0.6));
}
.victory-title {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 32px;
  text-align: center;
  letter-spacing: 0.05em;
}

/* ─── SUPERPOWER BUTTON GLOW ───────────────────────────────── */
.btn-superpower {
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(201,168,76,0.15));
  border: 1px solid rgba(201,168,76,0.4);
  position: relative;
  overflow: hidden;
}
.btn-superpower::before {
  content: '';
  position: absolute;
  top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: rgba(255,255,255,0.12);
  transform: skewX(-20deg);
  animation: shimmer 2.5s infinite;
}
@keyframes shimmer {
  0%   { left: -75%; }
  100% { left: 150%; }
}

/* ─── NAV BTN ACTIVE GLOW ──────────────────────────────────── */
.nav-btn.active .nav-icon {
  filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.6));
}

/* ─── HEADER BRAND GLOW ON HOVER ───────────────────────────── */
.header-brand:hover .unicorn-logo-svg {
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.4));
  transition: filter 0.3s;
}

/* ─── DEX CARD HOVER EFFECT ────────────────────────────────── */
.dex-card.found {
  transition: var(--transition), box-shadow 0.3s;
}
.dex-card.found:active {
  transform: scale(0.93);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-sm);
}

/* ─── GAMEOVER MODAL SHAKE ─────────────────────────────────── */
@keyframes modalDrop {
  0%   { transform: translateY(-40px) scale(0.92); opacity: 0; }
  70%  { transform: translateY(6px) scale(1.01); }
  100% { transform: none; opacity: 1; }
}
.gameover-box { animation: modalDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }


/* ─── DAILY CHALLENGE CARD ─────────────────────────────────── */
.daily-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(255,215,0,0.06));
  border: 1.5px solid rgba(201,168,76,0.5);
  border-radius: var(--radius);
  padding: 14px 18px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(201,168,76,0.15);
}
.daily-card:hover { border-color: var(--gold-light); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(201,168,76,0.25); }
.daily-card.daily-done { opacity: 0.7; cursor: default; }
.daily-label { font-weight: 700; font-size: 15px; color: var(--text); }
.daily-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.daily-badge { background: var(--gold); color: #1a1a1a; font-weight: 700; font-size: 13px; border-radius: 20px; padding: 5px 14px; white-space: nowrap; }
.daily-badge.done { background: var(--success); color: white; }

/* ─── HOME STATS DETAIL ─────────────────────────────────────── */
.home-stats-detail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.stat-detail-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
}
.stat-detail-val { display: block; font-size: 18px; font-weight: 700; color: var(--gold); }
.stat-detail-lbl { display: block; font-size: 10px; color: var(--text-3); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── DEX METRICS (Startupdex detail) ──────────────────────── */
.dex-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.dex-metric {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}
.dex-metric-icon { font-size: 20px; margin-bottom: 4px; }
.dex-metric-val { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.3; word-break: break-word; }
.dex-metric-lbl { font-size: 10px; color: var(--text-3); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.4px; }

/* ─── FIX RESPONSIVE — iPad Pro & Large Screens ──────────────── */
/* iPhone / small mobile: full width */
@media (max-width: 599px) {
  #app { width: 100%; max-width: 100%; }
  .home-stats-detail { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet: 600px–899px */
@media (min-width: 600px) {
  body { background: var(--bg-2); display: flex; justify-content: center; align-items: flex-start; }
  #app { max-width: 900px; box-shadow: 0 0 60px rgba(0,0,0,0.2); }
  .mode-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .dex-grid { grid-template-columns: repeat(3, 1fr); }
}

/* iPad Pro & Desktop: 900px+ */
@media (min-width: 900px) {
  #app { max-width: 1200px; }
  .dex-grid { grid-template-columns: repeat(4, 1fr); }
  .home-hero { padding: 24px 28px; }
  .game-screen { padding: 0 22px 24px; }
  .clue-card { padding: 20px 24px; }
  .guess-area { padding: 18px 24px 24px; }
  .reveal-card { padding: 24px; }
  .settings-page { padding: 20px 24px; }
  .startupdex { padding: 20px 24px; }
  .donate-page { padding: 20px 24px; }
}

/* Large desktop: 1200px+ */
@media (min-width: 1200px) {
  #app { max-width: 1200px; }
  .dex-grid { grid-template-columns: repeat(5, 1fr); }
}


/* ═══════════════════════════════════════════════════════════
   STREAK SYSTEM v2
   ═══════════════════════════════════════════════════════════ */

/* ─── Streak topbar indicator (in game) ─────────────────────── */
.streak-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid transparent;
  transition: all 0.3s ease;
}
.streak-indicator.streak-cold  { color: var(--text-3); border-color: var(--border); }
.streak-indicator.streak-warm  { color: #FF8C00; border-color: #FF8C00; background: rgba(255,140,0,0.08); }
.streak-indicator.streak-hot   { color: #FF4500; border-color: #FF4500; background: rgba(255,69,0,0.1); animation: streakPulse 1.5s ease infinite; }
.streak-indicator.streak-epic  { color: #FFD700; border-color: #FFD700; background: rgba(255,215,0,0.12); animation: streakPulse 1s ease infinite; }
.streak-indicator.streak-king  { color: #C9A84C; border-color: #C9A84C; background: linear-gradient(135deg,rgba(201,168,76,0.15),rgba(255,215,0,0.1)); animation: streakGlow 0.8s ease infinite; }

@keyframes streakPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes streakGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
  50% { box-shadow: 0 0 12px 3px rgba(201,168,76,0.4); }
}

/* ─── Streak danger warning ──────────────────────────────────── */
.streak-danger {
  background: rgba(217,48,37,0.08);
  border: 1px solid rgba(217,48,37,0.3);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  text-align: center;
  animation: dangerPulse 1s ease infinite;
}
@keyframes dangerPulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* ─── Streak shield button ───────────────────────────────────── */
.btn-shield {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #4A90D9;
  background: rgba(74,144,217,0.08);
  color: #4A90D9;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-shield:hover { background: rgba(74,144,217,0.15); transform: translateY(-1px); }
.btn-shield.shield-active { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.1); }
.shield-detail { font-size: 11px; font-weight: 400; opacity: 0.7; margin-left: auto; }

/* ─── Streak milestone toast ─────────────────────────────────── */
.streak-milestone-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #2B2B2B, #3A3A3A);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 24px;
  text-align: center;
  z-index: 9500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 20px rgba(201,168,76,0.3);
  animation: toastIn 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
  pointer-events: none;
  white-space: nowrap;
}
.toast-icon { font-size: 28px; display: block; margin-bottom: 4px; }
.toast-title { font-size: 15px; font-weight: 700; color: var(--gold-light); }
.toast-sub { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 2px; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.9); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}
.streak-milestone-toast.hiding { animation: toastOut 0.3s ease forwards; }

/* ─── STREAK CHIP on home stats ────────────────────────────── */
.streak-chip { font-weight: 700; transition: all 0.3s ease; }
.streak-chip.streak-warm  { color: #FF8C00; border-color: #FF8C00 !important; background: rgba(255,140,0,0.08); }
.streak-chip.streak-hot   { color: #FF4500; border-color: #FF4500 !important; background: rgba(255,69,0,0.08); }
.streak-chip.streak-epic  { color: #FFD700; border-color: #FFD700 !important; background: rgba(255,215,0,0.1); }
.streak-chip.streak-king  { color: var(--gold); border-color: var(--gold) !important; background: rgba(201,168,76,0.12); }
.shield-chip { color: #4A90D9; border-color: #4A90D9 !important; background: rgba(74,144,217,0.08); font-weight: 700; }

/* ─── GAME TOPBAR RIGHT (streak + lives) ───────────────────── */
.game-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-topbar .streak-indicator {
  font-size: 12px;
  padding: 2px 8px;
}

/* ─── PAYPAL SMALL BUTTON (inside donate cards) ─────────────── */
.btn-paypal-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #0070BA;
  color: white;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 8px;
  transition: var(--transition);
}
.btn-paypal-sm:hover { background: #005ea6; }

/* ─── HOME STATS (updated for streak) ──────────────────────── */
.home-stats { flex-wrap: wrap; gap: 6px; }
.stat-chip {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── GAME CLUE — Financial Grid ───────────────────────────── */
.clue-financial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.clue-fin-item {
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}
.clue-fin-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  margin-bottom: 3px;
}
.clue-fin-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  word-break: break-word;
}

/* ─── PWA INSTALL BANNER ───────────────────────────────────── */
.pwa-banner {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  background: var(--anthracite);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(201,168,76,0.2);
  z-index: 8500;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pwa-banner.hidden { display: none; }
.pwa-banner-in {
  animation: pwaSlideUp 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.pwa-banner-out {
  animation: pwaSlideDown 0.3s ease forwards;
}
@keyframes pwaSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes pwaSlideDown {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(20px); }
}
.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.pwa-banner-icon {
  border-radius: 10px;
  flex-shrink: 0;
}
.pwa-banner-text { min-width: 0; }
.pwa-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #FAFAFA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pwa-banner-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}
.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pwa-btn-install {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}
.pwa-btn-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.2s;
}
.pwa-btn-dismiss:hover { color: rgba(255,255,255,0.8); }

/* ─── iOS INSTALL HINT ─────────────────────────────────────── */
.ios-hint {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px);
  max-width: 420px;
  background: var(--anthracite);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 20px rgba(201,168,76,0.2);
  z-index: 8500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.ios-hint.ios-hint-in {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.ios-hint.ios-hint-out {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}
.ios-hint-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.ios-hint-text { flex: 1; min-width: 0; }
.ios-hint-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ios-hint-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
  line-height: 1.4;
}
.ios-hint-sub strong { color: rgba(255,255,255,0.9); }
.ios-hint-close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  padding: 4px 6px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s;
}
.ios-hint-close:hover { color: rgba(255,255,255,0.85); }
/* Arrow pointing down toward Safari's bottom share button */
.ios-hint-arrow {
  width: 14px;
  height: 14px;
  background: var(--anthracite);
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg) translateX(-50%);
  position: absolute;
  bottom: -8px;
  left: 50%;
  border-radius: 2px;
}
