/* ===== CSS RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f35;
  --bg-card-hover: #222842;
  --text-primary: #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #a78bfa;
  --neon-green: #22d3ee;
  --neon-pink: #f472b6;
  --neon-orange: #fb923c;
  --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-2: linear-gradient(135deg, #22d3ee, #6366f1);
  --gradient-3: linear-gradient(135deg, #f472b6, #fb923c);
  --gradient-gold: linear-gradient(135deg, #f59e0b, #eab308);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(99,102,241,0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-3);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--neon-green); }

img { max-width: 100%; height: auto; display: block; }

/* ===== UTILITY CLASSES ===== */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.container--wide { max-width: 720px; }

.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.hidden { display: none !important; }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  padding: 12px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.header__coins {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.header__coins .coin-icon {
  font-size: 1.1rem;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
}

.header__nav-btn:hover,
.header__nav-btn.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ===== HEADER AD ===== */
.header-ad {
  width: 100%;
  margin-top: 8px;
  overflow: hidden;
}

.header-ad ins {
  width: 100% !important;
}

/* Sticky ad bar for quiz page */
.sticky-ad-bar {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(10, 14, 26, 0.95);
  padding: 4px 0;
  width: 100%;
}

.sticky-ad-bar .header-ad {
  margin-top: 0;
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(99, 102, 241, 0.15);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}

.mobile-nav__inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
}

.mobile-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 10px;
  transition: var(--transition);
  text-decoration: none;
}

.mobile-nav__item span:first-child {
  font-size: 1.3rem;
}

.mobile-nav__item.active,
.mobile-nav__item:hover {
  color: var(--accent-3);
}

.mobile-nav__item.active {
  background: rgba(99, 102, 241, 0.1);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-xl);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn:hover::after { opacity: 1; }

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn--primary:hover {
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
}

.btn--secondary {
  background: var(--gradient-3);
  color: #fff;
  box-shadow: 0 4px 20px rgba(244, 114, 182, 0.3);
}

.btn--secondary:hover {
  box-shadow: 0 6px 28px rgba(244, 114, 182, 0.5);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--accent-3);
  border: 2px solid var(--accent-2);
}

.btn--outline:hover {
  background: var(--gradient-1);
  color: #fff;
  border-color: transparent;
}

.btn--gold {
  background: var(--gradient-gold);
  color: #1a1f35;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn--block {
  width: 100%;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ===== CARD ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all var(--transition);
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-glow);
}

.card--glow {
  box-shadow: var(--shadow-glow);
}

/* ===== ENTRY GATE (18+ Page) ===== */
.gate {
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Gate Banner (like reference site "Play Quiz of the Day") */
.gate-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid rgba(255, 165, 0, 0.2);
  animation: fadeUp 0.5s ease-out;
}

.gate-banner__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.gate-banner__desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}

.gate-banner__icon {
  font-size: 2.8rem;
  flex-shrink: 0;
  margin-left: 12px;
  animation: pulse 2s ease-in-out infinite;
}

/* Gate Card (reference-style white/light card with orange question) */
.gate-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: fadeUp 0.6s ease-out;
  margin-bottom: 16px;
}

.gate-card__question {
  font-size: 1.3rem;
  font-weight: 800;
  color: #e65100;
  margin-bottom: 20px;
  line-height: 1.3;
}

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

.gate-card__option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.gate-card__option:hover {
  background: #fff3e0;
  border-color: #ff9800;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255,152,0,0.2);
}

.gate-card__option:active {
  transform: scale(0.98);
  background: #ffe0b2;
}

.gate-card__option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #ff9800;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 6px;
  margin-right: 12px;
  flex-shrink: 0;
}

/* Gate info card (like reference site) */
.gate-info {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: fadeUp 0.7s ease-out;
}

.gate-info__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #e65100;
  margin-bottom: 14px;
}

.gate-info__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gate-info__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: #444;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  line-height: 1.5;
}

.gate-info__list li:last-child {
  border-bottom: none;
}

.gate-info__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== QUIZ PAGE ===== */
.quiz {
  padding-bottom: 100px;
}

.quiz__timer-bar {
  height: 3px;
  background: var(--bg-card);
  border-radius: 4px;
  margin: 10px 0;
  overflow: hidden;
}

.quiz__timer-fill {
  height: 100%;
  background: var(--gradient-2);
  border-radius: 4px;
  transition: width 1s linear;
  width: 100%;
}

.quiz__timer-fill.warning { background: var(--gradient-3); }

.quiz__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.quiz__timer-text {
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.quiz__timer-text.warning { color: var(--neon-pink); }

.quiz__progress {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.quiz__coins-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #f59e0b;
}

.quiz__question-card {
  padding: 16px 14px;
  margin-bottom: 14px;
  text-align: center;
}

.quiz__question-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.quiz__question-text {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quiz__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quiz__option {
  padding: 12px 10px;
  background: var(--bg-card);
  border: 2px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

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

.quiz__option:active { transform: scale(0.97); }

.quiz__option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  animation: correctPop 0.4s ease-out;
}

.quiz__option.wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  animation: shake 0.4s ease-out;
}

@keyframes correctPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Progress bar for quiz */
.quiz__progress-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.quiz__progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--bg-card);
  transition: background var(--transition);
}

