/* ============================================================
   Tolga Studio — Online Oyunlar ortak design system
   Tek kaynak: renk token'ları, tipografi, spacing, bileşenler.
   Dört oyun da bu dosyayı kullanır; oyun css'leri yalnız
   oyun alanına özel kuralları ekler.
   ============================================================ */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Renk token'ları — 3 nötr + 1 vurgu disiplini */
  --bg-0: #070b14;
  --bg-1: #0b1322;
  --bg-2: #111c31;
  --bg-3: #16233c;
  --panel-1: #131f36;
  --panel-2: #0d1626;
  --cizgi: rgba(232, 193, 90, 0.16);
  --cizgi-soluk: rgba(255, 255, 255, 0.07);

  --altin-1: #f3d574;
  --altin-2: #d9b04c;
  --altin-3: #a9821e;
  --altin-soft: rgba(217, 176, 76, 0.35);

  --murekkep: #eef2f8;
  --soluk: #8fa0b8;
  --cok-soluk: #5b6a82;

  --iyi: #4cd07d;
  --kotu: #e5586a;
  --bilgi: #5aa2e8;

  /* Spacing scale (4-base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;

  --r-kucuk: 10px;
  --r-orta: 14px;
  --r-buyuk: 20px;

  --golge-panel:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(232, 193, 90, 0.08);
  --golge-vurgu:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3),
    0 8px 18px rgba(0, 0, 0, 0.45),
    0 0 0 1.5px var(--altin-soft);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
    system-ui, sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, var(--bg-3) 0%, var(--bg-1) 48%, var(--bg-0) 100%);
  color: var(--murekkep);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Çuha dokusu — casino felt hissi */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(232, 193, 90, 0.014) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(90, 162, 232, 0.011) 0 2px, transparent 2px 6px);
}

/* ---------- Tipografi ---------- */
.hero-baslik {
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--altin-1) 0%, var(--altin-2) 60%, var(--altin-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
}
.alt-baslik {
  color: var(--soluk);
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
}
.bolum-baslik {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--altin-1);
}
.kucuk { font-size: 12px; color: var(--soluk); }

/* ---------- Panel / kart ---------- */
.panel {
  background: linear-gradient(165deg, var(--panel-1) 0%, var(--panel-2) 100%);
  border: 1px solid var(--cizgi);
  border-radius: var(--r-buyuk);
  box-shadow: var(--golge-panel);
  padding: var(--s5);
  position: relative;
  z-index: 1;
}

/* ---------- Butonlar ----------
   REVİZYON-1 (site kuralı): düz-modern görünüm — doku/kabartma/emboss YOK,
   sade altın dolgu veya outline. Hover'da TRANSFORM YASAK (sitede blink
   hatası → kalıcı yasak); hover geri bildirimi yalnız renk/kenarlık.
   Tüm butonlar min 44×44px dokunma alanı. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 46px;
  min-width: 44px;
  padding: 0 var(--s5);
  border-radius: var(--r-orta);
  border: 1px solid var(--cizgi);
  background: #182642;
  color: var(--murekkep);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { border-color: var(--altin-soft); background: #1e3054; }
.btn:active { background: #142138; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--altin-2); outline-offset: 2px; }

.btn.birincil {
  background: var(--altin-2);
  color: #241a05;
  border: 1px solid var(--altin-2);
}
.btn.birincil:hover { background: #e5bd5e; border-color: #e5bd5e; }
.btn.birincil:active { background: #c9a041; }
.btn.tehlike { border-color: rgba(229, 88, 106, 0.4); color: #ff8b9a; }
.btn.tehlike:hover { background: rgba(229, 88, 106, 0.12); border-color: rgba(229, 88, 106, 0.6); }
.btn.kucuk-btn { min-height: 44px; padding: 0 var(--s4); font-size: 13px; border-radius: var(--r-kucuk); }
.btn.hayalet { background: transparent; border-color: var(--cizgi-soluk); }
.btn.hayalet:hover { background: rgba(255, 255, 255, 0.05); }

/* ---------- Form ---------- */
.giris-alani {
  width: 100%;
  min-height: 46px;
  padding: 0 var(--s4);
  border-radius: var(--r-orta);
  border: 1px solid var(--cizgi-soluk);
  background: rgba(0, 0, 0, 0.32);
  color: var(--murekkep);
  font: inherit;
  /* 16px altı iOS Safari'de odaklanınca otomatik zoom tetikler —
     tahmin/mesaj yazarken ekran zıplar; 16px sabit kalmalı */
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.giris-alani::placeholder { color: var(--cok-soluk); }
.giris-alani:focus {
  outline: none;
  border-color: var(--altin-2);
  box-shadow: 0 0 0 3px rgba(217, 176, 76, 0.18);
}
.etiket {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--soluk);
  margin-bottom: var(--s2);
}

