/* 03:17 — sayfa stilleri (site her zaman karanlık temadadır) */

:root {
  color-scheme: dark;
  --bg: #08080a;
  --text: #ddd6c8;
  --muted: #8d877b;
  --line: #1d1d23;
  --accent: #c9473d;
  --amber: #f0b35a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (hover: none) and (pointer: coarse) {
  .hide-on-touch { display: none; }
}

/* ---------- Üst ve alt bilgi ---------- */

.top { border-bottom: 1px solid var(--line); }
.top .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
}
.wordmark {
  color: #e2534a;
  font: 700 1.35rem "Courier New", ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: 0 0 10px rgb(226 83 74 / 45%);
}
.top-note { margin-left: auto; color: var(--muted); font-size: 0.85rem; }

.age-badge {
  display: inline-grid;
  place-items: center;
  min-width: 2.4em;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

main { flex: 1; padding: 20px 0 40px; }

.about {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(255 255 255 / 3%);
}
.about h2 { margin: 0 0 8px; font-size: 1.1rem; }
.about ul { margin: 0; padding-left: 20px; color: var(--muted); }
.about li + li { margin-top: 4px; }
.about strong { color: var(--text); }

.bottom {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.bottom a { color: var(--muted); }

/* ---------- Metin sayfaları ---------- */

.prose h1 { margin: 12px 0 16px; font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -0.01em; }
.prose h2 { margin: 28px 0 8px; font-size: 1.15rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Oyun sahnesi ---------- */

.horror-stage {
  --h-text: #ddd6c8;
  --h-muted: #8d877b;
  --h-accent: #c9473d;
  --h-amber: #f0b35a;
  --h-voice: #e7c9a0;
  --h-line: rgb(255 255 255 / 9%);
  --h-surface: rgb(255 255 255 / 4%);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(78vh, 720px);
  color: var(--h-text);
  background: radial-gradient(ellipse at 50% 15%, #1b1a20 0%, #0b0b0e 62%, #060608 100%);
  border: 1px solid #1d1d23;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 30%);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  color-scheme: dark;
}
/* kenar kararması */
.horror-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgb(0 0 0 / 60%) 100%);
}
/* film greni */
.horror-stage::after {
  content: "";
  position: absolute;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: h-grain 0.9s steps(5) infinite;
}
.horror-stage.no-fx::after { animation: none; }
@keyframes h-grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-2%, -4%); }
  80% { transform: translate(4%, 2%); }
  100% { transform: translate(0, 0); }
}
.horror-stage > * { position: relative; z-index: 2; }
.horror-stage > .dawn-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% -10%, rgb(255 190 120 / 30%), transparent 65%);
  transition: opacity 5s ease;
}
.horror-stage.dawn > .dawn-layer { opacity: 1; }
.horror-stage :focus-visible { outline-color: var(--h-amber); }

.horror-stage.flicker { animation: h-flicker 1.25s linear; }
@keyframes h-flicker {
  0%, 100% { filter: none; }
  10% { filter: brightness(0.45); }
  14% { filter: none; }
  38% { filter: brightness(0.6); }
  44% { filter: none; }
}
.horror-stage.shake { animation: h-shake 0.55s ease; }
@keyframes h-shake {
  0%, 100% { transform: none; }
  15% { transform: translate(-3px, 1px); }
  30% { transform: translate(3px, -1px); }
  45% { transform: translate(-2px, 0); }
  60% { transform: translate(2px, 1px); }
  80% { transform: translate(-1px, 0); }
}

/* Ortak düğmeler */
.h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 12px;
  background: rgb(255 255 255 / 6%);
  color: var(--h-text);
  font: 650 1rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.h-btn:hover { background: rgb(255 255 255 / 12%); }
.h-btn.primary { background: var(--h-accent); border-color: var(--h-accent); color: #fff; }
.h-btn.primary:hover { background: #dc5a50; }
.h-btn.small { min-height: 38px; padding: 0 12px; font-size: 0.88rem; }
.h-link {
  border: 0;
  background: none;
  color: var(--h-muted);
  font: 0.88rem var(--font);
  text-decoration: underline;
  cursor: pointer;
}
.h-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Yaş onayı ve başlık ekranı */
.h-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: inherit;
  padding: clamp(24px, 6vw, 48px) clamp(18px, 5vw, 40px);
  text-align: center;
}
.h-age {
  padding: 8px 16px;
  border-radius: 14px;
  background: var(--h-accent);
  color: #fff;
  font: 800 2.2rem/1 var(--font);
  letter-spacing: 0.02em;
}
.h-center h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 1.75rem); font-weight: 600; }
.h-warn {
  max-width: 48ch;
  margin: 0;
  padding-left: 20px;
  color: var(--h-muted);
  font: 0.95rem/1.6 var(--font);
  text-align: left;
}
.h-small { margin: 0; color: var(--h-muted); font: 0.82rem/1.5 var(--font); max-width: 46ch; }
.h-logo {
  margin: 0;
  color: #e2534a;
  font: 700 clamp(4rem, 19vw, 7.5rem)/1 "Courier New", ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgb(226 83 74 / 55%), 0 0 60px rgb(226 83 74 / 25%);
  animation: h-blink 3.4s infinite;
}
.no-fx .h-logo { animation: none; }
@keyframes h-blink {
  0%, 92%, 100% { opacity: 1; }
  94% { opacity: 0.35; }
  96% { opacity: 1; }
  97.5% { opacity: 0.5; }
}
.h-tagline { margin: 0; color: var(--h-muted); font-size: 1.2rem; font-style: italic; }
.h-tips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--h-muted);
  font: 0.85rem var(--font);
}

