/* =============================================================================
   ALTIN PİLOT — çok oyunculu uçuş oyunu arayüzü
   Tema: slot oyunuyla (ALTIN 777) aynı — okey masası yeşil çuhası, istaka
   ahşabı, altın yaldız, fildişi taşlar
   ============================================================================= */

/* ---------- Yazı tipleri (yerel, OFL lisanslı) ---------- */
@font-face { font-family: 'Alfa Slab One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/alfa-slab-one-latin-400-normal.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; }
@font-face { font-family: 'Alfa Slab One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/alfa-slab-one-latin-ext-400-normal.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: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-500-normal.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; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-ext-500-normal.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: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-600-normal.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; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-ext-600-normal.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: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-700-normal.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; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-ext-700-normal.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: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-800-normal.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; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-ext-800-normal.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; }


/* ---------- Tasarım belirteçleri (slot oyunuyla aynı) ---------- */
:root {
  /* Okey masası çuhası */
  --felt-hi: #1f8350;
  --felt: #0f5a35;
  --felt-lo: #073521;
  --felt-edge: #02160c;
  /* Altın yaldız */
  --gold-hi: #fff4c2;
  --gold: #f2c14e;
  --gold-mid: #d9a12b;
  --gold-lo: #8a5a12;
  /* İstaka ahşabı */
  --wood-hi: #94602f;
  --wood: #5e3818;
  --wood-lo: #2c180a;
  /* Okey taşı renkleri */
  --okey-red: #d7263d;
  --okey-yellow: #f2a900;
  --okey-blue: #1f5fd1;
  --okey-black: #23201c;
  /* Metin */
  --text: #f7f1de;
  --text-dim: rgba(247, 241, 222, .66);
  --line: rgba(242, 193, 78, .26);
  --win: #ffd24d;

  --font-display: 'Alfa Slab One', 'Rockwell Extra Bold', Georgia, serif;
  --font-ui: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', system-ui, sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  --topbar-h: 56px;
  --frame: 12px;
  --side-w: clamp(260px, 22vw, 350px);
  --btn-h: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--felt-edge);
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 600;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
button, input { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 10px; }
svg { display: block; }

/* ---------- Uygulama ızgarası ---------- */
.app {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top" "stage" "console";
  padding: 0 var(--safe-r) 0 var(--safe-l);
  isolation: isolate;
}
/* Çuha */
.app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(120% 95% at 50% 40%, var(--felt-hi) 0%, var(--felt) 36%, var(--felt-lo) 70%, var(--felt-edge) 100%);
}
/* Çuha dokusu */
.app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 -.12'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.ambient { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- Üst çubuk ---------- */
.topbar {
  grid-area: top;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding: var(--safe-t) clamp(10px, 2vw, 24px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(180deg, rgba(1, 10, 5, .72), rgba(1, 10, 5, 0));
  position: relative;
  z-index: 5;
  min-width: 0;
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar__left { flex: 0 1 auto; }
.topbar__right { flex: 0 0 auto; }
.topbar__title {
  display: none;
  font-family: var(--font-display);
  font-size: 20px;
  background: linear-gradient(180deg, #fffbe0, #f2c14e 55%, #b9740e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .6));
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  max-width: 100%;
  min-width: 0;
  padding: 0 14px 0 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .34);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
}
.chip__dot { width: 10px; height: 10px; border-radius: 50%; background: #4cd27a; box-shadow: 0 0 8px #4cd27a; flex: none; }
.chip__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip__tag { flex: none; font-size: 13px; font-weight: 800; padding: 2px 7px; border-radius: 6px; color: #2a1600; background: var(--gold); }

.balance-pill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 42px;
  min-width: 0;
  max-width: 34vw;
  padding: 2px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .32));
  border: 1px solid rgba(242, 193, 78, .4);
  text-align: right;
}
.balance-pill__label { font-size: 12px; line-height: 1; color: var(--text-dim); font-weight: 600; letter-spacing: .02em; }
.balance-pill__value { font-size: 21px; line-height: 1.1; font-weight: 800; color: var(--gold-hi); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balance-pill.is-up .balance-pill__value { animation: balUp .7s ease; }
@keyframes balUp { 30% { color: #fff; text-shadow: 0 0 12px rgba(255, 210, 80, .9); transform: scale(1.06); } }

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .34);
  color: var(--gold-hi);
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.icon-btn:hover { background: rgba(242, 193, 78, .16); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn--fs { width: 46px; height: 46px; border-color: rgba(242, 193, 78, .6); background: rgba(242, 193, 78, .14); }
.icon-btn--fs svg { width: 24px; height: 24px; stroke-width: 2.4; }
.icon-btn__badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--okey-red);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #0b2a1b;
}
.icon-btn--bets { display: none; }
.ico-sound-off, .ico-fs-exit { display: none; }
.is-muted .ico-sound-on { display: none; }
.is-muted .ico-sound-off { display: block; }
.is-fullscreen .ico-fs-enter { display: none; }
.is-fullscreen .ico-fs-exit { display: block; }

/* ---------- Sahne ---------- */
.stage {
  grid-area: stage;
  position: relative;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 10px);
  padding: 4px clamp(8px, 1.6vw, 22px) 6px;
}
/* Sahnenin üzerine düşen spot ışık */
.stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -12%;
  width: min(1400px, 130%);
  height: 95%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(50% 62% at 50% 0%, rgba(255, 243, 210, .14), rgba(255, 243, 210, .04) 45%, transparent 72%);
}

/* Işıklı tabela (slot ile aynı, daha kısa) */
.marquee {
  position: relative;
  flex: none;
  padding: clamp(10px, 1.6vh, 18px) 34px clamp(10px, 1.7vh, 18px);
  text-align: center;
  border-radius: 22px 22px 12px 12px;
  background:
    radial-gradient(80% 140% at 50% 0%, rgba(242, 193, 78, .18), transparent 60%),
    linear-gradient(180deg, #0b2a1b, #03130b);
  border: 2px solid #1c0f05;
  box-shadow:
    inset 0 0 0 3px var(--gold-lo),
    inset 0 0 0 5px var(--gold),
    inset 0 0 0 7px #3a2208,
    0 12px 30px rgba(0, 0, 0, .45);
}
.marquee__bulbs {
  position: absolute;
  inset: 9px;
  border-radius: 16px 16px 8px 8px;
  pointer-events: none;
  --bulb: 18px;
  background:
    radial-gradient(circle at 25% 50%, #fffbe6 0 2px, #ffcf3f 2.6px 3.6px, transparent 4.4px) 0 0 / calc(var(--bulb) * 2) 10px repeat-x,
    radial-gradient(circle at 75% 50%, rgba(255, 220, 120, .35) 0 2px, rgba(160, 110, 20, .45) 2.6px 3.6px, transparent 4.4px) 0 0 / calc(var(--bulb) * 2) 10px repeat-x,
    radial-gradient(circle at 25% 50%, #fffbe6 0 2px, #ffcf3f 2.6px 3.6px, transparent 4.4px) 0 100% / calc(var(--bulb) * 2) 10px repeat-x,
    radial-gradient(circle at 75% 50%, rgba(255, 220, 120, .35) 0 2px, rgba(160, 110, 20, .45) 2.6px 3.6px, transparent 4.4px) 0 100% / calc(var(--bulb) * 2) 10px repeat-x;
  filter: drop-shadow(0 0 3px rgba(255, 205, 64, .9));
  animation: bulbs 0.9s steps(1) infinite;
}
.is-flying .marquee__bulbs { animation-duration: .45s; }
.is-celebrating .marquee__bulbs { animation-duration: .22s; }
@keyframes bulbs {
  0% { background-position: 0 0, 0 0, 0 100%, 0 100%; }
  50% { background-position: var(--bulb) 0, var(--bulb) 0, calc(var(--bulb) * -1) 100%, calc(var(--bulb) * -1) 100%; }
}
.marquee__title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 4.6vh, 56px);
  line-height: 1.05;
  letter-spacing: .02em;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(180deg, #fffdf0 0%, #ffe383 30%, #f4b92b 54%, #b8730c 76%, #ffd975 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.5px #3a2200;
  filter: drop-shadow(0 3px 0 #3a2200) drop-shadow(0 8px 16px rgba(0, 0, 0, .55));
}
.marquee__sub {
  position: relative;
  margin-top: 2px;
  font-size: clamp(13px, 1.8vh, 18px);
  font-weight: 600;
  letter-spacing: .03em;
  color: rgba(255, 236, 180, .78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Son turlar şeridi: okey taşı görünümlü çarpanlar */
.strip { flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; }
.strip__list {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow: hidden;
  padding: 2px 0 4px;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.pill {
  flex: none;
  min-width: 52px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--pc, var(--okey-blue));
  background: linear-gradient(180deg, #fffdf6, #f1e4c2 70%, #dcc796);
  box-shadow: 0 2px 0 #a88e5c, 0 3px 6px rgba(0, 0, 0, .35);
}
.c-black { --pc: var(--okey-black); }
.c-blue { --pc: var(--okey-blue); }
.c-yellow { --pc: #c98100; }
.c-red { --pc: var(--okey-red); }
.pill.is-new { animation: pillIn .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes pillIn { from { transform: translateY(-10px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.strip__more {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .34);
  color: var(--gold-hi);
  cursor: pointer;
}
.strip__more svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Uçuş ekranı: istaka ahşabı çerçeve */
.flight-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.rack {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: var(--frame);
  border-radius: calc(var(--frame) * 1.7);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .28), transparent 12%, transparent 88%, rgba(0, 0, 0, .28)),
    linear-gradient(180deg, rgba(255, 210, 150, .16), transparent 30%, rgba(0, 0, 0, .25)),
    repeating-linear-gradient(96deg, #6d4422 0 7px, #613b1c 7px 12px, #7a4d27 12px 15px, #5d391b 15px 23px),
    var(--wood);
  box-shadow:
    inset 0 0 0 2px #1c0f05,
    inset 0 0 0 4px var(--gold-mid),
    inset 0 0 0 5px var(--gold-hi),
    inset 0 0 0 7px #3a2208,
    0 0 0 2px #1c0f05,
    0 22px 46px rgba(0, 0, 0, .58);
}
.rack canvas {
  position: absolute;
  left: var(--frame);
  top: var(--frame);
  width: calc(100% - var(--frame) * 2);
  height: calc(100% - var(--frame) * 2);
  display: block;
  border-radius: calc(var(--frame) * .9);
  background: #000; /* siyah gece gökyüzü (canvas çizilmeden önce de siyah) */
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .55);
}
/* Çerçevenin çevresinde dönen ışık halkası */
:root { --glow1: #ffd24d; --glow2: #ff8a3c; --glow-speed: 6s; --glow-op: .5; }
.is-flying { --glow-speed: 2s; --glow-op: .8; }
.is-crash { --glow1: #ff3b2f; --glow2: #ff8a3c; --glow-speed: .8s; --glow-op: 1; }
.is-win { --glow1: #fff4c2; --glow2: #ffd24d; --glow-speed: 1.1s; --glow-op: .95; }
.rack__glow {
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: calc(var(--frame) * 2.4);
  overflow: hidden;
  filter: blur(9px);
  opacity: var(--glow-op);
  transition: opacity .4s;
  pointer-events: none;
}
.rack__glow::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--glow1) 35deg, transparent 80deg, transparent 180deg, var(--glow2) 215deg, transparent 260deg);
  animation: glowSpin var(--glow-speed) linear infinite;
}
@keyframes glowSpin { to { transform: rotate(1turn); } }
.rack__glass {
  position: absolute;
  inset: var(--frame);
  border-radius: calc(var(--frame) * .9);
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .03) 26%, transparent 38%, transparent 72%, rgba(255, 255, 255, .04) 86%, transparent 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), inset 0 12px 24px rgba(0, 0, 0, .3), inset 0 -10px 20px rgba(0, 0, 0, .25);
}
.conn {
  position: absolute;
  left: 50%;
  bottom: calc(var(--frame) + 10px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  background: rgba(10, 12, 18, .82);
  border: 1px solid rgba(242, 193, 78, .55);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
  color: var(--gold-hi);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.conn::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 210, 77, .25);
  border-top-color: #ffd24d;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Çekimde ekranda yükselen kazanç */
.win-float {
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 3;
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  font-size: clamp(26px, 5vh, 56px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 210, 80, .95), 0 0 34px rgba(255, 170, 40, .6), 0 4px 0 #6b4308;
}
.win-float.is-on { animation: winFloat 1.8s cubic-bezier(.2, .9, .3, 1) forwards; }
@keyframes winFloat {
  0% { opacity: 0; transform: translate(-50%, -10%) scale(.5); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  28% { transform: translate(-50%, -52%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -125%) scale(1); }
}

/* ---------- Canlı bahisler ---------- */
.side { grid-area: side; display: none; min-height: 0; min-width: 0; padding: 4px 0 calc(10px + var(--safe-b)) clamp(8px, 1.2vw, 16px); }
.livebets {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(3, 19, 11, .78), rgba(3, 19, 11, .62));
  border: 1px solid rgba(242, 193, 78, .26);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
}
.tabs { display: flex; gap: 6px; padding: 10px 16px 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.tabs--side { padding: 6px 8px 0; gap: 0; }
.tabs__btn {
  flex: none;
  padding: 10px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
}
.tabs--side .tabs__btn { flex: 1 1 0; min-width: 0; padding: 9px 6px; font-size: 17px; }
.tabs__btn.is-active { color: var(--gold-hi); border-bottom-color: var(--gold); }
.livebets__panel { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.livebets__panel.is-active { display: flex; }
.livebets__sum { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px 10px 6px; }
.livebets__sum div { min-width: 0; padding: 5px 8px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(242, 193, 78, .14); }
.livebets__sum span { display: block; font-size: 12px; color: var(--text-dim); line-height: 1.1; }
.livebets__sum b { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gold-hi); }
.livebets__head, .lb-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 54px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}
.livebets__head { flex: none; padding: 4px 14px 4px; font-size: 13px; color: var(--text-dim); font-weight: 600; }
.livebets__head span:nth-child(n+2), .lb-row > :nth-child(n+2) { text-align: right; }
.livebets__head span:nth-child(3), .lb-row > :nth-child(3) { text-align: center; }
.livebets__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 8px 10px; -webkit-overflow-scrolling: touch; }
.lb-row {
  min-height: 34px;
  padding: 4px 6px;
  margin-bottom: 4px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .26);
  border: 1px solid transparent;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.lb-row > * { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row__name { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.lb-row__av {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--av, var(--okey-blue));
}
.lb-row__x { justify-self: center; }
.lb-row__x .x { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 13px; font-weight: 800; color: var(--pc); background: #f6ecd2; }
.lb-row__win { color: var(--text-dim); }
.lb-row.is-won { background: rgba(242, 193, 78, .14); border-color: rgba(242, 193, 78, .5); }
.lb-row.is-won .lb-row__win { color: var(--gold-hi); font-weight: 800; }
.lb-row.is-mine { box-shadow: inset 3px 0 0 var(--gold); }
.lb-row.is-lost { opacity: .55; }
.livebets__empty { padding: 26px 10px; text-align: center; font-size: 16px; color: var(--text-dim); font-weight: 500; line-height: 1.35; }
.mine-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .26);
  border: 1px solid transparent;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.mine-row.is-won { border-color: rgba(242, 193, 78, .45); }
.mine-row__t { color: var(--text-dim); font-size: 13px; }
.mine-row__r { text-align: right; font-weight: 800; }
.mine-row.is-won .mine-row__r { color: var(--gold-hi); }

/* ---------- Bahis panelleri ---------- */
.console {
  grid-area: console;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px clamp(10px, 1.4vw, 18px);
  padding: 8px clamp(8px, 1.6vw, 22px) calc(12px + var(--safe-b));
  min-width: 0;
}
.console.is-single { grid-template-columns: minmax(0, 560px); justify-content: center; }
.bet-panel {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(3, 19, 11, .82), rgba(2, 12, 7, .9));
  border: 1px solid rgba(242, 193, 78, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 26px rgba(0, 0, 0, .4);
  transition: border-color .2s, box-shadow .2s;
}
.bet-panel.is-live { border-color: rgba(255, 170, 60, .75); box-shadow: 0 0 0 1px rgba(255, 170, 60, .35), 0 0 22px rgba(255, 150, 40, .25), 0 12px 26px rgba(0, 0, 0, .4); }
.bet-panel__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(128px, 46%); gap: 10px; align-items: stretch; min-width: 0; }
.bet-panel__left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.amount {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 4px;
  height: 52px;
  padding: 0 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .4);
  border: 1px solid rgba(242, 193, 78, .3);
}
.amount__btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--gold-lo);
  background: radial-gradient(circle at 50% 30%, #2f5a43, #0f2a1c 70%);
  color: var(--gold-hi);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 2px 0 #010a05;
}
.amount__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.amount__btn:active { transform: translateY(1px); }
.amount__btn:disabled { opacity: .35; cursor: default; }
.amount__field { display: flex; flex-direction: column; align-items: center; min-width: 0; cursor: text; }
.amount__label { font-size: 12px; line-height: 1; color: var(--text-dim); white-space: nowrap; }
.amount__input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-user-select: text;
  user-select: text;
}
.amount__input:disabled { color: var(--text-dim); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.quick button {
  height: 30px;
  min-width: 0;
  padding: 0 4px;
  border-radius: 15px;
  border: 1px dashed rgba(255, 255, 255, .3);
  background: radial-gradient(circle at 50% 30%, #2f5a43, #0f2a1c);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick button:hover { border-color: var(--gold); }
.quick button:disabled { opacity: .35; cursor: default; }

/* Büyük işlem düğmesi: BAHİS (altın) / İPTAL (kırmızı) / ÇEK (turuncu) */
.bet-btn {
  position: relative;
  min-width: 0;
  min-height: var(--btn-h);
  padding: 6px 8px;
  border: 0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  overflow: hidden;
  color: #2a1600;
  background: linear-gradient(180deg, #fff1b0, #f2c14e 45%, #c98a1e);
  box-shadow: 0 4px 0 #6b4308, 0 10px 22px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .7);
  transition: transform .08s, filter .15s;
}
.bet-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #6b4308, inset 0 1px 0 rgba(255, 255, 255, .7); }
/* Bahis süresinde "Bahis yap" tuşunda dolaşan parıltı ve hafif ışıma */
.bet-btn > span { position: relative; z-index: 1; }
.bet-btn::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -45%;
  width: 38%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .6), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.is-betting .bet-btn:not(.is-cancel):not(.is-cashout):not(:disabled)::before { animation: shine 2.4s ease-in-out infinite; }
.is-betting .bet-btn:not(.is-cancel):not(.is-cashout):not(:disabled) { animation: betGlow 2.4s ease-in-out infinite; }
@keyframes shine {
  0% { opacity: 0; transform: skewX(-18deg) translateX(0); }
  8% { opacity: 1; }
  42%, 100% { opacity: 0; transform: skewX(-18deg) translateX(430%); }
}
@keyframes betGlow { 50% { box-shadow: 0 4px 0 #6b4308, 0 0 0 2px rgba(255, 241, 176, .9), 0 0 26px rgba(255, 200, 70, .75), inset 0 1px 0 rgba(255, 255, 255, .7); } }
.bet-btn:disabled { cursor: default; filter: grayscale(.5) brightness(.7); }
.bet-btn > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet-btn__top { font-size: 21px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.05; }
.bet-btn__amt { font-size: 24px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bet-btn__sub { font-size: 13px; font-weight: 700; line-height: 1.1; opacity: .85; }
.bet-btn__sub:empty { display: none; }
.bet-btn.is-cancel {
  color: #fff;
  background: radial-gradient(circle at 50% 22%, #ff8a7a 0%, #e8291e 40%, #a10d0d 78%, #5e0505 100%);
  box-shadow: 0 4px 0 #3a0505, 0 10px 22px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.bet-btn.is-cashout {
  color: #2a1000;
  background: linear-gradient(180deg, #fff4c2 0%, #ffc04d 35%, #ff8a1e 70%, #c9520e 100%);
  box-shadow: 0 4px 0 #6b2a04, 0 0 0 2px #fff4c2, 0 0 26px rgba(255, 160, 40, .75), inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: cashPulse 1s ease-in-out infinite;
}
.bet-btn.is-cashout .bet-btn__amt { font-size: 27px; }
@keyframes cashPulse { 50% { box-shadow: 0 4px 0 #6b2a04, 0 0 0 2px #fff4c2, 0 0 40px rgba(255, 170, 50, 1), inset 0 1px 0 rgba(255, 255, 255, .8); } }
/* En erken çekim çarpanına kadar kilitli ÇEK: soluk, nabızsız; çarpana gelince parlar */
.bet-btn.is-cashout.is-locked { animation: none; filter: saturate(.55) brightness(.82); box-shadow: 0 4px 0 #6b2a04, 0 0 0 2px rgba(255, 244, 194, .45), inset 0 1px 0 rgba(255, 255, 255, .5); }
.bet-btn.is-cashout.is-locked:disabled { opacity: 1; cursor: default; }
.bet-btn.is-wait { color: var(--text); background: linear-gradient(180deg, #2f5a43, #0f2a1c); box-shadow: inset 0 0 0 2px rgba(242, 193, 78, .35), 0 6px 14px rgba(0, 0, 0, .35); }
.bet-btn.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%) -200% 0 / 200% 100% no-repeat;
  animation: busy .9s linear infinite;
}
@keyframes busy { to { background-position: 200% 0; } }

.bet-panel__auto { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; min-width: 0; }
.switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 15px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch__ui {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(242, 193, 78, .35);
  transition: background .15s;
}
.switch__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #9aa59e;
  transition: transform .15s, background .15s;
}
.switch input:checked + .switch__ui { background: rgba(242, 193, 78, .35); border-color: var(--gold); }
.switch input:checked + .switch__ui::after { transform: translateX(16px); background: var(--gold-hi); box-shadow: 0 0 8px rgba(255, 220, 120, .8); }
.switch input:checked ~ .switch__txt { color: var(--gold-hi); }
.switch input:focus-visible + .switch__ui { outline: 3px solid var(--gold-hi); outline-offset: 2px; }
.switch input:disabled ~ * { opacity: .5; }
.auto-x {
  display: inline-flex;
  align-items: center;
  height: 32px;
  width: 84px;
  padding: 0 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(242, 193, 78, .3);
}
.auto-x__input { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; text-align: right; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; -webkit-user-select: text; user-select: text; }
.auto-x__input:disabled { color: var(--text-dim); }
.auto-x__suffix { font-weight: 800; color: var(--gold); padding-left: 2px; }
.auto-x.is-off { opacity: .45; }
.auto-x.is-bad { border-color: #ff6f61; }
.bet-panel__msg {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  transform: translate(-50%, -60%);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  max-width: 96%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bet-panel__msg.is-on { animation: msgPop 2.6s ease forwards; }
.bet-panel__msg.is-win { color: #2a1600; background: linear-gradient(180deg, #fff1b0, #f2c14e); box-shadow: 0 0 18px rgba(255, 210, 80, .8), 0 3px 0 #6b4308; }
.bet-panel__msg.is-lose { color: #fff; background: #7a1010; border: 1px solid #ff8a80; }
.bet-panel__msg.is-info { color: var(--text); background: #0b2a1b; border: 1px solid var(--line); }
@keyframes msgPop {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(.7); }
  12% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); }
  20% { transform: translate(-50%, -60%) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -90%); }
}

/* ---------- Yerleşimler ---------- */
/* Masaüstü: solda canlı bahisler */
@media (orientation: landscape) and (min-height: 561px) and (min-width: 1000px) {
  .app {
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "top top" "side stage" "side console";
  }
  .side { display: block; }
  .console { padding-left: clamp(8px, 1.6vw, 22px); }
}
/* Canlı bahisler yoksa (dar ekran): Bahisler tuşu */
@media not all and (orientation: landscape) and (min-height: 561px) and (min-width: 1000px) {
  .icon-btn--bets { display: grid; }
}
/* Alçak masaüstü penceresi: tabela gizli, başlık üst çubukta */
@media (orientation: landscape) and (max-height: 760px) {
  .marquee { display: none; }
  .topbar__title { display: block; }
}
/* Dikey (telefon / tablet) */
@media (orientation: portrait) {
  :root { --topbar-h: 52px; --frame: 9px; --btn-h: 88px; }
  .console { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 6px; padding-bottom: calc(10px + var(--safe-b)); }
  .bet-panel { padding: 8px 10px; gap: 6px; }
  .marquee { padding-left: 16px; padding-right: 16px; }
  .marquee__title { font-size: clamp(26px, 7.5vw, 52px); }
}
@media (orientation: portrait) and (max-height: 820px) {
  .marquee { display: none; }
}
@media (orientation: portrait) and (min-width: 700px) {
  .console { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (orientation: portrait) and (max-width: 480px) {
  :root { --btn-h: 80px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn--fs { width: 42px; height: 42px; }
  #btnHistory, #btnRules { display: none; }
  .chip { padding: 0 10px 0 8px; height: 36px; }
  .balance-pill { max-width: 40vw; padding: 2px 10px; }
  .balance-pill__value { font-size: 19px; }
  .amount { height: 46px; }
  .amount__input { font-size: 21px; }
  .quick button { height: 28px; font-size: 14px; }
  .bet-btn__top { font-size: 18px; }
  .bet-btn__amt { font-size: 21px; }
  .bet-btn.is-cashout .bet-btn__amt { font-size: 23px; }
  .pill { min-width: 46px; height: 26px; font-size: 14px; padding: 0 6px; }
}
@media (orientation: portrait) and (max-width: 400px) {
  .chip__name { display: none; }
  .chip { padding: 0 8px; gap: 6px; }
  .switch { font-size: 14px; gap: 5px; }
  .switch__ui { width: 34px; }
  .switch input:checked + .switch__ui::after { transform: translateX(12px); }
  .auto-x { width: 70px; }
  .bet-panel__main { grid-template-columns: minmax(0, 1fr) minmax(112px, 44%); gap: 8px; }
}
@media (orientation: portrait) and (max-width: 340px) {
  .balance-pill__label { display: none; }
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick button:nth-child(4) { display: none; }
}
/* Telefon dikey ve alçak: paneller sıkışık */
@media (orientation: portrait) and (max-height: 700px) {
  :root { --btn-h: 74px; }
  .quick { display: none; }
  .bet-panel__auto { gap: 6px 10px; }
}
/* Çok alçak dikey ekran (ör. 320×568): paneller sıkışık, uçuş ekranına yer açılır */
@media (orientation: portrait) and (max-height: 620px) {
  :root { --btn-h: 60px; --topbar-h: 48px; }
  .stage { gap: 4px; padding-top: 2px; padding-bottom: 4px; }
  .pill { height: 24px; min-width: 42px; font-size: 13px; padding: 0 5px; }
  .strip__more { width: 30px; height: 30px; }
  .console { gap: 6px; padding-top: 4px; padding-bottom: calc(6px + var(--safe-b)); }
  .bet-panel { padding: 6px 8px; gap: 5px; }
  .amount { height: 40px; grid-template-columns: 30px minmax(0, 1fr) 30px; }
  .amount__btn { width: 28px; height: 28px; }
  .amount__label { display: none; }
  .amount__input { font-size: 18px; }
  .bet-btn { border-radius: 12px; }
  .bet-btn__top { font-size: 15px; }
  .bet-btn__amt { font-size: 18px; }
  .bet-btn.is-cashout .bet-btn__amt { font-size: 19px; }
  .bet-btn__sub { display: none; }
}
/* Dar panellerde otomatik satırı tek satır kalsın: kısa etiketler */
@media (orientation: portrait) and (max-width: 359px), (orientation: landscape) and (max-height: 420px) {
  .bet-panel__auto { flex-wrap: nowrap; gap: 6px; }
  .switch { gap: 5px; }
  .switch__ui { width: 32px; height: 20px; }
  .switch__ui::after { width: 14px; height: 14px; }
  .switch input:checked + .switch__ui::after { transform: translateX(12px); }
  .bet-panel__auto .switch__txt { font-size: 0; }
  .bet-panel__auto .switch:first-child .switch__txt::after { content: "Oto çek"; font-size: 13px; }
  .bet-panel__auto .switch:last-child .switch__txt::after { content: "Oto bahis"; font-size: 13px; }
  .auto-x { width: 60px; height: 28px; padding: 0 5px; }
  .auto-x__input { font-size: 15px; }
}
/* Yatay telefon (alçak ekran): paneller sağda */
@media (orientation: landscape) and (max-height: 560px) {
  :root { --topbar-h: 44px; --frame: 8px; --btn-h: 64px; }
  .app {
    grid-template-columns: minmax(0, 1fr) clamp(250px, 38vw, 340px);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "top top" "stage console";
  }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn--fs { width: 40px; height: 40px; }
  .chip { height: 34px; }
  .balance-pill { height: 36px; }
  .balance-pill__label { display: none; }
  .console {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 6px;
    padding: 4px 10px calc(6px + var(--safe-b)) 4px;
    overflow-y: auto;
  }
  .bet-panel { padding: 6px 8px; gap: 5px; }
  .bet-panel__main { grid-template-columns: minmax(0, 1fr) minmax(96px, 42%); gap: 6px; }
  .amount { height: 40px; grid-template-columns: 30px minmax(0, 1fr) 30px; }
  .amount__btn { width: 28px; height: 28px; }
  .amount__label { display: none; }
  .amount__input { font-size: 19px; }
  .quick { display: none; }
  .bet-btn { border-radius: 12px; }
  .bet-btn__top { font-size: 15px; }
  .bet-btn__amt { font-size: 18px; }
  .bet-btn.is-cashout .bet-btn__amt { font-size: 19px; }
  .bet-btn__sub { display: none; }
  .switch { font-size: 13px; }
  .auto-x { height: 28px; width: 66px; }
  .stage { padding-right: 4px; }
  .pill { height: 24px; min-width: 44px; font-size: 13px; }
  .strip__more { width: 30px; height: 30px; }
}
@media (orientation: landscape) and (max-height: 400px) {
  #btnHistory, #btnRules { display: none; }
  .bet-panel__main { grid-template-columns: minmax(0, 1fr) minmax(88px, 40%); }
  .amount { padding: 0 3px; gap: 2px; grid-template-columns: 26px minmax(0, 1fr) 26px; }
  .amount__btn { width: 26px; height: 26px; }
  .amount__input { font-size: 17px; }
  .bet-btn__top { font-size: 14px; }
  .bet-btn__amt { font-size: 17px; }
}
/* Geniş masaüstü: biraz daha iri */
@media (min-width: 1500px) and (min-height: 860px) {
  :root { --frame: 14px; --topbar-h: 64px; --btn-h: 104px; }
  .bet-btn__top { font-size: 23px; }
  .bet-btn__amt { font-size: 27px; }
}

/* ---------- Efekt katmanı ---------- */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.fx.is-inside { z-index: 0; }

/* ---------- Katmanlar (overlay) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: rgba(1, 10, 5, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid rgba(242, 193, 78, .4);
  background: rgba(0, 0, 0, .3);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, filter .15s, background .15s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: default; }
.btn--primary {
  color: #2a1600;
  border: 0;
  background: linear-gradient(180deg, #fff1b0, #f2c14e 45%, #c98a1e);
  box-shadow: 0 4px 0 #6b4308, 0 10px 22px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--xl { height: 60px; padding: 0 34px; font-size: 23px; border-radius: 16px; }
.btn--block { width: 100%; }
.btn--ghost { background: rgba(255, 255, 255, .04); }
.btn--ghost:hover { background: rgba(242, 193, 78, .12); }

/* Yükleniyor */
.overlay--loading { background: radial-gradient(circle at 50% 40%, var(--felt), var(--felt-edge)); z-index: 80; }
.loading { width: min(360px, 80vw); text-align: center; }
.loading__title, .login__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 62px);
  line-height: 1.05;
  color: transparent;
  background: linear-gradient(180deg, #fffdf0 0%, #ffe383 30%, #f4b92b 54%, #b8730c 76%, #ffd975 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.5px #3a2200;
  filter: drop-shadow(0 3px 0 #3a2200) drop-shadow(0 10px 20px rgba(0, 0, 0, .5));
  white-space: nowrap;
}
.loading__bar { height: 10px; margin: 22px 0 10px; border-radius: 6px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); overflow: hidden; }
.loading__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c98a1e, #fff1b0); transition: width .2s; }
.loading__text { color: var(--text-dim); font-size: 17px; }

/* Giriş */
.overlay--login { background: radial-gradient(circle at 50% 38%, rgba(31, 131, 80, .55), rgba(1, 10, 5, .9) 70%); z-index: 70; }
.login {
  width: min(520px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: clamp(22px, 5vh, 46px) clamp(20px, 5vw, 44px);
  text-align: center;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(11, 42, 27, .92), rgba(3, 19, 11, .95));
  border: 1px solid rgba(242, 193, 78, .45);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 0 6px rgba(0, 0, 0, .25);
}
.login__lead { margin: 14px 0 26px; font-size: 20px; font-weight: 500; color: var(--text); line-height: 1.3; }
.login__note { margin: 18px 0 0; font-size: 15px; font-weight: 500; color: var(--text-dim); line-height: 1.35; }
.login__note:empty { display: none; }
.login__tiles { display: flex; justify-content: center; margin-bottom: 14px; }
.login__tiles img {
  width: clamp(120px, 34vw, 170px);
  height: auto;
  padding: 10px 14px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf6, #f1e4c2 70%, #dcc796);
  box-shadow: 0 5px 0 #a88e5c, 0 10px 18px rgba(0, 0, 0, .45);
  animation: tileBob 2.2s ease-in-out infinite;
}
@keyframes tileBob { 50% { transform: translateY(-7px) rotate(-2deg); } }

/* Büyük kazanç */
.overlay--bigwin { background: radial-gradient(circle at 50% 45%, rgba(60, 40, 0, .55), rgba(1, 8, 4, .88) 70%); cursor: pointer; z-index: 55; overflow: hidden; }
.bigwin { position: relative; z-index: 1; max-width: 100%; text-align: center; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.bigwin__title {
  --title-grad: linear-gradient(180deg, #fffdf0 0%, #ffe383 28%, #f4b92b 52%, #b8730c 74%, #ffd975 100%);
  font-family: var(--font-display);
  font-size: clamp(40px, 10vw, 128px);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  background-image: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%), var(--title-grad);
  background-size: 260% 100%, 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 2px #3a2200;
  filter: drop-shadow(0 5px 0 #3a2200) drop-shadow(0 0 30px rgba(255, 196, 64, .55));
  animation: shine 2.6s ease-in-out infinite;
}
.bigwin.tier-2 .bigwin__title { --title-grad: linear-gradient(180deg, #fff 0%, #ffd2c8 22%, #ff5b45 50%, #a80f0f 78%, #ffb39e 100%); }
.bigwin.tier-3 .bigwin__title { --title-grad: linear-gradient(100deg, #ffe383, #ff7a5a, #ffd24d, #7fd3ff, #c9a2ff, #ffe383); }
.bigwin.is-pop .bigwin__title { animation: tierPop .55s cubic-bezier(.2, 1.7, .4, 1), shine 2.6s ease-in-out infinite; }
.bigwin.is-pop .bigwin__amount { animation: tierPop .55s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes shine { 0% { background-position: 160% 0, 0 0; } 60%, 100% { background-position: -160% 0, 0 0; } }
@keyframes tierPop { 0% { transform: scale(.55); } 100% { transform: scale(1); } }
.bigwin__amount {
  position: relative;
  margin-top: 10px;
  font-size: clamp(44px, 9vw, 112px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 210, 80, .85), 0 4px 0 #6b4308;
}
.bigwin__sub {
  position: relative;
  margin-top: 12px;
  font-size: clamp(18px, 2.8vh, 26px);
  font-weight: 800;
  color: var(--gold-hi);
  text-shadow: 0 2px 4px rgba(0, 0, 0, .95), 0 0 14px rgba(0, 0, 0, .7);
}
.bigwin__hint {
  margin-top: 26px;
  font-size: clamp(15px, 2.2vh, 20px);
  font-weight: 700;
  letter-spacing: .03em;
  color: rgba(255, 244, 194, .9);
  text-shadow: 0 2px 6px rgba(0, 0, 0, .85);
  animation: hintBlink 1.6s ease-in-out infinite;
  transition: opacity .3s;
}
@keyframes hintBlink { 50% { opacity: .45; } }
.overlay--bigwin.is-done .bigwin__hint { opacity: 0; animation: none; }
.bigwin::before {
  content: "";
  position: absolute;
  inset: -18% -12%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .5), rgba(0, 0, 0, .28) 60%, transparent);
}
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.bigwin__rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220vmax;
  height: 220vmax;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 90, .22) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 22%, transparent 50%);
  mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .55) 22%, transparent 50%);
  animation: raysSpin 28s linear infinite;
}
@keyframes raysSpin { to { transform: translate(-50%, -50%) rotate(1turn); } }

/* Sarsıntı */
.is-shaking .stage, .is-shaking .console { animation: shake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translate(-1px, 0); }
  20%, 80% { transform: translate(3px, 1px); }
  30%, 50%, 70% { transform: translate(-6px, -1px); }
  40%, 60% { transform: translate(6px, 1px); }
}

/* ---------- Pencereler (sheet) ---------- */
.overlay--sheet { z-index: 52; }
.sheet {
  width: min(820px, 100%);
  max-height: min(88vh, 940px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #0f3a26, #062014);
  border: 1px solid rgba(242, 193, 78, .42);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: rise .25s ease;
}
.sheet--compact { width: min(560px, 100%); }
.sheet--bets { width: min(560px, 100%); height: min(88vh, 900px); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px 22px;
  border-bottom: 1px solid var(--line);
}
.sheet__head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__body { flex: 1 1 auto; min-height: 0; padding: 16px 22px 22px; overflow: auto; -webkit-overflow-scrolling: touch; -webkit-user-select: text; user-select: text; }
.sheet__body--flush { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet__body--flush .livebets { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
@media (max-width: 640px) {
  .overlay--sheet { place-items: end center; padding: 0; }
  .sheet { width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; padding-bottom: var(--safe-b); }
  .sheet--bets { height: 86vh; }
}
@media (max-width: 400px) {
  .sheet__head h2 { font-size: 22px; }
  .sheet__body { padding: 14px 16px 18px; }
}

/* Kurallar metni */
.rules-text { font-size: 17px; font-weight: 500; line-height: 1.5; max-width: 72ch; }
.rules-text h3 { margin: 18px 0 6px; font-size: 20px; font-weight: 800; color: var(--gold-hi); }
.rules-text h3:first-child { margin-top: 0; }
.rules-text ul { margin: 0; padding-left: 20px; }
.rules-text li { margin: 4px 0; }
.rules-text strong { color: var(--gold-hi); font-weight: 700; }
.rules-odds { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 10px 0 4px; }
.rules-odds div { padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(242, 193, 78, .16); text-align: center; }
.rules-odds b { display: block; font-size: 19px; color: var(--gold-hi); }
.rules-odds span { font-size: 14px; color: var(--text-dim); }

/* Adil oyun */
.fair { font-size: 16px; font-weight: 500; line-height: 1.45; }
.fair p { margin: 0 0 10px; color: var(--text-dim); }
.fair__rounds { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.fair__box { padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(242, 193, 78, .2); margin-bottom: 12px; }
.fair__row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 10px; align-items: baseline; margin: 4px 0; }
.fair__row span { color: var(--text-dim); font-size: 14px; }
.fair__row code, .fair__row b { min-width: 0; overflow-wrap: anywhere; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--text); }
.fair__row b { font-family: inherit; font-size: 18px; color: var(--gold-hi); }
.fair__ok { margin-top: 8px; font-weight: 800; }
.fair__ok.is-ok { color: #7fe39a; }
.fair__ok.is-bad { color: #ff8a80; }
.fair .btn { height: 42px; font-size: 17px; }

/* Oyuncu menüsü */
.menu {
  position: fixed;
  top: calc(var(--topbar-h) + var(--safe-t) - 4px);
  left: calc(10px + var(--safe-l));
  z-index: 40;
  min-width: 230px;
  padding: 6px;
  border-radius: 14px;
  background: #0b2a1b;
  border: 1px solid rgba(242, 193, 78, .4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
.menu__item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.menu__item:hover { background: rgba(242, 193, 78, .12); }

/* Bildirim */
.toast {
  position: fixed;
  top: calc(var(--topbar-h) + var(--safe-t) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(560px, calc(100vw - 24px));
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(10, 20, 14, .95);
  border: 1px solid rgba(242, 193, 78, .5);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  animation: drop .25s ease;
}
.toast.is-error { border-color: #ff6f61; }
@keyframes drop { from { transform: translate(-50%, -10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Yükleme sırasında arayüzü gizle */
.is-loading .topbar, .is-loading .stage, .is-loading .console, .is-loading .side { visibility: hidden; }

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
  .marquee__bulbs, .bigwin__title, .bigwin__rays, .bigwin__hint, .rack__glow::before, .login__tiles img, .bet-btn.is-cashout, .bet-btn, .bet-btn::before { animation: none !important; }
  .overlay, .sheet, .bigwin, .pill.is-new, .is-shaking .stage, .is-shaking .console, .win-float.is-on { animation: none !important; }
}