.quiz__progress-dot.done { background: var(--gradient-1); }
.quiz__progress-dot.active { background: var(--gradient-2); }

/* ===== RESULT PAGE ===== */
.result {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.result__card {
  text-align: center;
  padding: 36px 24px;
  max-width: 400px;
  width: 100%;
  animation: fadeUp 0.6s ease-out;
}

.result__icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: bounce 1s ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-30px); }
  60% { transform: translateY(-10px); }
}

.result__title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.result__subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.result__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.result__stat {
  background: rgba(99, 102, 241, 0.08);
  padding: 16px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.result__stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result__stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

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

/* ===== CONTESTS PAGE ===== */
.contests {
  padding: 16px 0 100px;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.contest-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
}

.contest-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contest-card__icon--purple { background: rgba(99, 102, 241, 0.15); }
.contest-card__icon--pink { background: rgba(244, 114, 182, 0.15); }
.contest-card__icon--cyan { background: rgba(34, 211, 238, 0.15); }
.contest-card__icon--gold { background: rgba(245, 158, 11, 0.15); }

.contest-card__info { flex: 1; }

.contest-card__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.contest-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.contest-card__entry {
  text-align: right;
}

.contest-card__cost {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f59e0b;
}

.contest-card__btn {
  margin-top: 4px;
}

/* Leaderboard */
.leaderboard {
  margin-top: 28px;
}

.leaderboard__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.08);
}

.leaderboard__rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.leaderboard__rank.gold { background: var(--gradient-gold); color: #1a1f35; }
.leaderboard__rank.silver { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #1a1f35; }
.leaderboard__rank.bronze { background: linear-gradient(135deg, #d97706, #f59e0b); color: #1a1f35; }

.leaderboard__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.leaderboard__name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.leaderboard__score {
  font-weight: 700;
  font-size: 0.85rem;
  color: #f59e0b;
}

/* ===== ARTICLES ===== */
.articles {
  padding: 16px 0 100px;
}

.article-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.article-card__img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.article-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__body { flex: 1; }

.article-card__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-green);
  margin-bottom: 4px;
}

.article-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.article-card__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__read {
  font-size: 0.75rem;
  color: var(--accent-3);
  font-weight: 600;
  margin-top: 6px;
  display: inline-block;
}

/* ===== FULL ARTICLE PAGE ===== */
.article-full {
  padding: 20px 0 100px;
}

.article-full h1 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}

.article-full .article-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 20px;
}

.article-full .article-content {
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-full .article-content h2 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin: 24px 0 12px;
}

.article-full .article-content p { margin-bottom: 16px; }

.article-full .article-content ul {
  margin: 12px 0;
  padding-left: 20px;
}

.article-full .article-content li { margin-bottom: 6px; }

/* ===== LEGAL / INFO PAGES ===== */
.info-page {
  padding: 20px 0 100px;
}

.info-page h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-page h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text-primary);
}

.info-page p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.7;
}

.info-page ul {
  color: var(--text-secondary);
  margin: 10px 0 14px 20px;
}

.info-page li { margin-bottom: 6px; }

.info-page a { color: var(--accent-3); }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-2);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* ===== SOUND TOGGLE ===== */
.sound-toggle {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 99;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.sound-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-2);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 10px 20px;
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: rgba(34, 197, 94, 0.3); color: #22c55e; }
.toast.error { border-color: rgba(239, 68, 68, 0.3); color: #ef4444; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform var(--transition);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal__icon { font-size: 3rem; margin-bottom: 12px; }
.modal__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.modal__text { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(99, 102, 241, 0.1);
  padding: 28px 0 100px;
  text-align: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer__links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== COIN ANIMATION ===== */
.coin-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 800;
  color: #f59e0b;
  z-index: 200;
  pointer-events: none;
  animation: coinFly 0.8s ease-out forwards;
}

@keyframes coinFly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -120%) scale(1.5); }
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

/* ===== AD PLACEHOLDER ===== */
.ad-slot {
  background: var(--bg-card);
  border: 1px dashed rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 20px 0;
  min-height: 100px;
}

.ad-slot--top {
  min-height: 250px;
  max-width: 300px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.ad-slot--banner {
  min-height: 90px;
  margin: 16px 0;
}

.ad-slot--inline {
  min-height: 200px;
  margin: 16px 0;
}

.ad-slot__label {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== RANDOM ARTICLES (below quiz) ===== */
.random-articles {
  margin-top: 24px;
  padding-bottom: 20px;
}

.random-articles__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-left: 2px;
}

.random-articles__grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.random-article-card {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition), transform var(--transition);
  border: 1px solid rgba(99, 102, 241, 0.08);
}

.random-article-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.random-article-card__icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
}

.random-article-card__body {
  flex: 1;
  min-width: 0;
}

.random-article-card__tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--neon-green);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.random-article-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.random-article-card__desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.random-article-card__link {
  font-size: 0.75rem;
  color: var(--accent-1);
  font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .container { max-width: 540px; }
  .container--wide { max-width: 720px; }
  
  .gate__title { font-size: 2.2rem; }
  .quiz__question-text { font-size: 1.6rem; }
  .quiz__options { gap: 12px; }
  .quiz__option { padding: 14px 12px; }
}

@media (min-width: 1024px) {
  .mobile-nav { display: none; }
  .container { max-width: 580px; }
  body { padding-bottom: 0; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
