:root {
  --bg: #0D1310;
  --bg2: #131B17;
  --card: #18221D;
  --card2: #1F2B24;
  --line: #2A3931;
  --txt: #ECF2EE;
  --muted: #8FA398;
  --green: #74A57F;
  --green-bright: #8FCB9B;
  --gold: #C8A96E;
  --rose: #A02841;
  --red: #E05C5C;
  --radius: 16px;
}

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

body {
  background: var(--bg);
  color: var(--txt);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif { font-family: Fraunces, Georgia, serif; }

button { font-family: inherit; cursor: pointer; border: none; }
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------- giriş sayfası */

body.landing { display: grid; place-items: center; padding: 24px; overflow-x: hidden; }

.lp-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(116,165,127,.20), transparent 60%),
    radial-gradient(700px 500px at 95% 105%, rgba(200,169,110,.14), transparent 60%),
    var(--bg);
}

.lp { max-width: 620px; text-align: center; padding: 20px 0 40px; }
.lp-logo { font-size: 72px; line-height: 1; margin-bottom: 10px; }
.lp h1 { font-size: clamp(38px, 8vw, 60px); letter-spacing: -.02em; margin-bottom: 14px; }
.lp-sub { color: var(--muted); font-size: 17px; line-height: 1.65; margin-bottom: 32px; }
.lp-sub strong { color: var(--gold); }

.lp-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px; margin-bottom: 34px;
}
.lp-feat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.lp-feat span { font-size: 26px; }
.lp-feat b { font-size: 14px; }
.lp-feat i { font-style: normal; font-size: 12px; color: var(--muted); }

.btn-google {
  display: inline-flex; align-items: center; gap: 12px;
  background: #fff; color: #1c1c1c; font-weight: 600; font-size: 16px;
  padding: 15px 30px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .15s;
}
.btn-google:hover { transform: translateY(-2px); }

.lp-error, .lp-warn {
  background: rgba(224,92,92,.12); border: 1px solid rgba(224,92,92,.35);
  color: #F5B3B3; border-radius: 12px; padding: 12px 16px; margin-bottom: 22px; font-size: 14px;
}
.lp-warn { background: rgba(200,169,110,.10); border-color: rgba(200,169,110,.3); color: var(--gold); }

