/* Games UI CSS - OnlineGameLand AU */

.game-container-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  box-shadow: var(--glow-cyan), 0 20px 60px rgba(0,0,0,0.8);
  overflow: hidden;
  margin-bottom: 3rem;
  position: relative;
}

.game-header-bar {
  background: rgba(12, 16, 28, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.game-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-title-group h2 {
  font-size: 1.4rem;
}

.game-badge {
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid var(--primary-cyan);
  color: var(--primary-cyan);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.game-controls-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.game-viewport {
  width: 100%;
  min-height: 520px;
  background: radial-gradient(circle at center, #0f1526 0%, #070912 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.game-canvas-element {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Betting Control Bar */
.betting-panel {
  background: rgba(12, 16, 28, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.bet-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bet-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.bet-btn:hover {
  background: var(--primary-cyan);
  color: #000;
}

.bet-amount-display {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--accent-gold);
  min-width: 100px;
  text-align: center;
  font-size: 1.1rem;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.stat-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
}

/* Game Specific - Cyber Wheel */
.wheel-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 32px solid var(--primary-magenta);
  z-index: 10;
  filter: drop-shadow(0 4px 10px rgba(255, 0, 127, 0.8));
}

/* Game Specific - Land Miner Grid */
.miner-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.miner-tile {
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, rgba(28, 37, 65, 0.9), rgba(18, 24, 43, 0.9));
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  position: relative;
  user-select: none;
}

.miner-tile:hover:not(.revealed) {
  transform: scale(1.05);
  border-color: var(--primary-cyan);
  box-shadow: var(--glow-cyan);
}

.miner-tile.revealed-gem {
  background: linear-gradient(145deg, rgba(0, 255, 136, 0.2), rgba(0, 242, 255, 0.2));
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.miner-tile.revealed-bomb {
  background: linear-gradient(145deg, rgba(255, 0, 127, 0.3), rgba(199, 0, 57, 0.3));
  border-color: var(--primary-magenta);
  box-shadow: var(--glow-magenta);
}

.miner-multiplier-banner {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: var(--glow-gold);
  margin-bottom: 1.5rem;
}

/* Game Specific - Neon Match 3 */
.match3-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  max-width: 480px;
  width: 100%;
  background: rgba(10, 14, 26, 0.85);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 242, 255, 0.1);
}

.match3-cell {
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  user-select: none;
  padding: 4px;
}

.match3-cell:hover {
  transform: scale(1.08);
  border-color: var(--primary-cyan);
  background: rgba(0, 242, 255, 0.08);
}

.match3-cell.selected {
  border-color: var(--accent-gold);
  box-shadow: var(--glow-gold);
  transform: scale(1.12);
  animation: pulseSelect 1s infinite alternate;
}

.match3-cell.pop-matched {
  animation: matchPop 0.3s ease-out forwards;
}

@keyframes matchPop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); filter: brightness(1.8); }
  100% { transform: scale(0.2); opacity: 0; }
}

/* Gem Colors */
.gem-cyan { color: #00f2ff; filter: drop-shadow(0 0 6px rgba(0, 242, 255, 0.7)); }
.gem-magenta { color: #ff007f; filter: drop-shadow(0 0 6px rgba(255, 0, 127, 0.7)); }
.gem-gold { color: #ffd700; filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7)); }
.gem-green { color: #00ff88; filter: drop-shadow(0 0 6px rgba(0, 255, 136, 0.7)); }
.gem-purple { color: #aa00ff; filter: drop-shadow(0 0 6px rgba(170, 0, 255, 0.7)); }
.gem-orange { color: #ff7700; filter: drop-shadow(0 0 6px rgba(255, 119, 0, 0.7)); }
.gem-star { color: #ffffff; filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1)); animation: starSpin 3s linear infinite; }

@keyframes starSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulseSelect {
  0% { box-shadow: 0 0 10px var(--accent-gold); }
  100% { box-shadow: 0 0 25px var(--accent-gold); }
}

/* Game Specific - GameLand Reels Slots */
.slot-machine-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 650px;
}

.reels-container {
  display: flex;
  gap: 10px;
  background: #05070c;
  border: 3px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.9), var(--glow-cyan);
  width: 100%;
  justify-content: center;
}

.reel-column {
  flex: 1;
  background: linear-gradient(180deg, #0e1322 0%, #161d33 50%, #0e1322 100%);
  border: 1px solid rgba(0, 242, 255, 0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 270px;
  position: relative;
}

.reel-strip {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  width: 100%;
  transition: top 0.05s linear;
}

.reel-symbol {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  user-select: none;
}

.win-overlay-text {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 0 40px rgba(255, 0, 127, 0.8);
  pointer-events: none;
  animation: winScale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes winScale {
  0% { transform: scale(0.2); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Paytable & Rules Section */
.game-details-tabs {
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.game-details-tabs h4 {
  font-size: 1.1rem;
  color: var(--primary-cyan);
  margin-bottom: 0.75rem;
}

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

.paytable-item {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.paytable-item .icon {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.paytable-item .multiplier {
  font-weight: 800;
  color: var(--accent-gold);
}

/* Mobile Responsiveness for Game Interfaces */
@media (max-width: 768px) {
  .game-header-bar {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    gap: 0.75rem;
  }

  .game-title-group {
    flex-direction: column;
    gap: 0.4rem;
  }

  .game-title-group h2 {
    font-size: 1.25rem;
  }

  .game-viewport {
    min-height: auto;
    padding: 1.25rem 0.75rem;
  }

  .betting-panel {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    text-align: center;
  }

  .bet-selector {
    flex-wrap: wrap;
    justify-content: center;
  }

  .betting-panel .btn {
    width: 100%;
    justify-content: center;
  }

  /* Reel scaling on mobile tablets & smartphones */
  .reels-container {
    gap: 6px;
    padding: 8px;
  }

  .reel-column {
    height: 225px;
  }

  .reel-symbol {
    height: 75px;
    font-size: 2rem;
  }

  .win-overlay-text {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .game-viewport {
    padding: 1rem 0.4rem;
  }

  /* Land Miner Grid on small phones */
  .miner-board {
    gap: 6px;
    max-width: 320px;
  }

  .miner-tile {
    font-size: 1.4rem;
    border-width: 1px;
  }

  /* Neon Match-3 Board on small phones */
  .match3-board {
    gap: 3px;
    padding: 6px;
    max-width: 340px;
  }

  .match3-cell {
    padding: 2px;
  }

  /* Reels machine on small phones */
  .reels-container {
    gap: 3px;
    padding: 5px;
  }

  .reel-column {
    height: 180px;
  }

  .reel-symbol {
    height: 60px;
    font-size: 1.6rem;
  }

  .reel-symbol svg {
    width: 36px;
    height: 36px;
  }

  .paytable-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 360px) {
  .miner-board {
    max-width: 280px;
    gap: 4px;
  }

  .match3-board {
    max-width: 290px;
    gap: 2px;
    padding: 4px;
  }

  .reel-column {
    height: 150px;
  }

  .reel-symbol {
    height: 50px;
    font-size: 1.3rem;
  }

  .reel-symbol svg {
    width: 28px;
    height: 28px;
  }
}

