*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Skema warna diperbarui agar lebih modern & profesional (Tech / Corporate Vibe) */
  --navy: #0f172a;        /* Slate 900 - lebih elegan dari navy biasa */
  --blue: #2563eb;        /* Royal Blue modern */
  --accent: #f59e0b;      /* Amber cerah */
  --teal: #0d9488;        /* Teal kekinian */
  --coral: #e11d48;       /* Rose modern */
  --violet: #7c3aed;      /* Violet cerah */
  --cream: #f8fafc;       /* Off-white bersih (tidak terlalu kuning) */
  --gray50: #f1f5f9;
  --gray100: #e2e8f0;
  --gray400: #64748b;
  --gray700: #334155;
  --text: #0f172a;
  --shadow: rgba(15, 23, 42, 0.08); /* Bayangan lebih lembut & elegan */
  --card-radius: 16px;    /* Sudut lebih proporsional */
}

html {
  scroll-behavior: smooth;
}

body {
  /* Font diperbarui dengan sistem font modern */
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Header - Diberikan efek glow modern */

.app-header {
  position: relative;
  background: var(--navy);
  overflow: hidden;
  padding: 64px 24px 56px;
  text-align: center;
}

.app-header::before,
.app-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(40px); /* Efek glow kekinian */
}

.app-header::before {
  width: 420px;
  height: 420px;
  top: -180px;
  left: -120px;
  background: var(--accent);
}

.app-header::after {
  width: 280px;
  height: 280px;
  bottom: -120px;
  right: -60px;
  background: #3b82f6;
}

.header-inner {
  position: relative;
  z-index: 1;
}

.header-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 40px;
  margin-bottom: 24px;
}

.app-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  font-size: clamp(32px, 5vw, 56px);
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.app-title span {
  color: var(--accent);
}

.app-subtitle {
  margin-top: 16px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  letter-spacing: 0.2px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.app-author {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Layout */

.container {
  width: 96vw;
  max-width: 1400px; /* Disesuaikan agar konten tidak terlalu melebar */
  margin: -20px auto 60px;
  padding: 0 28px;
  position: relative;
  z-index: 10;
}

.intro-card {
  background: #ffffff;
  border: 1px solid var(--gray100);
  border-radius: var(--card-radius);
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: 0 10px 30px var(--shadow); /* Bayangan lebih dalam */
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.intro-left {
  flex: 1;
  min-width: 240px;
}

.intro-card h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.intro-card p {
  font-size: 15px;
  color: var(--gray400);
  line-height: 1.7;
  max-width: 520px;
}

.home-three-column {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.15fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

.home-center-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Main cards */

.test-info,
.practice-area {
  background: #ffffff;
  border: 1px solid var(--gray100);
  border-radius: var(--card-radius);
  padding: 32px;
  box-shadow: 0 6px 24px var(--shadow);
}

.color-block-sets { border-top: 4px solid var(--accent); }
.color-block-reference { border-top: 4px solid var(--teal); }
.color-block-fulltest { border-top: 4px solid var(--coral); }
.color-block-practice { border-top: 4px solid var(--violet); }

.test-info h2,
.practice-area h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray100);
}

/* Buttons */

.section-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  flex-shrink: 0;
}

button {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px; /* Lebih kotak kekinian */
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#btn-nav-listening { background: var(--blue); color: #ffffff; }
#btn-nav-structure { background: var(--teal); color: #ffffff; }
#btn-nav-reading { background: var(--violet); color: #ffffff; }

#btn-nav-listening:hover,
#btn-nav-structure:hover,
#btn-nav-reading:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.btn-full-test {
  background: var(--navy); /* Ubah ke gelap agar terlihat lebih pro */
  color: #ffffff;
  font-weight: 800;
}

.btn-full-test:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.3);
}

.main-button-active {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3) !important;
  transform: translateY(-2px) !important;
}

button:disabled {
  background: var(--gray100) !important;
  color: var(--gray400) !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Info boxes */

.vertical-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-box {
  background: var(--gray50);
  border: 1px solid var(--gray100);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
}

.info-box h3 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.color-block-sets .info-box h3 { color: var(--accent); }
.color-block-reference .info-box h3 { color: var(--teal); }
.color-block-fulltest .info-box h3 { color: var(--coral); }
.color-block-practice .info-box h3 { color: var(--violet); }

.info-box p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin: 6px 0;
}

