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

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

:root {
  --red:    #F22248;
  --yellow: #F2D06B;
  --dark:   #1a1a2e;
  --gray:   #F5F5F7;
  --white:  #ffffff;
  --text:   #2d2d2d;
  --muted:  #777;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

html, body {
  font-family: 'Poppins', sans-serif;
  background: var(--gray);
  color: var(--text);
  min-height: 100vh;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.nav-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 6px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-btn.active { background: var(--red); color: var(--yellow); font-weight: 600; }

/* ── Pages ────────────────────────────────────────────────── */
.page { display: none; min-height: calc(100vh - 64px - 60px); padding-bottom: 80px; }
.page.active { display: block; }

.page-header {
  background: linear-gradient(135deg, var(--red), #c0143a);
  color: white;
  text-align: center;
  padding: 50px 20px 40px;
}

.page-header h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.page-header p  { font-size: 16px; opacity: 0.9; }

/* ── HOME ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--red) 0%, #c0143a 60%, #8b0f2a 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 80px 60px;
  text-align: left;
}

.hero-content h1 { font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.brand { color: var(--yellow); }
.hero-sub { font-size: 17px; opacity: 0.9; max-width: 480px; line-height: 1.7; margin-bottom: 28px; }
.hero-illustration { font-size: 120px; line-height: 1; }

.features-overview {
  padding: 60px 40px;
  text-align: center;
}

.features-overview h2 { font-size: 28px; font-weight: 700; margin-bottom: 32px; color: var(--dark); }

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 30px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(242,34,72,0.15);
  border-color: var(--red);
}

.feature-icon { font-size: 40px; margin-bottom: 12px; }
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: var(--dark); }
.feature-card p  { font-size: 14px; color: var(--muted); line-height: 1.6; }

.how-to {
  background: var(--dark);
  color: white;
  padding: 50px 40px;
  text-align: center;
}

.how-to h2 { font-size: 26px; font-weight: 700; margin-bottom: 32px; color: var(--yellow); }

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.step {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 120px;
  text-align: center;
}

.step-num {
  display: inline-block;
  background: var(--red);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  line-height: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p { font-size: 13px; color: rgba(255,255,255,0.85); }
.step-arrow { font-size: 22px; color: var(--yellow); }

/* ── TOPICS ───────────────────────────────────────────────── */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.topic-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
  text-align: center;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(242,34,72,0.15);
  border-color: var(--red);
}

.topic-emoji { font-size: 44px; margin-bottom: 12px; }
.topic-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.topic-card p  { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }

.btn-topic-start {
  background: var(--red);
  color: var(--yellow);
  border: none;
  border-radius: 20px;
  padding: 8px 22px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-topic-start:hover { background: #c0143a; }

/* ── PRACTICE ─────────────────────────────────────────────── */
.practice-section {
  background: white;
  border-radius: var(--radius);
  padding: 36px;
  margin: 30px auto;
  max-width: 820px;
  box-shadow: var(--shadow);
  position: relative;
}

.section-badge {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.practice-section h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.section-desc { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }

/* Audio model box */
.audio-model-box {
  background: #fff8f0;
  border: 2px solid var(--yellow);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.model-sentence {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.8;
  margin-bottom: 16px;
}

.speed-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.speed-label { font-size: 14px; color: var(--muted); font-weight: 500; }

.speed-btn {
  background: #eee;
  color: #555;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 6px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.speed-btn:hover { background: var(--yellow); color: var(--red); }
.active-speed { background: var(--red) !important; color: var(--yellow) !important; border-color: var(--yellow); }

/* Dialogue box */
.dialogue-box {
  background: #f8f8ff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e0e0f0;
}

.dialogue-box h3 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }

.dialogue-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.line-b { flex-direction: row-reverse; }

.speaker-badge {
  background: var(--red);
  color: white;
  font-size: 12px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.line-b .speaker-badge { background: var(--dark); }

.dialogue-text {
  background: white;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  max-width: 80%;
}

/* Guided tasks */
.guided-task {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--red);
}

.task-level {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.task-instruction {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.task-template-box {
  background: white;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.task-template {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.6;
  flex: 1;
}

.task-example-box {
  background: #fffbea;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-left: 3px solid var(--yellow);
  font-size: 14px;
  line-height: 1.6;
}

.example-label { font-weight: 600; color: #b8860b; margin-right: 6px; }
.example-text  { color: #555; font-style: italic; }

.task-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

.task-transcript-wrap {
  margin-top: 12px;
}

.task-transcript-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-transcript {
  min-height: 32px;
  font-size: 15px;
  color: #333;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  border: 1px dashed #ddd;
  margin-bottom: 10px;
  line-height: 1.6;
}

.listening-pulse {
  color: var(--red);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Feedback boxes */
.feedback-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 4px;
}

.feedback-great  { background: #e8f8f0; border: 1.5px solid #34c77b; }
.feedback-almost { background: #fffbe6; border: 1.5px solid #f5c518; }
.feedback-retry  { background: #fff0f0; border: 1.5px solid #f22248; }

.feedback-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }

.feedback-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--dark);
}

.feedback-detail {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 6px;
}

.feedback-score {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  background: var(--dark);
  color: var(--yellow);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.feedback-example {
  font-size: 13px;
  color: #666;
  font-style: italic;
  margin-top: 4px;
}

/* Task buttons */
.btn-record-task {
  background: var(--red);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-record-task:hover { background: #c0143a; }
.btn-record-task.recording-active { background: #c0143a; animation: pulse 1s infinite; }

.btn-hint-task {
  background: #fff8e1;
  color: #b8860b;
  border: 1.5px solid #f5c518;
  border-radius: 20px;
  padding: 8px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-hint-task:hover { background: #f5c518; color: white; }

/* ── RECORD ───────────────────────────────────────────────── */
.record-container {
  max-width: 700px;
  margin: 30px auto;
  padding: 0 20px;
}

.record-prompt-box {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border-left: 5px solid var(--red);
}

.record-prompt-box h3 { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.record-prompt-box p  { font-size: 17px; font-weight: 500; color: var(--dark); line-height: 1.6; margin-bottom: 12px; }

.transcript-box {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.transcript-box h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--muted); }
.transcript-text { font-size: 16px; color: #555; font-style: italic; min-height: 40px; line-height: 1.7; }

.record-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.recordings-list {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.recordings-list h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }

.recording-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  font-weight: 500;
}

.recording-item audio { flex: 1; height: 36px; }

/* ── SCENARIO ─────────────────────────────────────────────── */
.scenario-container {
  max-width: 720px;
  margin: 30px auto;
  padding: 0 20px;
}

.scenario-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border-top: 5px solid var(--red);
  text-align: center;
}

.scenario-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scenario-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.6;
  margin-bottom: 16px;
}

.scenario-hint {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

.scenario-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.response-area {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.response-area h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

.response-transcript-box {
  background: #f9f9f9;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  min-height: 60px;
  border: 1px dashed #ddd;
}

.scenario-record-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sample-answer-box {
  background: #fff8e1;
  border-radius: 10px;
  padding: 16px;
  border-left: 4px solid var(--yellow);
  margin-top: 12px;
}

.sample-answer-box strong { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.sample-answer-box p { font-size: 15px; color: var(--dark); line-height: 1.7; margin-bottom: 10px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--red);
  color: var(--yellow);
  border: none;
  border-radius: 25px;
  padding: 12px 28px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: inline-block;
}

.btn-primary:hover { background: #c0143a; transform: translateY(-1px); }

.btn-play {
  background: var(--red);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 28px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-play:hover { background: #c0143a; }

.btn-play-dialogue {
  background: var(--dark);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s;
}

.btn-play-dialogue:hover { background: #333; }

.btn-play-small {
  background: #eee;
  color: var(--dark);
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-play-small:hover { background: var(--yellow); color: var(--red); }

.btn-record {
  background: var(--red);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-record:hover { background: #c0143a; }
.recording-active { background: #c0143a !important; animation: pulse 1s infinite; }

.btn-play-back {
  background: var(--dark);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-play-back:hover { background: #333; }
.btn-play-back:disabled { background: #ccc; cursor: not-allowed; }

.btn-clear {
  background: #eee;
  color: #555;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-clear:hover { background: #ddd; }

.btn-record-task { background: #e8f4fd; color: #1a73e8; }
.btn-record-task:hover { background: #1a73e8; color: white; }
.btn-record-task.recording-active { background: var(--red) !important; color: white !important; }

/* ── Word Highlight ───────────────────────────────────────── */
.word {
  display: inline-block;
  padding: 2px 3px;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}

.word-highlight {
  background: rgba(242, 208, 107, 0.6);
  color: var(--red);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(242, 34, 72, 0.2);
  border-radius: 5px;
}

/* ── Pulse animation ──────────────────────────────────────── */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(242,34,72,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(242,34,72,0); }
  100% { box-shadow: 0 0 0 0 rgba(242,34,72,0); }
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 18px;
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
══════════════════════════════════════════════════════════ */

/* ── Tablet (≤768px) ──────────────────────────────────────── */
@media (max-width: 768px) {

  /* Navbar: logo kiri, tombol scroll horizontal */
  .navbar {
    padding: 0 12px;
    height: 56px;
  }
  .nav-logo { font-size: 18px; }
  .nav-links {
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-btn { font-size: 12px; padding: 6px 10px; white-space: nowrap; }

  /* Page min-height */
  .page { min-height: calc(100vh - 56px - 50px); padding-bottom: 70px; }

  /* Page header */
  .page-header { padding: 30px 16px 24px; }
  .page-header h1 { font-size: 24px; }
  .page-header p  { font-size: 14px; }

  /* Hero */
  .hero {
    flex-direction: column;
    padding: 36px 20px 32px;
    text-align: center;
    gap: 16px;
  }
  .hero-content h1 { font-size: 26px; }
  .hero-sub { font-size: 14px; margin-bottom: 20px; }
  .hero-illustration { font-size: 64px; }

  /* Feature cards: 2 kolom */
  .features-overview { padding: 32px 16px; }
  .features-overview h2 { font-size: 20px; margin-bottom: 20px; }
  .feature-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature-card { padding: 18px 12px; }
  .feature-icon { font-size: 28px; margin-bottom: 8px; }
  .feature-card h3 { font-size: 14px; }
  .feature-card p  { font-size: 12px; }

  /* How to steps */
  .how-to { padding: 32px 16px; }
  .how-to h2 { font-size: 20px; margin-bottom: 20px; }
  .steps { flex-direction: column; align-items: center; gap: 6px; }
  .step-arrow { transform: rotate(90deg); font-size: 18px; }
  .step { padding: 12px 16px; min-width: 160px; }

  /* Topics grid: 2 kolom */
  .topics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
  }
  .topic-card { padding: 18px 12px; }
  .topic-emoji { font-size: 32px; margin-bottom: 8px; }
  .topic-card h3 { font-size: 14px; }
  .topic-card p  { font-size: 12px; margin-bottom: 12px; }
  .btn-topic-start { font-size: 12px; padding: 6px 14px; }

  /* Practice sections */
  .practice-section {
    margin: 12px;
    padding: 18px 14px;
    border-radius: 12px;
  }
  .practice-section h2 { font-size: 18px; }
  .model-sentence { font-size: 16px; }
  .speed-row { gap: 6px; }
  .speed-btn { font-size: 12px; padding: 5px 12px; }
  .dialogue-text { font-size: 13px; max-width: 85%; }
  .task-template { font-size: 14px; }
  .task-template-box { flex-direction: column; align-items: flex-start; }
  .task-actions { gap: 8px; }
  .feedback-box { flex-direction: column; gap: 8px; }
  .btn-record-task, .btn-hint-task { width: 100%; text-align: center; }

  /* Record page */
  .record-container { margin: 16px auto; padding: 0 12px; }
  .record-prompt-box { padding: 16px; }
  .record-prompt-box p { font-size: 15px; }
  .transcript-box { padding: 14px; }
  .transcript-text { font-size: 14px; }
  .record-controls { gap: 8px; }
  .recordings-list { padding: 14px; }
  .recording-item { flex-direction: column; align-items: flex-start; gap: 6px; }
  .recording-item audio { width: 100%; }

  /* Scenario page */
  .scenario-container { margin: 16px auto; padding: 0 12px; }
  .scenario-card { padding: 22px 16px; }
  .scenario-text { font-size: 16px; }
  .response-area { padding: 16px; }

  /* Buttons — full width on mobile */
  .btn-primary  { width: 100%; text-align: center; padding: 13px 20px; font-size: 15px; }
  .btn-record   { width: 100%; padding: 13px 20px; font-size: 15px; }
  .btn-play-back{ width: 100%; padding: 13px 20px; font-size: 15px; }
  .btn-clear    { width: 100%; padding: 13px 20px; font-size: 15px; }
  .btn-play     { width: 100%; padding: 11px 20px; font-size: 14px; }
  .scenario-record-controls { flex-direction: column; }
  .scenario-record-controls .btn-record,
  .scenario-record-controls .btn-play-small { width: 100%; text-align: center; padding: 12px; }
}

/* ── Small phone (≤400px) ─────────────────────────────────── */
@media (max-width: 400px) {

  .nav-logo { font-size: 16px; }
  .nav-btn  { font-size: 11px; padding: 5px 8px; }

  .hero-content h1 { font-size: 22px; }
  .hero-sub { font-size: 13px; }

  /* Topics: 1 kolom di layar sangat kecil */
  .topics-grid { grid-template-columns: 1fr; }

  /* Feature cards: 1 kolom */
  .feature-cards { grid-template-columns: 1fr; }

  .model-sentence { font-size: 15px; }
  .scenario-text  { font-size: 15px; }
  .page-header h1 { font-size: 20px; }
}

/* ── Bottom Navigation (mobile only) ─────────────────────── */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Sembunyikan top navbar links di mobile, tampilkan bottom nav */
  .navbar .nav-links { display: none; }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    height: 62px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
  }

  .bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    padding: 6px 4px;
    transition: color 0.2s, background 0.2s;
    gap: 2px;
  }

  .bottom-nav-btn.active {
    color: var(--yellow);
    background: rgba(242,34,72,0.15);
  }

  .bottom-nav-btn:active { background: rgba(255,255,255,0.08); }

  .bnav-icon  { font-size: 20px; line-height: 1; }
  .bnav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }

  /* Beri ruang di bawah konten agar tidak tertutup bottom nav */
  .page { padding-bottom: 80px; }
  .footer { display: none; }
}
