:root {
  --bg: #090909;
  --panel: rgba(20, 20, 20, 0.92);
  --panel-2: #141414;
  --line: #292929;
  --text: #f1ede3;
  --muted: #9b988f;
  --gold: #c6a15b;
  --gold-2: #e0c07b;
  --red: #9a2f2f;
  --green: #3b7f57;
  --shadow: 0 28px 80px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 80% 0%, rgba(198,161,91,.10), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(98,34,34,.14), transparent 30%),
    linear-gradient(135deg, #0a0a0a, #0e0e0e 60%, #080808);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.015) 50%, transparent 50.2%);
  background-size: 120px 120px;
  opacity: .35;
}
.grain {
  position: fixed;
  inset: 0;
  opacity: .05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }

.app-shell { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: 54px 0 80px; position: relative; z-index: 1; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 34px; }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .24em; }
.hero h1 { margin: 10px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 7vw, 80px); line-height: .92; letter-spacing: -.05em; font-weight: 600; }
.hero h1 span { color: var(--gold-2); }
.hero p { margin: 0; color: var(--muted); font-size: 16px; }
.status-card { min-width: 190px; border: 1px solid var(--line); background: rgba(12,12,12,.7); padding: 18px 20px; box-shadow: var(--shadow); }
.status-card span, .status-card small { display:block; color: var(--muted); }
.status-card span { text-transform: uppercase; font-size: 10px; letter-spacing: .2em; }
.status-card strong { display:block; margin: 5px 0 3px; font-family: Georgia, serif; font-size: 22px; color: var(--gold-2); }
.status-card small { font-size: 12px; }

