:root {
  --bg: #12102a;
  --bg2: #1c1940;
  --panel: #231f4d;
  --panel2: #2c2760;
  --cizgi: #3a3478;
  --yazi: #f1efff;
  --soluk: #a49fd3;
  --vurgu: #ffc83d;
  --vurgu2: #ff8a3d;
  --iyi: #4ade80;
  --kotu: #ff5d73;
  --mor: #7c5cff;
  --tas: #fff6e0;
  --tas-golge: #d9c79a;
  --kutu: 30px;
  font-family: 'Rubik', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg) radial-gradient(ellipse 120% 70% at top, #2a2263 0%, var(--bg) 70%) no-repeat fixed;
  color: var(--yazi);
  font-size: 15px;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
.gizli { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #3a3478; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* Arka planda süzülen harfler (giriş ve lobi) */
.arka-harfler { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.arka-harfler span { position: absolute; bottom: -120px; font-weight: 900; color: rgba(255, 255, 255, .045); animation: yuksel linear infinite; }
@keyframes yuksel { to { transform: translateY(-130vh) rotate(var(--don)); } }
body.oyunda .arka-harfler { display: none; }

.ekran { display: none; min-height: 100vh; position: relative; z-index: 1; }
.ekran.aktif { display: flex; }
#giris, #lobi { align-items: center; justify-content: center; padding: 20px; }
#oyun.aktif { flex-direction: column; height: 100vh; height: 100dvh; }

.kart {
  background: var(--panel);
  border: 1px solid var(--cizgi);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

/* ---------- Giriş ---------- */
.giris-kart { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; animation: gir .5s ease-out; }
.logo { margin: 0 0 4px; font-weight: 900; font-size: 34px; letter-spacing: 1px; text-align: center; }
.logo span {
  display: inline-block; width: 44px; height: 48px; line-height: 48px; margin: 0 1px;
  background: var(--tas); color: #2b2147; border-radius: 9px; box-shadow: 0 4px 0 var(--tas-golge), 0 8px 16px rgba(0,0,0,.3);
  font-size: 27px; cursor: pointer; user-select: none;
  animation: logoGir .6s cubic-bezier(.3, 1.6, .5, 1) backwards;
}
.logo span:nth-child(1) { --r: -4deg; animation-delay: .05s; }
.logo span:nth-child(2) { --r: 3deg; animation-delay: .12s; }
.logo span:nth-child(3) { --r: -3deg; animation-delay: .19s; }
.logo span:nth-child(4) { --r: 4deg; animation-delay: .26s; }
.logo span:nth-child(5) { --r: -2deg; animation-delay: .33s; }
.logo span:nth-child(6) { --r: 3deg; animation-delay: .40s; }
.logo span { transform: rotate(var(--r)); }
@keyframes logoGir { from { transform: translateY(-40px) rotate(0) scale(.4); opacity: 0; } }
.logo b { display: block; color: var(--vurgu); margin-top: 10px; letter-spacing: 10px; text-shadow: 0 0 24px rgba(255, 200, 61, .45); }
.alt { text-align: center; color: var(--soluk); margin: 0 0 6px; }
label { display: flex; flex-direction: column; gap: 6px; color: var(--soluk); font-size: 13px; }
input, select {
  background: var(--bg2); border: 1px solid var(--cizgi); border-radius: 10px;
  padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--vurgu); box-shadow: 0 0 0 3px rgba(255, 200, 61, .15); }
input[type=range], input[type=checkbox] { padding: 0; background: none; border: none; box-shadow: none; accent-color: var(--vurgu); }
input[type=checkbox] { width: 20px; height: 20px; cursor: pointer; }
input[type=range] { width: 100%; cursor: pointer; }
.kod-input { text-transform: uppercase; letter-spacing: 6px; text-align: center; font-weight: 700; flex: 1; min-width: 0; }

.btn {
  background: var(--panel2); border: 1px solid var(--cizgi); border-radius: 10px;
  padding: 12px 18px; cursor: pointer; font-weight: 500; transition: transform .08s, background .15s, filter .15s, opacity .15s;
}
.btn:hover:not(:disabled) { background: #38317a; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ana { background: linear-gradient(180deg, var(--vurgu), var(--vurgu2)); color: #2b1800; border: none; font-weight: 700; box-shadow: 0 4px 0 #c46a1c; }
.btn.ana:hover:not(:disabled) { filter: brightness(1.07); background: linear-gradient(180deg, var(--vurgu), var(--vurgu2)); }
.btn.ana:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #c46a1c; }
.btn.kucuk { padding: 8px 12px; font-size: 14px; }
.btn.hayalet { background: transparent; }
.btn.ikon { padding: 8px 12px; font-size: 18px; line-height: 1; }
.btn.genis { width: 100%; padding: 15px; font-size: 18px; }
.btn.cikis-btn { border-color: color-mix(in srgb, var(--kotu) 55%, var(--cizgi)); color: #ffb3bf; }
.btn.cikis-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--kotu) 22%, var(--panel2)); }
.satir { display: flex; gap: 10px; }
.satir.merkez { justify-content: center; flex-wrap: wrap; }
.ayrac { display: flex; align-items: center; gap: 10px; color: var(--soluk); font-size: 13px; }
.ayrac::before, .ayrac::after { content: ''; flex: 1; height: 1px; background: var(--cizgi); }
.hata { color: var(--kotu); min-height: 1.2em; margin: 0; text-align: center; }

/* ---------- Lobi ---------- */
.lobi-kart { width: min(920px, 100%); display: flex; flex-direction: column; gap: 18px; animation: gir .4s ease-out; }
.lobi-ust { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.etiket { color: var(--soluk); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; }
.buyuk-kod { font-size: 46px; font-weight: 900; letter-spacing: 12px; color: var(--vurgu); text-shadow: 0 0 30px rgba(255, 200, 61, .35); }
.lobi-govde { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lobi-govde > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--soluk); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.sayi-rozet { background: var(--panel2); color: var(--yazi); border-radius: 20px; padding: 1px 8px; font-size: 12px; letter-spacing: 0; }
.oyuncu-listesi { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.oyuncu-listesi li { display: flex; align-items: center; gap: 10px; background: var(--bg2); padding: 8px 12px; border-radius: 12px; }
.oyuncu-listesi li.yeni { animation: gir .3s ease-out; }
.oyuncu-listesi .ad { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 900; color: #140f2e; font-size: 14px; }
.nokta { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.rozet { margin-left: auto; font-size: 11px; color: var(--vurgu); border: 1px solid var(--vurgu); border-radius: 20px; padding: 2px 8px; white-space: nowrap; }
.cevrimdisi { opacity: .45; }
.ayar-satir { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zorluk-secim { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.zorluk-secim button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; cursor: pointer;
  background: var(--bg2); border: 2px solid var(--cizgi); border-radius: 12px; font-size: 13px; font-weight: 500;
  transition: border-color .15s, background .15s, transform .1s;
}
.zorluk-secim button b { font-size: 20px; }
.zorluk-secim button:hover:not(:disabled) { transform: translateY(-2px); }
.zorluk-secim button:disabled { cursor: default; }
.zorluk-secim button:disabled:not(.secili) { opacity: .45; }
.zorluk-secim button.secili { border-color: var(--vurgu); background: rgba(255, 200, 61, .12); color: var(--vurgu); font-weight: 700; }
.zorluk-secim[data-secili=zor] button.secili { border-color: #ff922b; background: rgba(255, 146, 43, .14); color: #ffc078; }
.zorluk-secim[data-secili=uzman] button.secili { border-color: var(--kotu); background: rgba(255, 93, 115, .14); color: #ffc9d1; }
.zorluk-secim[data-secili=kolay] button.secili { border-color: var(--iyi); background: rgba(74, 222, 128, .12); color: var(--iyi); }
.zorluk-aciklama { margin: -4px 0 0; font-size: 12.5px; color: var(--soluk); min-height: 2.6em; }
.rekor-satir { margin-top: -6px; font-size: 13px; font-weight: 700; color: var(--vurgu); background: rgba(255, 200, 61, .08); border: 1px solid rgba(255, 200, 61, .3); border-radius: 10px; padding: 6px 10px; }
.lobi-dugmeler { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* Harf puanı tablosu (nasıl oynanır) */
.harf-tablosu { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; background: var(--bg2); border-radius: 12px; padding: 11px 14px; }
.harf-tablosu div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: 1.5px; font-weight: 700; color: var(--yazi); }
.harf-tablosu b {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; letter-spacing: 0; font-size: 12px;
  background: linear-gradient(180deg, #fffcf3, var(--tas)); color: #2b2147; box-shadow: 0 2px 0 var(--tas-golge);
}
.harf-tablosu .nadir b { color: #c0541f; }
.can-kazandi { margin-top: 4px; color: var(--kotu); font-weight: 700; }
.nasil { background: var(--bg2); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: #d6d2f5; }
.nasil summary { cursor: pointer; font-weight: 700; color: var(--yazi); }
.nasil ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.bekle { text-align: center; color: var(--soluk); margin: -6px 0 0; }
.lobi-sohbet { height: 260px; display: flex; background: var(--bg2); border-radius: 14px; padding: 12px 14px; }

/* ---------- Oyun üst bar ---------- */
.ust-bar {
  display: flex; align-items: center; gap: 18px; padding: 10px 18px;
  background: rgba(20, 17, 50, .85); border-bottom: 1px solid var(--cizgi); position: relative; z-index: 2;
}
.seviye-kutu { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.tur-rozet { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 12px; white-space: nowrap; }
.tur-rozet span { padding: 2px 9px; border-radius: 20px; background: var(--bg2); border: 1px solid var(--cizgi); }
.tur-rozet .tr { font-weight: 700; }
.tur-rozet[data-tur=altin] .tr { background: rgba(255, 200, 61, .18); border-color: var(--vurgu); color: var(--vurgu); }
.tur-rozet[data-tur=hizli] .tr { background: rgba(77, 171, 247, .18); border-color: #4dabf7; color: #a5d8ff; }
.tur-rozet[data-tur=patron] .tr { background: rgba(255, 93, 115, .2); border-color: var(--kotu); color: #ffc9d1; animation: nabizKucuk 1s ease-in-out infinite alternate; }
.seviye-kutu b { font-size: 28px; font-weight: 900; color: var(--vurgu); line-height: 1; text-shadow: 0 0 18px rgba(255, 200, 61, .4); }
.ilerleme { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ilerleme-yazi { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilerleme-yazi span { font-weight: 700; }
.ilerleme-yazi small { color: var(--soluk); margin-left: 4px; }
.ilerleme-bar { position: relative; height: 12px; background: var(--bg2); border-radius: 8px; margin-right: 8px; }
#ilerlemeDolgu {
  height: 100%; width: 0; border-radius: 8px;
  background: linear-gradient(90deg, #7c5cff, #a78bfa);
  box-shadow: 0 0 12px rgba(124, 92, 255, .6);
  transition: width .45s cubic-bezier(.3, 1.3, .5, 1), background .3s;
}
#ilerlemeDolgu.gecti { background: linear-gradient(90deg, #22c55e, var(--iyi)); box-shadow: 0 0 14px rgba(74, 222, 128, .6); }
.yildiz-isaret {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  font-size: 18px; line-height: 1; color: #4b4580; text-shadow: 0 0 0 transparent;
  transition: color .3s, transform .3s, text-shadow .3s; pointer-events: auto; cursor: default;
}
.yildiz-isaret small { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 1px; font-size: 9.5px; font-weight: 700; color: var(--soluk); text-shadow: none; letter-spacing: 0; }
.yildiz-isaret.dolu small { color: var(--vurgu); }
.takim-puan { font-weight: 700; }
.takim-puan #takimPuan { display: inline-block; color: var(--vurgu); font-size: 16px; }
#takimPuan.zipla { animation: puanZipla .45s ease-out; }
@keyframes puanZipla { 0% { transform: scale(1.5); color: #fff; } 100% { transform: none; } }
/* Patron seviyesi: puan hedefi patronun canı olarak gösterilir */
.patron-can { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; margin-right: 4px; }
.patron-can .pc-ad { font-size: 12px; font-weight: 900; letter-spacing: 1px; color: #ffc9d1; }
.patron-can .pc-hat { position: relative; width: clamp(80px, 14vw, 180px); height: 10px; border-radius: 6px; background: rgba(255, 93, 115, .15); border: 1px solid rgba(255, 93, 115, .55); overflow: hidden; }
#patronDolgu { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #c92a4a, #ff5d73 60%, #ff8fa0); box-shadow: 0 0 10px rgba(255, 93, 115, .7); transition: width .5s cubic-bezier(.3, 1.3, .5, 1); }
.patron-can b { font-size: 13px; color: #ff8fa0; font-variant-numeric: tabular-nums; }
.patron-can.vurus { animation: patronSars .35s ease-out; }
.patron-can.vurus #patronDolgu { animation: patronBeyaz .35s ease-out; }
@keyframes patronSars { 20% { transform: translateX(-4px) rotate(-1deg); } 45% { transform: translateX(4px) rotate(1deg); } 70% { transform: translateX(-2px); } }
@keyframes patronBeyaz { 0% { filter: brightness(2.2); } }
.patron-can.yenildi .pc-hat { border-color: rgba(74, 222, 128, .6); background: rgba(74, 222, 128, .12); }
.patron-can.yenildi b { color: var(--iyi); letter-spacing: 1px; }
.patron-can.yenildi .pc-ad { color: var(--iyi); text-decoration: line-through; text-decoration-thickness: 2px; }
.ucan-yazi.hasar { font-size: 20px; color: #ff8fa0; }

/* Son hamle rozeti: yalnızca son 10 saniyede görünür */
.son-hamle-rozet {
  display: none; padding: 5px 11px; border-radius: 20px; white-space: nowrap; font-size: 12px; font-weight: 900; letter-spacing: .5px;
  background: linear-gradient(90deg, #ff3d6b, #ff8a3d); color: #fff; box-shadow: 0 0 18px rgba(255, 70, 100, .6);
  animation: nabizKucuk .45s ease-in-out infinite alternate;
}
body.son-hamle .son-hamle-rozet { display: block; }
body.son-hamle .sahne { --cerceve: linear-gradient(135deg, #ffb3bd, #ff3d6b 30%, #ff8a3d 55%, #c92a4a 75%, #ffb3bd); }
body.son-hamle .tahmin-form input { border-color: #ff6b8a; }

/* Süre eklendi (hazine) */
.sure.uzadi { animation: sureUzadi .8s ease-out; }
.sure.uzadi .halka { stroke: var(--iyi); }
@keyframes sureUzadi { 0% { transform: scale(1.35); filter: drop-shadow(0 0 14px rgba(74, 222, 128, .9)); } 100% { transform: none; } }
.ucan-puan {
  position: fixed; z-index: 31; pointer-events: none; transform: translate(-50%, -50%);
  font-weight: 900; font-size: 17px; white-space: nowrap; text-shadow: 0 2px 8px rgba(0, 0, 0, .7), 0 0 12px currentColor;
}
.ucan-puan.benim { font-size: 24px; }
.ucan-puan.sure-ek { font-size: 20px; }
.btn.ikon.kapali { opacity: .45; position: relative; }
.btn.ikon.kapali::after { content: ''; position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; background: currentColor; transform: rotate(-35deg); border-radius: 2px; }
.yildiz-isaret.son { transform: translate(-80%, -50%); }
.yildiz-isaret.dolu { color: var(--vurgu); text-shadow: 0 0 10px rgba(255, 200, 61, .9); transform: translate(-50%, -50%) scale(1.25); }
.yildiz-isaret.son.dolu { transform: translate(-80%, -50%) scale(1.25); }
.canlar { font-size: 22px; letter-spacing: 2px; color: var(--kotu); white-space: nowrap; }
.canlar span { display: inline-block; text-shadow: 0 0 10px rgba(255, 93, 115, .5); }
.canlar .bos { color: #4b4580; text-shadow: none; }
.canlar .kayip { animation: kalpKir 1s ease-out; }
.canlar .kazanc { animation: kalpKazan 1.1s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes kalpKazan { 0% { transform: scale(0); } 50% { transform: scale(1.8); text-shadow: 0 0 22px var(--kotu); } 100% { transform: none; } }
@keyframes kalpKir { 0% { transform: scale(1.6); color: var(--kotu); } 40% { transform: scale(.7) rotate(-20deg); } 100% { transform: none; } }
.sure { position: relative; width: 54px; height: 54px; flex: none; }
.sure svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.halka-arka { fill: none; stroke: var(--bg2); stroke-width: 4; }
.halka { fill: none; stroke: var(--vurgu); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 119.4; transition: stroke-dashoffset .25s linear, stroke .3s; }
.sure.az .halka { stroke: var(--kotu); }
.sure.cok-az { animation: nabizKucuk .5s ease-in-out infinite alternate; }
.sure b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; font-weight: 700; }
.sure b.zipla { animation: zipla .35s ease-out; }
@keyframes zipla { 0% { transform: scale(1.5); color: var(--kotu); } 100% { transform: none; } }
@keyframes nabizKucuk { to { transform: scale(1.08); } }

/* Son 10 saniye: kenarlarda kırmızı nabız */
body.son-saniye::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 5;
  box-shadow: inset 0 0 110px rgba(255, 60, 90, .45);
  animation: kenarNabiz 1s ease-in-out infinite;
}
@keyframes kenarNabiz { 50% { box-shadow: inset 0 0 50px rgba(255, 60, 90, .2); } }

/* ---------- Oyun gövdesi ---------- */
.oyun-govde { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.sol { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 18px; min-height: 0; overflow: auto; }
.sag { border-left: 1px solid var(--cizgi); display: flex; flex-direction: column; min-height: 0; background: rgba(20, 17, 50, .5); }
.panel { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.skor-panel { flex: 0 1 auto; max-height: 34%; }
.akis-panel { flex: 1 1 0; min-height: 90px; border-top: 1px solid var(--cizgi); }
.sohbet-yeri { flex: 1.35 1 0; min-height: 160px; display: flex; border-top: 1px solid var(--cizgi); padding: 12px 16px; }

/* ---------- Kelime tahtası ---------- */
.tahta {
  --tahta-vurgu: 124, 92, 255;
  position: relative; flex: 1 1 0; min-height: 170px; overflow: auto;
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center; align-items: flex-start;
  gap: 16px 18px; padding: 18px 20px;
  border-radius: 22px; border: 1px solid rgba(var(--tahta-vurgu), .35);
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(var(--tahta-vurgu), .16), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(var(--tahta-vurgu), .1), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(180deg, #1d1849, #141036);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), inset 0 0 70px rgba(0, 0, 0, .45), 0 12px 32px rgba(0, 0, 0, .3);
  transition: border-color .4s, box-shadow .4s;
}
.tahta[data-tur=altin] { --tahta-vurgu: 255, 200, 61; box-shadow: inset 0 0 70px rgba(0, 0, 0, .45), 0 0 34px rgba(255, 200, 61, .18); }
.tahta[data-tur=hizli] { --tahta-vurgu: 77, 171, 247; box-shadow: inset 0 0 70px rgba(0, 0, 0, .45), 0 0 34px rgba(77, 171, 247, .18); }
.tahta[data-tur=patron] { --tahta-vurgu: 255, 93, 115; box-shadow: inset 0 0 70px rgba(0, 0, 0, .45), 0 0 40px rgba(255, 93, 115, .22); }

/* Uzunluğa göre grup kartı */
.grup {
  position: relative; display: flex; flex-direction: column; gap: 0;
  min-width: 108px; padding: 8px 11px 11px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: border-color .3s, box-shadow .3s;
}
.grup-baslik { display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 18px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--soluk); white-space: nowrap; }
.grup-baslik .say { font-variant-numeric: tabular-nums; color: #c9c4f0; background: rgba(255, 255, 255, .07); border-radius: 10px; padding: 1px 7px; letter-spacing: .5px; }
.grup-cizgi { height: 3px; margin: 6px 0 10px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; position: relative; }
.grup-cizgi::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--oran, 0)); background: linear-gradient(90deg, #7c5cff, #c4b5fd); border-radius: 3px; transition: transform .5s cubic-bezier(.3, 1.3, .5, 1); }
.grup-govde { display: flex; gap: 16px; }
.grup.buyuk { border-color: rgba(255, 200, 61, .4); background: linear-gradient(180deg, rgba(255, 200, 61, .09), rgba(255, 200, 61, .02)); box-shadow: 0 6px 18px rgba(0, 0, 0, .25), 0 0 22px rgba(255, 200, 61, .12); }
.grup.buyuk .grup-baslik .ad { color: var(--vurgu); }
.grup.buyuk .grup-cizgi::after { background: linear-gradient(90deg, #ff8a3d, #ffc83d); }
.grup.tamam { border-color: rgba(74, 222, 128, .45); }
.grup.tamam .grup-baslik .say { background: rgba(74, 222, 128, .2); color: var(--iyi); }
.grup.tamam .grup-cizgi::after { background: linear-gradient(90deg, #22c55e, var(--iyi)); }
.grup.yeni-tamam { animation: grupTamam .9s ease-out; }
@keyframes grupTamam { 0% { box-shadow: 0 0 0 3px var(--iyi), 0 0 40px rgba(74, 222, 128, .6); transform: scale(1.03); } 100% { transform: none; } }

.sutun { display: flex; flex-direction: column; gap: 7px; }
.slot { display: flex; gap: 3px; position: relative; perspective: 400px; }
.slot .k {
  width: var(--kutu); height: var(--kutu); border-radius: calc(var(--kutu) * .22);
  background: linear-gradient(180deg, rgba(8, 6, 26, .55), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .05);
  display: grid; place-items: center; font-weight: 900; font-size: calc(var(--kutu) * .56);
  text-transform: uppercase; position: relative;
}
.slot.bulundu .k {
  background: linear-gradient(180deg, color-mix(in srgb, var(--renk) 72%, #fff) 0%, var(--renk) 55%, color-mix(in srgb, var(--renk) 80%, #000) 100%);
  border-color: color-mix(in srgb, var(--renk) 60%, #fff); color: #140f2e;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 3px 10px color-mix(in srgb, var(--renk) 35%, transparent);
}
.slot.bulundu .k::after { content: ''; position: absolute; left: 12%; right: 12%; top: 7%; height: 28%; border-radius: 40%; background: linear-gradient(180deg, rgba(255, 255, 255, .45), transparent); pointer-events: none; }
.slot.bulundu.benim .k { border-color: #fff; }
.slot.kacti .k { background: rgba(255, 93, 115, .07); border-color: rgba(255, 93, 115, .5); color: #ffb3bd; box-shadow: none; }
.slot.buyuk .k { border-color: rgba(255, 200, 61, .45); }
.slot.buyuk:not(.bulundu):not(.kacti) .k { background: linear-gradient(180deg, rgba(40, 28, 8, .55), rgba(255, 200, 61, .07)); }
.slot .k.ipucu { color: var(--vurgu); background: rgba(255, 200, 61, .12); border-color: rgba(255, 200, 61, .5); }
.slot .k.ipucu.yeni { animation: ipucuAc .5s ease-out; }

/* Hazine kelime: altın parıltılı kutular + anahtar rozeti */
.slot.hazine:not(.bulundu):not(.kacti) .k {
  border-color: rgba(255, 200, 61, .7);
  background: linear-gradient(180deg, rgba(70, 46, 0, .55), rgba(255, 200, 61, .16));
  animation: hazineParla 2.4s ease-in-out infinite;
  animation-delay: calc(var(--j) * 110ms - var(--faz, 0ms));
}
@keyframes hazineParla {
  0%, 100% { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45), 0 0 6px rgba(255, 200, 61, .15); }
  50% { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45), 0 0 16px rgba(255, 200, 61, .6); border-color: #ffe28a; }
}
.slot .hz-rozet {
  position: absolute; z-index: 2; left: calc(var(--kutu) * -.3); top: calc(var(--kutu) * -.34);
  font-size: max(13px, calc(var(--kutu) * .42)); line-height: 1; pointer-events: auto; cursor: help;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)) drop-shadow(0 0 6px rgba(255, 200, 61, .6));
  animation: anahtar 2.4s ease-in-out infinite; animation-delay: calc(0ms - var(--faz, 0ms));
}
@keyframes anahtar { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(10deg) scale(1.12); } }
.slot.hazine.bulundu .k { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 0 0 2px #ffc83d, 0 0 14px rgba(255, 200, 61, .55); }
.slot.hazine.bulundu .hz-rozet, .slot.hazine.kacti .hz-rozet { animation: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
@keyframes ipucuAc { from { transform: scale(1.5); background: var(--vurgu); color: #2b1800; } }
.slot.yeni .k { animation: harfAc .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--j) * 45ms); }
@keyframes harfAc { 0% { transform: rotateX(90deg) scale(.6); filter: brightness(1.8); } 100% { transform: none; } }

.bonus-satir { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 0; }
.bonus-satir:empty { display: none; }
.bonus-satir .b {
  font-size: 12px; padding: 3px 10px; border-radius: 20px; background: rgba(255, 200, 61, .12);
  color: var(--vurgu); text-transform: uppercase; letter-spacing: .5px; border-left: 3px solid var(--renk);
}
.bonus-satir .b.yeni { animation: bonusGir .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes bonusGir { from { transform: scale(.3); opacity: 0; background: var(--vurgu); color: #2b1800; } }

/* ---------- Harf sahnesi ---------- */
/* Süslü harf paneli: altın çerçeve, köşe süsleri, yıldızlı zemin, ahşap raf */
.sahne {
  --cerceve: linear-gradient(135deg, #ffe28a, #c9892a 30%, #ffd25e 50%, #a8701f 72%, #ffe28a);
  --golge: inset 0 0 0 1px rgba(255, 226, 138, .12), inset 0 2px 30px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .4), 0 0 40px rgba(255, 190, 60, .08);
  container-type: inline-size;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px clamp(14px, 2.4vw, 34px) 14px; flex: none; margin-top: 8px;
  border: 3px solid transparent; border-radius: 26px;
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1px 1px at 28% 70%, rgba(255, 255, 255, .4), transparent 60%),
    radial-gradient(1.5px 1.5px at 47% 14%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(1px 1px at 66% 62%, rgba(255, 255, 255, .4), transparent 60%),
    radial-gradient(1.5px 1.5px at 84% 26%, rgba(255, 255, 255, .45), transparent 60%),
    radial-gradient(1px 1px at 93% 78%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(ellipse 75% 110% at 50% 115%, rgba(124, 92, 255, .4), transparent 70%),
    radial-gradient(ellipse 60% 60% at 50% -20%, rgba(255, 200, 61, .12), transparent 70%),
    linear-gradient(180deg, #2a2366, #191440) padding-box,
    var(--cerceve) border-box;
  box-shadow: var(--golge);
  transition: opacity .3s, filter .3s;
}
.sahne.bekliyor { opacity: .65; filter: saturate(.6); }
.sahne.flas-dogru { animation: sahneDogru .6s ease-out; }
.sahne.flas-bonus { animation: sahneBonus .6s ease-out; }
@keyframes sahneDogru { 0% { box-shadow: var(--golge), 0 0 0 4px var(--iyi), 0 0 60px rgba(74, 222, 128, .6); } 100% { box-shadow: var(--golge); } }
@keyframes sahneBonus { 0% { box-shadow: var(--golge), 0 0 0 4px var(--vurgu), 0 0 60px rgba(255, 200, 61, .55); } 100% { box-shadow: var(--golge); } }

/* Köşe süsleri */
.sahne .kose { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.sahne .kose::before { content: '✦'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; color: #ffd25e; text-shadow: 0 0 10px rgba(255, 200, 61, .9); }
.sahne .kose.k1 { top: 6px; left: 8px; }
.sahne .kose.k2 { top: 6px; right: 8px; }
.sahne .kose.k3 { bottom: 6px; left: 8px; }
.sahne .kose.k4 { bottom: 6px; right: 8px; }
.sahne .kose.k1::after, .sahne .kose.k2::after { content: ''; position: absolute; top: 10px; width: 60px; height: 1px; background: linear-gradient(90deg, rgba(255, 210, 94, .6), transparent); }
.sahne .kose.k1::after { left: 22px; }
.sahne .kose.k2::after { right: 22px; transform: scaleX(-1); }

/* Üst kenara oturan başlık şeridi */
.sahne-baslik { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); pointer-events: none; }
.sahne-baslik span {
  display: block; padding: 4px 18px; border-radius: 20px; white-space: nowrap;
  font-size: 12px; font-weight: 900; letter-spacing: 3px; color: #3a2500;
  background: linear-gradient(180deg, #ffe28a, #e0a53a); box-shadow: 0 3px 0 #9c6a1c, 0 6px 16px rgba(0, 0, 0, .4);
}

/* Taşların durduğu ahşap raf */
.raf { position: relative; width: 100%; display: flex; justify-content: center; padding-bottom: 14px; }
.raf::after {
  content: ''; position: absolute; left: 3%; right: 3%; bottom: 0; height: 18px; border-radius: 8px;
  background: linear-gradient(180deg, #b77a3e 0%, #8a5527 45%, #5e3615 100%);
  box-shadow: inset 0 2px 0 rgba(255, 220, 170, .35), 0 8px 18px rgba(0, 0, 0, .45);
}
.raf::before {
  content: ''; position: absolute; left: 5%; right: 5%; bottom: 12px; height: 26px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 200, 61, .18), transparent 70%);
}
.raf .harfler { position: relative; z-index: 1; }

/* Alttaki yazma alanı */
.yazma-alani { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.yazma-ust { position: relative; width: min(640px, 100%); min-height: 22px; display: flex; justify-content: center; }
.tahmin-puan {
  position: absolute; left: 0; bottom: 2px; padding: 3px 11px; border-radius: 20px; font-size: 13px; font-weight: 700;
  background: rgba(74, 222, 128, .14); border: 1px solid rgba(74, 222, 128, .45); color: var(--iyi);
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; pointer-events: none; white-space: nowrap;
}
.tahmin-puan.goster { opacity: 1; transform: none; }
.tahmin-puan.altin { background: rgba(255, 200, 61, .16); border-color: var(--vurgu); color: var(--vurgu); }
.tahmin-puan.hamle { background: rgba(255, 93, 115, .18); border-color: #ff6b8a; color: #ffc9d1; }
.geri-bildirim { flex: 1; text-align: center; font-weight: 700; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.geri-bildirim.goster { opacity: 1; transform: none; }
.geri-bildirim.iyi { color: var(--iyi); }
.geri-bildirim.kotu { color: var(--kotu); }
.geri-bildirim.notr { color: var(--soluk); }
.geri-bildirim.altin { color: var(--vurgu); }
.seri-rozet {
  position: absolute; right: 0; bottom: 2px; z-index: 2; padding: 4px 12px; border-radius: 20px; font-weight: 900; font-size: 14px;
  background: linear-gradient(90deg, #ff6b3d, #ffc83d); color: #2b1000; opacity: 0; pointer-events: none;
  box-shadow: 0 0 calc(var(--guc, 1) * 6px) rgba(255, 140, 50, .8);
}
.seri-rozet.goster { animation: seriGir 2s ease-out forwards; }
.seri-rozet.ates { background: linear-gradient(90deg, #ff2d55, #ff6b3d, #ffc83d); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); font-size: 16px; }
@keyframes seriGir { 0% { opacity: 0; transform: scale(.4) rotate(-10deg); } 12% { opacity: 1; transform: scale(1.2) rotate(3deg); } 22% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }

.tahmin-form { display: flex; gap: 10px; width: min(640px, 100%); align-items: stretch; }
.tahmin-form input {
  flex: 1; min-width: 0; font-size: 26px; font-weight: 700; text-align: center; letter-spacing: 4px; text-transform: uppercase;
  background: rgba(10, 8, 30, .55); border: 2px solid #3d3690; border-radius: 14px; padding: 9px 14px;
}
.tahmin-form input::placeholder { text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 400; color: #6f69a8; }
.tahmin-form input.gecersiz { border-color: var(--kotu); color: #ffb3bd; box-shadow: 0 0 0 3px rgba(255, 93, 115, .15); }
.tahmin-form input.zaten { border-color: #b08a2e; color: #e8cf8a; box-shadow: none; }
.tahmin-form input.hazir { border-color: var(--iyi); box-shadow: 0 0 0 3px rgba(74, 222, 128, .15), 0 0 20px rgba(74, 222, 128, .2); }
.tahmin-form .btn.ana { padding: 0 22px; }
.tahmin-form.salla { animation: salla .4s ease-out; }
.tahmin-form.salla-hafif { animation: sallaHafif .3s ease-out; }
@keyframes salla { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }
@keyframes sallaHafif { 33% { transform: translateX(-4px); } 66% { transform: translateX(4px); } }

/* Harf taşları: sahnenin genişliğine ve harf sayısına göre büyür */
.harfler {
  --adet: 7;
  --bosluk: clamp(6px, 1.6cqi, 14px);
  display: flex; gap: var(--bosluk); justify-content: center; flex-wrap: nowrap;
  width: 100%; padding: 4px 0 0;
}
.tas {
  /* Alt sınır küçük tutulur: mobilde 11 taş (patron + sahte harf) de sığsın */
  --b: clamp(24px, min(calc((100cqi - var(--kenar, 40px) - (var(--adet) - 1) * var(--bosluk)) / var(--adet)), 13vh), 104px);
  width: var(--b); height: calc(var(--b) * 1.1); flex: none;
  position: relative; border: none; padding: 0; border-radius: calc(var(--b) * .18);
  background: linear-gradient(180deg, #fffcf3 0%, var(--tas) 60%, #f6e9c8 100%); color: #2b2147;
  box-shadow: 0 calc(var(--b) * .085) 0 var(--tas-golge), 0 calc(var(--b) * .18) calc(var(--b) * .3) rgba(0, 0, 0, .32);
  font-size: calc(var(--b) * .56); font-weight: 900; display: grid; place-items: center;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .15s, opacity .2s, box-shadow .15s, filter .2s, background .3s;
}
.tas:hover:not(:disabled) { transform: translateY(-5px); filter: brightness(1.04); }
.tas:active:not(:disabled) { transform: translateY(2px); }
.tas:disabled { cursor: default; }
.tas.kullanildi { opacity: .28; transform: translateY(5px) scale(.92); box-shadow: 0 2px 0 var(--tas-golge); }
.tas.gizli-harf {
  background: linear-gradient(180deg, #a48cff, #7c5cff); color: #fff;
  box-shadow: 0 calc(var(--b) * .085) 0 #5638c9, 0 0 26px rgba(124, 92, 255, .65);
  animation: gizliNabiz 1.6s ease-in-out infinite;
}
@keyframes gizliNabiz { 50% { box-shadow: 0 calc(var(--b) * .085) 0 #5638c9, 0 0 40px rgba(124, 92, 255, .95); } }
.tas.acik-gizli { outline: 3px solid rgba(124, 92, 255, .75); outline-offset: 3px; }
.tas.acildi { animation: tasAc .7s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes tasAc { 0% { transform: rotateY(90deg) scale(.7); } 100% { transform: none; } }
.tas.sahte { background: #4b2a3a; color: #ff8fa0; box-shadow: 0 calc(var(--b) * .085) 0 #2d1622; cursor: not-allowed; opacity: .85; }
.tas.sahte::after { content: ''; position: absolute; left: 12%; right: 12%; top: 50%; height: 4px; background: var(--kotu); border-radius: 4px; transform: rotate(-22deg); box-shadow: 0 0 8px var(--kotu); }
.tas .h { line-height: 1; }
.tas .d {
  position: absolute; right: calc(var(--b) * .09); bottom: calc(var(--b) * .07);
  font-size: calc(var(--b) * .2); font-weight: 700; line-height: 1; color: #8a7a55; font-variant-numeric: tabular-nums;
}
.tas.nadir .d { color: #c0541f; }
.tas .x:empty { display: none; }
.tas .x {
  position: absolute; top: calc(var(--b) * -.14); left: calc(var(--b) * -.1); z-index: 2;
  padding: calc(var(--b) * .03) calc(var(--b) * .08); border-radius: 20px;
  font-size: calc(var(--b) * .19); font-weight: 900; line-height: 1.15; letter-spacing: 0;
  color: #fff; background: linear-gradient(180deg, #4dabf7, #1c7ed6); box-shadow: 0 2px 0 #1864ab, 0 0 12px rgba(77, 171, 247, .7);
}
.tas.carpan2 { box-shadow: 0 calc(var(--b) * .085) 0 var(--tas-golge), 0 0 0 3px #4dabf7, 0 0 22px rgba(77, 171, 247, .55), 0 calc(var(--b) * .18) calc(var(--b) * .3) rgba(0, 0, 0, .32); }
.tas.carpan3 { box-shadow: 0 calc(var(--b) * .085) 0 var(--tas-golge), 0 0 0 3px #f06595, 0 0 26px rgba(240, 101, 149, .65), 0 calc(var(--b) * .18) calc(var(--b) * .3) rgba(0, 0, 0, .32); }
.tas.carpan3 .x { background: linear-gradient(180deg, #f783ac, #d6336c); box-shadow: 0 2px 0 #a61e4d, 0 0 14px rgba(240, 101, 149, .8); }
.tas.gizli-harf .d { color: rgba(255, 255, 255, .7); }
.tas.sahte .d { color: #ff8fa0; }
.tas.sahte .x { display: none; }
.tas.sallan { animation: tasSallan .4s ease-out; }
@keyframes tasSallan { 25% { transform: rotate(-9deg); } 50% { transform: rotate(7deg); } 75% { transform: rotate(-4deg); } }

.sahne-alt { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 10px; min-height: 34px; }
.karistir-gosterge { display: flex; align-items: center; gap: 8px; color: var(--soluk); font-size: 13px; }
.karistir-gosterge .ikon-donen { display: inline-block; font-size: 16px; animation: don 3s linear infinite; }
.karistir-gosterge.durdu .ikon-donen { animation-play-state: paused; opacity: .5; }
.karistir-gosterge.durdu small::after { content: ' · duraklatıldı'; }
@keyframes don { to { transform: rotate(360deg); } }
.karistir-bar { width: 110px; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
#karistirDolgu { height: 100%; width: 100%; background: linear-gradient(90deg, #7c5cff, #c4b5fd); transform-origin: left; transform: scaleX(0); transition: transform .1s linear; }
.ipucu-btn { display: flex; align-items: center; gap: 6px; }
.ipucu-btn .say { background: var(--vurgu); color: #2b1800; border-radius: 20px; padding: 0 7px; font-weight: 700; font-size: 12px; }
.ipucu-btn .bedel { color: var(--soluk); font-size: 11px; }

/* ---------- Skor ---------- */
.skor { margin: 0; padding: 2px; list-style: none; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; overflow-x: hidden; min-height: 0; }
.skor li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: var(--bg2); font-size: 14px; }
.skor li.ben { outline: 1px solid var(--vurgu); }
.skor li.nabiz { animation: skorNabiz .7s ease-out; }
@keyframes skorNabiz { 0% { background: rgba(74, 222, 128, .4); box-shadow: 0 0 14px rgba(74, 222, 128, .45); } 100% { background: var(--bg2); box-shadow: none; } }
.skor .sira { width: 20px; color: var(--soluk); font-size: 12px; text-align: center; }
.skor .ad { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skor .kelime-say { font-size: 11px; color: var(--soluk); }
.skor .p { font-weight: 700; min-width: 32px; text-align: right; }
.skor .sp { font-size: 11px; color: var(--iyi); min-width: 34px; text-align: right; }
.skor .sp.eksi { color: var(--kotu); }

/* ---------- Oyun akışı ---------- */
.akis { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; flex: 1; min-height: 0; }
.akis li { line-height: 1.35; word-wrap: break-word; }
.akis li.yeni { animation: gir .25s ease-out; }
.akis .sistem { color: var(--soluk); font-style: italic; }
.akis .sistem.hedef { color: var(--iyi); font-style: normal; font-weight: 500; }
.akis .sistem.hazine { color: var(--vurgu); font-style: normal; font-weight: 500; }
.akis .sistem.hepsi { color: var(--vurgu); font-style: normal; font-weight: 700; }
.akis .hazine:not(.sistem) { background: linear-gradient(90deg, rgba(255, 200, 61, .14), transparent); border-radius: 6px; padding: 2px 6px; }
.akis .ipucu { color: #e8cf8a; font-size: 13px; }
.akis .w { font-weight: 700; text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--renk); }
.akis .pt { color: var(--iyi); font-size: 12px; }
.akis .bonus .pt { color: var(--vurgu); }
.akis .buyuk { background: rgba(255, 200, 61, .12); border-radius: 6px; padding: 2px 6px; }

/* ---------- Sohbet ---------- */
.sohbet-panel { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; width: 100%; }
.sohbet-liste { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0 2px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sohbet-liste:empty::before { content: 'Henüz mesaj yok. Selam ver! 👋'; color: var(--soluk); font-size: 13px; margin: auto; }
.sohbet-liste li { background: rgba(255, 255, 255, .04); border-radius: 10px; padding: 6px 10px; max-width: 92%; align-self: flex-start; }
.sohbet-liste li.yeni { animation: gir .25s ease-out; }
.sohbet-liste li.ben { background: rgba(124, 92, 255, .2); align-self: flex-end; }
.sohbet-liste li.sistem { background: none; padding: 0 4px; color: var(--soluk); font-size: 12.5px; font-style: italic; align-self: center; max-width: 100%; }
.sohbet-liste .ust { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.sohbet-liste time { color: #6f69a8; font-size: 11px; margin-left: auto; }
.sohbet-liste .m { word-wrap: break-word; overflow-wrap: anywhere; line-height: 1.35; }
.tepkiler { display: flex; gap: 2px; justify-content: space-between; }
.tepki-btn { background: none; border: none; font-size: 19px; cursor: pointer; padding: 3px 4px; border-radius: 8px; transition: transform .12s, background .12s; }
.tepki-btn:hover { background: rgba(255, 255, 255, .08); transform: scale(1.2); }
.tepki-btn:active { transform: scale(.9); }
.sohbet-form { display: flex; gap: 8px; }
.sohbet-form input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px; }
.sohbet-form .btn { padding: 0 14px; box-shadow: none; }

/* ---------- Katmanlar ---------- */
.katman { position: fixed; inset: 0; background: rgba(10, 8, 30, .62); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 10; padding: 20px; overflow: auto; }
.sonuc-kart { width: min(520px, 100%); text-align: center; display: flex; flex-direction: column; gap: 12px; animation: gir .35s ease-out; }
@keyframes gir { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.sonuc-baslik { font-size: 30px; font-weight: 900; }
.sonuc-baslik.iyi { color: var(--iyi); text-shadow: 0 0 24px rgba(74, 222, 128, .35); }
.sonuc-baslik.kotu { color: var(--kotu); }
.sonuc-yildiz { font-size: 46px; letter-spacing: 8px; color: var(--vurgu); line-height: 1; }
.sonuc-yildiz span { display: inline-block; text-shadow: 0 0 18px rgba(255, 200, 61, .7); }
.sonuc-yildiz .bos { color: #4b4580; text-shadow: none; }
.sonuc-yildiz .pop { animation: yildizPop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes yildizPop { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: none; } }
.sonuc-detay { color: var(--soluk); display: flex; flex-direction: column; gap: 4px; }
.sonuc-detay b { color: var(--yazi); text-transform: uppercase; }
.sonuc-detay .tohum b { color: var(--vurgu); letter-spacing: 1px; }
.sonuc-detay .takim-sonuc { font-size: 17px; color: var(--yazi); }
.sonuc-detay .takim-sonuc b { color: var(--vurgu); font-size: 22px; }
.sonuc-ben { background: rgba(124, 92, 255, .16); border: 1px solid rgba(124, 92, 255, .4); border-radius: 10px; padding: 8px 12px; font-weight: 500; }
.sonuc-ben:empty { display: none; }
/* Takım puanı çubuğu: dolgu + hedef çizgisi */
.sonuc-bar { position: relative; height: 8px; margin: 4px 6px 6px; border-radius: 6px; background: var(--bg2); }
.sonuc-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, #7c5cff, #a78bfa); animation: barDol 1s cubic-bezier(.3, 1, .5, 1) .25s backwards; }
.sonuc-bar i { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--vurgu); box-shadow: 0 0 8px rgba(255, 200, 61, .8); }
@keyframes barDol { from { width: 0; } }

/* Seviye ödülleri */
.sonuc-odul { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.sonuc-odul:empty { display: none; }
.odul {
  display: flex; align-items: center; gap: 8px; text-align: left; padding: 7px 10px; border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--renk) 16%, transparent), rgba(255, 255, 255, .03));
  border: 1px solid color-mix(in srgb, var(--renk) 45%, transparent);
  animation: odulGir .5s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: calc(var(--gecikme, 0ms) + var(--i) * 160ms);
}
.odul.sessiz { animation: none; }
.odul.benim { box-shadow: 0 0 0 1px var(--vurgu), 0 0 14px rgba(255, 200, 61, .25); }
.odul .ikon { font-size: 22px; flex: none; }
.odul > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.odul small { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--soluk); }
.odul b { font-size: 13.5px; color: var(--renk); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odul .detay { font-size: 11.5px; color: #d6d2f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes odulGir { from { transform: translateY(10px) scale(.8); opacity: 0; } }

/* Sıradaki seviye önizlemesi */
.sonuc-sonraki { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: var(--bg2); border: 1px dashed var(--cizgi); }
.sonuc-sonraki:empty { display: none; }
.sonuc-sonraki .ss-ust { font-weight: 700; }
.sonuc-sonraki small { color: var(--soluk); font-size: 12.5px; }
.sonuc-sonraki[data-tur=altin] { border: 1px solid var(--vurgu); background: rgba(255, 200, 61, .1); }
.sonuc-sonraki[data-tur=altin] .ss-ust { color: var(--vurgu); }
.sonuc-sonraki[data-tur=hizli] { border: 1px solid #4dabf7; background: rgba(77, 171, 247, .1); }
.sonuc-sonraki[data-tur=hizli] .ss-ust { color: #a5d8ff; }
.sonuc-sonraki[data-tur=patron] { border: 1px solid var(--kotu); background: rgba(255, 93, 115, .12); animation: patronParla 1.1s ease-in-out infinite alternate; }
@keyframes patronParla { to { box-shadow: 0 0 24px rgba(255, 93, 115, .45); } }
.sonuc-sonraki[data-tur=patron] .ss-ust { color: #ffc9d1; }

/* Seviyeler arası büyük geri sayım */
.buyuk-sayac {
  position: fixed; left: 50%; top: 50%; z-index: 26; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%); font-size: min(34vw, 190px); font-weight: 900; line-height: 1; color: var(--vurgu);
  text-shadow: 0 0 40px rgba(255, 200, 61, .7), 0 10px 30px rgba(0, 0, 0, .6);
}
.buyuk-sayac.goster { animation: sayac .95s ease-out forwards; }
@keyframes sayac {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
}
.mvp { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.mvp li { display: flex; gap: 10px; align-items: center; background: var(--bg2); border-radius: 10px; padding: 8px 12px; }
.mvp .ad { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mvp small { color: var(--soluk); }
.sonuc-kacan { display: flex; flex-direction: column; gap: 6px; }
.sonuc-kacan:empty { display: none; }
.cipler { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.cipler span { font-size: 12px; padding: 3px 9px; border-radius: 20px; border: 1px solid rgba(255, 93, 115, .45); color: #ffb3bd; text-transform: uppercase; letter-spacing: .5px; }
.cipler .fazla { border-color: var(--cizgi); color: var(--soluk); }
.sonuc-alt { color: var(--soluk); font-size: 14px; }

.podyum { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin-top: 4px; }
.basamak { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 110px; animation: podyumGir .6s cubic-bezier(.3, 1.4, .5, 1) backwards; }
.basamak.b1 { animation-delay: .5s; }
.basamak.b2 { animation-delay: .25s; }
.basamak .avatar { width: 46px; height: 46px; font-size: 20px; }
.basamak.b1 .avatar { width: 58px; height: 58px; font-size: 26px; box-shadow: 0 0 0 3px var(--vurgu), 0 0 24px rgba(255, 200, 61, .6); }
.basamak .ad { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basamak .puan { color: var(--vurgu); font-weight: 900; }
.basamak .kaide { width: 100%; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, var(--panel2), var(--bg2)); display: grid; place-items: center; font-size: 26px; border: 1px solid var(--cizgi); border-bottom: none; }
.basamak.b1 .kaide { height: 96px; background: linear-gradient(180deg, #5a4a1a, var(--bg2)); }
.basamak.b2 .kaide { height: 70px; }
.basamak.b3 .kaide { height: 50px; }
@keyframes podyumGir { from { transform: translateY(40px); opacity: 0; } }

.menu-kart { display: flex; flex-direction: column; gap: 10px; width: min(340px, 100%); }
.ayar-kutu { display: flex; flex-direction: column; gap: 12px; background: var(--bg2); border-radius: 12px; padding: 12px 14px; margin-bottom: 4px; }
label.yatay { flex-direction: row; align-items: center; justify-content: space-between; color: var(--yazi); font-size: 14px; }

.sonuc-ac { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 9; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }

/* Duyurular, efektler */
.afisler { position: fixed; top: 58%; left: 50%; transform: translateX(-50%); z-index: 25; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: 92vw; }
body.sonuc-acik .afisler { top: 7%; }
body.sonuc-acik .afis { transform-origin: top; }
.afis {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 12px 26px; border-radius: 16px; background: rgba(20, 17, 50, .92); border: 1px solid var(--cizgi);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: afis var(--sure, 2.3s) ease-in-out forwards;
}
.afis b { font-size: 28px; font-weight: 900; letter-spacing: .5px; }
.afis span { color: var(--soluk); font-size: 14px; }
.afis.seviye b { font-size: 40px; color: var(--vurgu); text-shadow: 0 0 24px rgba(255, 200, 61, .5); }
.afis.altin { border-color: var(--vurgu); }
.afis.altin b { background: linear-gradient(90deg, #ffe28a, #ffc83d, #ff8a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.afis.yesil { border-color: var(--iyi); }
.afis.yesil b { color: var(--iyi); }
.afis.mor { border-color: var(--mor); }
.afis.mor b { color: #c4b5fd; }
.afis.tur-altin { border-color: var(--vurgu); box-shadow: 0 0 40px rgba(255, 200, 61, .35); }
.afis.tur-altin b { color: var(--vurgu); }
.afis.tur-hizli { border-color: #4dabf7; box-shadow: 0 0 40px rgba(77, 171, 247, .35); }
.afis.tur-hizli b { color: #a5d8ff; }
.afis.tur-patron { border-color: var(--kotu); box-shadow: 0 0 50px rgba(255, 93, 115, .4); }
.afis.tur-patron b { color: #ffc9d1; font-size: 34px; }
.afis.kirmizi { border-color: var(--kotu); }
.afis.kirmizi b { color: var(--kotu); }
@keyframes afis {
  0% { opacity: 0; transform: translateY(-20px) scale(.8); }
  10% { opacity: 1; transform: translateY(0) scale(1.06); }
  16% { transform: scale(1); }
  82% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-14px) scale(.96); }
}

.efekt-tuval { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 30; }
.ucan-yazi {
  position: fixed; z-index: 31; pointer-events: none; transform: translate(-50%, -100%);
  font-weight: 900; font-size: 16px; white-space: nowrap; text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
  animation: ucan 1.5s ease-out forwards;
}
.ucan-yazi.buyuk { font-size: 24px; }
@keyframes ucan {
  0% { opacity: 0; transform: translate(-50%, -60%) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, -110%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -260%) scale(1); }
}
.tepki-uc { position: fixed; bottom: 40px; z-index: 32; pointer-events: none; display: flex; flex-direction: column; align-items: center; animation: tepkiUc 3s ease-out forwards; }
.tepki-uc .e { font-size: 44px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }
.tepki-uc small { font-weight: 700; font-size: 12px; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
@keyframes tepkiUc {
  0% { opacity: 0; transform: translateY(20px) scale(.4); }
  12% { opacity: 1; transform: translateY(-20px) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--sal), -55vh) rotate(var(--don)) scale(.9); }
}
.flas { position: fixed; inset: 0; pointer-events: none; z-index: 29; animation: flas .8s ease-out forwards; }
@keyframes flas { from { opacity: 1; } to { opacity: 0; } }

.baglanti { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--kotu); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 40; }
.kopyalandi { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--iyi); color: #062; padding: 10px 18px; border-radius: 10px; z-index: 40; font-weight: 500; animation: gir .25s ease-out; }

/* ---------- Kısa ekranlar ---------- */
@media (max-height: 760px) and (min-width: 861px) {
  .sol { gap: 8px; padding: 10px 16px 12px; }
  .sahne { gap: 8px; padding: 20px 16px 10px; }
  .raf { padding-bottom: 10px; }
  .raf::after { height: 14px; }
  .tahmin-form input { font-size: 22px; padding: 7px 12px; }
  .ust-bar { padding: 6px 16px; }
}

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
  #oyun.aktif { height: auto; min-height: 100vh; }
  .oyun-govde { grid-template-columns: minmax(0, 1fr); }
  .sol, .sag { min-width: 0; }
  .sol { overflow: visible; padding: 12px; }
  .sag { border-left: none; border-top: 1px solid var(--cizgi); }
  .skor-panel { max-height: none; }
  .akis-panel { max-height: 200px; min-height: 120px; }
  .sohbet-yeri { height: 320px; flex: none; }
  .tahta { flex: none; gap: 10px 10px; overflow: visible; padding: 12px 8px; border-radius: 18px; }
  .grup { padding: 7px 9px 9px; min-width: 0; }
  .tur-rozet { order: 2; }
  .lobi-govde { grid-template-columns: 1fr; }
  .ust-bar { gap: 10px; padding: 8px 10px; flex-wrap: wrap; }
  .ilerleme { order: 5; flex-basis: 100%; }
  .canlar { font-size: 16px; margin-left: auto; }
  .sahne { padding: 22px 8px 12px; border-radius: 20px; }
  .harfler { --kenar: 8px; --bosluk: clamp(4px, 1.6cqi, 10px); }
  .sahne .kose.k1::after, .sahne .kose.k2::after { display: none; }
  .seri-rozet { font-size: 12px; }
  .afisler { top: 50%; }
  .tahmin-form input { font-size: 20px; letter-spacing: 2px; }
  .tahmin-form .btn.ana { padding: 0 14px; }
  /* Tahta uzayınca yazma alanı ekranın altında sabit kalsın */
  .yazma-alani {
    position: sticky; bottom: 0; z-index: 6; margin: 0 -12px -12px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(18, 16, 42, 0), rgba(18, 16, 42, .94) 28%);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
  .son-hamle-rozet { order: 3; font-size: 11px; padding: 4px 9px; }
  .patron-can .pc-ad { display: none; }
  .buyuk-kod { font-size: 38px; }
  .afis b { font-size: 22px; }
  .afis.seviye b { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .arka-harfler, body.son-saniye::after { display: none; }
  .tas.gizli-harf, .sure.cok-az, .karistir-gosterge .ikon-donen, .slot.hazine .k, .slot .hz-rozet, .son-hamle-rozet, .sonuc-sonraki { animation: none !important; }
}