/* ---------- Avatar rengi seçici ---------- */
.renk-secici { display: flex; gap: var(--s3); flex-wrap: wrap; justify-content: center; }
.renk-top {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 3px 6px rgba(255,255,255,0.35);
}
.renk-top:hover { box-shadow: 0 0 0 3px rgba(217,176,76,0.35),
  inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 3px 6px rgba(255,255,255,0.35); }
.renk-top.secili {
  border-color: var(--altin-1);
  box-shadow: 0 0 0 3px rgba(217,176,76,0.25), 0 0 18px rgba(217,176,76,0.45),
    inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 3px 6px rgba(255,255,255,0.35);
}

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: rgba(0,0,0,0.72);
  box-shadow: inset 0 -5px 10px rgba(0,0,0,0.3), inset 0 2px 5px rgba(255,255,255,0.4);
  flex: 0 0 auto;
}

/* ---------- Ekran yönetimi ---------- */
.ekran { display: none; animation: ekranGir 0.32s ease; }
.ekran.acik { display: block; }
@keyframes ekranGir {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.orta-kolon {
  width: min(480px, calc(100vw - 24px));
  margin: 0 auto;
  padding: var(--s6) 0 var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  position: relative;
  z-index: 1;
}

/* ---------- Oda listesi ---------- */
.oda-satir {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  min-height: 44px;
  border-radius: var(--r-orta);
  border: 1px solid var(--cizgi-soluk);
  background: rgba(255,255,255,0.025);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.oda-satir:hover {
  border-color: var(--altin-soft);
  background: rgba(217,176,76,0.06);
}
.oda-satir .oda-ad { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oda-satir .oda-detay { font-size: 12px; color: var(--soluk); flex-shrink: 0; }
.rozet {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(217,176,76,0.12);
  border: 1px solid var(--altin-soft);
  color: var(--altin-1);
  text-transform: uppercase;
}

/* Boş durum — davetkar */
.bos-durum {
  text-align: center;
  padding: var(--s7) var(--s4);
  color: var(--soluk);
  display: flex; flex-direction: column; gap: var(--s3); align-items: center;
}
.bos-durum .bos-ikon { font-size: 42px; filter: drop-shadow(0 4px 14px rgba(217,176,76,0.35)); animation: sallan 3.2s ease-in-out infinite; }
@keyframes sallan {
  0%,100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-6px); }
}
.bos-durum .bos-mesaj { font-size: 14px; line-height: 1.5; max-width: 300px; }

/* ---------- Oyuncu listesi (oda bekleme) ---------- */
.koltuk-satir {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-kucuk);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--cizgi-soluk);
}
.koltuk-satir.bos-koltuk { opacity: 0.55; border-style: dashed; }
.koltuk-satir .oyuncu-ad { font-weight: 700; font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.koltuk-satir .sen { color: var(--altin-1); font-size: 11px; font-weight: 800; }

/* ---------- Chat ---------- */
.chat-kutu { display: flex; flex-direction: column; gap: var(--s2); }
.chat-mesajlar {
  height: 150px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: var(--s2);
  border-radius: var(--r-kucuk);
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--cizgi-soluk);
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.chat-mesaj { font-size: 13px; line-height: 1.45; word-break: break-word; animation: ekranGir 0.2s ease; }
.chat-mesaj .kim { font-weight: 800; }
.chat-mesaj.sistem { color: var(--soluk); font-style: italic; font-size: 12px; }
.chat-mesaj.yaklastin { color: var(--altin-1); font-weight: 700; }
.chat-giris { display: flex; gap: var(--s2); }
.chat-giris .giris-alani { min-height: 40px; font-size: 16px; } /* iOS zoom tetiğine dikkat */

/* ---------- Toast ---------- */
.toast-kap {
  position: fixed; top: max(env(safe-area-inset-top), 14px); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: var(--s2);
  z-index: 300; pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}
.toast {
  background: linear-gradient(165deg, var(--panel-1), var(--panel-2));
  border: 1px solid var(--altin-soft);
  border-radius: var(--r-orta);
  box-shadow: 0 12px 30px rgba(0,0,0,0.55);
  padding: var(--s3) var(--s4);
  font-size: 13px; font-weight: 600;
  text-align: center;
  animation: toastGir 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.toast.hata { border-color: rgba(229,88,106,0.5); color: #ff9aa8; }
.toast.iyi { border-color: rgba(76,208,125,0.4); color: #7ee6a3; }
@keyframes toastGir {
  from { opacity: 0; transform: translateY(-14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ---------- Modal ---------- */
.modal-fon {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 7, 13, 0.72);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--s4);
  animation: fonGir 0.2s ease;
}
@keyframes fonGir { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(400px, 100%);
  max-height: 86dvh; overflow-y: auto;
  animation: modalGir 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes modalGir {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ---------- Üst bar (oyun içi) ---------- */
.ust-bar {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  position: relative; z-index: 2;
}
.ust-bar .logo {
  font-weight: 800; font-size: 15px; letter-spacing: 1.5px;
  background: linear-gradient(180deg, var(--altin-1), var(--altin-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-transform: uppercase;
  white-space: nowrap;
}
.ust-bar .bosluk { flex: 1; }
.ikon-btn {
  width: 44px; height: 44px; min-height: 44px; min-width: 44px; padding: 0;
  border-radius: 50%;
  font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
}
.ikon-btn.kapali { opacity: 0.4; }

/* ---------- Watermark — her oyun ekranında ---------- */
.tolga-watermark {
  position: fixed;
  right: max(env(safe-area-inset-right), 12px);
  bottom: max(env(safe-area-inset-bottom), 10px);
  z-index: 250;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: rgba(232, 193, 90, 0.4);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  user-select: none;
}
.tolga-watermark::before { content: "◆ "; font-size: 8px; vertical-align: 2px; }

/* ---------- Dil menüsü — sabit sol-alt köşe (watermark sağ-altta) ---------- */
.dil-menu-kok {
  position: fixed;
  left: max(env(safe-area-inset-left), 12px);
  bottom: max(env(safe-area-inset-bottom), 10px);
  z-index: 260;
}
.dil-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--cizgi);
  background: linear-gradient(165deg, var(--panel-1), var(--panel-2));
  color: var(--soluk);
  font: inherit; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.dil-btn:hover { border-color: var(--altin-soft); color: var(--altin-1); }
.dil-bayrak { font-size: 15px; line-height: 1; }
.dil-liste {
  position: absolute;
  left: 0; bottom: calc(100% + 8px);
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px;
  border-radius: var(--r-orta);
  border: 1px solid var(--cizgi);
  background: linear-gradient(165deg, var(--panel-1), var(--panel-2));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  min-width: 150px;
  animation: modalGir 0.18s ease;
}
.dil-secim {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: none; border-radius: var(--r-kucuk);
  background: transparent;
  color: var(--murekkep);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
}
.dil-secim:hover { background: rgba(217, 176, 76, 0.1); }
.dil-secim.aktif {
  background: rgba(217, 176, 76, 0.14);
  color: var(--altin-1);
}

/* ---------- Konfeti tuvali ---------- */
.konfeti-tuval {
  position: fixed; inset: 0; z-index: 240;
  pointer-events: none;
}

/* ---------- Sıra göstergesi ---------- */
.sira-nokta {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--iyi);
  box-shadow: 0 0 10px var(--iyi);
  animation: nefes 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes nefes {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ---------- Yardımcılar ---------- */
.satir { display: flex; align-items: center; gap: var(--s3); }
.kolon { display: flex; flex-direction: column; gap: var(--s3); }
.gizli { display: none !important; }
.merkez { text-align: center; }
.tam-genis { width: 100%; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(217,176,76,0.22); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 420px) {
  .orta-kolon { padding-top: var(--s4); gap: var(--s4); }
  .panel { padding: var(--s4); }
}