.view { display:none; }
.view.active { display:block; animation: fade .28s ease; }
@keyframes fade { from{opacity:0; transform: translateY(5px)} to{opacity:1; transform:none} }
.grid-two { display:grid; grid-template-columns: .95fr 1.05fr; gap: 22px; }
.panel { border:1px solid var(--line); background: var(--panel); padding: 24px; box-shadow: var(--shadow); min-height: 500px; backdrop-filter: blur(14px); }
.panel-title { display:flex; justify-content:space-between; align-items:center; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); margin-bottom:20px; }
.panel-title > div { display:flex; align-items:center; gap:12px; }
.panel-title h2 { margin:0; font-family:Georgia, serif; font-size:24px; font-weight:500; }
.step { width:34px; height:34px; display:grid; place-items:center; border:1px solid #49402f; color:var(--gold-2); font-size:11px; }
.field-label { display:block; font-size:12px; text-transform:uppercase; letter-spacing:.15em; color:var(--muted); margin-bottom:8px; }
textarea, .answer-input { width:100%; border:1px solid #323232; background:#0d0d0d; color:var(--text); padding:14px 15px; outline:none; transition:.2s; }
textarea { resize:vertical; min-height:98px; }
textarea:focus, .answer-input:focus { border-color:#7f673e; box-shadow:0 0 0 3px rgba(198,161,91,.07); }
.answers-editor { display:grid; gap:10px; margin-top:16px; }
.answer-row { display:grid; grid-template-columns: 22px 36px 1fr; gap:9px; align-items:center; }
.answer-row input[type="radio"] { width:16px; height:16px; accent-color: var(--gold); }
.choice-letter { width:34px; height:46px; display:grid; place-items:center; border:1px solid #3a3328; color:var(--gold-2); font-family:Georgia, serif; }
.form-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.primary-btn, .secondary-btn, .ghost-btn, .finish-btn { border:0; transition:.18s ease; }
.primary-btn { background:var(--gold); color:#0b0b0b; font-weight:800; padding:13px 18px; }
.primary-btn:hover { background:var(--gold-2); transform:translateY(-1px); }
.primary-btn.xl { padding:16px 24px; font-size:16px; }
.secondary-btn { background:#171717; border:1px solid #383838; color:var(--text); padding:12px 17px; }
.secondary-btn:hover { border-color:#5b5b5b; background:#1d1d1d; }
.ghost-btn { background:transparent; color:var(--muted); font-size:12px; padding:8px 10px; border:1px solid #303030; }
.ghost-btn:hover { color:var(--text); border-color:#555; }
.ghost-btn.danger:hover { color:#f0a1a1; border-color:#673333; }
.hidden { display:none !important; }

.question-bank-panel { min-height:500px; }
.empty-state { min-height:340px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; color:var(--muted); gap:6px; }
.empty-icon { width:58px; height:58px; display:grid; place-items:center; border:1px solid #343434; font-family:Georgia, serif; font-size:28px; color:var(--gold); margin-bottom:6px; }
.empty-state strong { color:#ccc7bc; }
.empty-state span { font-size:13px; }
.question-list { display:grid; gap:10px; max-height: 515px; overflow:auto; padding-right:5px; }
.question-item { border:1px solid #2d2d2d; background:#101010; padding:14px; }
.question-item-top { display:flex; justify-content:space-between; gap:14px; }
.question-index { min-width:34px; height:34px; display:grid; place-items:center; border:1px solid #393226; color:var(--gold-2); font-size:11px; }
.question-copy { flex:1; min-width:0; }
.question-copy strong { display:block; font-size:14px; line-height:1.45; font-weight:650; margin-bottom:8px; }
.question-copy small { color:var(--muted); }
.question-copy small b { color:#a7c8ad; }
.item-actions { display:flex; gap:5px; }
.icon-btn { width:34px; height:34px; border:1px solid #323232; background:#171717; color:#aaa; }
.icon-btn:hover { color:#fff; border-color:#555; }
.icon-btn.delete:hover { color:#f0a1a1; border-color:#673333; }

.finish-bar { display:flex; justify-content:space-between; align-items:center; gap:20px; border:1px solid #3b3327; background:rgba(23,19,14,.82); padding:18px 20px; margin-top:22px; box-shadow:var(--shadow); }
.finish-bar strong, .finish-bar span { display:block; }
.finish-bar strong { font-family:Georgia, serif; font-size:20px; color:var(--gold-2); }
.finish-bar span { color:var(--muted); font-size:12px; margin-top:2px; }
.finish-btn { background:var(--gold-2); color:#0d0d0d; font-weight:900; padding:14px 22px; text-transform:uppercase; letter-spacing:.08em; }
.finish-btn:not(:disabled):hover { transform:translateY(-1px); filter:brightness(1.07); }

.ready-card, .result-card { width:min(760px, 100%); margin:60px auto; border:1px solid #3d3426; background:linear-gradient(145deg, rgba(22,19,15,.96), rgba(10,10,10,.96)); box-shadow:var(--shadow); padding:50px; text-align:center; }
.ready-card h2, .result-card h2 { font-family:Georgia, serif; font-size:clamp(36px,5vw,58px); line-height:1.02; font-weight:500; margin:14px 0; }
.ready-card p, .result-card p { color:var(--muted); }
.ready-actions { display:flex; justify-content:center; gap:10px; margin-top:28px; }

.quiz-topbar { display:flex; justify-content:space-between; align-items:center; gap:24px; margin:10px auto 18px; width:min(940px,100%); }
.quiz-topbar > div:first-child { flex:1; }
#quizProgressText { display:block; color:var(--muted); font-size:12px; margin-bottom:7px; }
.progress-track { height:4px; background:#222; overflow:hidden; }
.progress-bar { width:0; height:100%; background:var(--gold); transition:width .25s ease; }
.score-box { border:1px solid #373127; padding:10px 14px; color:var(--muted); font-size:12px; }
.score-box strong { color:var(--gold-2); margin-left:5px; font-size:18px; }
.quiz-card { width:min(940px,100%); margin:0 auto; border:1px solid var(--line); background:rgba(17,17,17,.95); padding:34px; box-shadow:var(--shadow); }
.question-number { color:var(--gold); letter-spacing:.18em; font-weight:800; font-size:11px; }
.quiz-card h2 { font-family:Georgia, serif; font-size:clamp(28px,4vw,42px); font-weight:500; line-height:1.18; margin:14px 0 28px; }
.answer-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.answer-btn { min-height:76px; display:flex; align-items:center; gap:14px; border:1px solid #343434; background:#111; color:var(--text); text-align:left; padding:15px; transition:.15s; }
.answer-btn:hover:not(:disabled) { border-color:#75613d; transform:translateY(-1px); }
.answer-btn .choice-letter { flex:0 0 38px; height:38px; }
.answer-btn.correct { border-color:#426e50; background:rgba(46,100,65,.16); }
.answer-btn.wrong { border-color:#703636; background:rgba(130,45,45,.15); }
.feedback { margin-top:18px; border-left:3px solid var(--gold); background:#151515; padding:12px 14px; color:#ddd7ca; }
.next-btn { margin-top:16px; float:right; }
.quiz-card::after { content:""; display:block; clear:both; }

.big-score { margin:24px auto 10px; }
.big-score strong { font-family:Georgia, serif; font-size:84px; color:var(--gold-2); font-weight:500; }
.big-score span { font-size:24px; color:var(--muted); }
.toast { position:fixed; right:22px; bottom:22px; z-index:20; transform:translateY(20px); opacity:0; pointer-events:none; background:#171717; color:#eee; border:1px solid #393939; padding:12px 16px; box-shadow:var(--shadow); transition:.2s; font-size:13px; }
.toast.show { transform:none; opacity:1; }

@media (max-width: 860px) {
  .app-shell { width:min(100% - 22px, 760px); padding-top:30px; }
  .hero { align-items:flex-start; }
  .grid-two { grid-template-columns:1fr; }
  .status-card { min-width:160px; }
  .answer-grid { grid-template-columns:1fr; }
}
@media (max-width: 620px) {
  .hero { flex-direction:column; }
  .hero h1 { font-size:50px; }
  .status-card { width:100%; }
  .panel { padding:16px; }
  .finish-bar, .ready-actions, .quiz-topbar { flex-direction:column; align-items:stretch; }
  .finish-btn { width:100%; }
  .ready-card, .result-card { padding:30px 18px; margin:24px auto; }
  .quiz-card { padding:22px 16px; }
  .question-item-top { flex-wrap:wrap; }
  .item-actions { width:100%; justify-content:flex-end; }
}

/* Kurtlar Vadisi themed visual layer */
:root {
  --bg: #050505;
  --panel: rgba(12, 12, 12, 0.93);
  --panel-2: #0e0e0e;
  --line: #272727;
  --text: #efeee9;
  --muted: #8c8c89;
  --gold: #a7a7a3;
  --gold-2: #d7d7d2;
  --red: #8e1015;
  --green: #426a4f;
  --shadow: 0 34px 100px rgba(0,0,0,.70);
}
body {
  background:
    radial-gradient(circle at 72% 18%, rgba(130, 0, 8, .13), transparent 25%),
    radial-gradient(circle at 18% 82%, rgba(255,255,255,.025), transparent 28%),
    linear-gradient(145deg, #030303 0%, #0a0a0a 42%, #040404 100%);
}
body::before {
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(255,255,255,.018) 50%, transparent 50.3%),
    linear-gradient(0deg, transparent 49.7%, rgba(255,255,255,.012) 50%, transparent 50.3%);
  background-size: 110px 110px;
  opacity:.28;
}
.kv-backdrop { position:fixed; inset:0; pointer-events:none; overflow:hidden; z-index:0; }
.kv-rings { position:absolute; width:700px; height:700px; right:-210px; top:-210px; border:1px solid rgba(143,16,21,.16); border-radius:50%; box-shadow:0 0 0 70px rgba(143,16,21,.025),0 0 0 140px rgba(143,16,21,.018),0 0 0 210px rgba(143,16,21,.012); }
.kv-monogram { position:absolute; right:4vw; bottom:-7vh; font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; font-size:min(34vw,520px); letter-spacing:-.09em; color:rgba(255,255,255,.018); transform:skewX(-8deg); }
.kv-scan { position:absolute; inset:0; background:repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 4px); opacity:.25; }
.grain { opacity:.09; }
.app-shell { z-index:2; }
.hero { position:relative; padding:28px 0 18px; border-bottom:1px solid #242424; }
.hero::before { content:""; position:absolute; left:0; bottom:-1px; width:160px; height:2px; background:var(--red); box-shadow:0 0 24px rgba(142,16,21,.45); }
.eyebrow { color:#aaa; letter-spacing:.32em; font-size:11px; }
.hero h1 { margin:9px 0 9px; font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; font-size:clamp(48px,8vw,92px); letter-spacing:.015em; line-height:.83; text-transform:uppercase; font-weight:900; text-shadow:0 4px 26px #000; }
.hero h1 span { color:inherit; }
.kv-title-main { color:#e8e8e5 !important; }
.kv-title-red { color:#8d1116 !important; text-shadow:0 0 28px rgba(141,17,22,.22); }
.kv-title-sub { color:#858582 !important; font-size:.47em; letter-spacing:.20em; }
.hero-rule { width:min(540px,80vw); height:1px; margin:16px 0 13px; background:linear-gradient(90deg, #8d1116, #2e2e2e 58%, transparent); }
.hero p { color:#858582; max-width:680px; letter-spacing:.03em; }
.status-card { border-color:#2a2a2a; background:linear-gradient(145deg,rgba(12,12,12,.95),rgba(4,4,4,.93)); position:relative; overflow:hidden; }
.status-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--red); }
.status-card strong { color:#d4d4d0; font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; letter-spacing:.04em; text-transform:uppercase; }
.panel, .quiz-card, .ready-card, .result-card { border-color:#252525; background:linear-gradient(145deg,rgba(15,15,15,.96),rgba(5,5,5,.96)); box-shadow:0 30px 80px rgba(0,0,0,.62); }
.panel-title h2, .quiz-card h2, .ready-card h2, .result-card h2 { font-family:'Arial Narrow', Impact, sans-serif; text-transform:uppercase; letter-spacing:.03em; font-weight:800; }
.step, .question-index, .choice-letter { border-color:#4b191b; color:#d0d0ca; background:rgba(120,8,13,.08); }
textarea, .answer-input { background:#080808; border-color:#2a2a2a; }
textarea:focus, .answer-input:focus { border-color:#6c1519; box-shadow:0 0 0 3px rgba(142,16,21,.10); }
.primary-btn, .finish-btn { background:linear-gradient(#97191d,#6d0d11); color:#f4f3ef; border:1px solid #a52c30; text-transform:uppercase; letter-spacing:.06em; box-shadow:0 10px 30px rgba(90,0,5,.22); }
.primary-btn:hover, .finish-btn:not(:disabled):hover { background:linear-gradient(#aa2025,#7d1015); color:white; }
.secondary-btn, .ghost-btn, .icon-btn { background:#0c0c0c; border-color:#303030; }
.question-item { background:linear-gradient(90deg,#0b0b0b,#101010); border-color:#242424; }
.question-item:hover { border-color:#43191b; }
.question-copy small b { color:#c9c9c3; }
.finish-bar { border-color:#3a1718; background:linear-gradient(90deg,rgba(61,7,10,.33),rgba(10,10,10,.88)); }
.finish-bar strong { color:#d6d6d1; font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; letter-spacing:.04em; }
.progress-bar { background:linear-gradient(90deg,#5f090d,#a51a20); box-shadow:0 0 16px rgba(142,16,21,.4); }
.score-box { border-color:#3c1719; background:#090909; }
.score-box strong, .question-number, .big-score strong { color:#c5c5c0; }
.answer-btn { background:linear-gradient(145deg,#0b0b0b,#121212); border-color:#2a2a2a; }
.answer-btn:hover:not(:disabled) { border-color:#731419; background:#141010; }
.answer-btn.correct { border-color:#47664e; background:rgba(42,82,52,.18); }
.answer-btn.wrong { border-color:#7f171b; background:rgba(115,15,20,.18); }
.feedback { border-left-color:#8d1116; }
.music-toggle { position:fixed; top:18px; right:18px; z-index:30; width:42px; height:42px; border:1px solid #3b1719; background:rgba(5,5,5,.88); color:#c8c8c3; font-size:18px; border-radius:50%; box-shadow:0 8px 30px rgba(0,0,0,.45); backdrop-filter:blur(10px); }
.music-toggle:hover { border-color:#8d1116; color:#fff; }
.music-toggle.muted { opacity:.45; }
@media (max-width:620px){ .music-toggle{top:10px;right:10px;width:38px;height:38px}.kv-monogram{font-size:58vw}.hero h1{font-size:48px}.kv-title-sub{font-size:.42em} }
