/* ==========================================================================
   GATES OF KASINO 1000 — GAME STYLESHEET (Cyber-Olympus Theme v2.0)
   ========================================================================== */

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

:root {
  --color-bg: #07090E;
  --color-surface: #0E121D;
  --color-surface-hover: #151B2B;
  --color-emerald: #00F5A0;
  --color-cyan: #00D9F5;
  --color-violet: #8B5CF6;
  --color-gold: #F59E0B;
  --color-gold-light: #FDE68A;
  --color-danger: #FF3B5C;
  --color-text-main: #F8FAFC;
  --color-text-muted: #94A3B8;
  --glow-emerald: 0 0 20px rgba(0, 245, 160, 0.45);
  --glow-gold: 0 0 20px rgba(245, 158, 11, 0.45);
  --glow-violet: 0 0 20px rgba(139, 92, 246, 0.45);
}

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

#game-stage-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #07090E;
  background-image: url('assets/ui/background_temple.svg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: box-shadow 0.6s ease, filter 0.6s ease;
}

/* Atmospheric Cyber-Storm Aura during Free Spins */
#game-stage-wrapper.bonus-mode-active {
  box-shadow: inset 0 0 110px rgba(139, 92, 246, 0.45), inset 0 0 40px rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.kasino-toast-container {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.kasino-toast {
  background: rgba(14, 18, 29, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-emerald);
  color: var(--color-text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.55rem 1.2rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), var(--glow-emerald);
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.kasino-toast--gold {
  border-color: var(--color-gold);
  color: var(--color-gold-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), var(--glow-gold);
}

.kasino-toast--danger,
.kasino-toast--warning {
  border-color: var(--color-danger);
  color: #FFE4E6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 20px rgba(255, 59, 92, 0.45);
}

.kasino-toast.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   TOP BAR HUD
   ========================================================================== */

.game-top-bar {
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 40;
  pointer-events: none;
}

.game-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
}

.game-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #FFF 0%, var(--color-emerald) 45%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(0, 245, 160, 0.5));
}

.game-badge-1000 {
  background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
  color: #FFF;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.top-multiplier-meter {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(14, 18, 29, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 245, 160, 0.4);
  box-shadow: var(--glow-emerald);
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

.top-multiplier-meter.active {
  border-color: var(--color-gold);
  box-shadow: var(--glow-gold);
  transform: scale(1.08);
}

.multiplier-meter-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multiplier-meter-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--color-emerald);
  text-shadow: 0 0 10px rgba(0, 245, 160, 0.7);
  min-width: 42px;
  text-align: right;
}

.top-multiplier-meter.active .multiplier-meter-val {
  color: var(--color-gold-light);
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.9);
}

.free-spins-counter-pill {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9) 0%, rgba(76, 29, 149, 0.9) 100%);
  border: 1px solid rgba(192, 132, 252, 0.6);
  box-shadow: var(--glow-violet);
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  pointer-events: auto;
}

.free-spins-counter-pill.visible {
  display: flex;
}

.fs-counter-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #E9D5FF;
  letter-spacing: 0.08em;
}

.fs-counter-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
}

/* ==========================================================================
   LEFT SIDE BETTING OPTIONS & TUMBLE FEED
   ========================================================================== */

.side-bet-actions {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  z-index: 35;
  width: 148px;
}

.bet-action-card {
  background: rgba(14, 18, 29, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem 0.65rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.bet-action-card:hover:not(.locked):not(.disabled) {
  transform: translateY(-2px);
  border-color: rgba(0, 245, 160, 0.4);
}

.bet-action-card.locked,
.bet-action-card.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.ante-bet-card {
  border-color: rgba(0, 245, 160, 0.25);
}

.ante-bet-card.active {
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.85) 0%, rgba(14, 18, 29, 0.95) 100%);
  border-color: var(--color-emerald);
  box-shadow: var(--glow-emerald);
}

.ante-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-emerald);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.ante-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  color: #FFF;
  line-height: 1.2;
}

