/* ==========================================================================
   CYBER WANTED OUTLAW — GAME STYLESHEET (Cyber-Western Dark Neon Theme)
   ========================================================================== */

* {
  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-crimson: #FF3B5C;
  --color-danger: #EF4444;
  --color-text-main: #F8FAFC;
  --color-text-muted: #94A3B8;
  --glow-crimson: 0 0 20px rgba(255, 59, 92, 0.45);
  --glow-gold: 0 0 20px rgba(245, 158, 11, 0.45);
  --glow-cyan: 0 0 20px rgba(0, 217, 245, 0.45);
  --glow-emerald: 0 0 20px rgba(0, 245, 160, 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_cyber_west.svg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: box-shadow 0.6s ease, filter 0.6s ease;
}

/* Atmospheric Cyber-West Aura during Free Spins */
#game-stage-wrapper.bonus-mode-active {
  box-shadow: inset 0 0 120px rgba(255, 59, 92, 0.45), inset 0 0 45px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   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-crimson);
  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-crimson);
  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;
}

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

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

.game-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.92) 0%, rgba(7, 9, 14, 0.5) 80%, transparent 100%);
  z-index: 40;
  flex-shrink: 0;
}

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

.game-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #FFFFFF 0%, #FF3B5C 50%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 59, 92, 0.5));
}

.game-badge-sub {
  background: linear-gradient(135deg, #FF3B5C 0%, #D97706 100%);
  color: #07090E;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  box-shadow: var(--glow-crimson);
}

/* Multiplier Meter Badge */
.top-multiplier-meter {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  background: rgba(14, 18, 29, 0.88);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.top-multiplier-meter.active {
  border-color: var(--color-gold);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
  transform: scale(1.05);
}

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

.multiplier-meter-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--color-gold-light);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
}

/* Free Spins Counter Pill */
.free-spins-counter-pill {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, rgba(255, 59, 92, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
  border: 1.5px solid var(--color-crimson);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  box-shadow: var(--glow-crimson);
  animation: pulseNeon 2s infinite ease-in-out;
}

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

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

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

@keyframes pulseNeon {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* ==========================================================================
   SIDE BETTING ACTIONS & TUMBLE FEED
   ========================================================================== */

.side-bet-actions {
  position: absolute;
  top: 74px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 30;
  width: 175px;
}

.bet-action-card {
  position: relative;
  background: rgba(14, 18, 29, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  cursor: pointer;
}

.bet-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.bet-action-card.disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.6);
}

/* Ante Bet Card */
.ante-bet-card {
  border-color: rgba(245, 158, 11, 0.35);
}

.ante-bet-card.active {
  border-color: var(--color-gold);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45);
  background: rgba(26, 20, 16, 0.92);
}

.ante-badge,
.buy-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.3rem;
}

.ante-badge {
  background: rgba(245, 158, 11, 0.2);
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
}

.buy-badge {
  background: rgba(255, 59, 92, 0.2);
  color: var(--color-crimson);
  border: 1px solid var(--color-crimson);
}

.ante-title,
.buy-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-text-main);
  margin-bottom: 0.2rem;
}

.ante-sub {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.ante-toggle-btn {
  width: 100%;
  padding: 0.35rem 0;
  border-radius: 6px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  background: #1E293B;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
}

.ante-bet-card.active .ante-toggle-btn {
  background: var(--color-gold);
  color: #07090E;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

/* Bonus Buy Card */
.bonus-buy-card {
  border-color: rgba(255, 59, 92, 0.35);
}

.bonus-buy-card:hover {
  border-color: var(--color-crimson);
  box-shadow: var(--glow-crimson);
}

.buy-cost-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 900;
  color: #FFFFFF;
  background: rgba(255, 59, 92, 0.25);
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(255, 59, 92, 0.5);
}

/* Tumble Feed Panel */
.tumble-feed-panel {
  background: rgba(14, 18, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.6rem;
  max-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

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

.tumble-feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.45rem;
  background: rgba(21, 27, 43, 0.6);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  animation: feedItemIn 0.2s ease-out;
}

@keyframes feedItemIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

/* ==========================================================================
   PIXI CANVAS CONTAINER & MOUNT POINTS
   ========================================================================== */

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

#game-canvas-container canvas {
  display: block;
}

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

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

/* ==========================================================================
   MODALS (BONUS BUY, FREE SPINS INTRO, RESULT, PAYTABLE)
   ========================================================================== */

.bonus-overlay-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.bonus-modal-content {
  background: #0E121D;
  border: 2px solid var(--color-crimson);
  border-radius: 20px;
  padding: 2.2rem 2.5rem;
  text-align: center;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), var(--glow-crimson);
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.bonus-modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 0 15px rgba(255, 59, 92, 0.6));
}

.bonus-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--color-text-main);
  margin-bottom: 0.6rem;
}

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

.bonus-modal-highlight {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-gold);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.8);
  margin-bottom: 1.6rem;
}

.bonus-confirm-actions {
  display: flex;
  gap: 0.8rem;
}

.bonus-modal-btn {
  flex: 1;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: linear-gradient(135deg, #FF3B5C 0%, #D97706 100%);
  color: #07090E;
  box-shadow: 0 4px 18px rgba(255, 59, 92, 0.45);
  transition: all 0.2s ease;
}

.bonus-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.6);
}

.bonus-btn-cancel {
  background: #1E293B;
  color: var(--color-text-muted);
  box-shadow: none;
}

.bonus-btn-cancel:hover {
  background: #334155;
  color: #FFFFFF;
}

/* Paytable / Rules Modal */
.rules-modal-content {
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  text-align: left;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.rules-card {
  background: rgba(21, 27, 43, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rules-card img {
  width: 44px;
  height: 44px;
  margin-bottom: 0.4rem;
}

.rules-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 0.2rem;
}

.rules-card-pays {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--color-gold);
  line-height: 1.3;
}

/* ==========================================================================
   RESPONSIVENESS (MOBILE / TABLET)
   ========================================================================== */

@media (max-width: 900px) {
  .side-bet-actions {
    top: 60px;
    left: 8px;
    width: 120px;
  }
  .ante-title, .buy-title {
    font-size: 0.72rem;
  }
  .tumble-feed-panel {
    display: none;
  }
}
