/* BetVio Originals — düz (flat) oyun kabuğu.
 *
 * Mines, Keno, Chicken ve sonrakiler aynı kabuğu kullanır: solda bahis paneli,
 * sağda oyun alanı, altta adil oyun çubuğu. Renklerin TAMAMI aşağıdaki
 * değişkenlerde; tema değişikliği için yalnız :root bloğunu düzenlemek yeter.
 */
:root {
  --zemin: #10141a;          /* sayfa */
  --panel: #19202a;          /* sol panel, üst çubuk */
  --kutu: #0c1015;           /* girdiler, ızgara yuvası */
  --kenar: #273140;          /* ince çizgiler */
  --kart: #2b3544;           /* kapalı kare / sayı */
  --kart-ust: #36435a;       /* kapalı kare üzerine gelince */
  --kart-golge: #1d2532;     /* kapalı kare alt kalınlığı */
  --yazi: #e9edf3;
  --soluk: #8995a7;
  --vurgu: #e5263a;          /* BetVio kırmızısı: ana düğme */
  --vurgu-ust: #ff3b4f;
  --vurgu-golge: #a3121f;
  --kazanc: #2ad46f;         /* kazanç, güvenli kare */
  --kazanc-koyu: #0f3b25;
  --kayip: #ff4d5e;
  --altin: #ffc23d;
  --mor: #8b5cf6;
  --yaricap: 8px;
  --yazi-tipi: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--zemin); color: var(--yazi);
  font: 600 13px/1.35 var(--yazi-tipi); -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
input { font: inherit; color: inherit; }

/* ── Yerleşim ─────────────────────────────────────────────── */
.kabuk { height: 100%; display: flex; flex-direction: column; }
.ust { height: 44px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--panel); border-bottom: 1px solid var(--kenar); }
.ust .marka { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .4px; }
.ust .marka small { color: var(--soluk); font-weight: 600; letter-spacing: 1.2px; font-size: 10px; }
.ust .bakiye { margin-left: auto; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  background: var(--kutu); border-radius: 6px; font-variant-numeric: tabular-nums; }
.ust .bakiye.oynat { animation: nabiz .5s; }
.ust .ikon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; color: var(--soluk); }
.ust .ikon:hover { color: var(--yazi); background: var(--kutu); }

.govde { flex: 1; min-height: 0; display: flex; }
.yan { width: 300px; flex: none; background: var(--panel); padding: 14px; display: flex; flex-direction: column;
  gap: 12px; overflow-y: auto; border-right: 1px solid var(--kenar); scrollbar-width: thin; scrollbar-color: #2c3644 transparent; }
.sahne { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 18px; overflow: hidden; }

@media (max-width: 760px) {
  .govde { flex-direction: column-reverse; overflow-y: auto; }
  .yan { width: auto; border-right: 0; border-top: 1px solid var(--kenar); overflow: visible; }
  .sahne { flex: none; min-height: 58vh; padding: 12px; }
}

/* ── Sekme (Elle / Otomatik) ──────────────────────────────── */
.sekmeler { display: flex; padding: 4px; gap: 4px; background: var(--kutu); border-radius: 999px; }
.sekmeler button { flex: 1; height: 36px; border-radius: 999px; color: var(--soluk); transition: background .15s, color .15s; }
.sekmeler button.secili { background: var(--kart); color: var(--yazi); }
.sekmeler button:not(.secili):hover { color: var(--yazi); }

/* ── Alanlar ──────────────────────────────────────────────── */
.alan { display: flex; flex-direction: column; gap: 6px; }
.alan > label, .alan .baslik { display: flex; justify-content: space-between; color: var(--soluk); font-size: 12px; }
.girdi { display: flex; height: 40px; background: var(--kutu); border: 2px solid var(--kart); border-radius: 6px;
  overflow: hidden; transition: border-color .15s; }
.girdi:focus-within { border-color: var(--kart-ust); }
.girdi input, .girdi select { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 0 10px;
  font-variant-numeric: tabular-nums; }
.girdi select { appearance: none; cursor: pointer; color: var(--yazi);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238995a7' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.girdi select option { background: var(--panel); }
.girdi .ek { display: grid; place-items: center; padding: 0 8px; color: var(--soluk); }
.girdi button.kucuk { width: 44px; background: var(--kart); border-left: 2px solid var(--kutu); transition: background .15s; }
.girdi button.kucuk:hover:not(:disabled) { background: var(--kart-ust); }
.girdi.salt input { color: var(--soluk); }
.girdi.devre { opacity: .55; pointer-events: none; }

.ikili { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }

/* Seçenek düğmeleri (zorluk, risk) */
.secenek { display: flex; gap: 4px; padding: 4px; background: var(--kutu); border-radius: 6px; }
.secenek button { flex: 1; height: 32px; border-radius: 4px; color: var(--soluk); font-size: 12px; }
.secenek button.secili { background: var(--kart); color: var(--yazi); }

/* ── Ana düğme ────────────────────────────────────────────── */
.ana { height: 48px; border-radius: 6px; background: var(--vurgu); color: #fff; font-size: 14px; font-weight: 800;
  letter-spacing: .3px; box-shadow: 0 3px 0 var(--vurgu-golge); transition: background .12s, transform .08s, box-shadow .08s; }
.ana:hover:not(:disabled) { background: var(--vurgu-ust); }
.ana:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--vurgu-golge); }
.ana:disabled { opacity: .5; }
.ana.cek { background: var(--kazanc); color: #062614; box-shadow: 0 3px 0 #0f8a43; }
.ana.cek:hover:not(:disabled) { background: #3df081; }
.ikincil { height: 40px; border-radius: 6px; background: var(--kart); transition: background .15s; }
.ikincil:hover:not(:disabled) { background: var(--kart-ust); }
.ikincil:disabled { opacity: .5; }

.ayrac { height: 1px; background: var(--kenar); margin: 2px 0; }
.not { color: var(--soluk); font-size: 11px; text-align: center; }

/* ── Alt çubuk ────────────────────────────────────────────── */
.alt { height: 40px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: var(--panel); border-top: 1px solid var(--kenar); color: var(--soluk); font-size: 12px; }
.alt button { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; }
.alt button:hover { background: var(--kutu); color: var(--yazi); }
.alt .sag { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ── Kazanç kartı (oyun alanının ortasında) ──────────────── */
.kazanc-karti { position: absolute; left: 50%; top: 50%; z-index: 20; min-width: 170px; padding: 16px 22px;
  transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; text-align: center;
  background: var(--panel); border: 3px solid var(--kazanc); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6); transition: transform .22s cubic-bezier(.2,1.6,.4,1), opacity .18s; }
.kazanc-karti.acik { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.kazanc-karti .k { font-size: 30px; font-weight: 900; color: var(--kazanc); font-variant-numeric: tabular-nums; }
.kazanc-karti .t { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--kenar); color: var(--soluk);
  font-variant-numeric: tabular-nums; }

/* ── Pencere (adil oyun, kurallar) ───────────────────────── */
.perde { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(4,7,10,.72); opacity: 0; pointer-events: none; transition: opacity .18s; }
.perde.acik { opacity: 1; pointer-events: auto; }
.pencere { width: min(480px, 100%); max-height: 88vh; overflow-y: auto; background: var(--panel); border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); transform: translateY(12px); transition: transform .2s; }
.perde.acik .pencere { transform: none; }
.pencere header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
  border-bottom: 1px solid var(--kenar); font-size: 14px; }