.info-box strong { color: var(--navy); }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stat-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--gray100);
  color: var(--navy);
}

.practice-area p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
}

.practice-note,
.flow-text { margin-top: 12px; }

.muted-note {
  margin-top: 8px;
  font-style: italic;
  color: var(--gray400);
}

/* Dynamic test content */

.question-card,
.passage-card,
.audio-box,
.score-box,
.restart-box {
  background: #ffffff;
  border: 1px solid var(--gray100);
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 2px 8px var(--shadow);
}

.question-card h3,
.passage-card h3,
.audio-box h3,
.score-box h3,
.restart-box h3 {
  margin-top: 0;
  color: var(--navy);
}

.question-meta {
  color: var(--gray400);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
}

.choice {
  display: flex;
  align-items: center;
  background: var(--gray50);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 10px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.choice:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.choice input {
  margin-right: 12px;
  transform: scale(1.1);
  accent-color: var(--blue);
}

.explanation {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--gray100);
  line-height: 1.6;
  font-size: 14.5px;
}

.correct { color: #059669; font-weight: 800; }
.wrong { color: #e11d48; font-weight: 800; }

.passage-text {
  line-height: 1.8;
  white-space: pre-line;
  font-size: 16px;
  color: var(--text);
}

.audio-box {
  background: var(--gray50);
  border-color: var(--gray100);
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.audio-status {
  margin-top: 12px;
  font-weight: bold;
  color: var(--gray400);
}

.btn-play { background: var(--blue); color: #ffffff; }
.btn-pause { background: var(--accent); color: var(--navy); }
.btn-resume { background: #10b981; color: #ffffff; }
.btn-stop { background: var(--coral); color: #ffffff; }

.btn-play.active,
.btn-pause.active,
.btn-resume.active,
.btn-stop.active {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
  transform: translateY(-2px);
}

.btn-stop:hover { background: #be123c; }

.timer-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 16px 24px;
  margin: 20px 0;
}

.timer-box p {
  margin: 5px 0 0;
  color: #065f46;
  font-size: 14px;
  font-weight: 500;
}

.timer-display {
  font-size: 32px;
  font-weight: 800;
  color: #047857;
  font-variant-numeric: tabular-nums;
}

.timer-warning { background: #fef9c3; border-color: #fde047; }
.timer-warning p, .timer-warning .timer-display { color: #a16207; }
.timer-danger { background: #fef2f2; border-color: #fca5a5; }
.timer-danger p, .timer-danger .timer-display { color: #b91c1c; }

.score-box { background: #f0fdf4; border-color: #86efac; }
.score-box p { line-height: 1.6; font-size: 15px;}

.restart-box { background: var(--gray50); border-color: var(--gray100); }
.restart-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.btn-restart { background: var(--blue); color: #ffffff; }
.btn-shuffle { background: var(--violet); color: #ffffff; }
.btn-shuffle:hover { background: #6d28d9; }

/* Footer */

.app-footer {
  text-align: center;
  padding: 40px 24px;
  font-size: 14px;
  color: var(--gray400);
  line-height: 1.8;
  border-top: 1px solid var(--gray100);
  margin-top: 40px;
}

.app-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.app-footer a:hover {
  text-decoration: underline;
}

.footer-contact {
  margin-top: 8px;
}

code {
  background: var(--gray100);
  color: var(--navy);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

/* Responsive */

@media (max-width: 1100px) {
  .home-three-column {
    grid-template-columns: 1fr 1fr;
  }
  .home-three-column > .test-info:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 48px 20px 40px;
  }

  .app-title {
    font-size: 32px;
  }

  .app-subtitle {
    font-size: 15px;
  }

  .home-three-column {
    grid-template-columns: 1fr;
  }

  .intro-card {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 28px 24px;
    text-align: center;
  }

  .section-buttons {
    flex-direction: column;
    width: 100%;
  }

  .section-buttons button,
  .audio-controls button,
  .restart-buttons button {
    width: 100%;
    padding: 14px;
  }

  .container {
    width: 100%;
    padding: 24px 16px 48px;
    margin-top: 0;
  }

  .test-info,
  .practice-area {
    padding: 24px 20px;
  }

  .timer-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .timer-display {
    font-size: 28px;
  }
}