/* Oyun ekranı */
.h-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--h-line);
  font: 0.9rem var(--font);
}
.h-place {
  color: var(--h-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.h-clock {
  color: #e2534a;
  font: 700 1.1rem "Courier New", ui-monospace, monospace;
  text-shadow: 0 0 10px rgb(226 83 74 / 50%);
}
.dawn .h-clock { color: var(--h-amber); text-shadow: 0 0 10px rgb(240 179 90 / 50%); }
.h-pulse { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.h-pulse .heart {
  display: inline-block;
  color: var(--h-accent);
  animation: h-beat calc(60s / var(--bpm, 72)) infinite;
}
.no-fx .h-pulse .heart { animation: none; }
.h-pulse small { color: var(--h-muted); }
.h-pulse.lvl-1 b { color: var(--h-amber); }
.h-pulse.lvl-2 b { color: #ff6b5f; }
@keyframes h-beat {
  0%, 40%, 100% { transform: scale(1); }
  10% { transform: scale(1.3); }
  25% { transform: scale(1.12); }
}
.h-tools { display: flex; gap: 6px; margin-left: auto; }
.h-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--h-line);
  border-radius: 10px;
  background: var(--h-surface);
  color: var(--h-text);
  font-size: 1rem;
  cursor: pointer;
}
.h-icon.off { opacity: 0.4; }

.h-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 0;
  font: 0.85rem var(--font);
}
.h-item {
  padding: 4px 10px;
  border: 1px solid var(--h-line);
  border-radius: 999px;
  background: var(--h-surface);
  color: var(--h-text);
  font: inherit;
  cursor: pointer;
}
.h-item[aria-expanded="true"] { border-color: var(--h-amber); }
.h-empty { color: var(--h-muted); font-style: italic; }
.h-item-info {
  margin: 8px 16px 0;
  padding: 10px 12px;
  border-left: 2px solid var(--h-amber);
  background: var(--h-surface);
  font-size: 0.95rem;
  font-style: italic;
}

.h-story {
  max-width: 64ch;
  padding: 20px clamp(16px, 4vw, 32px) 4px;
  font-size: clamp(1.05rem, 2.6vw, 1.18rem);
  line-height: 1.75;
}
.h-story p { margin: 0 0 1em; }
.h-story p.voice {
  padding-left: 14px;
  border-left: 2px solid rgb(231 201 160 / 35%);
  color: var(--h-voice);
  font-style: italic;
}
.h-story p.big {
  margin: 0.3em 0;
  color: var(--h-amber);
  font: 700 2.6rem "Courier New", ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-align: center;
}
.h-story p.reveal { animation: h-reveal 0.9s ease both; }
@keyframes h-reveal {
  from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
.h-skip { margin: 0 0 18px; color: var(--h-muted); font: 0.8rem var(--font); text-align: center; }

.h-choices {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 4px clamp(16px, 4vw, 32px) 24px;
  list-style: none;
}
.h-choice {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--h-line);
  border-radius: 12px;
  background: var(--h-surface);
  color: var(--h-text);
  font: inherit;
  font-size: 1.02rem;
  text-align: left;
  cursor: pointer;
  animation: h-reveal 0.5s ease both;
  transition: border-color 0.2s, background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.h-choice:hover { border-color: rgb(201 71 61 / 65%); background: rgb(201 71 61 / 10%); }
.h-choice .num { min-width: 1.2em; color: var(--h-muted); font: 700 0.78rem var(--font); }

.h-input { padding: 0 clamp(16px, 4vw, 32px) 14px; font-family: var(--font); }
.h-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.h-field {
  width: 8.5ch;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 12px;
  background: #0e0e12;
  color: #f2ede2;
  font: 700 1.3rem/1 "Courier New", ui-monospace, monospace;
  letter-spacing: 0.3em;
}
.h-field.text { width: min(100%, 15ch); letter-spacing: 0.08em; font-family: Georgia, serif; }
.h-field::placeholder { color: #55524c; }
.h-radio { flex-direction: column; align-items: stretch; max-width: 420px; }
.h-freq {
  color: var(--h-amber);
  font: 700 2.2rem/1.1 "Courier New", ui-monospace, monospace;
  text-align: center;
  text-shadow: 0 0 12px rgb(240 179 90 / 40%);
}
.h-range { width: 100%; accent-color: var(--h-accent); }
.h-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.h-feedback {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--h-voice);
  font-family: Georgia, serif;
  font-style: italic;
}
.h-feedback.flash { animation: h-reveal 0.6s ease both; }

.h-ending {
  margin: 0 clamp(16px, 4vw, 32px) 26px;
  padding: 20px 18px;
  border: 1px solid var(--h-line);
  border-radius: 14px;
  background: rgb(0 0 0 / 35%);
  font-family: var(--font);
  text-align: center;
  animation: h-reveal 0.8s ease both;
}
.h-kind { margin: 0; color: var(--h-muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.h-kind.kotu { color: #ff6b5f; }
.h-kind.gercek { color: var(--h-amber); }
.h-ending h2 { margin: 4px 0 8px; font: 600 2rem Georgia, serif; }
.h-hint, .h-found { margin: 0 0 8px; color: var(--h-muted); }
.h-endings-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 16px;
  padding: 0;
  list-style: none;
}
.h-endings-list li {
  padding: 3px 10px;
  border: 1px solid var(--h-line);
  border-radius: 999px;
  color: var(--h-muted);
  font-size: 0.85rem;
}
.h-endings-list li.found { border-color: rgb(240 179 90 / 45%); color: var(--h-text); }
.h-endings-list li.current { background: rgb(240 179 90 / 14%); }

@media (max-width: 420px) {
  .h-hud { gap: 8px 10px; padding: 10px 12px; }
  .h-pulse small { display: none; }
  .h-icon { width: 34px; height: 34px; font-size: 0.9rem; }
  .h-tools { gap: 4px; }
}

