/* Bahasa Turki A1 — gaya dasar */
:root {
  --red: #d7263d;
  --red-dark: #b01c30;
  --red-soft: #fdecee;
  --ink: #1d1d27;
  --muted: #6b6b7b;
  --line: #ececf1;
  --bg: #faf8f6;
  --card: #ffffff;
  --green: #1e9e61;
  --green-soft: #e7f6ee;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--red); text-decoration: none; }
h1, h2 { line-height: 1.2; margin: 0 0 .4rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.brand b { color: var(--red); }
.brand-mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--red); color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .04em;
}
.topnav { display: flex; align-items: center; gap: 12px; }
.hello { font-size: .9rem; color: var(--muted); }

/* Layout */
.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 28px 16px 48px; flex: 1; }
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.footer { text-align: center; font-size: .8rem; color: var(--muted); padding: 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 700;
  cursor: pointer; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-block { width: 100%; }

/* Auth */
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 28px; box-shadow: 0 10px 30px rgba(29, 29, 39, .06);
}
.auth-brand { margin-bottom: 16px; }
.auth-card h1 { font-size: 1.6rem; }
.auth-switch { text-align: center; margin: 20px 0 0; font-size: .9rem; color: var(--muted); }

/* Forms */
.form { display: grid; gap: 14px; margin-top: 20px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form label small { font-weight: 400; color: var(--muted); }
.form input {
  width: 100%; padding: 12px 14px; border: 1px solid #dcdce4; border-radius: 10px;
  font: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
.form input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.form .btn { margin-top: 6px; }

/* Alerts */
.alert { padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin-top: 16px; }
.alert-error { background: var(--red-soft); color: var(--red-dark); }
.alert-success { background: var(--green-soft); color: var(--green); font-weight: 600; }

/* Hero + progress */
.hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; margin-bottom: 32px;
}
.eyebrow { color: var(--red); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }
.progress-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.progress-top { display: flex; justify-content: space-between; font-weight: 600; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--red); border-radius: 99px; }
.progress-card p { margin: 0; }

/* Units */
.unit { margin-bottom: 32px; }
.unit-head { margin-bottom: 12px; }
.unit-no { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--red); background: var(--red-soft); padding: 3px 10px; border-radius: 99px; margin-bottom: 8px; }
.unit-head p { margin: 0; }

/* Lessons */
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lesson {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink);
}
a.lesson:hover { border-color: var(--red); }
.lesson-num {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  font-weight: 700; font-size: .9rem; background: var(--bg); color: var(--muted);
}
.lesson-num svg { width: 20px; height: 20px; }
.lesson-body { flex: 1; min-width: 0; display: grid; }
.lesson-title { font-weight: 700; }
.lesson-obj { font-size: .85rem; color: var(--muted); }
.lesson-meta { flex: none; text-align: right; }
.badge { font-style: normal; font-size: .7rem; font-weight: 700; color: #fff; background: var(--ink); padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.go { color: var(--red); font-weight: 700; font-size: .9rem; }
.score { color: var(--green); }

.is-lulus .lesson-num { background: var(--green-soft); color: var(--green); }
.is-terbuka { border-color: var(--red); box-shadow: 0 4px 14px rgba(215, 38, 61, .08); }
.is-terbuka .lesson-num { background: var(--red); color: #fff; }
.is-terkunci { opacity: .6; }

@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; }
  .hello { display: none; }
  .lesson { padding: 12px; gap: 10px; }
  .lesson-meta .small { display: none; }
}

/* ===== Halaman pelajaran ===== */
.mt { margin-top: 12px; }
.crumbs { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); margin-bottom: 18px; }
.lesson-head { margin-bottom: 20px; }
.lesson-head p { margin: 0 0 8px; }
.pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; background: var(--line); }
.pill-ok { background: var(--green-soft); color: var(--green); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 14px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-size: .8rem; }
.sub { font-size: 1rem; margin: 18px 0 8px; }

.video { position: relative; aspect-ratio: 16 / 9; background: #111; border-radius: 12px; overflow: hidden; }
.video iframe, .video > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-empty { display: grid; place-items: center; background: var(--bg); border: 1px dashed #d4d4dc; color: var(--muted); }

.summary { white-space: normal; }
.vocab { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 0; }
.vocab div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.vocab dt { font-weight: 700; color: var(--red-dark); }
.vocab dd { margin: 0; font-size: .875rem; color: var(--muted); }

.locked-box { padding: 16px; border-radius: 10px; background: var(--bg); border: 1px dashed #d4d4dc; color: var(--muted); text-align: center; }

.question { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.question legend { font-weight: 600; margin-bottom: 10px; padding: 0; display: flex; gap: 10px; }
.qnum { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--red-soft); color: var(--red-dark); font-size: .8rem; font-weight: 700; }
.question audio { width: 100%; margin-bottom: 10px; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice:hover { border-color: #d4d4dc; }
.choice input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--red); background: var(--red-soft); }

.text-answer, .match select {
  width: 100%; padding: 11px 14px; border: 1px solid #dcdce4; border-radius: 10px; font: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
.text-answer:focus, .match select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.tr-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.key { min-width: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
.key:hover { border-color: var(--red); }

.match { display: grid; gap: 8px; }
.match-row { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 10px; font-weight: 600; }

.order-out { min-height: 52px; padding: 8px; border: 2px dashed #d4d4dc; border-radius: 10px; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.order-pool { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.order-out .chip { background: var(--red); border-color: var(--red); color: #fff; }

/* ===== Hasil ===== */
.result { text-align: center; padding: 32px 20px; }
.result-score { font-size: 3.4rem; font-weight: 800; line-height: 1; margin-bottom: 10px; }
.result.is-pass .result-score { color: var(--green); }
.result.is-fail .result-score { color: var(--red); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.review { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.review li { padding-left: 4px; }
.review p { margin: 0 0 4px; }
.review-q { font-weight: 600; }
.review .ok b { color: var(--green); }
.review .no > p:nth-child(2) b { color: var(--red); }
.empty { text-align: center; padding: 40px 0; }

@media (max-width: 680px) {
  .match-row { grid-template-columns: 1fr; gap: 4px; }
  .card { padding: 16px; }
}
