/**
 * @file games/cyber-heist/game.css
 * @description Arkusz stylów dla gry Cyber Heist: Hold & Win 10000 zgodny ze standardem SSOT KASINO.
 */

:root {
  --ch-bg-deep: #06080F;
  --ch-bg-radial: #111827;
  --ch-neon-emerald: #00F5A0;
  --ch-neon-cyan: #38BDF8;
  --ch-neon-gold: #F59E0B;
  --ch-neon-purple: #8B5CF6;
  --ch-neon-rose: #F43F5E;
  --ch-surface-glass: rgba(15, 23, 42, 0.78);
  --ch-border-subtle: rgba(148, 163, 184, 0.18);
  --ch-text-primary: #F8FAFC;
  --ch-text-muted: #94A3B8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--ch-bg-deep);
  font-family: 'Inter', sans-serif;
  color: var(--ch-text-primary);
}

#game-stage-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 38%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 50% 50%, var(--ch-bg-radial) 0%, var(--ch-bg-deep) 100%);
  transition: background 0.6s ease;
}

#game-stage-wrapper.mode-hold-and-win {
  background:
    radial-gradient(circle at 50% 40%, rgba(245, 158, 11, 0.22) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, #1F1209 0%, #070503 100%);
}

#game-stage-wrapper.mode-pick-bonus {
  background:
    radial-gradient(circle at 50% 40%, rgba(139, 92, 246, 0.24) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, #170F2E 0%, #06040D 100%);
}

/* ================= TOP BAR HUD & JACKPOTS ================= */
.game-top-bar {
  flex-shrink: 0;
  min-height: 62px;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(7, 9, 14, 0.85);
  border-bottom: 1px solid var(--ch-border-subtle);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.brand-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.badge-volatility {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ch-neon-gold);
}

.game-logo {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ch-text-primary);
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.game-logo span {
  color: var(--ch-neon-emerald);
}

.jackpot-Ribbon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.jp-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 96px;
  transform: translate3d(0, 0, 0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.jp-tier {
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.jp-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 800;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}

.jp-mini { border-color: rgba(56, 189, 248, 0.45); }
.jp-mini .jp-tier { color: #38BDF8; }

.jp-minor { border-color: rgba(0, 245, 160, 0.45); }
.jp-minor .jp-tier { color: #00F5A0; }

.jp-major { border-color: rgba(168, 85, 247, 0.55); }
.jp-major .jp-tier { color: #C084FC; }

.jp-maxi { border-color: rgba(244, 63, 94, 0.55); }
.jp-maxi .jp-tier { color: #FB7185; }

.jp-grand {
  border-color: rgba(245, 158, 11, 0.85);
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.55) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.28);
}
.jp-grand .jp-tier { color: #FBBF24; }
.jp-grand .jp-val { color: #FDE68A; }

.status-cluster {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-counter-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid var(--ch-neon-gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.pill-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #FDE68A;
}

.pill-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 800;
  color: #FFFFFF;
}

.rtp-indicator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--ch-text-muted);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ================= MAIN CANVAS STAGE & SIDEBAR ================= */
#game-canvas-container {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bonus-buy-sidebar {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translate3d(0, -50%, 0);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 30;
}

.buy-card {
  width: 156px;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--ch-surface-glass);
  backdrop-filter: blur(12px);
  color: var(--ch-text-primary);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.buy-card:hover:not(:disabled) {
  transform: translate3d(4px, 0, 0) scale(1.03);
}

.buy-card:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.buy-hold-win {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.18);
}

.buy-hold-win:hover:not(:disabled) {
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.38);
}

.buy-pick-click {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.18);
}

.buy-pick-click:hover:not(:disabled) {
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.38);
}

.buy-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ch-neon-emerald);
}

.buy-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 900;
  color: #FFFFFF;
}

.buy-desc {
  font-size: 0.68rem;
  color: var(--ch-text-muted);
}

.buy-price {
  margin-top: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 800;
  color: #FDE68A;
}

.feature-banner-hud {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  padding: 0.35rem 1.2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.35);
  pointer-events: none;
  z-index: 25;
}

.banner-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #E2E8F0;
}

/* ================= CONTROLS & CELEBRATION ROOTS ================= */
#controls-root {
  flex-shrink: 0;
  width: 100%;
  z-index: 50;
}

#celebration-root {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}

/* ================= PAYTABLE MODAL ================= */
.paytable-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.86);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
}

.paytable-overlay.open {
  display: flex;
}

.paytable-card {
  width: min(860px, 95vw);
  max-height: 85vh;
  background: #0F172A;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.paytable-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ch-border-subtle);
  background: rgba(2, 6, 23, 0.6);
}

.paytable-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--ch-neon-emerald);
}

.paytable-close {
  background: transparent;
  border: none;
  color: var(--ch-text-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.paytable-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pt-section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.98rem;
  color: #38BDF8;
  margin-bottom: 0.45rem;
}

.pt-section p, .pt-section li {
  font-size: 0.86rem;
  line-height: 1.55;
  color: #CBD5E1;
}

.pt-section ul {
  padding-left: 1.2rem;
  margin-top: 0.4rem;
}

.pt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.pt-item {
  padding: 0.65rem;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pt-item-title {
  font-weight: 700;
  font-size: 0.82rem;
}

.pt-item-payouts {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--ch-text-muted);
}

/* ================= RESPONSIVE MOBILE RULES ================= */
@media (max-width: 960px) {
  .jackpot-Ribbon {
    gap: 0.28rem;
  }
  .jp-box {
    min-width: 68px;
    padding: 0.2rem 0.4rem;
  }
  .jp-tier { font-size: 0.52rem; }
  .jp-val { font-size: 0.68rem; }

  .bonus-buy-sidebar {
    left: 0.5rem;
    top: auto;
    bottom: 0.5rem;
    transform: none;
    flex-direction: row;
  }
  .buy-card {
    width: 128px;
    padding: 0.45rem 0.55rem;
  }
  .buy-desc { display: none; }
}