/* Game Container */
.game-container {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.game-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 212, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.game-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.game-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 20px rgba(0, 212, 212, 0.5));
}

.game-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Game Layout */
.game-layout {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
}

.game-panel {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(26, 31, 46, 0.8) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
}

.game-panel-center {
  min-height: 550px;
}

.panel-title {
  color: var(--accent-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Stats Panel */
.stats-panel {
  height: fit-content;
}

.stats-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(0, 212, 212, 0.3);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Bet Options */
.bet-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bet-btn {
  padding: 0.6rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.8) 0%, rgba(0, 212, 212, 0.8) 100%);
  border: 2px solid transparent;
  border-radius: 50%;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bet-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(0, 212, 212, 0.5);
  border-color: var(--accent-primary);
}

.bet-btn.active {
  background: var(--accent-primary);
  box-shadow: 0 0 25px rgba(0, 212, 212, 0.7);
  transform: scale(1.1);
}

.custom-bet {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.custom-bet input {
  flex: 1;
  padding: 0.6rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.custom-bet input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(0, 212, 212, 0.2);
}

.set-btn {
  padding: 0.6rem 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-md);
  color: var(--accent-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.set-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* Game Buttons */
.game-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.deal-btn,
.spin-btn,
.roll-btn {
  background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
  color: var(--text-primary);
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.deal-btn:hover:not(:disabled),
.spin-btn:hover:not(:disabled),
.roll-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.hit-btn {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #10b981 100%);
  color: var(--bg-primary);
  flex: 1;
}

.stand-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  flex: 1;
}

.hit-btn:hover:not(:disabled),
.stand-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

/* ==================== CARD GAME ==================== */
.cards-container {
  margin: 1rem 0;
}

.player-cards,
.dealer-cards {
  margin-bottom: 1.5rem;
}

.player-cards h3,
.dealer-cards h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cards {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 110px;
  margin-bottom: 0.5rem;
  perspective: 1000px;
}

.playing-card {
  width: 70px;
  height: 100px;
  background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
  border: 2px solid #ddd;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: cardDeal 0.4s ease-out;
  position: relative;
}

.playing-card .card-suit {
  font-size: 2rem;
  line-height: 1;
}

.playing-card .card-value {
  font-size: 1.2rem;
  color: #1a1a1a;
  margin-top: 0.25rem;
}

.playing-card.red .card-suit,
.playing-card.red .card-value {
  color: #dc2626;
}

.playing-card.black .card-suit,
.playing-card.black .card-value {
  color: #1a1a1a;
}

.playing-card.hidden {
  background: linear-gradient(145deg, #1a1f2e 0%, #2d3748 100%);
  border-color: var(--accent-primary);
}

.playing-card.hidden .card-suit,
.playing-card.hidden .card-value {
  display: none;
}

.playing-card.hidden::before {
  content: '?';
  font-size: 2.5rem;
  color: var(--accent-primary);
}

@keyframes cardDeal {
  from {
    transform: translateY(-80px) rotateY(180deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotateY(0);
    opacity: 1;
  }
}

.card-total {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-primary);
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.game-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.game-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.game-result.win {
  color: #10b981;
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.1);
  animation: pulseWin 0.5s ease;
}

.game-result.lose {
  color: #ef4444;
  border: 2px solid #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.game-result.push {
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  background: rgba(0, 212, 212, 0.1);
}

@keyframes pulseWin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==================== SPINNER GAME ==================== */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 0;
}

.slot-machine {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 30px rgba(0, 212, 212, 0.3);
  margin-bottom: 1.5rem;
}

.slot-reel {
  width: 80px;
  height: 100px;
  background: linear-gradient(180deg, #0a0e1a 0%, #1a1f2e 50%, #0a0e1a 100%);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
  position: relative;
}

.slot-reel.spinning .slot-symbol {
  animation: slotSpin 0.1s linear infinite;
}

@keyframes slotSpin {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.slot-symbol {
  transition: transform 0.3s ease;
}

.spinner-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.spinner-result.win {
  color: #10b981;
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.spinner-result.lose {
  color: #ef4444;
  border: 2px solid #ef4444;
}

/* ==================== PREDICTOR GAME ==================== */
.prediction-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0;
}

.prediction-options {
  display: flex;
  gap: 1.5rem;
  width: 100%;
}

.prediction-btn {
  flex: 1;
  padding: 2rem 1rem;
  border: 3px solid transparent;
  border-radius: var(--radius-lg);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.red-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.blue-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.prediction-btn:hover:not(:disabled) {
  transform: translateY(-5px) scale(1.02);
}

.prediction-btn.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 30px rgba(0, 212, 212, 0.6);
  transform: scale(1.05);
}

.prediction-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.prediction-icon {
  font-size: 2.5rem;
}

.prediction-display {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 4px solid var(--border-color);
  background: var(--bg-secondary);
  transition: all 0.5s ease;
}

.prediction-display.red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #ef4444;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
}

.prediction-display.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #3b82f6;
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
}

.prediction-display.spinning {
  animation: colorSpin 0.15s linear infinite;
}

@keyframes colorSpin {
  0% { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
  50% { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
  100% { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
}

.prediction-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ==================== DICE GAME ==================== */
.dice-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0;
}

.dice-options {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.dice-choice-btn {
  flex: 1;
  padding: 1.25rem;
  border: 3px solid transparent;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.low-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.high-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.dice-choice-btn:hover:not(:disabled) {
  transform: translateY(-3px);
}

.dice-choice-btn.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 25px rgba(0, 212, 212, 0.6);
  transform: scale(1.02);
}

.dice-choice-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dice-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.dice-cube {
  width: 120px;
  height: 120px;
  background: linear-gradient(145deg, #ffffff 0%, #e0e0e0 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 3px solid var(--accent-primary);
  position: relative;
}

.dice-cube.rolling {
  animation: diceRoll 0.15s ease-in-out infinite;
}

@keyframes diceRoll {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(15deg) scale(1.1); }
  50% { transform: rotate(0deg) scale(1); }
  75% { transform: rotate(-15deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

.dice-face {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.dice-face.face-1 { grid-template-columns: 1fr; }
.dice-face.face-2 { grid-template-columns: 1fr 1fr; }
.dice-face.face-3 { grid-template-columns: repeat(3, 1fr); }
.dice-face.face-4 { grid-template-columns: repeat(2, 1fr); }
.dice-face.face-5 { grid-template-columns: repeat(3, 1fr); }
.dice-face.face-6 { grid-template-columns: repeat(3, 1fr); }

.dice-dot {
  width: 18px;
  height: 18px;
  background: #1a1a1a;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.dice-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.dice-game-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ==================== RULES PANEL ==================== */
.rules-panel {
  height: fit-content;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.rules-list li {
  padding: 0.6rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rules-list li::before {
  content: '•';
  color: var(--accent-primary);
  font-weight: bold;
}

.rules-list li:last-child {
  border-bottom: none;
}

.warning-box {
  background: rgba(0, 212, 212, 0.1);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.warning-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.warning-content {
  flex: 1;
}

.warning-content strong {
  display: block;
  color: var(--accent-primary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.warning-content p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.4;
}

.guest-mode-message {
  margin-top: auto;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  border: 1px dashed var(--border-color);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .game-layout {
    grid-template-columns: 180px 1fr 180px;
  }
}

@media (max-width: 968px) {
  .game-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .game-panel {
    padding: 1.25rem;
  }

  .stats-content {
    flex-direction: row;
    justify-content: space-around;
  }

  .stat-item {
    padding: 0.75rem;
  }

  .prediction-options {
    flex-direction: row;
  }

  .dice-options {
    flex-direction: row;
  }

  .slot-reel {
    width: 70px;
    height: 90px;
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .game-title {
    font-size: 1.75rem;
  }

  .game-icon {
    font-size: 3rem;
  }

  .bet-options {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }

  .bet-btn {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .slot-reel {
    width: 60px;
    height: 80px;
    font-size: 2rem;
  }

  .playing-card {
    width: 55px;
    height: 80px;
  }

  .playing-card .card-suit {
    font-size: 1.5rem;
  }

  .playing-card .card-value {
    font-size: 1rem;
  }

  .dice-cube {
    width: 100px;
    height: 100px;
  }

  .prediction-display {
    width: 120px;
    height: 120px;
    font-size: 2.5rem;
  }
}
