:root {
  --bg: #f4f2fb; --panel: #fff; --text: #1d1b2e; --muted: #6b6880; --line: #e3e0ef;
  --brand: #46178f; --brand2: #6a2fd0; --ok: #26890c; --bad: #e21b3c;
  --c0: #e21b3c; --c1: #1368ce; --c2: #d89e00; --c3: #26890c;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15131f; --panel: #211e2e; --text: #eeeaf8; --muted: #a29fb5; --line: #353148; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
a { color: var(--brand2); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 0 0 auto; }
.grow { flex: 1 1 200px !important; }
.stack > * + * { margin-top: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; margin: 0; }
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 8px; padding: 9px 16px; cursor: pointer; background: var(--brand); color: #fff; text-decoration: none; display: inline-block; }
button:hover { filter: brightness(1.1); }
button:disabled { opacity: .5; cursor: default; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--bad); }
button.small { padding: 5px 10px; font-size: 13px; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--text); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
.scroll { overflow-x: auto; }
.msg { padding: 10px 12px; border-radius: 8px; background: var(--line); margin: 10px 0; font-size: 14px; white-space: pre-wrap; }
.msg.error { background: #fde3e7; color: #8a0b20; }
.msg.ok { background: #dff3d8; color: #1b5e08; }

/* Yönetim paneli */
.topbar { background: var(--brand); color: #fff; padding: 10px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.topbar .logo { font-weight: 800; font-size: 18px; margin-right: 8px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.tabs button { background: transparent; color: #e7dcff; padding: 7px 12px; }
.tabs button.active { background: rgba(255,255,255,.18); color: #fff; }
.coursepick { display: flex; align-items: center; gap: 6px; margin: 0; color: #fff; font-weight: 700; font-size: 14px; }
.topbar .coursesel { width: auto; max-width: 360px; background: #fff; color: var(--brand); font-weight: 700; border: 0; }
.topbar .coursesel option { color: #222; }
.topbar .user { font-size: 13px; display: flex; gap: 8px; align-items: center; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.qitem { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel); }
.qitem .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; margin-top: 6px; }
.qitem .opts .right { color: var(--ok); font-weight: 700; }
@media (max-width: 600px) { .qitem .opts { grid-template-columns: 1fr; } }
.optedit { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; }
.picklist { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.picklist .check { padding: 3px 0; }
.output { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 500px; overflow: auto; }

/* Login */
.login { max-width: 360px; margin: 12vh auto; padding: 0 16px; }
.login .card { padding: 24px; }
.brandtitle { text-align: center; color: var(--brand2); font-size: 28px; font-weight: 800; margin-bottom: 16px; }

/* Sunucu (host) ekranı */
.host { position: fixed; inset: 0; background: var(--brand); color: #fff; overflow: auto; z-index: 10; display: flex; flex-direction: column; }
.host header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
.host header button { background: rgba(255,255,255,.15); color: #fff; }
.host .body button { background: #fff; color: var(--brand); font-size: 20px; padding: 12px 28px; }
.host .body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 16px; text-align: center; }
.pinbox { background: #fff; color: #222; border-radius: 12px; padding: 16px 24px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: center; }
.pinbox .pin { font-size: clamp(40px, 8vw, 72px); font-weight: 900; letter-spacing: 4px; }
.pinbox .url { font-size: 15px; color: #555; word-break: break-all; }
.qr { background: #fff; padding: 4px; border-radius: 8px; line-height: 0; width: 200px; height: 200px; }
.qr svg { width: 100%; height: 100%; }
.players { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 1000px; }
.players span { background: rgba(255,255,255,.15); padding: 6px 12px; border-radius: 99px; font-weight: 700; cursor: pointer; }
.players span.off { opacity: .45; }
.bigq { background: #fff; color: #222; border-radius: 12px; padding: 18px 24px; font-size: clamp(20px, 3vw, 34px); font-weight: 700; max-width: 1100px; width: 100%; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 1100px; }
.answers div { color: #fff; border-radius: 10px; padding: 18px; font-size: clamp(16px, 2.2vw, 26px); font-weight: 700; text-align: left; display: flex; gap: 12px; align-items: center; min-height: 80px; }
.answers div.dim { opacity: .3; }
.answers div.win { outline: 5px solid #fff; }
.shape { font-size: 1.3em; }
.o0 { background: var(--c0); } .o1 { background: var(--c1); } .o2 { background: var(--c2); } .o3 { background: var(--c3); }
.timer { width: 90px; height: 90px; border-radius: 50%; background: #fff; color: var(--brand); font-size: 38px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.stats { display: flex; gap: 24px; align-items: center; font-size: 20px; font-weight: 700; }
.bars { display: flex; gap: 14px; align-items: flex-end; height: 160px; }
.bars div { width: 70px; border-radius: 6px 6px 0 0; display: flex; align-items: flex-start; justify-content: center; color: #fff; font-weight: 800; padding-top: 4px; min-height: 30px; }
.board { background: #fff; color: #222; border-radius: 12px; padding: 12px 18px; width: 100%; max-width: 600px; text-align: left; }
.board div { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid #eee; font-size: 20px; font-weight: 700; }
.board div:last-child { border: 0; }
.explain { background: rgba(255,255,255,.15); border-radius: 10px; padding: 12px 16px; max-width: 1100px; font-size: 18px; }

/* Oyuncu (telefon) ekranı */
.play { min-height: 100vh; min-height: 100dvh; background: var(--brand); color: #fff; display: flex; flex-direction: column; }
.play .top { display: flex; justify-content: space-between; padding: 10px 14px; font-weight: 700; font-size: 14px; background: rgba(0,0,0,.15); }
.play .center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 16px; gap: 14px; text-align: center; }
.play .join { background: #fff; color: #222; border-radius: 12px; padding: 20px; width: 100%; max-width: 360px; }
.play .join input { font-size: 20px; text-align: center; font-weight: 700; margin-bottom: 10px; background: #fff; color: #222; border-color: #ccc; }
.play .join button { width: 100%; font-size: 18px; padding: 12px; }
.play .ptext { font-size: 18px; font-weight: 700; background: #fff; color: #222; border-radius: 10px; padding: 12px; width: 100%; }
.pbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; flex: 1; max-height: 60vh; }
.pbtns button { border-radius: 10px; font-size: 16px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 90px; }
.pbtns button .shape { font-size: 34px; }
.big { font-size: 28px; font-weight: 900; }
.verdict { padding: 18px 26px; border-radius: 12px; font-size: 26px; font-weight: 900; }
.verdict.ok { background: var(--ok); } .verdict.bad { background: var(--bad); }

/* ---- Bıçakçılık: açılış sayfası ---- */
.landing { background: #120f18; color: #ece9f5; }
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; overflow: hidden; background: radial-gradient(ellipse at 70% 60%, #3a1606 0%, #120f18 65%); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; max-width: 1100px; margin: 0 auto; padding: 48px 16px; }
.hero h1 { font-size: clamp(36px, 7vw, 72px); line-height: 1.05; margin: 12px 0 18px; letter-spacing: -0.02em; }
.hero h1 span { background: linear-gradient(90deg, #ffd29a, #ff7a1a 45%, #c2410c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ff9a4a; }
.lead { font-size: clamp(16px, 2vw, 20px); max-width: 640px; color: #cfc9de; }
.landing .btn { background: #ff7a1a; color: #1a0d03; padding: 12px 28px; font-size: 17px; }
.features { max-width: 1100px; margin: 0 auto; padding: 40px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feat { background: #1b1826; border: 1px solid #2c2838; border-radius: 12px; padding: 18px; }
.feat b { color: #ffb070; font-size: 17px; }
.feat p { color: #bdb8cf; margin: 8px 0 0; }
.loginwrap { max-width: 380px; margin: 0 auto; padding: 24px 16px 60px; }
.landing .card { background: #1b1826; border-color: #2c2838; }
.landing input { background: #120f18; color: #ece9f5; border-color: #3a3550; }
.landing .brandtitle { color: #ffb070; }
.landing button { background: #ff7a1a; color: #1a0d03; }
.foot { text-align: center; color: #8f8aa3; font-size: 12px; padding: 24px 16px; border-top: 1px solid #2c2838; }

/* ---- Uygulama ---- */
.topbar { background: #1b1826; }
.topbar .logo { color: #ffb070; text-decoration: none; }
.weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.week { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); background: var(--bg); }
.week:hover { border-color: #ff7a1a; }
.week .wn { flex: 0 0 38px; height: 38px; border-radius: 50%; background: #ff7a1a; color: #1a0d03; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.section h2 { color: var(--brand2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.social { background: var(--bg); border-left: 4px solid #ff7a1a; padding: 4px 14px; border-radius: 6px; }
.bullets li { margin: 3px 0; }
.refs li { font-size: 13px; color: var(--muted); margin: 4px 0; }
.animbox { margin: 10px 0 16px; }
.animbox canvas { width: 100%; aspect-ratio: 960 / 420; display: block; border-radius: 10px; background: #14121c; }
.animcap { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.weekpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 14px; margin: 6px 0 12px; }
code { background: var(--line); padding: 1px 5px; border-radius: 4px; }

/* ---- Tam ekran sunum ---- */
.deck { position: fixed; inset: 0; z-index: 20; background: #120f18; color: #ece9f5; display: flex; flex-direction: column; }
.slide { flex: 1; overflow: auto; padding: clamp(20px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; max-width: 1400px; width: 100%; margin: 0 auto; }
.slide h1 { font-size: clamp(30px, 5vw, 60px); margin: 10px 0; }
.slide h2 { font-size: clamp(22px, 3.2vw, 40px); color: #ffb070; }
.slide ul { font-size: clamp(17px, 2vw, 26px); line-height: 1.5; }
.slide .acad { font-size: clamp(17px, 2vw, 26px); line-height: 1.6; max-width: 1100px; }
.slide blockquote { margin: 16px 0 0; padding: 12px 18px; border-left: 5px solid #ff7a1a; background: #1b1826; border-radius: 8px; font-size: clamp(15px, 1.7vw, 22px); color: #ffd29a; }
.slide-body { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; }
.slide-body:not(:has(.animbox)) { grid-template-columns: 1fr; }
@media (max-width: 900px) { .slide-body { grid-template-columns: 1fr; } }
.slide .terms { display: flex; flex-wrap: wrap; gap: 10px; }
.slide .terms span { background: #2a2638; padding: 8px 16px; border-radius: 99px; font-size: clamp(16px, 2vw, 24px); }
.slide .refs li { font-size: clamp(13px, 1.4vw, 17px); color: #bdb8cf; }
.slide .muted { color: #a8a3bb; }
.deckbar { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: #1b1826; }
.deckbar button { background: #2a2638; }
.deck .animcap { color: #a8a3bb; }

/* ---- 4116 sineması ---- */
.cine { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 960px) { .cine { grid-template-columns: 1fr; } }
.cine canvas { width: 100%; display: block; border-radius: 10px; background: #000; }
.cine-tl { margin: 8px 0; padding: 0; }
.cine-ctl { margin-bottom: 8px; }
.cine-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.cine .chip { background: transparent; color: inherit; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 500; }
.cine .chip.on { background: #ff7a1a; color: #1a0d03; border-color: #ff7a1a; }
.cine-story p { font-size: 14px; }
.cine-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.cine-stats div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.cine-stats span { display: block; font-size: 11px; color: var(--muted); }
.cine-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 12px; }
.cine-box svg { width: 100%; color: var(--text); }
.cine-note { grid-column: 1 / -1; }
.deck .cine { color: #ece9f5; --bg: #1b1826; --line: #2c2838; --text: #ece9f5; --muted: #a8a3bb; }
.deck button.secondary { color: #ece9f5; border-color: #3a3550; }