.ante-sub {
  font-size: 0.62rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.ante-toggle-btn {
  margin-top: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  border: 1px solid rgba(0, 245, 160, 0.3);
  background: rgba(0, 245, 160, 0.1);
  color: var(--color-emerald);
  cursor: pointer;
  transition: all 0.2s;
}

.ante-bet-card.active .ante-toggle-btn {
  background: var(--color-emerald);
  color: #07090E;
}

.bonus-buy-card {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, rgba(14, 18, 29, 0.9) 100%);
}

.bonus-buy-card:hover:not(.locked):not(.disabled) {
  border-color: var(--color-gold);
  box-shadow: var(--glow-gold);
}

.buy-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.buy-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  color: #FFF;
  line-height: 1.2;
}

.buy-cost-pill {
  margin-top: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-gold-light);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
}

/* Live Tumble History Feed */
.tumble-feed-panel {
  background: rgba(14, 18, 29, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.55rem;
  min-height: 110px;
}

.tumble-feed-header {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 0.4rem;
}

.tumble-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tumble-feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(21, 27, 43, 0.85);
  border-radius: 6px;
  padding: 0.22rem 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  animation: toastSlideIn 0.2s ease-out;
}

.tumble-feed-icon {
  width: 18px;
  height: 18px;
}

.tumble-feed-count {
  color: var(--color-text-muted);
  font-weight: 700;
}

.tumble-feed-win {
  color: var(--color-emerald);
  font-weight: 800;
}

@media (max-width: 900px) {
  .side-bet-actions {
    position: absolute;
    top: 56px;
    left: 12px;
    transform: none;
    flex-direction: row;
    width: auto;
  }
  .tumble-feed-panel {
    display: none;
  }
}

/* ==========================================================================
   PIXIJS CANVAS CONTAINER & CABINET
   ========================================================================== */

#game-canvas-container {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#controls-root {
  flex-shrink: 0;
  width: 100%;
  z-index: 50;
}

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

/* ==========================================================================
   MODALS (BONUS INTRO, RESULT, BONUS BUY CONFIRM, RULES)
   ========================================================================== */

.bonus-overlay-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(14px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.bonus-overlay-modal.open {
  display: flex;
}

.bonus-modal-content {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, #151B2B 0%, #0E121D 100%);
  border: 2px solid var(--color-emerald);
  border-radius: 20px;
  padding: 2.25rem 1.75rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), var(--glow-emerald);
  animation: modalScaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bonus-buy-confirm-card {
  border-color: var(--color-gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), var(--glow-gold);
}

@keyframes modalScaleUp {
  0% { transform: scale(0.82); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.bonus-modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem auto;
  filter: drop-shadow(0 0 16px rgba(0, 245, 160, 0.6));
}

.bonus-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #FFF 0%, var(--color-emerald) 50%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.bonus-modal-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.bonus-modal-highlight {
  font-family: 'Outfit', sans-serif;
  font-size: 2.35rem;
  font-weight: 900;
  color: var(--color-emerald);
  text-shadow: 0 0 20px rgba(0, 245, 160, 0.7);
  margin-bottom: 1.5rem;
}

.bonus-confirm-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
}

.bonus-modal-btn {
  display: inline-block;
  width: 100%;
  max-width: 260px;
  padding: 0.9rem 1.4rem;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(135deg, var(--color-emerald) 0%, var(--color-cyan) 100%);
  color: #07090E;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 25px rgba(0, 245, 160, 0.4);
}

.bonus-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(0, 245, 160, 0.7);
}

.bonus-btn-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-main);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.bonus-btn-cancel:hover {
  background: rgba(255, 59, 92, 0.2);
  border-color: var(--color-danger);
  box-shadow: 0 0 20px rgba(255, 59, 92, 0.35);
}

/* RULES & PAYTABLE MODAL */
.rules-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.rules-modal-overlay.open {
  display: flex;
}

.rules-modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  background: #0E121D;
  border: 1px solid rgba(0, 245, 160, 0.25);
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 245, 160, 0.1);
}

.rules-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.rules-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-emerald);
}

.rules-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}

.rules-close-btn:hover {
  color: #FFF;
}

.rules-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin: 1.25rem 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.paytable-card {
  background: #151B2B;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.85rem 0.5rem;
  text-align: center;
}

.paytable-sym-img {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.4rem auto;
  display: block;
}

.paytable-sym-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.paytable-sym-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--color-emerald);
  line-height: 1.35;
}