@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --red: #c0392b;
  --red-dark: #96281b;
  --red-deeper: #7a1a10;
  --red-darkest: #5a0f08;
  --gold: #f5c518;
  --gold-light: #ffd740;
  --cream: #f5f0e0;
  --white: #ffffff;
  --black: #0a0a0a;
  --green: #2ecc71;
  --overlay-dark: rgba(0,0,0,0.25);
  --overlay-darker: rgba(0,0,0,0.4);
  --font-display: 'Bebas Neue', cursive;
  --font-body: 'Nunito', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 50px;
  --transition: 0.2s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--red);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(70,10,5,0.98) 0%, rgba(90,15,8,0.96) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(245,197,24,0.25);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.nav-logo .logo-sub {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  display: block;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-links a.active { color: var(--gold); }
.nav-cta {
  background: var(--gold) !important;
  color: var(--red-deeper) !important;
  font-weight: 900 !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }
.nav-hamburger { display: none; background: none; border: none; color: var(--white); font-size: 1.4rem; cursor: pointer; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  overflow: hidden;
}
.hero::before {
  content: 'SAIGON';
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(100px, 25vw, 280px);
  color: rgba(0,0,0,0.08);
  pointer-events: none;
  white-space: nowrap;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  letter-spacing: -0.02em;
}
.hero-content { position: relative; z-index: 1; max-width: 780px; }

.hero-badge {
  display: inline-block;
  background: rgba(245,197,24,0.12);
  border: 1px solid rgba(245,197,24,0.4);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 24px;
}
.hero h1 em { color: var(--gold); font-style: normal; }

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
  font-weight: 600;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.03em;
}
.btn-primary { background: var(--gold); color: var(--red-deeper); box-shadow: 0 4px 20px rgba(245,197,24,0.35); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(245,197,24,0.5); }
.btn-secondary { background: rgba(255,255,255,0.1); color: var(--white); border: 2px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--gold); border: 2px solid var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--red-deeper); }

/* ── STATS BAR ── */
.stats-bar {
  background: var(--overlay-darker);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 40px 24px;
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 3rem; color: var(--gold); line-height: 1; }
.stat-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-top: 4px; }

/* ── SECTION ── */
.section {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.section-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: 0.03em; line-height: 1; margin-bottom: 16px; }
.section-sub { color: rgba(255,255,255,0.62); font-size: 1rem; max-width: 560px; line-height: 1.6; margin-bottom: 48px; font-weight: 600; }

/* ── SUBJECT GRID ── */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.subject-card {
  background: var(--overlay-dark);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-decoration: none;
  color: var(--white);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.subject-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.subject-card:hover { transform: translateY(-4px); border-color: rgba(245,197,24,0.3); box-shadow: var(--shadow); }
.subject-card:hover::after { transform: scaleX(1); }
.subject-card .icon { font-size: 2rem; }
.subject-card h3 { font-size: 1rem; font-weight: 800; }
.subject-card p { font-size: 0.8rem; color: rgba(255,255,255,0.52); line-height: 1.5; }
.subject-card .badge { position: absolute; top: 12px; right: 12px; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 10px; border-radius: var(--radius-pill); }
.badge-free { background: rgba(46,204,113,0.15); color: #2ecc71; border: 1px solid rgba(46,204,113,0.35); }
.badge-pro { background: rgba(245,197,24,0.15); color: var(--gold); border: 1px solid rgba(245,197,24,0.35); }
.badge-soon { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.12); }

/* ── PRICING ── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; max-width: 800px; margin: 0 auto; }
.pricing-card { background: var(--overlay-dark); border: 2px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 36px 28px; text-align: center; transition: var(--transition); position: relative; }
.pricing-card.featured { border-color: var(--gold); background: rgba(245,197,24,0.06); transform: scale(1.03); }
.pricing-card.featured::before { content: 'MOST POPULAR'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--red-deeper); font-size: 0.65rem; font-weight: 900; letter-spacing: 0.15em; padding: 4px 16px; border-radius: var(--radius-pill); white-space: nowrap; }
.pricing-name { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.pricing-price { font-family: var(--font-display); font-size: 4rem; color: var(--white); line-height: 1; }
.pricing-price sup { font-family: var(--font-body); font-size: 1.2rem; font-weight: 800; vertical-align: top; margin-top: 12px; display: inline-block; }
.pricing-period { font-size: 0.8rem; color: rgba(255,255,255,0.45); margin-bottom: 24px; }
.pricing-features { list-style: none; margin-bottom: 28px; }
.pricing-features li { padding: 8px 0; font-size: 0.88rem; color: rgba(255,255,255,0.78); border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 10px; text-align: left; }
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 900; flex-shrink: 0; }
.pricing-features li.locked::before { content: '🔒'; }
.pricing-features li.locked { color: rgba(255,255,255,0.3); }

/* ── QUIZ PAGE ── */
.quiz-page { min-height: 100vh; display: flex; flex-direction: column; }
.quiz-header { background: var(--overlay-darker); border-bottom: 1px solid rgba(255,255,255,0.08); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.quiz-header-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold); letter-spacing: 0.05em; }
.quiz-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 32px 16px 60px; }

