/* Sayı Labirenti — arayüz stilleri */
:root {
  --bg: #050507;
  --panel: rgba(10, 11, 14, 0.94);
  --panel2: #14161b;
  --line: #2b2f36;
  --text: #ece9e2;
  --muted: #9b978d;
  --red: #ff3b3b;
  --red2: #8b1111;
  --green: #39ff88;
  --yellow: #ffd23f;
  --blue: #6fc3ff;
  --paper: #e9dfc4;
  --ink: #2b2118;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Impact, "Arial Black", "Segoe UI Black", sans-serif;
  --hand: "Segoe Print", "Comic Sans MS", "Chalkboard SE", cursive;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
button { font-family: inherit; }
.hidden { display: none !important; }

#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#grain { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: 0.07; image-rendering: pixelated; z-index: 2; }
#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 3; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 52%, rgba(0,0,0,.78) 100%); }
#vignette::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px); opacity: .35; }
#danger { position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: 0; background: radial-gradient(ellipse at center, rgba(120,0,0,0) 45%, rgba(170,0,0,.75) 100%); }
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 5; background: #fff; opacity: 0; }
#blackout { position: fixed; inset: 0; pointer-events: none; z-index: 6; background: #000; opacity: 0; }

#hide-ov { position: fixed; inset: 0; pointer-events: none; z-index: 7; display: none; }
#hide-ov.show { display: block; }
#hide-ov.locker { background: linear-gradient(to bottom, #060908 0, #060908 34%, transparent 34%, transparent 62%, #060908 62%), repeating-linear-gradient(to bottom, #060908 0 16px, transparent 16px 30px), radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.85) 80%); }
#hide-ov.desk { background: linear-gradient(to bottom, #1b1108 0, #1b1108 42%, #0b0704 45%, transparent 47%), linear-gradient(to right, #0a0806 0, #0a0806 7%, transparent 9%, transparent 91%, #0a0806 93%), radial-gradient(ellipse at center 70%, transparent 35%, rgba(0,0,0,.85) 85%); }
#hide-ov.cabinet { background: linear-gradient(to right, #120a1c 0, #120a1c 40%, #05030a 42%, transparent 44%), linear-gradient(to bottom, #120a1c 0, #120a1c 12%, transparent 14%, transparent 86%, #120a1c 88%), radial-gradient(ellipse at 70% center, transparent 30%, rgba(0,0,0,.85) 80%); }
.hide-lab { position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%); font-family: var(--display); letter-spacing: 3px; color: #cfcac0; font-size: clamp(16px, 1.6vw, 22px); text-shadow: 0 2px 8px #000; opacity: .85; }
.act.hide-btn { border-color: rgba(111,195,255,.7); color: #a5dcff; }

/* ---------- Ortak ---------- */
.screen { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-start; justify-content: center; padding: 16px; background: rgba(0,0,0,.55); overflow-x: hidden; overflow-y: auto; }
.screen > * { margin: auto; flex-shrink: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: 14px; padding: clamp(18px, 3vw, 40px); width: min(880px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset; }
.panel.wide { width: min(1180px, calc(100vw - 32px)); }
.panel.narrow { width: min(460px, calc(100vw - 32px)); }
.panel h2 { margin: 0 0 14px; font-family: var(--display); font-weight: 400; letter-spacing: 2px; font-size: clamp(28px, 3.4vw, 48px); }
.row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.btn { appearance: none; border: 2px solid #3a3f47; background: linear-gradient(#1b1e24, #121418); color: var(--text); padding: 14px 26px; border-radius: 10px; font-size: clamp(17px, 1.6vw, 22px); font-weight: 700; letter-spacing: 1px; cursor: pointer; transition: transform .08s, border-color .15s, box-shadow .15s; min-height: 56px; }
.btn small { font-weight: 500; opacity: .75; font-size: .75em; }
.btn:hover:not(:disabled) { border-color: var(--red); box-shadow: 0 0 18px rgba(255,59,59,.35); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.big { font-size: clamp(20px, 2vw, 28px); padding: 16px 38px; min-height: 66px; }
.btn.small { padding: 8px 14px; min-height: 44px; font-size: 16px; }
.btn.red { background: linear-gradient(#b31212, #6d0a0a); border-color: #ff5a5a; }
.btn.red:hover { box-shadow: 0 0 28px rgba(255,40,40,.6); }
.ib { appearance: none; border: 1px solid #3a3f47; background: rgba(15,16,20,.8); color: var(--text); border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 700; letter-spacing: 1px; cursor: pointer; pointer-events: auto; min-height: 40px; }
.ib:hover { border-color: var(--red); }

/* ---------- Başlık ---------- */
#scr-title { background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.15), rgba(0,0,0,.72)); }
.title-wrap { text-align: center; width: min(1100px, calc(100vw - 32px)); }
.logo { position: relative; display: inline-block; font-family: var(--display); font-size: clamp(44px, min(10vw, 15vh), 150px); line-height: .95; letter-spacing: 4px; color: #efe9dc; text-shadow: 0 0 24px rgba(255,40,40,.45), 0 6px 0 #3b0707; animation: flick 6s infinite; }
.logo::before, .logo::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; }
.logo::before { color: #ff2a2a; transform: translate(-3px, 0); clip-path: inset(0 0 60% 0); animation: glitch1 3.2s infinite steps(1); opacity: .7; }
.logo::after { color: #2de2e6; transform: translate(3px, 0); clip-path: inset(55% 0 0 0); animation: glitch2 2.7s infinite steps(1); opacity: .5; }
@keyframes glitch1 { 0%, 92%, 100% { transform: translate(0); } 93% { transform: translate(-6px, 2px); } 96% { transform: translate(4px, -2px); } }
@keyframes glitch2 { 0%, 88%, 100% { transform: translate(0); } 89% { transform: translate(7px, -1px); } 94% { transform: translate(-5px, 2px); } }
@keyframes flick { 0%, 100% { opacity: 1; } 41% { opacity: 1; } 42% { opacity: .35; } 43% { opacity: 1; } 77% { opacity: .9; } 78% { opacity: .2; } 79% { opacity: 1; } }
.sub { margin-top: 10px; font-size: clamp(16px, 1.8vw, 24px); letter-spacing: 6px; color: var(--muted); text-transform: uppercase; }
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: clamp(22px, 4vh, 44px) 0 8px; }
.theme-card { appearance: none; cursor: pointer; text-align: left; color: var(--text); padding: 22px 24px; border-radius: 14px; border: 2px solid #2b2f36; background: linear-gradient(160deg, rgba(30,10,12,.92), rgba(10,10,14,.94)); transition: transform .12s, border-color .15s, box-shadow .15s; position: relative; overflow: hidden; }
.theme-card.t2 { background: linear-gradient(160deg, rgba(30,10,45,.92), rgba(8,8,20,.94)); }
.theme-card:hover { transform: translateY(-3px); border-color: var(--red); box-shadow: 0 10px 40px rgba(255,40,40,.25); }
.theme-card.t2:hover { border-color: #ff2bd6; box-shadow: 0 10px 40px rgba(255,43,214,.25); }
.tc-mon { position: absolute; right: 14px; bottom: 0; width: clamp(70px, 8vw, 110px); height: auto; opacity: .85; filter: drop-shadow(0 0 10px rgba(0,0,0,.8)); transition: transform .2s; pointer-events: none; }
.theme-card:hover .tc-mon { transform: translateY(-6px) scale(1.04); }
.theme-card > div { position: relative; z-index: 1; }
.tc-foot { padding-right: clamp(70px, 8vw, 110px); }
.tc-top { font-family: var(--display); letter-spacing: 3px; color: var(--red); font-size: 20px; }
.theme-card.t2 .tc-top { color: #ff5ad8; }
.tc-name { font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; margin: 4px 0 6px; }
.tc-world { color: var(--muted); font-size: 16px; }
.tc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.tc-stars { color: var(--yellow); font-weight: 800; font-size: 18px; }
.tc-go { font-family: var(--display); letter-spacing: 2px; font-size: 20px; color: #fff; }
.foot { margin-top: 18px; color: #6f6c66; font-size: 13px; }

/* ---------- Kat seçimi ---------- */
.p-head { display: flex; gap: 18px; align-items: center; }
.p-head h2 { margin: 0; }
.p-kicker { font-family: var(--display); color: var(--red); letter-spacing: 3px; }
.blurb { color: var(--muted); font-size: 18px; margin: 10px 0 18px; }
.floor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.floor-card { appearance: none; text-align: left; cursor: pointer; color: var(--text); background: var(--panel2); border: 2px solid var(--line); border-radius: 12px; padding: 16px; min-height: 170px; display: flex; flex-direction: column; gap: 6px; transition: transform .1s, border-color .15s; }
.floor-card:hover { border-color: var(--red); transform: translateY(-2px); }
.floor-card.final { border-color: #5c1a1a; background: linear-gradient(160deg, #26090b, #14161b); }
.fc-num { font-family: var(--display); font-size: 34px; letter-spacing: 2px; color: #fff; }
.fc-name { font-weight: 700; font-size: 18px; flex: 1; }
.fc-meta { color: var(--muted); font-size: 14px; }
.fc-stars { color: var(--yellow); font-size: 24px; letter-spacing: 2px; }
.fc-stars .off { color: #3a3a3a; }

.quick { margin-top: 22px; padding: 16px 18px; border: 1px dashed #3b4049; border-radius: 12px; background: rgba(20,22,27,.7); }
.quick-h { font-family: var(--display); letter-spacing: 3px; color: var(--yellow); font-size: 24px; margin-bottom: 10px; }
.quick-h span { font-family: var(--font); letter-spacing: 0; color: var(--muted); font-size: 15px; margin-left: 10px; }
.quick-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; margin: 8px 0; }
.quick-row label { font-weight: 700; color: #cfcac0; }
.qcard.team0 { border-top-color: #ff3b3b; box-shadow: 0 30px 90px rgba(0,0,0,.8), 0 0 60px rgba(255,40,40,.18); }
.qcard.team1 { border-top-color: #3b8bff; box-shadow: 0 30px 90px rgba(0,0,0,.8), 0 0 60px rgba(60,140,255,.2); }
.qcard.team0 .q-tag { color: #ff5a5a; }
.qcard.team1 .q-tag { color: #6fb0ff; }
.teams-res { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.tr { border-radius: 14px; padding: 18px; text-align: center; border: 2px solid #333; }
.tr.team0 { background: linear-gradient(#3a0c0c, #1a0707); border-color: #7a2020; }
.tr.team1 { background: linear-gradient(#0c1f3a, #07101a); border-color: #20487a; }
.tr.win { box-shadow: 0 0 40px rgba(255,210,63,.35); border-color: var(--yellow); }
.tn { font-family: var(--display); letter-spacing: 3px; font-size: clamp(18px, 2vw, 26px); }
.ts { font-family: var(--display); font-size: clamp(48px, 6vw, 84px); color: #fff; }
.tr.win .tn::after { content: " ★"; color: var(--yellow); }

/* ---------- Kat girişi ---------- */
.kat-num { font-family: var(--display); color: var(--red); font-size: clamp(22px, 2.4vw, 32px); letter-spacing: 6px; }
.remember { margin: 14px 0; background: #0d1a12; border: 1px solid #1f5a36; border-left: 6px solid var(--green); border-radius: 10px; padding: 14px 18px; font-size: clamp(17px, 1.7vw, 23px); line-height: 1.45; }
.rem-h { font-family: var(--display); color: var(--green); letter-spacing: 3px; margin-bottom: 6px; }
.remember .rl { margin: 6px 0; }
.goal { font-size: clamp(17px, 1.6vw, 22px); line-height: 1.5; }
.controls-hint { margin-top: 12px; color: var(--muted); font-size: 16px; }
.controls-hint kbd { display: inline-block; border: 1px solid #555; border-bottom-width: 3px; border-radius: 5px; padding: 1px 7px; margin: 0 2px; color: #ddd; font-family: var(--font); font-size: 14px; background: #1a1a1a; }

/* ---------- Soru kartı ---------- */
#scr-question { background: rgba(0,0,0,.62); padding: 12px; overflow-x: hidden; }
.qcard { width: min(1180px, calc(100vw - 24px)); background: linear-gradient(180deg, #121419, #0b0c0f); border: 1px solid #30343b; border-top: 4px solid var(--red); border-radius: 16px; padding: clamp(14px, 2.2vw, 30px); box-shadow: 0 30px 90px rgba(0,0,0,.8), 0 0 60px rgba(255,0,0,.08); position: relative; }
.qcard.ok { border-top-color: var(--green); }
.qcard.shake { animation: shake .4s; }
@keyframes shake { 0%,100% { transform: translate(0); } 20% { transform: translate(-10px, 2px); } 40% { transform: translate(9px, -2px); } 60% { transform: translate(-6px, 1px); } 80% { transform: translate(4px, 0); } }
.q-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.q-tag { font-family: var(--display); letter-spacing: 3px; color: var(--red); font-size: clamp(18px, 1.8vw, 26px); }
.qcard.ok .q-tag { color: var(--green); }
.q-topic { background: #1e2127; border: 1px solid #353a42; border-radius: 99px; padding: 4px 14px; font-size: 15px; color: #cfcac0; }
.q-head .ib { margin-left: auto; }
.q-timer { height: 8px; background: #22252b; border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
#q-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), var(--yellow)); transition: width .2s linear; }
.q-text { font-size: clamp(21px, 2.25vw, 36px); line-height: 1.4; font-weight: 600; }
.q-text b { color: #fff; }
.q-text .stmt { margin-top: 10px; padding: 12px 18px; border-left: 5px solid var(--yellow); background: #1a1810; border-radius: 8px; font-weight: 700; }
.bignum { display: inline-block; font-family: var(--display); letter-spacing: 3px; font-size: 1.35em; background: #1d2026; border: 1px solid #3a3f47; border-radius: 8px; padding: 0 12px; margin: 0 4px; }
.sym { color: var(--yellow); font-weight: 900; }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.05; margin: 0 3px; font-weight: 800; }
.frac > span:first-child { border-bottom: 2.5px solid currentColor; padding: 0 4px 1px; }
.frac > span:last-child { padding: 1px 4px 0; }
.q-visual { margin: 14px 0 6px; display: flex; flex-direction: column; align-items: center; }
.q-visual:empty { display: none; }
.vcap { color: var(--muted); font-size: clamp(14px, 1.3vw, 18px); margin-bottom: 6px; text-align: center; }
.vt-wrap { max-width: 100%; overflow-x: auto; }
.vt { border-collapse: collapse; font-size: clamp(17px, 1.7vw, 26px); background: #0f1114; }
.vt th, .vt td { border: 1.5px solid #3b4049; padding: 8px 14px; text-align: center; white-space: nowrap; }
.vt th { background: #1b1e24; font-weight: 700; }
.vt tr.hr th { background: #222630; color: #bfbab0; font-size: .85em; }
.vt td { font-weight: 800; }
.vt td.bump { animation: bump .25s; }
@keyframes bump { 0% { background: #3d3510; } 100% { background: transparent; } }
.swatch { display: inline-block; width: .8em; height: .8em; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.6); }
svg.chart { width: min(620px, 92vw); height: auto; max-height: 38vh; }
svg.chart .grid { stroke: #2a2e35; stroke-width: 1; }
svg.chart .axis { stroke: #c9c4b8; stroke-width: 2.5; }
svg.chart .tick { fill: #b8b3a8; font-size: 18px; font-family: var(--font); }
svg.chart .val { fill: #fff; font-size: 22px; font-weight: 800; font-family: var(--font); }
svg.chart .lab { fill: #e8e4da; font-size: 21px; font-weight: 700; font-family: var(--font); }
svg.chart .lab.small { font-size: 16px; fill: #a9a499; font-weight: 600; }
svg.chart .dot { fill: #6fc3ff; stroke: #0b3a5c; stroke-width: 2; }
svg.chart.spec { max-height: 20vh; }
svg.tree .tval { fill: #fff; font-size: 26px; font-weight: 800; font-family: var(--font); }
svg.tree .tsym { fill: var(--yellow); font-size: 30px; font-weight: 900; font-family: var(--font); }
svg.tree .pcirc { fill: none; stroke: var(--red); stroke-width: 2.5; }
svg.tree .axis { stroke: #8f8a80; stroke-width: 2; }
.algo-wrap { display: flex; justify-content: center; }
.algo { border-collapse: collapse; font-size: clamp(22px, 2.3vw, 34px); font-weight: 800; }
.algo td { padding: 4px 18px; min-width: 70px; }
.algo td.al { text-align: right; }
.algo td.ar { text-align: left; border-left: 3px solid #c9c4b8; color: #ffb4b4; }
.algo .sym, .q-text .sym { font-size: 1.15em; }
.q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.2vw, 16px); margin-top: 16px; }
.opt { appearance: none; display: flex; align-items: center; gap: 14px; text-align: left; min-height: clamp(62px, 9vh, 96px); padding: 10px 18px; background: linear-gradient(#1c1f25, #14161a); color: var(--text); border: 2px solid #3a3f47; border-radius: 12px; font-size: clamp(20px, 2.1vw, 34px); font-weight: 700; cursor: pointer; transition: transform .08s, border-color .12s, background .2s; }
.opt:hover:not(:disabled) { border-color: #d9d4c9; }
.opt:active:not(:disabled) { transform: scale(.98); }
.opt .ol { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em; border-radius: 8px; background: #2a2e36; font-family: var(--display); font-size: .8em; color: #d8d3c8; }
.opt .ot { flex: 1; }
.opt.correct { background: linear-gradient(#10532c, #0a3a1f); border-color: var(--green); box-shadow: 0 0 24px rgba(57,255,136,.35); }
.opt.correct .ol { background: var(--green); color: #032; }
.opt.wrong { background: linear-gradient(#5a0c0c, #3a0707); border-color: var(--red); }
.opt.wrong .ol { background: var(--red); color: #200; }
.opt.gone { opacity: .25; text-decoration: line-through; }
.opt:disabled { cursor: default; }
.q-keys { margin-top: 8px; color: #7d7a72; font-size: 14px; text-align: right; }
.q-keys kbd { display: inline-block; border: 1px solid #555; border-bottom-width: 3px; border-radius: 5px; padding: 0 6px; color: #cfcac0; font-family: var(--font); font-size: 12px; background: #1a1a1a; }
.q-feedback { margin-top: 16px; background: #0f1512; border: 1px solid #25402f; border-radius: 12px; padding: 14px 18px; font-size: clamp(17px, 1.7vw, 24px); line-height: 1.5; }
.q-feedback.bad { background: #170d0d; border-color: #4a1d1d; }
.fb-title { font-family: var(--display); letter-spacing: 3px; font-size: clamp(24px, 2.4vw, 36px); color: var(--green); }
.q-feedback.bad .fb-title { color: var(--red); }
.fb-explain .ln { padding: 2px 0; }
.fb-explain .ln.ok { color: #9ff5c2; }
.fb-explain .ln.no { color: #f0b3b3; }
.fb-rule { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #3b4049; color: #d8e8dc; font-size: .92em; }
.fb-rule-h { display: inline-block; font-family: var(--display); letter-spacing: 2px; color: var(--green); margin-right: 10px; font-size: .9em; }
.q-actions { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin-top: 16px; flex-wrap: wrap; }
/* Canlı deney */
.exp { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.exp-top { display: flex; align-items: center; gap: 24px; }
.exp-stage { width: 150px; height: 130px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.exp-count { font-family: var(--display); font-size: clamp(26px, 3vw, 44px); letter-spacing: 2px; color: var(--yellow); min-width: 150px; }
.exp-strip { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; max-width: 900px; min-height: 30px; }
.coin { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 900; color: #3b2a05; background: radial-gradient(circle at 35% 30%, #fff3b0, #d4a017 60%, #8a6508); border: 2px solid #6b4e06; }
.coin.t { background: radial-gradient(circle at 35% 30%, #ffe0c0, #c97a2a 60%, #7a4210); }
.coin.big { width: 110px; height: 110px; font-size: 22px; letter-spacing: 1px; }
.coin.mini { width: 26px; height: 26px; font-size: 13px; }
.coin.flip { animation: flip .12s linear; }
@keyframes flip { 0% { transform: rotateX(0) scale(.9); } 50% { transform: rotateX(90deg) scale(1.1); } 100% { transform: rotateX(0) scale(1); } }
.roll { animation: roll .12s ease-out; }
@keyframes roll { 0% { transform: rotate(-40deg) scale(.8); } 100% { transform: rotate(0) scale(1); } }
.die.sm { vertical-align: middle; }
.wheel { width: 130px; height: 130px; }
.ball { display: inline-block; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(0,0,0,.5); box-shadow: inset -3px -3px 5px rgba(0,0,0,.35), inset 3px 3px 5px rgba(255,255,255,.35); }
.ball.big { width: 90px; height: 90px; }
.ball.pop { animation: pop .14s ease-out; }
@keyframes pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.ball-lab { font-weight: 800; margin-top: 4px; }

/* ---------- Not ---------- */
#scr-note { background: rgba(0,0,0,.7); }
.paper { width: min(760px, calc(100vw - 40px)); background: var(--paper); color: var(--ink); border-radius: 4px; padding: clamp(22px, 3vw, 42px); box-shadow: 0 30px 80px rgba(0,0,0,.8); transform: rotate(-1deg); position: relative;
  background-image: repeating-linear-gradient(0deg, transparent 0 33px, rgba(70,110,170,.35) 33px 35px), radial-gradient(circle at 80% 20%, rgba(120,80,20,.18), transparent 40%), radial-gradient(circle at 20% 90%, rgba(120,80,20,.15), transparent 35%); }
.paper::before { content: ""; position: absolute; left: 52px; top: 0; bottom: 0; width: 2px; background: rgba(190,40,40,.45); }
.paper-h { font-family: var(--display); letter-spacing: 3px; color: #7a1510; font-size: 22px; padding-left: 40px; }
.paper-t { font-family: var(--hand); font-weight: 700; font-size: clamp(26px, 3vw, 42px); color: #1d2a55; padding-left: 40px; margin: 6px 0 8px; }
.paper-b { font-size: clamp(20px, 2vw, 30px); line-height: 1.55; padding-left: 40px; font-weight: 600; }
.paper-b b { color: #7a1510; }
.paper-c { font-family: var(--hand); color: #7a1510; margin: 18px 0 12px 40px; font-size: 18px; opacity: .85; }
.paper .btn { margin-left: 40px; }

/* ---------- Yakalandın / Tamamlandı ---------- */
.panel.redp { border-top-color: var(--red); background: linear-gradient(180deg, #1c0707, #0b0b0e); }
.caught-title { font-family: var(--display); font-size: clamp(46px, 7vw, 96px); color: var(--red); letter-spacing: 4px; text-shadow: 0 0 30px rgba(255,0,0,.5); line-height: 1; animation: flick 3s infinite; }
.caught-lives { font-size: clamp(22px, 2.4vw, 32px); margin: 10px 0; }
.heart { color: var(--red); }
.heart.off { color: #333; }
.panel.greenp { border-top-color: var(--green); background: linear-gradient(180deg, #06170d, #0b0b0e); }
.done-title { font-family: var(--display); font-size: clamp(38px, 5.5vw, 76px); color: var(--green); letter-spacing: 3px; text-shadow: 0 0 30px rgba(57,255,136,.4); line-height: 1.05; }
.done-sub { font-family: var(--font); font-size: clamp(16px, 1.6vw, 22px); color: #b9f5cf; letter-spacing: 1px; margin-top: 6px; text-shadow: none; }
.stars { display: flex; gap: 22px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.star { text-align: center; opacity: 0; transform: scale(.4); animation: starIn .45s forwards; }
.star .s { font-size: clamp(56px, 7vw, 92px); line-height: 1; color: #333; }
.star.on .s { color: var(--yellow); text-shadow: 0 0 28px rgba(255,210,63,.6); }
.star .sl { color: var(--muted); font-size: 16px; font-weight: 700; }
@keyframes starIn { to { opacity: 1; transform: scale(1); } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: #111418; border: 1px solid #262a31; border-radius: 10px; padding: 12px; text-align: center; }
.stat .v { font-size: clamp(26px, 2.8vw, 40px); font-weight: 900; }
.stat .k { color: var(--muted); font-size: 15px; }

/* ---------- Onur listesi ---------- */
.name-entry { margin: 8px auto 12px; max-width: 560px; text-align: center; background: #14120a; border: 1px solid #5a4a12; border-radius: 12px; padding: 12px; }
.ne-h { font-family: var(--display); letter-spacing: 2px; color: var(--yellow); font-size: 20px; margin-bottom: 8px; }
.ne-row { display: flex; gap: 10px; justify-content: center; }
.ne-row input { flex: 1; min-width: 0; font-size: 22px; padding: 10px 14px; border-radius: 10px; border: 2px solid #5a4a12; background: #0b0b0b; color: #fff; font-family: var(--font); font-weight: 700; user-select: text; -webkit-user-select: text; }
.honor { max-width: 560px; margin: 0 auto 14px; }
.honor-h { font-family: var(--display); letter-spacing: 2px; color: var(--muted); text-align: center; margin-bottom: 4px; }
.hr-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; padding: 5px 12px; border-radius: 8px; font-weight: 700; font-size: 18px; }
.hr-row:nth-child(odd) { background: rgba(255,255,255,.03); }
.hr-row.me { background: rgba(255,210,63,.18); color: var(--yellow); }
.hr-i { color: var(--muted); }
.medal { font-family: var(--display); }
.medal.m0 { color: #ffd23f; } .medal.m1 { color: #d9dde3; } .medal.m2 { color: #d08b4b; }
.hr-s { font-family: var(--display); letter-spacing: 1px; }
.hr-empty { color: #6f6c66; font-size: 15px; padding: 4px 12px; }
.honor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.hon-th { font-family: var(--display); letter-spacing: 2px; color: var(--red); font-size: 22px; margin-bottom: 8px; }
.hon-floor { background: #111418; border: 1px solid #262a31; border-radius: 10px; padding: 8px 6px; margin-bottom: 8px; }
.hon-f { font-weight: 800; padding: 0 8px 4px; color: #d8d3c8; }
.ib.off { color: #ff8a8a; border-color: #7a2020; }

/* ---------- Ayarlar ---------- */
.set-grid { display: grid; gap: 12px; }
.set-row { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 12px; }
.set-row label { font-weight: 700; font-size: 18px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { appearance: none; border: 2px solid #353a42; background: #15171b; color: var(--text); padding: 10px 16px; border-radius: 9px; font-size: 16px; font-weight: 700; cursor: pointer; min-height: 46px; }
.seg button.on { border-color: var(--red); background: #2a0d0d; box-shadow: 0 0 12px rgba(255,59,59,.3); }
input[type=range] { width: 100%; accent-color: var(--red); height: 30px; }
.set-note { color: var(--muted); font-size: 15px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.help-grid h3 { margin: 0 0 6px; color: var(--red); font-family: var(--display); letter-spacing: 2px; font-weight: 400; font-size: 24px; }
.help-grid ul { margin: 0; padding-left: 20px; line-height: 1.5; font-size: 17px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud-tl { position: absolute; left: 16px; top: 14px; display: flex; flex-direction: column; gap: 6px; background: rgba(0,0,0,.45); padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.07); }
#hud-floor { font-family: var(--display); letter-spacing: 2px; font-size: clamp(16px, 1.6vw, 22px); color: #eee; max-width: 42vw; }
#hud-lives { font-size: 24px; letter-spacing: 3px; }
.bar { display: flex; align-items: center; gap: 8px; }
.bar-ic { color: var(--yellow); font-size: 12px; font-weight: 800; display: inline-flex; width: 30px; justify-content: center; }
.bar-in { width: clamp(120px, 14vw, 220px); height: 14px; background: #1b1d21; border: 1px solid #3a3d43; border-radius: 7px; overflow: hidden; }
#bat-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ffd23f, #fff1a8); transition: width .2s; }
#bat-fill.low { background: linear-gradient(90deg, #ff3b3b, #ff9a5a); animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: .4; } }
#bat-pct { font-weight: 800; font-size: 14px; min-width: 32px; }
.bar.small .bar-in { height: 8px; }
#stam-fill { height: 100%; width: 100%; background: #6fc3ff; }
#hud-tc { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.chip { background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.12); border-radius: 99px; padding: 6px 14px; font-weight: 800; letter-spacing: 1px; font-size: clamp(14px, 1.3vw, 18px); }
#obj-doors { color: #ff8a8a; }
#obj-notes { color: #ffe39a; }
#obj-score { color: #a5e8ff; }
#score-pop { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); font-family: var(--display); letter-spacing: 2px; font-size: clamp(20px, 2vw, 30px); opacity: 0; pointer-events: none; text-shadow: 0 2px 8px #000; }
#score-pop.show { animation: popup 1.2s ease-out forwards; }
#score-pop.up { color: #7dffb0; }
#score-pop.down { color: #ff6b6b; }
@keyframes popup { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -18px); } }
.done-score { text-align: center; margin: 4px 0 16px; }
.score-big { font-family: var(--display); font-size: clamp(40px, 5vw, 68px); letter-spacing: 2px; color: #fff; }
.score-big span { font-size: .45em; color: var(--muted); }
.score-sub { color: var(--muted); font-size: 15px; }
.record { display: inline-block; margin-top: 6px; font-family: var(--display); letter-spacing: 3px; color: var(--yellow); font-size: clamp(20px, 2.2vw, 30px); animation: flick 1.2s infinite; }
.fc-rec { color: #8fb8c9; font-size: 13px; }
#hud-tr { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#minimap { width: clamp(150px, 15vw, 220px); height: clamp(150px, 15vw, 220px); border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.4); }
.hud-btns { display: flex; gap: 8px; }
#toast { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); text-align: center; font-size: clamp(20px, 2.2vw, 32px); font-weight: 800; text-shadow: 0 2px 10px #000, 0 0 30px rgba(0,0,0,.9); opacity: 0; transition: opacity .3s; max-width: 80vw; }
#toast.show { opacity: 1; }
#toast.red { color: #ff6b6b; }
#toast.green { color: #7dffb0; }
#toast.yellow { color: #ffe066; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 6px #000; }
#prompt { position: absolute; bottom: 22%; left: 50%; transform: translateX(-50%); font-size: clamp(18px, 1.8vw, 26px); font-weight: 700; color: #ddd; text-shadow: 0 2px 8px #000; }

/* ---------- Dokunmatik ---------- */
#touch { position: fixed; inset: 0; z-index: 11; pointer-events: none; }
#dpad { position: absolute; left: 22px; bottom: 22px; display: grid; grid-template-columns: repeat(3, clamp(74px, 8vw, 104px)); grid-template-rows: repeat(3, clamp(74px, 8vw, 104px)); gap: 6px; pointer-events: none; }
.dp { pointer-events: auto; appearance: none; border: 2px solid rgba(255,255,255,.25); background: rgba(20,22,26,.55); color: #fff; font-size: clamp(30px, 3.4vw, 44px); border-radius: 18px; touch-action: none; }
.dp.on, .act.on { background: rgba(255,59,59,.45); border-color: #ff8a8a; }
.dp.up { grid-column: 2; grid-row: 1; }
.dp.left { grid-column: 1; grid-row: 2; }
.dp.right { grid-column: 3; grid-row: 2; }
.dp.down { grid-column: 2; grid-row: 3; }
#actbtns { position: absolute; right: 24px; bottom: 24px; display: flex; gap: 14px; align-items: flex-end; }
.act { pointer-events: auto; appearance: none; width: clamp(96px, 10vw, 136px); height: clamp(96px, 10vw, 136px); border-radius: 50%; border: 3px solid rgba(255,255,255,.3); background: rgba(20,22,26,.6); color: #fff; font-family: var(--display); letter-spacing: 2px; font-size: clamp(18px, 1.8vw, 24px); touch-action: none; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.act small { font-family: var(--font); font-size: 12px; letter-spacing: 0; opacity: .8; margin-top: 2px; }
.act.flash { border-color: rgba(255,210,63,.6); color: var(--yellow); }
#look-hint { position: absolute; right: 24px; bottom: calc(clamp(96px, 10vw, 136px) + 40px); color: rgba(255,255,255,.5); font-size: 14px; }

.loading { font-family: var(--display); letter-spacing: 6px; font-size: 32px; color: #888; animation: flick 2s infinite; }

@media (max-width: 760px) {
  .q-opts { grid-template-columns: 1fr; }
  .set-row { grid-template-columns: 1fr; }
  #hud-tc { top: auto; bottom: 14px; }
}
@media (max-height: 640px) {
  .opt { min-height: 54px; }
  svg.chart { max-height: 30vh; }
}
