/* ═══════════════════════════════════════════════════════════════
   JargonBet — Game Launcher v1.0
   Real/Demo Choice Modal + Fullscreen Iframe Engine
   ═══════════════════════════════════════════════════════════════ */

/* ── Toast ──────────────────────────────────────────────────── */
.jb-toast {
  position: fixed; left: 50%; bottom: 90px;
  transform: translate(-50%, 20px);
  padding: 12px 22px;
  background: linear-gradient(135deg, #1a3454, #0D1B2A);
  color: #fff; font-weight: 600; font-size: .92rem;
  border: 1px solid rgba(184,150,62,.35);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 99999;
}
.jb-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.jb-toast-warn   { border-color: #e7a03a; }

/* ═══════════════════════════════════════════════════════════════
   REAL/DEMO CHOICE MODAL
   ═══════════════════════════════════════════════════════════════ */
.jb-choice-overlay {
  position: fixed; inset: 0;
  background: rgba(6, 14, 26, .76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .22s ease;
  z-index: 99990; padding: 20px;
}
.jb-choice-overlay.is-open { opacity: 1; }

.jb-choice-modal {
  width: 100%; max-width: 440px;
  background: linear-gradient(160deg, #112238 0%, #0B1728 100%);
  border: 1px solid rgba(184,150,62,.3);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6),
              0 0 0 1px rgba(184,150,62,.12) inset;
  transform: translateY(16px) scale(.98);
  transition: transform .28s cubic-bezier(.2,.9,.3,1.2);
  position: relative;
}
.jb-choice-overlay.is-open .jb-choice-modal { transform: translateY(0) scale(1); }

.jb-choice-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: none;
  color: #fff; font-size: 20px; cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s;
  z-index: 3;
}
.jb-choice-close:hover { background: rgba(255,255,255,.18); }

.jb-choice-art {
  position: relative; height: 170px;
  display: grid; place-items: center;
  overflow: hidden;
}
.jb-choice-art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.jb-choice-letter {
  font-family: Georgia, serif; font-weight: 900;
  font-size: 90px; color: #B8963E;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
}
.jb-choice-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, #0B1728 100%);
}

.jb-choice-head {
  padding: 4px 22px 0;
  margin-top: -34px;
  position: relative; z-index: 2;
}
.jb-choice-head h3 {
  margin: 0 0 4px;
  color: #fff; font-size: 1.38rem; font-weight: 800;
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
}
.jb-choice-prov {
  display: inline-block;
  color: #8aaec8; font-size: .82rem; font-weight: 500;
}
.jb-choice-rtp {
  display: inline-block; margin-left: 8px;
  padding: 2px 10px;
  background: rgba(184,150,62,.16);
  color: #d4ae58; font-size: .72rem; font-weight: 700;
  border-radius: 999px; border: 1px solid rgba(184,150,62,.25);
}

.jb-choice-body { padding: 18px 22px 24px; }
.jb-choice-title {
  margin: 0 0 14px;
  color: #8aaec8; font-size: .88rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .8px;
}

.jb-btn-real, .jb-btn-demo {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: none; border-radius: 14px;
  cursor: pointer; text-align: left;
  font-family: inherit;
  margin-bottom: 10px;
  transition: transform .2s, box-shadow .2s, filter .2s;
  position: relative;
}
.jb-btn-real {
  background: linear-gradient(135deg, #d4ae58 0%, #B8963E 50%, #8a6e28 100%);
  color: #0D1B2A;
  box-shadow: 0 8px 24px rgba(184,150,62,.35),
              0 0 0 1px rgba(184,150,62,.4) inset;
}
.jb-btn-demo {
  background: linear-gradient(135deg, #1e3d63 0%, #162d44 50%, #0D1B2A 100%);
  color: #fff;
  border: 1px solid rgba(138,174,200,.25);
}
.jb-btn-real:hover:not(.is-disabled),
.jb-btn-demo:hover { transform: translateY(-2px); filter: brightness(1.08); }
.jb-btn-real:active:not(.is-disabled),
.jb-btn-demo:active { transform: translateY(0); }

.jb-btn-real.is-disabled {
  filter: grayscale(.6) brightness(.65);
  cursor: not-allowed;
}

.jb-btn-icon { font-size: 26px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.jb-btn-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.jb-btn-main b { font-size: 1.05rem; font-weight: 800; letter-spacing: .3px; }
.jb-btn-main small { font-size: .78rem; opacity: .85; font-weight: 500; }
.jb-btn-arrow { font-size: 22px; font-weight: 700; opacity: .7; }

.jb-btn-demo.is-sim small { color: #e7a03a; }

/* ═══════════════════════════════════════════════════════════════
   IFRAME LAUNCHER (FULLSCREEN)
   ═══════════════════════════════════════════════════════════════ */
.jb-launcher-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99995;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.98);
  transition: opacity .24s ease, transform .24s ease;
}
.jb-launcher-overlay.is-open { opacity: 1; transform: scale(1); }

.jb-launcher-container {
  position: relative;
  width: 90vw; height: 90vh;
  max-width: 1400px; max-height: 850px;
  display: flex;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.9);
}

.jb-launcher-sidebar {
  position: absolute;
  right: -48px;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jb-launcher-exit, .jb-launcher-newtab {
  width: 48px; height: 44px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.1);
  border-left: none;
  color: #aaa; font-size: 20px;
  border-radius: 0 10px 10px 0;
  cursor: pointer; display: grid; place-items: center;
  transition: background .18s, color .18s;
}
.jb-launcher-exit:hover { background: #c62e2e; color: #fff; border-color: #c62e2e; }
.jb-launcher-newtab:hover { background: #222; color: #fff; }

.jb-launcher-body {
  flex: 1; position: relative; overflow: hidden;
  background: #000;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.jb-launcher-iframe {
  width: 100%; height: 100%;
  border: 0; background: #000;
  border-radius: 12px;
}

/* Yükleme ekranı */
.jb-launcher-loading {
  display: flex; flex-direction: column;
  gap: 16px; align-items: center;
  color: #8aaec8; font-size: .95rem;
}
.jb-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(184,150,62,.2);
  border-top-color: #B8963E;
  border-radius: 50%;
  animation: jb-spin 1s linear infinite;
}
@keyframes jb-spin { to { transform: rotate(360deg); } }

/* Hata ekranı */
.jb-launcher-error {
  text-align: center; color: #fff;
  display: flex; flex-direction: column;
  gap: 16px; align-items: center;
  padding: 30px;
}
.jb-launcher-error-ico { font-size: 48px; }
.jb-launcher-error h3 { margin: 0; font-size: 1.2rem; color: #e7a03a; }
.jb-launcher-error button { max-width: 220px; }

/* ═══════════════════════════════════════════════════════════════
   DAHİLİ SİMÜLATÖR (provider URL yoksa)
   ═══════════════════════════════════════════════════════════════ */
.jb-sim-stage {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  padding: 20px;
}
.jb-sim-card {
  background: rgba(13,27,42,.85);
  border: 1px solid rgba(184,150,62,.35);
  border-radius: 22px;
  padding: 32px 28px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  text-align: center;
  backdrop-filter: blur(6px);
}
.jb-sim-badge {
  display: inline-block;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(184,150,62,.15);
  color: #d4ae58; font-size: .72rem; font-weight: 800;
  letter-spacing: 1.2px;
  border: 1px solid rgba(184,150,62,.3);
  margin-bottom: 12px;
}
.jb-sim-card h2 { margin: 0 0 4px; color: #fff; font-size: 1.5rem; }
.jb-sim-card p  { margin: 0 0 20px; color: #8aaec8; font-size: .88rem; }
.jb-sim-reels {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 10px; margin-bottom: 18px;
}
.jb-sim-reel {
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #162d44, #0D1B2A);
  border: 1px solid rgba(184,150,62,.3);
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 42px;
  box-shadow: inset 0 0 18px rgba(0,0,0,.5);
}
.jb-sim-reel.spin { animation: jb-reel-spin .85s linear infinite; }
@keyframes jb-reel-spin {
  0%   { transform: translateY(0)  rotate(0); filter: blur(1.5px); }
  50%  { transform: translateY(-6px) rotate(-4deg); filter: blur(3px); }
  100% { transform: translateY(0)  rotate(0); filter: blur(1.5px); }
}
.jb-sim-info { margin-bottom: 14px; }
.jb-sim-note { color: #e7a03a; font-size: .78rem; }

.jb-sim-spin {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #d4ae58, #B8963E);
  color: #0D1B2A; border: none; border-radius: 12px;
  font-size: 1.05rem; font-weight: 900; letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(184,150,62,.4);
  transition: transform .15s, filter .15s;
}
.jb-sim-spin:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.jb-sim-spin:disabled { opacity: .6; cursor: wait; }

.jb-sim-result { margin-top: 14px; min-height: 28px; font-weight: 700; }
.jb-sim-win    { color: #4caf50; font-size: 1.25rem; }
.jb-sim-lose   { color: #8aaec8; }

/* ═══════════════════════════════════════════════════════════════
   BAKİYE FLASH (UserEngine)
   ═══════════════════════════════════════════════════════════════ */
.header-balance.is-flashing {
  animation: jb-balance-flash .9s ease;
}
@keyframes jb-balance-flash {
  0%   { box-shadow: 0 0 0 0 rgba(184,150,62,.6); }
  40%  { box-shadow: 0 0 0 8px rgba(184,150,62,.0); }
  100% { box-shadow: 0 0 0 0 rgba(184,150,62,0); }
}

/* ═══════════════════════════════════════════════════════════════
   MOBİL / RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .jb-choice-modal { max-width: 100%; border-radius: 18px 18px 0 0;
                     margin-bottom: 0; align-self: flex-end; }
  .jb-choice-overlay { align-items: flex-end; padding: 0; }
  .jb-choice-art { height: 140px; }
  .jb-launcher-topbar { padding: 8px 12px; }
  .jb-launcher-meta b { max-width: 50vw; font-size: .9rem; }
  .jb-launcher-fs, .jb-launcher-exit { width: 34px; height: 34px; }
  .jb-sim-card { padding: 22px 16px; }
  .jb-sim-reel { font-size: 32px; }
}

/* Oyun kartı tıklanabilirlik (live cards için) */
.live-card { cursor: pointer; }
.live-card:hover { transform: translateY(-3px); }