.difficulty-bar { display: flex; gap: 6px; background: rgba(0,0,0,0.25); border-radius: var(--radius-pill); padding: 5px; margin-bottom: 24px; }
.diff-btn { padding: 8px 22px; border-radius: var(--radius-pill); border: none; font-family: var(--font-body); font-size: 0.82rem; font-weight: 800; cursor: pointer; transition: all var(--transition); background: transparent; color: rgba(255,255,255,0.45); letter-spacing: 0.06em; text-transform: uppercase; }
.diff-btn.active { background: var(--gold); color: var(--red-deeper); box-shadow: 0 2px 12px rgba(245,197,24,0.35); }
.diff-btn:hover:not(.active) { color: var(--white); background: rgba(255,255,255,0.1); }

.stats-row { display: flex; gap: 12px; width: 100%; max-width: 500px; margin-bottom: 20px; }
.stat-box { background: var(--overlay-dark); border-radius: var(--radius); padding: 12px; text-align: center; flex: 1; border: 1px solid rgba(255,255,255,0.06); }
.stat-box .label { font-size: 0.58rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.stat-box .value { font-family: var(--font-display); font-size: 1.8rem; color: var(--white); line-height: 1.1; }

.progress-track { width: 100%; max-width: 500px; height: 4px; background: rgba(255,255,255,0.12); border-radius: 2px; margin-bottom: 24px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.4s ease; }

.question-card { background: var(--overlay-dark); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius); padding: 32px 24px 24px; width: 100%; max-width: 500px; text-align: center; margin-bottom: 16px; }
.category-tag { display: inline-block; font-size: 0.63rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); background: rgba(245,197,24,0.1); border-radius: var(--radius-pill); padding: 4px 14px; margin-bottom: 14px; }
.q-prompt { font-size: 0.73rem; color: rgba(255,255,255,0.45); margin-bottom: 8px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.q-text { font-family: var(--font-display); font-size: clamp(2rem, 8vw, 3.5rem); color: var(--white); letter-spacing: 0.02em; margin-bottom: 6px; line-height: 1; }
.q-sub { font-size: 0.78rem; color: rgba(255,255,255,0.4); margin-bottom: 14px; }
.q-instruction { font-size: 0.82rem; color: rgba(255,255,255,0.6); font-weight: 600; }

.answers { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 500px; margin-bottom: 14px; }
.answer-btn { background: var(--cream); color: var(--red-deeper); border: none; border-radius: var(--radius-sm); padding: 15px 20px; font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; cursor: pointer; text-align: left; transition: all 0.15s; line-height: 1.3; }
.answer-btn:hover:not(:disabled) { background: #fff; transform: translateX(4px); box-shadow: var(--shadow-sm); }
.answer-btn.correct { background: var(--green); color: var(--white); }
.answer-btn.wrong { background: #e74c3c; color: var(--white); opacity: 0.75; }
.answer-btn:disabled { cursor: default; }

.feedback { font-size: 1rem; font-weight: 800; min-height: 28px; text-align: center; margin-bottom: 10px; }
.feedback.correct { color: var(--green); }
.feedback.wrong { color: #ff8a80; }

.next-btn { background: var(--gold); color: var(--red-deeper); border: none; border-radius: var(--radius-pill); padding: 13px 40px; font-family: var(--font-body); font-size: 1rem; font-weight: 900; cursor: pointer; display: none; transition: all var(--transition); letter-spacing: 0.05em; }
.next-btn:hover { background: var(--gold-light); transform: scale(1.04); }
.next-btn.visible { display: inline-block; }

.results-screen { display: none; flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 500px; padding: 20px; }
.results-screen.visible { display: flex; }
.results-title { font-family: var(--font-display); font-size: 3rem; color: var(--gold); margin-bottom: 8px; }
.results-score { font-family: var(--font-display); font-size: 5rem; color: var(--white); line-height: 1; margin: 10px 0; }
.results-msg { color: rgba(255,255,255,0.75); font-size: 1rem; margin-bottom: 24px; line-height: 1.5; }

/* ── PAYWALL ── */
.paywall-overlay { position: fixed; inset: 0; background: rgba(70,10,5,0.97); backdrop-filter: blur(8px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.paywall-card { background: rgba(0,0,0,0.3); border: 2px solid var(--gold); border-radius: var(--radius); padding: 48px 36px; max-width: 480px; width: 100%; text-align: center; }
.paywall-icon { font-size: 3rem; margin-bottom: 16px; }
.paywall-card h2 { font-family: var(--font-display); font-size: 2.5rem; color: var(--gold); margin-bottom: 12px; letter-spacing: 0.03em; }
.paywall-card p { color: rgba(255,255,255,0.72); margin-bottom: 28px; line-height: 1.6; }

/* ── AUTH MODAL ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop.open { display: flex; }
.modal { background: #1c0a07; border: 1px solid rgba(245,197,24,0.25); border-radius: var(--radius); padding: 40px 32px; max-width: 420px; width: 100%; position: relative; }
.modal h2 { font-family: var(--font-display); font-size: 2rem; color: var(--gold); margin-bottom: 4px; letter-spacing: 0.03em; }
.modal p { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-bottom: 24px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: rgba(255,255,255,0.35); font-size: 1.4rem; cursor: pointer; transition: var(--transition); }
.modal-close:hover { color: var(--white); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.form-group input { width: 100%; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-sm); padding: 12px 16px; color: var(--white); font-family: var(--font-body); font-size: 0.95rem; transition: var(--transition); }
.form-group input:focus { outline: none; border-color: var(--gold); background: rgba(245,197,24,0.05); }
.form-group input::placeholder { color: rgba(255,255,255,0.2); }
.form-switch { text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.45); margin-top: 16px; }
.form-switch a { color: var(--gold); text-decoration: none; font-weight: 700; }

/* ── CHEAT SHEET ── */
.ref-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.ref-tab { padding: 7px 16px; border-radius: var(--radius-pill); border: 2px solid rgba(245,197,24,0.25); background: transparent; color: rgba(255,255,255,0.55); font-family: var(--font-body); font-size: 0.8rem; font-weight: 800; cursor: pointer; transition: var(--transition); letter-spacing: 0.04em; }
.ref-tab.active, .ref-tab:hover { background: var(--gold); color: var(--red-deeper); border-color: var(--gold); }
.ref-section { display: none; }
.ref-section.active { display: block; }
.explainer { background: var(--overlay-dark); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 20px; font-size: 0.88rem; line-height: 1.6; color: rgba(255,255,255,0.82); }
.explainer strong { color: var(--gold); }
.formula { background: rgba(245,197,24,0.08); border: 1px solid rgba(245,197,24,0.25); border-radius: var(--radius-sm); padding: 12px 16px; font-family: 'Courier New', monospace; font-size: 0.88rem; color: var(--gold); margin: 12px 0; letter-spacing: 0.02em; }
.ref-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; background: var(--overlay-dark); border-radius: var(--radius); overflow: hidden; }
.ref-table th { background: rgba(0,0,0,0.3); color: var(--gold); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 12px 16px; text-align: left; font-family: var(--font-body); }
.ref-table td { padding: 11px 16px; font-size: 0.9rem; border-top: 1px solid rgba(255,255,255,0.05); }
.ref-table tr:hover td { background: rgba(255,255,255,0.03); }
.td-vn { font-weight: 800; color: var(--white); }
.td-en { color: rgba(255,255,255,0.55); font-size: 0.82rem; }
.td-note { color: var(--gold); font-size: 0.75rem; font-style: italic; }
.td-num { color: var(--gold); font-weight: 900; font-size: 1rem; width: 40px; }

/* ── FOOTER ── */
footer { background: rgba(0,0,0,0.45); border-top: 1px solid rgba(255,255,255,0.07); padding: 48px 24px 32px; text-align: center; position: relative; z-index: 1; }
.footer-logo { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); margin-bottom: 6px; letter-spacing: 0.05em; }
.footer-tagline { font-size: 0.75rem; color: rgba(255,255,255,0.35); margin-bottom: 20px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
footer a { color: rgba(255,255,255,0.45); text-decoration: none; font-size: 0.82rem; font-weight: 600; transition: var(--transition); }
footer a:hover { color: var(--gold); }
.footer-copy { color: rgba(255,255,255,0.25); font-size: 0.75rem; line-height: 1.8; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: rgba(70,10,5,0.98); padding: 16px; gap: 4px; border-bottom: 1px solid rgba(245,197,24,0.2); }
  .stats-bar { gap: 30px; }
  .pricing-card.featured { transform: scale(1); }
  .hero h1 { font-size: clamp(2.8rem, 12vw, 5rem); }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.6s ease forwards; }
.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.25s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.4s; opacity: 0; }