.lp-code { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.lp-code input {
  background: var(--card); border: 1px solid var(--line); color: var(--txt);
  padding: 12px 16px; border-radius: 12px; width: 220px; font-size: 15px;
}
.lp-code input:focus { outline: none; border-color: var(--green); }
.lp-code button {
  background: var(--green); color: #08110C; font-weight: 700;
  padding: 12px 24px; border-radius: 12px; font-size: 15px;
}
.lp-codeerr { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }
.lp-foot { margin-top: 40px; color: #4A5B52; font-size: 13px; }

/* ---------------------------------------------------------------- kabuk */

.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  background: rgba(13,19,16,.92); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50; flex-wrap: wrap;
}
.brand { font-family: Fraunces, serif; font-size: 20px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.brand span { color: var(--txt); }

.stats-mini { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.sm {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 7px 13px; display: flex; align-items: baseline; gap: 5px; font-size: 13px;
}
.sm b { font-size: 15px; color: var(--gold); }
.sm i { font-style: normal; color: var(--muted); font-size: 11px; }

.user-chip { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.user-chip a { color: var(--muted); font-size: 17px; padding: 0 4px; }
.user-chip a:hover { color: var(--red); }

.tabs {
  display: flex; gap: 6px; padding: 14px 24px 0; overflow-x: auto;
  border-bottom: 1px solid var(--line); background: var(--bg);
  position: sticky; top: 61px; z-index: 40;
}
.tabs button {
  background: none; color: var(--muted); padding: 10px 16px 13px;
  font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button:hover { color: var(--txt); }
.tabs button.active { color: var(--green-bright); border-bottom-color: var(--green); }
.tabs em {
  font-style: normal; background: var(--rose); color: #fff; font-size: 11px;
  padding: 1px 7px; border-radius: 999px; margin-left: 4px; font-weight: 700;
}

main { max-width: 1000px; margin: 0 auto; padding: 28px 24px 80px; }

/* --------------------------------------------------------------- harita */

.hero {
  background: linear-gradient(135deg, var(--card2), var(--card));
  border: 1px solid var(--line); border-radius: 22px;
  padding: 26px 28px; margin-bottom: 30px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.hero-score { text-align: center; }
.hero-score .big {
  font-family: Fraunces, serif; font-size: 56px; font-weight: 700;
  line-height: 1; color: var(--gold);
}
.hero-score .lbl { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-top: 5px; }
.hero-mid { flex: 1; min-width: 240px; }
.hero-mid h2 { font-size: 22px; margin-bottom: 6px; }
.hero-mid p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.cefr-pill {
  display: inline-block; background: var(--green); color: #08110C;
  font-weight: 700; padding: 3px 12px; border-radius: 999px; font-size: 14px;
}

.goalbar { margin-top: 14px; }
.goalbar .track { height: 9px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.goalbar .fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 99px; transition: width .5s; }
.goalbar .txt { font-size: 12px; color: var(--muted); margin-top: 6px; }

.level-block { margin-bottom: 36px; }
.level-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.level-tag {
  font-family: Fraunces, serif; font-weight: 700; font-size: 15px;
  padding: 5px 14px; border-radius: 10px; color: #08110C;
}
.level-head h3 { font-size: 19px; font-weight: 600; }
.level-head .lock { color: var(--muted); font-size: 13px; }
.level-meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.mastery-bar { height: 6px; background: var(--card); border-radius: 99px; overflow: hidden; margin: 8px 0 16px; }
.mastery-bar div { height: 100%; border-radius: 99px; transition: width .6s; }

.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.unit {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: transform .15s, border-color .15s;
  display: flex; flex-direction: column; gap: 8px; position: relative;
}
.unit:hover { transform: translateY(-3px); border-color: var(--green); }
.unit.locked { opacity: .42; cursor: not-allowed; }
.unit.locked:hover { transform: none; border-color: var(--line); }
.unit.done { border-color: rgba(116,165,127,.5); }
.unit .u-emoji { font-size: 30px; }
.unit .u-title { font-weight: 600; font-size: 15px; }
.unit .u-intro { color: var(--muted); font-size: 12.5px; line-height: 1.5; flex: 1; }
.unit .u-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.stars { letter-spacing: 1px; font-size: 13px; }

.test-card {
  background: linear-gradient(135deg, rgba(200,169,110,.16), rgba(160,40,65,.10));
  border: 1px solid rgba(200,169,110,.4); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap;
}
.test-card .tc-txt { flex: 1; min-width: 200px; }
.test-card b { font-size: 15px; }
.test-card p { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* --------------------------------------------------------------- butonlar */

.btn {
  background: var(--green); color: #08110C; font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: 12px; transition: filter .15s, transform .15s;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn.ghost { background: var(--card2); color: var(--txt); border: 1px solid var(--line); }
.btn.gold { background: var(--gold); }
.btn.sm { padding: 9px 18px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }

/* ---------------------------------------------------------------- ders */

.overlay {
  position: fixed; inset: 0; background: rgba(8,12,10,.97); z-index: 100;
  overflow-y: auto; padding: 0;
}
.lesson { max-width: 720px; margin: 0 auto; padding: 20px 22px 70px; min-height: 100vh; }
.lesson-top { display: flex; align-items: center; gap: 14px; padding: 8px 0 22px; }
.lesson-top .x { background: none; color: var(--muted); font-size: 26px; line-height: 1; padding: 0 6px; }
.lesson-top .x:hover { color: var(--txt); }
.prog { flex: 1; height: 12px; background: var(--card); border-radius: 99px; overflow: hidden; }
.prog div { height: 100%; background: linear-gradient(90deg, var(--green), var(--green-bright)); border-radius: 99px; transition: width .35s; }
.lesson-top .cnt { color: var(--muted); font-size: 13px; min-width: 42px; text-align: right; }

.card-teach {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px 30px 34px; margin-bottom: 22px;
}
.card-teach .kicker { color: var(--green-bright); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.card-teach h2 { font-size: 27px; line-height: 1.25; margin-bottom: 16px; }
.card-teach p { font-size: 16.5px; line-height: 1.8; color: #D3DED8; }

.fig {
  margin: 22px 0 0; padding: 16px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 14px; overflow-x: auto;
}
.fig img { display: block; width: 100%; min-width: 460px; height: auto; }

.unit .u-fig {
  position: absolute; right: 12px; top: 12px; width: 26px; height: 26px;
  opacity: .28; pointer-events: none;
}

.q-wrap { margin-bottom: 20px; }
.q-lead { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.q-text { font-family: Fraunces, serif; font-size: 23px; line-height: 1.4; margin-bottom: 24px; }

.opts { display: flex; flex-direction: column; gap: 11px; }
.opt {
  background: var(--card); border: 2px solid var(--line); border-radius: 14px;
  padding: 16px 20px; text-align: left; color: var(--txt); font-size: 15.5px;
  line-height: 1.45; transition: all .13s; display: flex; gap: 13px; align-items: flex-start;
}
.opt:hover:not(:disabled) { border-color: var(--green); background: var(--card2); }
.opt .key {
  width: 24px; height: 24px; border-radius: 7px; background: var(--bg2);
  display: grid; place-items: center; font-size: 12px; color: var(--muted); flex-shrink: 0; margin-top: 1px;
}
.opt.sel { border-color: var(--green); background: var(--card2); }
.opt.right { border-color: var(--green-bright); background: rgba(143,203,155,.14); }
.opt.wrong { border-color: var(--red); background: rgba(224,92,92,.13); }
.opt:disabled { cursor: default; }

.feedback { border-radius: 16px; padding: 18px 20px; margin-top: 20px; animation: slideUp .25s; }
.feedback.ok { background: rgba(143,203,155,.13); border: 1px solid rgba(143,203,155,.35); }
.feedback.no { background: rgba(224,92,92,.11); border: 1px solid rgba(224,92,92,.32); }
.feedback b { display: block; margin-bottom: 6px; font-size: 15px; }
.feedback.ok b { color: var(--green-bright); }
.feedback.no b { color: #F09A9A; }
.feedback p { color: #C8D5CE; font-size: 14.5px; line-height: 1.65; }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.lesson-actions { display: flex; gap: 12px; margin-top: 26px; justify-content: flex-end; }

/* -------------------------------------------------------------- sonuç */

.result { text-align: center; padding: 40px 20px; }
.result .big-emoji { font-size: 72px; margin-bottom: 14px; }
.result h2 { font-size: 32px; margin-bottom: 10px; }
.result .pct { font-family: Fraunces, serif; font-size: 64px; color: var(--gold); line-height: 1; margin: 18px 0 6px; }
.result .sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 26px 0; }
.res-cell { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 10px; }
.res-cell b { display: block; font-size: 24px; color: var(--gold); font-family: Fraunces, serif; }
.res-cell i { font-style: normal; font-size: 12px; color: var(--muted); }

.unlock-note {
  background: linear-gradient(135deg, rgba(200,169,110,.2), rgba(116,165,127,.14));
  border: 1px solid var(--gold); border-radius: 14px; padding: 16px; margin: 20px 0; font-size: 15px;
}
.badge-pop { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.badge-pop .bp {
  background: var(--card); border: 1px solid var(--gold); border-radius: 12px;
  padding: 10px 16px; font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.badge-pop .bp span { font-size: 20px; }

.review-list { text-align: left; margin-top: 26px; }
.review-list h3 { font-size: 16px; margin-bottom: 12px; color: var(--muted); }
.rl-item { background: var(--card); border-left: 3px solid var(--red); border-radius: 10px; padding: 13px 16px; margin-bottom: 9px; }
.rl-item.ok { border-left-color: var(--green); }
.rl-item .rq { font-size: 14px; margin-bottom: 5px; }
.rl-item .ra { font-size: 13px; color: var(--green-bright); }
.rl-item .re { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.55; }

/* -------------------------------------------------------------- genel */

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.panel h3 { font-size: 17px; margin-bottom: 14px; }
.panel-sub { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .e-emoji { font-size: 52px; display: block; margin-bottom: 14px; }

.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); gap: 3px; overflow-x: auto; padding-bottom: 6px; }
.heat i { width: 12px; height: 12px; border-radius: 3px; background: var(--bg2); display: block; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kv > div { background: var(--bg2); border-radius: 12px; padding: 15px; }
.kv b { display: block; font-size: 26px; font-family: Fraunces, serif; color: var(--gold); }
.kv i { font-style: normal; font-size: 12px; color: var(--muted); }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bcard { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 14px; text-align: center; }
.bcard.locked { opacity: .3; }
.bcard .be { font-size: 32px; display: block; margin-bottom: 8px; }
.bcard b { font-size: 13.5px; display: block; margin-bottom: 3px; }
.bcard i { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.4; display: block; }

/* --------------------------------------------------- tadım görevleri */

.missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 13px; }

.mission {
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px; cursor: pointer; transition: transform .15s, border-color .15s;
  display: flex; flex-direction: column; gap: 7px;
}
.mission:hover { transform: translateY(-3px); border-color: var(--gold); }
.mission.locked { opacity: .4; cursor: not-allowed; }
.mission.locked:hover { transform: none; border-color: var(--line); }
.mission.done { border-color: rgba(116,165,127,.5); cursor: default; }
.mission.done:hover { transform: none; }

.m-top { display: flex; align-items: center; justify-content: space-between; }
.m-emoji { font-size: 26px; }
.m-xp { font-size: 11.5px; color: var(--gold); font-weight: 600; }
.mission.done .m-xp { color: var(--green-bright); }
.m-title { font-weight: 600; font-size: 15px; }
.m-brief { color: var(--muted); font-size: 12.5px; line-height: 1.55; flex: 1; }
.m-unit { font-size: 11px; color: #5F7268; }

.m-steps { margin: 22px 0 0; display: flex; flex-direction: column; gap: 11px; }
.m-step { display: flex; gap: 13px; align-items: flex-start; }
.m-step span {
  width: 25px; height: 25px; border-radius: 50%; background: var(--gold); color: #0E1512;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex-shrink: 0;
}
.m-step div { font-size: 14.5px; line-height: 1.6; color: #D3DED8; padding-top: 2px; }

.m-record {
  margin-top: 22px; background: rgba(200,169,110,.09);
  border: 1px solid rgba(200,169,110,.3); border-radius: 12px; padding: 15px 17px;
}
.m-record b { color: var(--gold); font-size: 12.5px; display: block; margin-bottom: 5px; }
.m-record p { font-size: 14px; line-height: 1.6; color: #C8D5CE; }

.note-form { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.note-form input, .note-form select, .note-form textarea {
  background: var(--bg2); border: 1px solid var(--line); color: var(--txt);
  padding: 11px 14px; border-radius: 10px; font-size: 14px; font-family: inherit; width: 100%;
}
.note-form textarea { grid-column: 1 / -1; min-height: 90px; resize: vertical; }
.note-form input:focus, .note-form textarea:focus, .note-form select:focus { outline: none; border-color: var(--green); }
.note-form .full { grid-column: 1 / -1; }

.note { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 11px; }
.note-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.note-head b { font-size: 15px; }
.note-head .tag { background: var(--card2); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; color: var(--muted); }
.note-head .del { margin-left: auto; background: none; color: var(--muted); font-size: 16px; }
.note-head .del:hover { color: var(--red); }
.note p { color: #C4D1CA; font-size: 14px; line-height: 1.65; white-space: pre-wrap; }

.weak-item { background: var(--bg2); border-radius: 10px; padding: 12px 15px; margin-bottom: 8px; font-size: 13.5px; }
.weak-item .wm { color: var(--muted); font-size: 12px; margin-top: 4px; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--gold); color: var(--txt);
  padding: 13px 24px; border-radius: 12px; z-index: 200; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: slideUp .25s;
}

table.tests { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tests td, table.tests th { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.tests th { color: var(--muted); font-weight: 500; font-size: 12px; }

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .brand span { display: none; }
  main { padding: 20px 16px 70px; }
  .tabs { padding: 12px 16px 0; }
  .note-form { grid-template-columns: 1fr; }
  .card-teach { padding: 24px 20px 26px; }
  .card-teach h2 { font-size: 23px; }
  .q-text { font-size: 20px; }
}
