:root {
  --bg: #080c16;
  --bg-elevated: rgba(17, 24, 42, 0.72);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f6fc;
  --text-muted: #9aa7c0;
  --accent: #7c6cff;
  --accent-2: #38bdf8;
  --accent-warm: #f59e0b;
  --success: #34d399;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
}

.glow-1 {
  width: 520px;
  height: 520px;
  background: #6366f1;
  top: -160px;
  left: -120px;
}

.glow-2 {
  width: 460px;
  height: 460px;
  background: #0ea5e9;
  top: 22%;
  right: -140px;
}

.glow-3 {
  width: 420px;
  height: 420px;
  background: #a855f7;
  bottom: -140px;
  left: 30%;
  opacity: 0.2;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(8, 12, 22, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(124, 108, 255, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .nav-cta {
  color: #fff;
  background: linear-gradient(135deg, #6d5dfc, #38bdf8);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(109, 93, 252, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-links .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(109, 93, 252, 0.48);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124, 108, 255, 0.42);
  background: rgba(124, 108, 255, 0.14);
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.lang-toggle:hover {
  transform: translateY(-1px);
  background: rgba(124, 108, 255, 0.26);
  border-color: rgba(124, 108, 255, 0.72);
}

.lang-toggle svg {
  color: #a5b4fc;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.25s ease;
}

/* Hero */
.hero {
  padding: 72px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(124, 108, 255, 0.14);
  border: 1px solid rgba(124, 108, 255, 0.32);
  color: #c7c0ff;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 55%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 24px;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #6d5dfc, #3b82f6);
  color: #fff;
  box-shadow: 0 12px 30px rgba(109, 93, 252, 0.36);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(109, 93, 252, 0.5);
}

.btn-sub {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 30px;
  font-size: 1.04rem;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.stat-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* Interactive Phone Mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 100%;
  max-width: 370px;
  background: linear-gradient(160deg, #1b243b, #0e1424);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 38px;
  padding: 14px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(124, 108, 255, 0.15);
  position: relative;
}

.phone-notch {
  width: 112px;
  height: 20px;
  background: #080c16;
  border-radius: 0 0 14px 14px;
  margin: 0 auto 10px;
}

.phone-screen {
  background: linear-gradient(180deg, #11192e 0%, #0b1020 100%);
  border-radius: 26px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.level-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  padding: 4px 10px;
  border-radius: 999px;
}

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

.article-preview h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: #fff;
}

.article-text {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #cdd7eb;
  margin-bottom: 18px;
}

.word-token {
  font-family: inherit;
  font-size: inherit;
  color: #e2e8f0;
  background: rgba(124, 108, 255, 0.16);
  border: 0;
  border-bottom: 1.5px dashed rgba(167, 139, 250, 0.75);
  border-radius: 5px;
  padding: 0 4px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.word-token:hover {
  background: rgba(124, 108, 255, 0.32);
  color: #fff;
}

.word-token.active {
  background: #7c6cff;
  color: #fff;
  border-bottom-color: transparent;
}

/* Lookup Popup Card */
.lookup-card {
  background: rgba(22, 31, 56, 0.95);
  border: 1px solid rgba(124, 108, 255, 0.35);
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.lookup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.lookup-word-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lookup-word {
  font-weight: 800;
  font-size: 1.08rem;
  color: #fff;
}

.lookup-pos {
  font-size: 0.72rem;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

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

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  background: rgba(124, 108, 255, 0.28);
  color: #fff;
}

.lookup-meaning {
  font-size: 0.98rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 4px;
}

.lookup-context {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.lookup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ai-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: #a78bfa;
}

.save-word-btn {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(124, 108, 255, 0.24);
  border: 1px solid rgba(124, 108, 255, 0.45);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.save-word-btn:hover {
  background: rgba(124, 108, 255, 0.4);
}

.save-word-btn.saved {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

/* Sections */
.section {
  padding: 84px 0;
}

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 54px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a78bfa;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 108, 255, 0.35);
  background: rgba(22, 31, 56, 0.85);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.icon-indigo { background: rgba(124, 108, 255, 0.16); color: #a78bfa; }
.icon-teal { background: rgba(20, 184, 166, 0.16); color: #2dd4bf; }
.icon-amber { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.icon-rose { background: rgba(244, 63, 94, 0.16); color: #fb7185; }
.icon-sky { background: rgba(56, 189, 248, 0.16); color: #38bdf8; }
.icon-purple { background: rgba(192, 132, 252, 0.16); color: #d8b4fe; }

.feature-card h3 {
  font-size: 1.14rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Theme Showcase */
.theme-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 42px;
}

.theme-info h2 {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.theme-info p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.theme-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-pill {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.theme-pill.active {
  color: #fff;
  background: rgba(124, 108, 255, 0.22);
  border-color: rgba(124, 108, 255, 0.6);
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.swatch-night { background: linear-gradient(135deg, #1e293b, #4c1d95); }
.swatch-amethyst { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.swatch-ocean { background: linear-gradient(135deg, #0284c7, #0f766e); }
.swatch-latte { background: linear-gradient(135deg, #d97706, #fef3c7); }
.swatch-sage { background: linear-gradient(135deg, #65a30d, #dcfce7); }

.theme-preview-stage {
  border-radius: 22px;
  padding: 32px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.45s ease, color 0.35s ease, border-color 0.35s ease;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.theme-night-depth {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #3b1739 100%);
  color: #f8fafc;
}

.theme-amethyst-galaxy {
  background: radial-gradient(circle at top right, #9333ea 0%, #3b0764 52%, #13072e 100%);
  color: #faf5ff;
}

.theme-ocean-depths {
  background: linear-gradient(135deg, #042f2e 0%, #0c4a6e 55%, #082f49 100%);
  color: #ecfeff;
}

.theme-warm-latte {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fed7aa 100%);
  color: #451a03;
  border-color: rgba(120, 53, 15, 0.18);
}

.theme-sage-sunlight {
  background: linear-gradient(135deg, #ecfccb 0%, #dcfce7 55%, #fef9c3 100%);
  color: #14532d;
  border-color: rgba(20, 83, 45, 0.16);
}

.stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.85;
}

.stage-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.theme-warm-latte .stage-badge,
.theme-sage-sunlight .stage-badge {
  background: rgba(0, 0, 0, 0.08);
}

.stage-quote {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.45;
  margin: 22px 0 8px;
}

.stage-translation {
  font-size: 0.94rem;
  opacity: 0.82;
  margin-bottom: 24px;
}

.stage-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.theme-warm-latte .stage-bar,
.theme-sage-sunlight .stage-bar {
  background: rgba(0, 0, 0, 0.1);
}

.stage-progress {
  width: 64%;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  opacity: 0.85;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.step-num {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.step-card h3 {
  font-size: 1.12rem;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Download CTA */
.download-section {
  padding-bottom: 104px;
}

.download-card {
  text-align: center;
  padding: 56px 32px;
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(109, 93, 252, 0.18), rgba(14, 165, 233, 0.12));
  border: 1px solid rgba(124, 108, 255, 0.34);
  box-shadow: var(--shadow);
}

.download-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 20px;
  box-shadow: 0 14px 32px rgba(109, 93, 252, 0.35);
}

.download-card h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.download-card p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}

.download-actions {
  margin-bottom: 22px;
}

.download-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.footer-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

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

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .theme-showcase {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 44px;
  }

  .features-grid,
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: rgba(8, 12, 22, 0.96);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
  }

  .theme-showcase {
    padding: 26px 20px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
