/* Quantum Crash Game Styles - Aviator Style */

.game-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  min-height: calc(100vh - 73px);
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  position: relative;
}

.game-header {
  text-align: center;
  padding: 32px 24px 24px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}

.game-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

.game-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.game-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 0;
  height: calc(100vh - 185px);
}

/* Game Canvas Area - Main Display */
.game-canvas-wrapper {
  background: #0f0f0f;
  border-right: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Animated Background Grid */
.game-canvas-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Gradient Overlay */
.game-canvas-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

/* Rocket/Plane Icon */
.rocket-display {
  position: absolute;
  font-size: 120px;
  filter: drop-shadow(0 0 30px rgba(255, 107, 107, 0.5));
  animation: rocketIdle 2s ease-in-out infinite;
  z-index: 2;
  transition: all 0.3s ease;
}

.rocket-display.flying {
  animation: rocketFly 0.5s ease-in-out infinite;
}

.rocket-display.crashed {
  animation: rocketCrash 0.5s ease forwards;
}

@keyframes rocketIdle {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50% { transform: translateY(-10px) rotate(-10deg); }
}

@keyframes rocketFly {
  0%, 100% { transform: translateY(0) rotate(-15deg) scale(1); }
  50% { transform: translateY(-5px) rotate(-10deg) scale(1.05); }
}

@keyframes rocketCrash {
  0% { transform: rotate(-15deg) scale(1); opacity: 1; }
  50% { transform: rotate(45deg) scale(1.2); opacity: 0.5; }
  100% { transform: rotate(90deg) scale(0.5); opacity: 0; }
}

/* Trail Effect */
.rocket-trail {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: trailPulse 1s ease-in-out infinite;
  z-index: 1;
}

@keyframes trailPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* Multiplier Display */
.multiplier-display {
  font-size: clamp(80px, 15vw, 180px);
  font-weight: 900;
  letter-spacing: -4px;
  background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 20px;
  font-family: 'Courier New', monospace;
  position: relative;
  z-index: 3;
  transition: all 0.05s ease;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
}

.multiplier-display.flying {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: multiplierGrow 0.1s ease infinite;
}

.multiplier-display.crashed {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: crashShake 0.5s ease;
}

.multiplier-display.won {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: winPulse 0.5s ease;
}

@keyframes multiplierGrow {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes crashShake {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-2deg); }
  75% { transform: scale(1.1) rotate(2deg); }
}

@keyframes winPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.game-status {
  font-size: 18px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  margin-top: 20px;
  position: relative;
  z-index: 3;
}

.game-status.flying {
  color: var(--success);
  animation: statusBlink 1s ease infinite;
}

.game-status.crashed {
  color: var(--error);
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Control Panel - Right Side */
.game-controls {
  background: var(--secondary-black);
  padding: 32px 24px;
  overflow-y: auto;
  border-left: 1px solid var(--border-subtle);
}

.balance-display {
  background: var(--tertiary-black);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}

.balance-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 700;
}

.balance-value {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.balance-currency {
  font-size: 18px;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* Bet Controls */
.bet-controls {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--tertiary-black);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-medium);
  background: var(--secondary-black);
}

/* Quick Bet Buttons */
.quick-bets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.quick-bet-btn {
  background: var(--tertiary-black);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-bet-btn:hover {
  background: var(--glass-bg);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

/* Action Buttons */
.game-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.btn-bet {
  width: 100%;
  padding: 20px;
  font-size: 18px;
  font-weight: 800;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.btn-bet::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.btn-bet:hover::before {
  width: 300px;
  height: 300px;
}

.btn-bet span {
  position: relative;
  z-index: 1;
}

.btn-bet-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.btn-bet-primary:hover {
  box-shadow: 0 6px 30px rgba(34, 197, 94, 0.5);
  transform: translateY(-2px);
}

.btn-bet-cashout {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
  animation: cashoutPulse 1.5s ease infinite;
}

.btn-bet-cashout:hover {
  box-shadow: 0 6px 30px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

@keyframes cashoutPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(245, 158, 11, 0.6); }
}

.btn-bet-secondary {
  background: var(--tertiary-black);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.btn-bet-secondary:hover {
  background: var(--glass-bg);
}

.btn-bet:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Game Info */
.game-info {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.info-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* History */
.game-history {
  margin-top: 32px;
}

.history-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.history-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-item {
  background: var(--tertiary-black);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.history-item.win {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.history-item.loss {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}

/* Risk Warning */
.risk-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-top: 24px;
}

.risk-warning-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--error);
  margin-bottom: 8px;
}

.risk-warning-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
  .game-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .game-canvas-wrapper {
    min-height: 400px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .multiplier-display {
    font-size: 100px;
  }

  .rocket-display {
    font-size: 80px;
  }
}

@media (max-width: 768px) {
  .game-header {
    padding: 24px 16px 16px;
  }

  .game-title {
    font-size: 28px;
  }

  .multiplier-display {
    font-size: 80px;
  }

  .rocket-display {
    font-size: 60px;
  }

  .game-controls {
    padding: 24px 16px;
  }

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