:root {
  --bg: #050810;
  --panel: #0c1220;
  --panel2: #111a2e;
  --border: #1e3a5f;
  --red: #ff2d55;
  --red-glow: rgba(255, 45, 85, 0.45);
  --green: #30d158;
  --cyan: #00d4ff;
  --amber: #ffb020;
  --text: #e8edf5;
  --muted: #7a8ba3;
  --mono: "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.scanlines {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 200;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.04) 2px, rgba(0,0,0,.04) 4px);
}

.noise {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 199; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.screen {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.screen.active { display: flex; flex-direction: column; }

/* ── INTRO ── */
#screen-intro {
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a0a12 0%, var(--bg) 70%);
}

.intro-box {
  width: 100%;
  max-width: 880px;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}

.intro-class {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: rgba(255, 45, 85, 0.1);
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  animation: pulse 2s ease-in-out infinite;
}
.intro-class b { font-weight: 800; }

.intro-terminal {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 45, 85, 0.08), 0 18px 50px rgba(0, 0, 0, 0.45);
  margin-bottom: 1.75rem;
}
.intro-terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.intro-dots { display: inline-flex; gap: 0.35rem; }
.intro-dots i { width: 9px; height: 9px; border-radius: 50%; background: #2a3a55; }
.intro-dots i:first-child { background: var(--red); }
.intro-terminal-title { flex: 1; letter-spacing: 0.06em; }
.intro-skip {
  font: inherit;
  color: var(--cyan);
  background: none;
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  cursor: pointer;
}
.intro-skip:hover { background: rgba(0, 212, 255, 0.1); }

.intro-hunter { text-align: left; margin-bottom: 2rem; animation: fadeUp 0.4s ease both; }
.intro-hunter-lead p {
  color: var(--text);
  line-height: 1.65;
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}
.intro-hunter-lead p:first-child { color: var(--cyan); font-weight: 700; letter-spacing: 0.02em; }

.intro-keys {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.6rem;
  margin: 1.1rem 0 0.9rem;
}
.intro-key {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  animation: fadeUp 0.35s ease both;
}
.intro-key-top { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.4rem; }
.intro-key-icon { font-size: 1rem; }
.intro-key-no { flex: 1; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--muted); }
.intro-key-letter {
  min-width: 1.6rem;
  text-align: center;
  font-family: var(--mono);
  font-weight: 800;
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  background: rgba(0, 212, 255, 0.08);
}
.intro-key-label { font-size: 0.8rem; line-height: 1.35; color: var(--text); }
.intro-key-final { border-color: rgba(255, 45, 85, 0.55); background: rgba(255, 45, 85, 0.06); }
.intro-key-final .intro-key-letter { color: var(--red); border-color: var(--red); background: rgba(255, 45, 85, 0.1); }
.intro-matrix {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--amber);
  text-align: center;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 560px) {
  .intro-keys { grid-template-columns: 1fr 1fr; }
  .intro-terminal-title { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-key, .intro-hunter, .intro-class { animation: none; }
}

.glitch-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.25em;
  color: var(--red);
  text-shadow: 0 0 30px var(--red-glow);
  margin-bottom: 0.5rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.intro-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.intro-loc { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

.intro-text {
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
  min-height: 150px;
  font-family: var(--mono);
  color: #a5d6ff;
  white-space: pre-line; /* paragraflar ve satır sonları korunsun */
  cursor: pointer;
}
.intro-text::after {
  content: "▌";
  color: var(--red);
  animation: blink 1s steps(1) infinite;
}

.btn-game {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.85rem 2rem;
  border: 2px solid var(--red);
  background: rgba(255, 45, 85, 0.12);
  color: var(--red);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.btn-game:hover {
  background: var(--red);
  color: white;
  box-shadow: 0 0 24px var(--red-glow);
}

.btn-start { font-size: 1.1rem; padding: 1rem 2.5rem; }

/* ── HUD ── */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.hud-left { display: flex; flex-direction: column; gap: 0.25rem; }
.hud-label { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.1em; display: block; }
.hud-player { font-weight: 700; color: var(--cyan); }

.player-badge {
  display: inline-block;
  width: fit-content;
  font-size: 0.55rem; font-weight: 800; letter-spacing: 0.1em;
  padding: 0.15rem 0.45rem; border-radius: 3px; border: 1px solid;
  font-family: var(--mono);
}
.badge-init { color: var(--muted); border-color: var(--border); background: rgba(122,139,163,.08); }
.badge-op { color: var(--cyan); border-color: var(--cyan); background: rgba(0,212,255,.12); }
.badge-rookie { color: #7ee787; border-color: #7ee787; background: rgba(126,231,135,.1); }
.badge-hunter { color: var(--amber); border-color: var(--amber); background: rgba(255,176,32,.1); }
.badge-analyst { color: #a78bfa; border-color: #a78bfa; background: rgba(167,139,250,.1); }
.badge-guardian { color: var(--green); border-color: var(--green); background: rgba(48,209,88,.15); }
.badge-elite { color: #ffd700; border-color: #ffd700; background: rgba(255,215,0,.12); }

.intro-portal-link {
  display: block; width: fit-content; margin: 1.1rem auto 0;
  font-size: 0.8rem; color: var(--muted); text-decoration: none;
}
.intro-portal-link:hover { color: var(--cyan); }

.btn-start:disabled { opacity: 0.45; cursor: wait; }

.hud-timer { font-family: var(--mono); font-size: 1.1rem; color: var(--amber); }
.hud-points { font-family: var(--mono); font-size: 1.1rem; color: var(--green); }

/* ── HUB ── */
.hub-layout {
  display: grid;
  grid-template-columns: 180px 1fr 200px;
  gap: 1rem;
  padding: 1.25rem;
  flex: 1;
}

.keys-hud h3, .mission-map h2 {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.game-hub-template.tpl-stage {
  min-height: 0;
  padding: 1rem 1.25rem;
}

.game-hub-template .map-path {
  display: block;
}

@media (max-width: 900px) {
  .game-hub-template .tpl-vertical {
    grid-template-columns: 1fr;
  }
}

.key-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel2);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.35rem;
  border-radius: 4px;
  transition: all 0.3s;
}

.key-slot .k { font-weight: 800; color: var(--cyan); font-size: 0.95rem; }
.key-slot .v { font-family: var(--mono); color: var(--green); font-weight: 700; font-size: 0.9rem; }
.key-slot.locked .v { color: var(--muted); }
.key-slot.collected { border-color: var(--green); box-shadow: 0 0 12px rgba(48,209,88,.2); }

.mission-story {
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.soru-container {
  flex: 1;
  overflow-y: auto;
}

.soru-text-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #d1e2f7;
  background: rgba(6, 10, 16, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 4px;
  padding: 1rem;
  margin: 0;
}

.map-path {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.mission-node {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.mission-node::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 100%;
  width: 2px;
  height: 12px;
  background: var(--border);
}

.mission-node:last-child::before { display: none; }

.mission-node.unlocked:hover { background: var(--panel2); border-color: var(--cyan); }
.mission-node.locked { opacity: 0.4; cursor: not-allowed; }
.mission-node.completed { border-left: 3px solid var(--green); }
.mission-node.active { border-color: var(--red); box-shadow: inset 0 0 20px rgba(255,45,85,.08); }

.node-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.85rem;
  border: 2px solid var(--border);
  background: var(--panel2);
}

.mission-node.unlocked .node-icon { border-color: var(--cyan); color: var(--cyan); }
.mission-node.completed .node-icon { border-color: var(--green); background: rgba(48,209,88,.15); color: var(--green); }
.mission-node.locked .node-icon { color: var(--muted); }

.node-info h4 { font-size: 1rem; margin-bottom: 0.15rem; }
.node-info p { font-size: 0.8rem; color: var(--muted); }
.node-badge { font-size: 0.7rem; color: var(--amber); font-family: var(--mono); }

.companion {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.companion-portrait { margin-bottom: 0.5rem; display: flex; justify-content: center; }
.guide-portrait-frame {
  padding: 0.35rem;
  border-radius: 8px;
  background: rgba(8, 12, 22, 0.85);
  border: 1px solid rgba(0, 212, 255, 0.25);
}
.guide-portrait-frame.guide-accent-amber {
  border-color: rgba(255, 176, 32, 0.35);
  box-shadow: 0 0 16px rgba(255, 176, 32, 0.12);
}
.guide-portrait-frame.guide-accent-cyan {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.12);
}
.guide-portrait-frame svg,
.guide-portrait-frame img {
  display: block;
}
.zeynep-sprite,
.guide-sprite {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.35));
  animation: zeynep-idle 3s ease-in-out infinite;
}
.guide-accent-amber {
  filter: drop-shadow(0 0 8px rgba(255, 176, 32, 0.4));
}
.companion-name { font-weight: 700; color: var(--cyan); font-size: 0.85rem; letter-spacing: 0.1em; margin-bottom: 0.35rem; }
.companion-name.guide-accent-amber { color: var(--amber); }
@keyframes zeynep-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.companion-role {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.companion-msg { font-size: 0.8rem; color: var(--muted); line-height: 1.5; text-align: left; }
.hub-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── CANLI LİDERLİK TABLOSU (oyun) ── */
.game-lb-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(280px, calc(100vw - 2rem));
  max-height: 280px;
  display: flex;
  flex-direction: column;
  background: rgba(12, 18, 32, 0.95);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  z-index: 50;
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s;
}

.game-lb-panel.lb-pulse {
  box-shadow: 0 0 24px rgba(48, 209, 88, 0.25);
}

.game-lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.game-lb-head h3 {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0;
}

.lb-live-badge {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--green);
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(48, 209, 88, 0.4);
  border-radius: 999px;
  background: rgba(48, 209, 88, 0.08);
}

.lb-live-badge.lb-status-frozen {
  color: var(--amber);
  border-color: rgba(255, 176, 32, 0.4);
  background: rgba(255, 176, 32, 0.08);
}

.game-lb-list {
  overflow-y: auto;
  padding: 0.35rem 0.5rem 0.5rem;
}

.lb-live-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 0.35rem;
  align-items: center;
  padding: 0.35rem 0.4rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.lb-live-row.lb-row-self {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.lb-live-row .lb-rank {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.72rem;
}

.lb-live-row .lb-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-live-row .lb-pts {
  font-family: var(--mono);
  color: var(--green);
  font-size: 0.72rem;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .game-lb-panel {
    right: 0.5rem;
    bottom: 0.5rem;
    width: calc(100vw - 1rem);
    max-height: 200px;
  }
}

/* ── MISSION ── */
.mission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.btn-back {
  background: none; border: 1px solid var(--border); color: var(--muted);
  padding: 0.4rem 0.85rem; cursor: pointer; border-radius: 4px; font-size: 0.85rem;
}
.btn-back:hover { color: var(--text); border-color: var(--cyan); }

.mission-chapter { font-size: 0.7rem; color: var(--red); letter-spacing: 0.15em; }
.mission-title-block h2 { font-size: 1.25rem; }
.mission-codename { font-size: 0.75rem; color: var(--amber); font-family: var(--mono); }
.mission-timer { font-family: var(--mono); color: var(--amber); font-size: 1.1rem; }

.mission-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  padding: 1rem 1.5rem;
  flex: 1;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.panel h3 { font-size: 0.7rem; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.75rem; }
.panel p { font-size: 0.9rem; line-height: 1.6; color: #c9d6e8; margin-bottom: 1rem; }

.rules-list { list-style: none; font-size: 0.8rem; color: var(--muted); }
.rules-list li { padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.rules-list li::before { content: "▸ "; color: var(--cyan); }

.mission-terminal { grid-row: span 2; display: flex; flex-direction: column; }

.terminal-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.75rem; color: var(--muted); margin-bottom: 0.75rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}

.term-dl { color: var(--cyan); text-decoration: none; font-size: 0.8rem; }
.term-dl:hover { text-decoration: underline; }

.terminal-out {
  flex: 1;
  background: #060a10;
  border: 1px solid #1a2744;
  border-radius: 4px;
  padding: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: #7ee787;
  overflow: auto;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-all;
}

.mission-submit { grid-column: 1; }

.submit-hint { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.submit-row { display: flex; gap: 0.5rem; }
.submit-row[hidden], .attempts[hidden] { display: none; }

#m-answer {
  flex: 1;
  background: #060a10;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 1rem;
  border-radius: 4px;
}

#m-answer:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(0,212,255,.15); }

.submit-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.submit-feedback.error { background: rgba(255,45,85,.12); border: 1px solid var(--red); color: #ff8fa3; }
.submit-feedback.success { background: rgba(48,209,88,.12); border: 1px solid var(--green); color: var(--green); }

.attempts { margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted); }

/* ── DEBRIEF ── */
#screen-debrief {
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #0a1a0f 0%, var(--bg) 70%);
}

.debrief-box {
  max-width: 520px;
  text-align: center;
  padding: 2.5rem;
  background: var(--panel);
  border: 1px solid var(--green);
  box-shadow: 0 0 40px rgba(48,209,88,.15);
}

.debrief-status { font-size: 1.5rem; font-weight: 800; color: var(--green); margin-bottom: 0.5rem; }
.debrief-points { font-size: 1.25rem; color: var(--amber); margin-bottom: 1rem; font-family: var(--mono); }
.debrief-key { font-family: var(--mono); font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--cyan); }

.umay-quote {
  font-style: italic;
  color: var(--red);
  border-left: 3px solid var(--red);
  padding: 1rem;
  text-align: left;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  background: rgba(255,45,85,.06);
}

@media (max-width: 900px) {
  .hub-layout { grid-template-columns: 1fr; }
  .companion { display: none; }
  .mission-layout { grid-template-columns: 1fr; }
  .mission-terminal { grid-row: auto; }
}

/* Operasyon Merkezi paneli (guides.js) — seçili avatar + rumuz + rozet (dikey) */
.companion-operator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0 0.85rem;
  text-align: center;
}
.companion-avatar .guide-photo {
  display: block;
  width: 96px;
  height: 128px;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.45);
}
.companion-operator-text { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.companion-operator .companion-name { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }

/* Soru kartları (soru.js) — soru.txt bölümlere ayrılıp kart olarak gösterilir */
.soru-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.soru-cards[hidden], .soru-text-pre[hidden] { display: none; }
.soru-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.soru-chip {
  font-family: var(--mono); font-size: 0.72rem; color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.3); background: rgba(0, 212, 255, 0.06);
  border-radius: 999px; padding: 0.2rem 0.65rem;
}
.soru-card {
  border: 1px solid var(--border); border-left: 3px solid var(--border);
  background: var(--panel2); border-radius: 6px; padding: 0.8rem 0.95rem;
}
.soru-card-title {
  font-size: 0.72rem; letter-spacing: 0.12em; color: var(--muted);
  margin-bottom: 0.55rem; font-weight: 700;
}
.soru-card p, .soru-card li { font-size: 0.86rem; line-height: 1.6; color: #c9d6e8; }
.soru-card p { margin: 0 0 0.55rem; }
.soru-card p:last-child { margin-bottom: 0; }
.soru-story { border-left-color: var(--cyan); background: rgba(0, 212, 255, 0.04); }
.soru-story .soru-story-p { font-style: italic; color: #d7e3f4; }
.soru-task { border: 1px solid var(--red); border-left-width: 3px; background: rgba(255, 45, 85, 0.07); }
.soru-task .soru-card-title { color: var(--red); }
.soru-task p { color: var(--text); font-weight: 600; font-size: 0.92rem; }
.soru-warn { border-left-color: var(--amber); background: rgba(255, 176, 32, 0.06); }
.soru-warn .soru-card-title { color: var(--amber); }
.soru-data .soru-card-title { color: var(--green); }
.soru-examples .soru-card-title { color: var(--green); }
.soru-list { margin: 0 0 0.55rem 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.soru-list:last-child { margin-bottom: 0; }
.soru-list li::marker { color: var(--cyan); font-weight: 700; }
.soru-list li strong { color: var(--text); }
.soru-line { display: block; }
.soru-code {
  font-family: var(--mono); font-size: 0.76rem; line-height: 1.5; color: #d1e2f7;
  background: rgba(6, 10, 16, 0.7); border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 4px; padding: 0.55rem 0.7rem; margin: 0.35rem 0 0.55rem;
  overflow-x: auto; white-space: pre;
  font-variant-ligatures: none; /* "##..." gibi harita satırları birleşmesin */
}
.soru-callout {
  font-size: 0.84rem; line-height: 1.55; color: #e9dcc0;
  border: 1px solid rgba(255, 176, 32, 0.35); background: rgba(255, 176, 32, 0.07);
  border-radius: 6px; padding: 0.6rem 0.8rem; margin: 0.35rem 0;
}
.soru-callout.soru-info { color: #cfe4f7; border-color: rgba(0, 212, 255, 0.3); background: rgba(0, 212, 255, 0.06); font-style: italic; }
.soru-io { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.soru-io-item {
  font-family: var(--mono); font-size: 0.74rem; color: #c9d6e8;
  background: rgba(6, 10, 16, 0.7); border: 1px solid var(--border);
  border-radius: 4px; padding: 0.3rem 0.6rem;
}
.soru-io-item b { color: var(--cyan); margin-right: 0.45rem; }
.soru-io-answer { border-color: rgba(48, 209, 88, 0.45); }
.soru-io-answer b { color: var(--green); }

/* Süre uyarıları ve süresi dolan bölüm */
.time-warning {
  margin: 0 0 0.75rem; padding: 0.55rem 0.75rem; border-radius: 6px; font-size: 0.85rem; font-weight: 600;
  color: var(--amber); background: rgba(255, 176, 32, 0.1); border: 1px solid rgba(255, 176, 32, 0.5);
}
.time-warning.critical { color: #ff8fa3; background: rgba(255, 45, 85, 0.12); border-color: var(--red); animation: zaman-nabiz 1s ease-in-out infinite; }
.time-warning[hidden] { display: none; }
.mission-timer.timer-critical { animation: zaman-nabiz 1s ease-in-out infinite; }
.debrief-status.debrief-expired { color: var(--red); }
@keyframes zaman-nabiz { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .time-warning.critical, .mission-timer.timer-critical { animation: none; }
}
.mission-node.expired { border-left: 3px solid var(--red); }
.mission-node.expired .node-icon { border-color: var(--red); background: rgba(255,45,85,.12); color: var(--red); }

/* Final kapanışı (10. bölüm) */
#screen-final {
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #062030 0%, var(--bg) 70%);
}
.final-box { width: 100%; max-width: 760px; padding: 3rem 1.25rem; text-align: center; }
.final-kicker { font-family: var(--mono); color: var(--cyan); letter-spacing: 0.2em; font-size: 0.8rem; margin-bottom: 0.75rem; }
.final-title { font-size: clamp(1.6rem, 5vw, 2.8rem); font-weight: 900; letter-spacing: 0.06em; color: var(--text); text-shadow: 0 0 24px rgba(0, 212, 255, 0.45); }
.final-sub { margin: 0.75rem 0 1.5rem; color: var(--green); font-weight: 700; }
.final-quote { white-space: pre-line; font-style: italic; color: #cfe4f7; line-height: 1.7; border-left: 3px solid var(--cyan); padding: 0.75rem 1rem; text-align: left; margin: 0 auto 1.5rem; max-width: 520px; background: rgba(0, 212, 255, 0.05); }
.final-stats { font-family: var(--mono); color: var(--amber); font-size: 1.1rem; margin-bottom: 0.75rem; }
.final-next { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.5rem; }
.final-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.final-actions .btn-game { text-decoration: none; }
.btn-ghost { background: transparent; }

/* Kapanış filmi (final ekranının önünde) — oynatma çubuğu yok, yalnızca "Atla" */
.final-film { position: fixed; inset: 0; z-index: 300; background: #000; display: flex; align-items: center; justify-content: center; }
.final-film[hidden] { display: none; }
.final-film video { width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
.final-film-skip {
  position: absolute; top: 1rem; right: 1rem; z-index: 2; cursor: pointer;
  font-family: var(--mono); font-size: 0.85rem; color: var(--text);
  background: rgba(12, 18, 32, 0.75); border: 1px solid var(--border); border-radius: 6px; padding: 0.45rem 0.9rem;
}
.final-film-skip:hover { border-color: var(--cyan); color: var(--cyan); }
.final-box-goster { animation: final-belir 0.8s ease-out; }
@keyframes final-belir { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .final-box-goster { animation: none; } }

/* Kurallar (başlamadan önce) ve bilgi penceresi */
.intro-rules { text-align: left; margin: 1.5rem auto 1rem; max-width: 760px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; }
.intro-rules[hidden] { display: none; }
.intro-rules h3 { font-size: 0.85rem; letter-spacing: 0.1em; color: var(--cyan); margin-bottom: 0.75rem; }
.rules-ol { margin-left: 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; }
.rules-ol li { font-size: 0.88rem; line-height: 1.55; color: #c9d6e8; }
.rules-accept { display: flex; align-items: center; gap: 0.6rem; margin-top: 1rem; font-weight: 700; color: var(--text); cursor: pointer; }
.rules-accept input { width: 18px; height: 18px; accent-color: var(--cyan); }
.btn-start:disabled { opacity: 0.45; cursor: not-allowed; }
.hud-rules { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--text); cursor: pointer; font-size: 0.8rem; padding: 0.2rem 0.55rem; margin-right: 0.6rem; }
.hud-rules:hover { border-color: var(--cyan); color: var(--cyan); }
.time-note { font-size: 0.75rem; color: var(--muted); margin: -0.25rem 0 0.6rem; }
.debrief-net { color: var(--muted); font-size: 0.85rem; margin: -0.5rem 0 1rem; }
.debrief-net[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 250; background: rgba(2, 5, 10, 0.75); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 640px; max-height: 85vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--cyan); border-radius: 10px; padding: 1.25rem 1.4rem; box-shadow: 0 0 30px rgba(0, 212, 255, 0.2); }
.modal-box h3 { color: var(--cyan); margin-bottom: 0.75rem; font-size: 1rem; }
.modal-body p { color: #c9d6e8; line-height: 1.6; font-size: 0.92rem; }
.modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.modal-actions [hidden] { display: none; }
