:root {
  --bg-0: #170307;
  --bg-1: #2b040a;
  --red-1: #ff2d55;
  --red-2: #ff5f6d;
  --red-3: #c0132f;
  --pink: #ff8a9b;
  --gold: #ffb199;
  --ink: #fff5f2;
  --ink-dim: rgba(255, 245, 242, 0.68);
  --ink-faint: rgba(255, 245, 242, 0.42);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-glow: 0 20px 60px -15px rgba(255, 45, 85, 0.45);
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-0);
  color: var(--ink);
  font-family: 'Prompt', 'Noto Sans SC', 'Noto Sans Myanmar', 'Noto Sans Khmer', system-ui, sans-serif;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
}

/* ---------- Aura background ---------- */
.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, var(--bg-1), var(--bg-0) 60%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.blob-1 {
  width: 60vmax;
  height: 60vmax;
  top: -25vmax;
  left: -15vmax;
  background: radial-gradient(circle at 30% 30%, var(--red-1), transparent 70%);
  animation: float-1 22s ease-in-out infinite;
}

.blob-2 {
  width: 55vmax;
  height: 55vmax;
  bottom: -25vmax;
  right: -15vmax;
  background: radial-gradient(circle at 60% 60%, var(--red-3), transparent 70%);
  animation: float-2 26s ease-in-out infinite;
}

.blob-3 {
  width: 40vmax;
  height: 40vmax;
  top: 30%;
  left: 55%;
  background: radial-gradient(circle at 50% 50%, var(--gold), transparent 72%);
  opacity: 0.35;
  animation: float-3 30s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 8vmax) scale(1.1); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vmax, -6vmax) scale(1.08); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8vmax, 5vmax) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(23, 3, 7, 0.55);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.navbar-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.navbar-logo { font-size: 18px; }

/* ---------- Language switcher ---------- */
.lang-switcher { position: relative; }

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.lang-trigger:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 95, 109, 0.4); }
.lang-flag { font-size: 15px; line-height: 1; }
.lang-code { letter-spacing: 0.04em; }
.lang-chevron { color: var(--ink-faint); transition: transform 0.18s ease; }
.lang-switcher.is-open .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: rgba(23, 3, 7, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.lang-switcher.is-open .lang-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-dim);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-option:hover { background: rgba(255, 45, 85, 0.12); color: var(--ink); }
.lang-option.is-active { color: var(--ink); background: rgba(255, 45, 85, 0.1); }
.lang-option .lang-flag { font-size: 16px; }
.lang-option .lang-native { font-weight: 600; }
.lang-option .lang-en { margin-left: auto; font-size: 12px; color: var(--ink-faint); }
.lang-option.is-active .lang-en { margin-left: 0; }
.lang-check { flex-shrink: 0; color: var(--red-2); margin-left: 4px; }

/* ---------- Layout ---------- */
.app {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.screen {
  display: none;
  width: 100%;
}
.screen.is-active {
  display: flex;
  justify-content: center;
  animation: rise 0.5s cubic-bezier(.22,1,.36,1);
}

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

/* ---------- Card base (glassmorphism) ---------- */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,0.08);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--pink);
  background: rgba(255, 45, 85, 0.14);
  border: 1px solid rgba(255, 95, 109, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.grad-text {
  background: linear-gradient(100deg, var(--red-2), var(--gold) 60%, var(--red-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Start screen (hero) ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  max-width: 1120px;
  width: 100%;
}

.hero-copy {
  padding: 52px 48px;
}

.hero-copy h1 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 18px;
}

.subtitle {
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.7;
  max-width: 460px;
  margin: 0 0 34px;
  overflow-wrap: anywhere;
}

.start-meta {
  display: flex;
  gap: 36px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--glass-border);
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-item strong { font-size: 24px; font-weight: 700; color: var(--pink); }
.meta-item span { font-size: 13px; color: var(--ink-faint); }

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  inset: -6%;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 45, 85, 0.55), rgba(255, 45, 85, 0) 68%);
  filter: blur(30px);
  z-index: 0;
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}