.pencere .ic { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pencere .ic p { margin: 0; color: var(--soluk); font-weight: 500; }
.pencere code { display: block; padding: 8px 10px; background: var(--kutu); border-radius: 6px; color: var(--yazi);
  font: 500 11px/1.4 ui-monospace, Consolas, monospace; word-break: break-all; -webkit-user-select: text; user-select: text; }

/* ── Son sonuçlar şeridi ─────────────────────────────────── */
.gecmis { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; z-index: 5; }
.gecmis span { min-width: 54px; height: 28px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px;
  background: var(--kart); font-size: 12px; font-variant-numeric: tabular-nums; animation: gir .25s ease-out; }
.gecmis span.k { background: var(--kazanc); color: #062614; }
@media (max-width: 760px) { .gecmis { top: 8px; right: 8px; } .gecmis span:nth-child(n+4) { display: none; } }

/* ── Bildirim ────────────────────────────────────────────── */
.bildirim { position: fixed; left: 50%; top: 56px; z-index: 60; transform: translate(-50%, -10px); opacity: 0;
  padding: 10px 16px; border-radius: 6px; background: var(--kayip); color: #fff; pointer-events: none;
  transition: opacity .2s, transform .2s; }
.bildirim.acik { opacity: 1; transform: translate(-50%, 0); }

@keyframes nabiz { 50% { transform: scale(1.06); color: var(--kazanc); } }
@keyframes gir { from { transform: translateX(-10px); opacity: 0; } }
@keyframes salla { 20%,60% { transform: translateX(-4px); } 40%,80% { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
  /* Kullanıcının sistemi azaltılmış hareket isteyebilir; oyun animasyonları
     yine de çalışsın diye kapatmıyoruz, yalnız salınım kısaltılır. */
  .ust .bakiye.oynat { animation-duration: .3s; }
}

/* ── Deneme bonusu (gerçek mod): üst çubuk rozeti, al düğmesi, pencere satırları ── */
.bonus-al { height: 32px; padding: 0 14px; border: none; border-radius: 8px; background: linear-gradient(180deg, #ffcf4d, #f5a623); color: #3a2400; font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.bonus-al:hover { filter: brightness(1.06); }
.bonus-rozet { height: 32px; padding: 0 10px; border: 1px solid rgba(255, 191, 64, .45); border-radius: 8px; background: rgba(255, 191, 64, .1); color: #ffcf4d; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: .6px; cursor: pointer; }
.bonus-rozet i { position: relative; width: 54px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.bonus-rozet i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--y, 0%); background: #ffcf4d; border-radius: 3px; }
.bonus-rozet small { font-size: 11px; color: #ffe7a3; font-variant-numeric: tabular-nums; }
.bakiye.bonuslu { border-color: rgba(255, 191, 64, .5); }
.bakiye.bonuslu span:first-child { color: #ffcf4d; }
.bonus-satirlar { display: flex; flex-direction: column; border: 1px solid var(--kenar); border-radius: 8px; overflow: hidden; }
.bonus-satirlar .satir { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; font-size: 13px; }
.bonus-satirlar .satir + .satir { border-top: 1px solid var(--kenar); }
.bonus-satirlar .satir span { color: var(--soluk); }
.bonus-cubuk { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bonus-cubuk i { display: block; height: 100%; background: linear-gradient(90deg, #f5a623, #ffcf4d); border-radius: 4px; }
