:root {
  --altin: #e8c27a;
  --altin-koyu: #b8893a;
  --yazi: #f5efe4;
  --soluk: rgba(245, 239, 228, 0.7);
  --cam: rgba(18, 14, 10, 0.55);
  --cizgi: rgba(232, 194, 122, 0.35);
  --baslik: "Cinzel", Georgia, serif;
  --govde: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: #000;
  color: var(--yazi);
  font-family: var(--govde);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Masaüstünde ekranın arkasında bulanık kapak */
.arka {
  position: fixed;
  inset: -40px;
  background: #000 center / cover no-repeat;
  filter: blur(40px) brightness(0.35);
  transform: scale(1.1);
}

/* Dikey 9:16 oyun ekranı: her zaman ortada */
.ekran {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: min(100vw, calc(100dvh * 9 / 16));
  margin: 0 auto;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.8);
}
@supports not (height: 100dvh) {
  .ekran { width: min(100vw, calc(100vh * 9 / 16)); }
}

.katman {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.6s ease-in-out, transform 0.9s ease-out;
}
.katman.gorunur { opacity: 1; transform: scale(1); }
.katman.bekle { z-index: 3; transform: none; transition: opacity 0.35s ease; }

/* Fotoğraf: hafif yakınlaşarak gelir */
.foto { z-index: 3; transform: scale(1.08); transition: opacity 0.25s ease, transform 4s ease-out; }
.foto.gorunur { transform: scale(1); }

.flas {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.flas.patla { animation: flas 0.6s ease-out; }
@keyframes flas { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }

/* Üst çubuk */
.ust {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 24px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
  z-index: 5;
  transition: opacity 0.4s;
}
.ust.sakin { opacity: 0; }
.ust:hover { opacity: 1; }
.ust-baslik {
  flex: 1;
  text-align: center;
  font-family: var(--baslik);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soluk);
}
.ikon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.ikon svg, .durdu svg, .dik-tut svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--yazi);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* İlerleme çizgisi */
.ilerleme {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 5;
}
#ilerlemeDolu { height: 100%; width: 0; background: var(--altin); }

.durdu {
  position: absolute;
  top: 50%; left: 50%;
  width: 76px; height: 76px;
  margin: -38px 0 0 -38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 4;
  pointer-events: none;
}
.durdu svg { width: 34px; height: 34px; fill: var(--yazi); stroke: none; margin-left: 4px; }

.yukleniyor {
  position: absolute;
  top: 50%; left: 50%;
  margin: -20px 0 0 -20px;
  z-index: 4;
  pointer-events: none;
}
.yukleniyor span {
  display: block;
  width: 40px; height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--altin);
  border-radius: 50%;
  animation: don 0.9s linear infinite;
}
@keyframes don { to { transform: rotate(360deg); } }

/* Seçim alanı */
.secim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 80px 20px calc(env(safe-area-inset-bottom) + 28px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 45%);
  z-index: 6;
  animation: yuksel 0.35s ease-out;
}
.secim-soru {
  font-family: var(--baslik);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--altin);
  text-align: center;
  margin-bottom: 14px;
}
.secim-liste { display: flex; flex-direction: column; gap: 12px; }
.secenek {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 1px solid var(--cizgi);
  border-radius: 14px;
  background: var(--cam);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--yazi);
  font: 600 17px/1.3 var(--govde);
  cursor: pointer;
  opacity: 0;
  animation: yuksel 0.35s ease-out forwards;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.secenek:hover { border-color: var(--altin); background: rgba(40, 30, 18, 0.7); }
.secenek:active { transform: scale(0.98); }
.secenek.secildi { background: var(--altin); color: #1a1208; border-color: var(--altin); }
.secenek.soldu { opacity: 0.25 !important; }
@keyframes yuksel { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.foto-ipucu {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 28px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  text-align: center;
  font-size: 14px;
  color: var(--yazi);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  z-index: 6;
  animation: nabiz 1.6s ease-in-out infinite;
}
@keyframes nabiz { 50% { opacity: 0.35; } }

/* Tam ekran kartlar */
.kart {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 28px calc(env(safe-area-inset-bottom) + 48px);
  z-index: 8;
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.92) 70%);
}
.kart > div { width: 100%; }
.eksik, .son { align-items: center; background: rgba(0, 0, 0, 0.85); }

.acilis { background: #000 center / cover no-repeat; }
.acilis::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.95) 75%);
}
.acilis-icerik { position: relative; }

.ust-yazi {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--soluk);
  margin-bottom: 12px;
}
h1, h2 {
  font-family: var(--baslik);
  font-weight: 700;
  line-height: 1.05;
  color: var(--yazi);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}
h1 { font-size: clamp(40px, 12vw, 56px); letter-spacing: 0.04em; }
h2 { font-size: 28px; margin-bottom: 12px; }
.bolum {
  margin: 14px 0 6px;
  font-family: var(--baslik);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--altin);
}
.aciklama { color: var(--soluk); font-size: 15px; line-height: 1.5; margin-bottom: 28px; }
.kucuk { color: rgba(245, 239, 228, 0.45); font-size: 12px; margin-top: 16px; }

.ana-btn, .ikinci-btn {
  display: block;
  width: 100%;
  min-height: 56px;
  border-radius: 14px;
  font: 600 17px var(--govde);
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.ana-btn {
  border: none;
  background: linear-gradient(135deg, var(--altin), var(--altin-koyu));
  color: #1a1208;
  box-shadow: 0 8px 30px rgba(232, 194, 122, 0.25);
}
.ikinci-btn {
  margin-top: 12px;
  border: 1px solid var(--cizgi);
  background: var(--cam);
  color: var(--yazi);
}
.ana-btn:hover, .ikinci-btn:hover { filter: brightness(1.08); }
.ana-btn:active, .ikinci-btn:active { transform: scale(0.98); }
button:focus-visible { outline: 2px solid var(--altin); outline-offset: 3px; }

/* Telefon yan çevrilince */
.dik-tut {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #000;
  z-index: 20;
  color: var(--soluk);
}
.dik-tut svg { width: 48px; height: 48px; animation: cevir 2s ease-in-out infinite; }
@keyframes cevir { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0); } }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .dik-tut { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