.hero-image {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -20px rgba(255, 45, 85, 0.55), inset 0 1px 0 rgba(255,255,255,0.15);
  border: 1px solid var(--glass-border);
}

.hero-chip {
  position: absolute;
  z-index: 2;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(23, 3, 7, 0.72);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.5);
  white-space: nowrap;
  animation: chip-float 5s ease-in-out infinite;
}
.hero-chip-1 { top: 8%; left: -6%; animation-delay: 0s; }
.hero-chip-2 { bottom: 10%; right: -8%; animation-delay: 1.2s; }

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .hero-chip { animation: none; }
}

/* ---------- Buttons ---------- */
.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.75; cursor: default; transform: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--red-1), var(--red-3));
  box-shadow: 0 12px 30px -8px rgba(255, 45, 85, 0.6);
}
.btn-primary:hover { box-shadow: 0 16px 38px -8px rgba(255, 45, 85, 0.75); transform: translateY(-1px); }

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

.btn-ghost {
  color: var(--ink-dim);
  background: transparent;
  padding: 10px 18px;
}
.btn-ghost:hover { color: var(--ink); }

.btn-outline {
  color: var(--ink);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  padding: 16px 28px;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ---------- Quiz screen ---------- */
.quiz-card {
  width: 100%;
  max-width: 640px;
  padding: 40px 40px 28px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-2), var(--gold));
  width: 20%;
  transition: width 0.4s cubic-bezier(.22,1,.36,1);
}
.progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
}

.q-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--pink);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.q-title {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
}
.q-hint {
  color: var(--ink-faint);
  font-size: 14px;
  margin: 0 0 28px;
}

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

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.option:hover {
  border-color: rgba(255, 95, 109, 0.5);
  background: rgba(255, 45, 85, 0.08);
  transform: translateX(2px);
}
.option.is-selected {
  border-color: var(--red-2);
  background: linear-gradient(90deg, rgba(255,45,85,0.18), rgba(255,45,85,0.05));
  box-shadow: 0 8px 24px -10px rgba(255,45,85,0.5);
}

.option-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.option.is-selected .option-icon {
  border-color: var(--red-2);
  background: var(--red-2);
}
.option-icon svg { opacity: 0; width: 12px; height: 12px; }
.option.is-selected .option-icon svg { opacity: 1; }

.option-text strong { display: block; font-weight: 600; }
.option-text span { display: block; font-size: 13px; color: var(--ink-faint); margin-top: 2px; }

.quiz-nav {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}
.btn-back-hidden { visibility: hidden; }

/* ---------- Result screen ---------- */
.result-wrap {
  width: 100%;
  max-width: 900px;
}

.result-head {
  text-align: center;
  margin-bottom: 28px;
}
.result-head h1 {
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 700;
  margin: 0;
}

.result-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  overflow: hidden;
  padding: 0;
}

.result-image {
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.result-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.5);
}

.result-body {
  padding: 36px 40px;
}

.result-body h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
}

.result-price {
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(100deg, var(--red-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
}
.result-price span { font-size: 16px; font-weight: 500; color: var(--ink-faint); -webkit-text-fill-color: var(--ink-faint); }

.result-specs {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-specs li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.result-specs li .dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--red-2), var(--gold));
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.badge {
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 177, 153, 0.14);
  border: 1px solid rgba(255, 177, 153, 0.35);
  color: var(--gold);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-copy { order: 2; text-align: center; }
  .hero-visual { order: 1; }
  .subtitle { margin: 0 auto 34px; }
  .start-meta { justify-content: center; }
  .hero-image { max-width: 300px; }
  .hero-chip { display: none; }
}

@media (max-width: 720px) {
  .hero-copy { padding: 40px 26px; }
  .quiz-card { padding: 30px 22px 22px; }
  .start-meta { gap: 20px; }
  .result-card { grid-template-columns: 1fr; }
  .result-image { padding: 24px 24px 0; }
  .result-image img { max-width: 260px; margin: 0 auto; }
  .result-body { padding: 28px 24px 32px; }
}
