/* ============================================
   CRAZYONOPOLY - AAA Premium Casino Games CSS
   Photorealistic Casino Game Styling
   HappyStoner5420 Games!
   ============================================ */

/* ============================================
   SHARED CASINO GAME STYLES
   ============================================ */

.casino-game-screen {
  background: #000;
  overflow: hidden;
}

.casino-game-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.casino-game-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: 100px;
  max-height: 100vh;
  overflow-y: auto;
}

.casino-game-title {
  font-family: var(--font-game);
  font-size: clamp(32px, 6vw, 56px);
  letter-spacing: 4px;
  background: linear-gradient(135deg, #ffd700, #ff9f43, #ffd700);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerTitle 2s linear infinite;
  filter: drop-shadow(0 0 15px rgba(255,159,67,0.5));
  text-align: center;
}

@keyframes shimmerTitle {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.casino-game-subtitle {
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(255,200,100,0.7);
  letter-spacing: 2px;
  margin-top: -12px;
}

.casino-back-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 32px;
  background: linear-gradient(180deg, rgba(60,30,30,0.95), rgba(40,15,15,0.98));
  border: 2px solid rgba(231,76,60,0.6);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(231,76,60,0.3);
}

.casino-back-btn:hover {
  background: linear-gradient(180deg, rgba(80,40,40,0.98), rgba(60,25,25,1));
  border-color: rgba(231,76,60,0.9);
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 6px 30px rgba(231,76,60,0.5);
}

/* ============================================
   LUCKY WHEEL STYLES
   ============================================ */

.wheel-bg {
  background: radial-gradient(ellipse at center, #2a1a3a 0%, #150a20 50%, #0a0510 100%);
}

.wheel-stage {
  perspective: 1000px;
  margin: 20px 0;
}

.wheel-frame {
  position: relative;
  width: 400px;
  height: 400px;
}

.wheel-lights-ring {
  position: absolute;
  top: -15px; left: -15px;
  width: 430px; height: 430px;
  border-radius: 50%;
  z-index: 1;
}

.wheel-light-bulb {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ffd700;
  box-shadow: 0 0 10px #ffd700, 0 0 20px #ff9f43;
  top: 50%; left: 50%;
  transform-origin: 0 0;
  transform: rotate(calc(var(--i) * 15deg)) translateX(205px);
  animation: bulbFlicker 0.5s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 0.05s);
}

@keyframes bulbFlicker {
  0% { opacity: 0.4; box-shadow: 0 0 5px #ffd700; }
  100% { opacity: 1; box-shadow: 0 0 15px #ffd700, 0 0 30px #ff9f43; }
}

#wheel-canvas {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
}

.wheel-pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 40px solid #e74c3c;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
  z-index: 10;
}

.wheel-pointer::after {
  content: '';
  position: absolute;
  top: -42px; left: -15px;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 35px solid #ff6b6b;
}

.wheel-center-cap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
  box-shadow: 0 5px 20px rgba(0,0,0,0.5), inset 0 -5px 15px rgba(0,0,0,0.3);
  z-index: 5;
}

.wheel-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.wheel-bet-section label {
  display: block;
  text-align: center;
  color: #ffd700;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.wheel-bet-selector {
  display: flex;
  gap: 8px;
}

.wheel-bet-btn {
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(40,20,60,0.9), rgba(20,10,30,0.9));
  border: 2px solid rgba(138,43,226,0.4);
  border-radius: 8px;
  color: #dda0dd;
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.wheel-bet-btn:hover {
  border-color: rgba(186,85,211,0.8);
  background: linear-gradient(180deg, rgba(60,30,90,0.9), rgba(40,20,60,0.9));
}

.wheel-bet-btn.active {
  background: linear-gradient(180deg, #9b59b6, #6c3483);
  border-color: #dda0dd;
  color: #fff;
  box-shadow: 0 0 15px rgba(155,89,182,0.5);
}

.wheel-balance {
  font-family: var(--font-ui);
  font-size: 18px;
  color: #5dfc8a;
}

.wheel-spin-btn {
  padding: 16px 40px;
  background: linear-gradient(180deg, #8e44ad 0%, #6c3483 50%, #5b2c6f 100%);
  border: 3px solid #dda0dd;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-game);
  font-size: 20px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(142,68,173,0.5);
}

.wheel-spin-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(142,68,173,0.7);
  background: linear-gradient(180deg, #9b59b6 0%, #7d3c98 50%, #6c3483 100%);
}

.wheel-spin-btn:active {
  transform: translateY(0);
}

.wheel-result {
  min-height: 60px;
}

.wheel-result-win, .wheel-result-lose {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 30px;
  border-radius: 12px;
  animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wheel-result-win {
  background: linear-gradient(180deg, rgba(39,174,96,0.9), rgba(30,130,76,0.9));
  border: 2px solid #2ecc71;
}

.wheel-result-lose {
  background: linear-gradient(180deg, rgba(192,57,43,0.9), rgba(146,43,33,0.9));
  border: 2px solid #e74c3c;
}

.wheel-result-win .result-label,
.wheel-result-lose .result-label {
  font-family: var(--font-game);
  font-size: 24px;
  color: #fff;
}

.wheel-result-win .result-amount {
  font-size: 20px;
  color: #a8e6cf;
  font-weight: 700;
}

.wheel-result-lose .result-amount {
  font-size: 20px;
  color: #fab1a0;
  font-weight: 700;
}

@keyframes resultPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   BLACKJACK STYLES
   ============================================ */

.blackjack-bg {
  background: radial-gradient(ellipse at center, #0a3d0c 0%, #052505 50%, #011501 100%);
}

.blackjack-table {
  position: relative;
  width: 100%;
  max-width: 900px;
  min-height: auto;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  padding-bottom: 80px;
  z-index: 2;
  overflow-y: auto;
}

.bj-felt {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: 
    radial-gradient(ellipse at center, rgba(39,174,96,0.3) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
  z-index: -1;
}

.blackjack-title {
  font-family: var(--font-game);
  font-size: 36px;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
  margin-bottom: 10px;
}

.bj-dealer-area, .bj-player-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
}

.bj-label {
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 3px;
}

.bj-hand {
  display: flex;
  gap: -30px;
  min-height: 140px;
}

.bj-card {
  width: 90px;
  height: 130px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.1);
  margin-left: -25px;
  transition: transform 0.3s, margin 0.3s;
  animation: dealCard 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bj-card:first-child {
  margin-left: 0;
}

.bj-card:hover {
  transform: translateY(-10px);
  z-index: 10;
}

@keyframes dealCard {
  0% { transform: translateY(-100px) rotate(10deg); opacity: 0; }
  100% { transform: translateY(0) rotate(0); opacity: 1; }
}

.card-inner {
  width: 100%;
  height: 100%;
  padding: 8px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-inner.red { color: #e74c3c; }
.card-inner.black { color: #2c3e50; }

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  line-height: 1.1;
}

.card-corner.top-left {
  position: absolute;
  top: 6px; left: 8px;
}

.card-corner.bottom-right {
  position: absolute;
  bottom: 6px; right: 8px;
  transform: rotate(180deg);
}

.card-rank {
  font-weight: 700;
  font-size: 18px;
}

.card-suit {
  font-size: 16px;
}

.card-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-face {
  font-size: 48px;
  font-weight: 700;
  font-family: serif;
}

.card-ace {
  font-size: 56px;
}

.card-pips {
  font-size: 20px;
  text-align: center;
  line-height: 1.4;
  word-spacing: 5px;
}

.card-back {
  background: linear-gradient(135deg, #1a1a4e 0%, #0d0d2b 100%);
}

.card-back-pattern {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: 
    repeating-linear-gradient(45deg, #2a2a6e 0px, #2a2a6e 2px, transparent 2px, transparent 8px),
    repeating-linear-gradient(-45deg, #2a2a6e 0px, #2a2a6e 2px, transparent 2px, transparent 8px),
    linear-gradient(180deg, #1a1a4e, #0d0d2b);
  border: 3px solid #3a3a8e;
  box-sizing: border-box;
}

.card-back-design {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back-design::after {
  content: '🎴';
  font-size: 40px;
  opacity: 0.3;
}

.bj-total {
  font-family: var(--font-game);
  font-size: 32px;
  color: #fff;
  background: rgba(0,0,0,0.5);
  padding: 8px 20px;
  border-radius: 20px;
  min-width: 60px;
  text-align: center;
}

.bj-total.blackjack {
  color: #ffd700;
  background: linear-gradient(180deg, rgba(255,215,0,0.3), rgba(184,134,11,0.3));
  animation: bjPulse 0.5s ease-in-out infinite alternate;
}

.bj-total.bust {
  color: #e74c3c;
  background: rgba(192,57,43,0.3);
}

@keyframes bjPulse {
  0% { box-shadow: 0 0 10px rgba(255,215,0,0.5); }
  100% { box-shadow: 0 0 25px rgba(255,215,0,0.8); }
}

.bj-divider {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 15px 0;
}

.bj-shoe {
  width: 60px; height: 40px;
  background: linear-gradient(180deg, #8b4513, #5d3a1a);
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  position: relative;
}

.bj-shoe::after {
  content: '';
  position: absolute;
  top: 5px; left: 5px;
  width: 50px; height: 10px;
  background: #fff;
  border-radius: 2px;
}

.bj-chip-stack {
  min-width: 80px;
  text-align: center;
}

.chip-in-play {
  display: inline-block;
  padding: 15px 20px;
  background: linear-gradient(180deg, #e74c3c 0%, #c0392b 50%, #a93226 100%);
  border: 4px dashed #fff;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.bj-controls {
  padding: 20px;
}

.bj-bet-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.bj-bet-section label {
  color: #ffd700;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 2px;
}

.bj-chip-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.bj-chip {
  width: 55px; height: 55px;
  border-radius: 50%;
  background: var(--chip-color);
  border: 4px dashed rgba(255,255,255,0.8);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.bj-chip:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.bj-chip.active {
  transform: translateY(-8px) scale(1.15);
  box-shadow: 0 0 20px var(--chip-color), 0 10px 25px rgba(0,0,0,0.5);
  border-color: #ffd700;
}

.bj-deal-btn {
  padding: 14px 40px;
  background: linear-gradient(180deg, #27ae60 0%, #1e8449 50%, #196f3d 100%);
  border: 3px solid #2ecc71;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-game);
  font-size: 18px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(39,174,96,0.4);
}

.bj-deal-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(39,174,96,0.6);
}

.bj-action-section {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.bj-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 15px 25px;
  border-radius: 12px;
  border: 2px solid;
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.bj-action-btn .btn-icon {
  font-size: 24px;
}

.hit-btn {
  background: linear-gradient(180deg, #3498db, #2980b9);
  border-color: #5dade2;
  color: #fff;
}

.hit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(52,152,219,0.5);
}

.stand-btn {
  background: linear-gradient(180deg, #e67e22, #d35400);
  border-color: #f39c12;
  color: #fff;
}

.stand-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(230,126,34,0.5);
}

.double-btn {
  background: linear-gradient(180deg, #9b59b6, #8e44ad);
  border-color: #bb8fce;
  color: #fff;
}

.double-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(155,89,182,0.5);
}

.bj-result {
  min-height: 70px;
  margin: 10px 0;
}

.bj-result-win, .bj-result-lose, .bj-result-push {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 30px;
  border-radius: 12px;
  animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bj-result-win {
  background: linear-gradient(180deg, rgba(39,174,96,0.9), rgba(30,130,76,0.9));
  border: 2px solid #2ecc71;
}

.bj-result-lose {
  background: linear-gradient(180deg, rgba(192,57,43,0.9), rgba(146,43,33,0.9));
  border: 2px solid #e74c3c;
}

.bj-result-push {
  background: linear-gradient(180deg, rgba(52,73,94,0.9), rgba(44,62,80,0.9));
  border: 2px solid #7f8c8d;
}

.result-msg {
  font-family: var(--font-game);
  font-size: 24px;
  color: #fff;
}

.result-payout {
  font-size: 18px;
  font-weight: 700;
}

.bj-result-win .result-payout { color: #a8e6cf; }
.bj-result-lose .result-payout { color: #fab1a0; }
.bj-result-push .result-payout { color: #bdc3c7; }

.bj-balance {
  font-family: var(--font-ui);
  font-size: 18px;
  color: #5dfc8a;
}

/* ============================================
   COIN FLIP STYLES
   ============================================ */

.coinflip-bg {
  background: radial-gradient(ellipse at center, #3d2a1a 0%, #1a1208 50%, #0a0804 100%);
}

.coin-stage {
  perspective: 1000px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.coin-3d {
  width: 150px;
  height: 150px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s;
}

.coin-3d.flipping {
  animation: coinFlip 2.5s cubic-bezier(0.17, 0.67, 0.12, 0.99) forwards;
}

@keyframes coinFlip {
  0% {
    transform: translateY(0) rotateX(0);
  }
  20% {
    transform: translateY(-150px) rotateX(720deg);
  }
  40% {
    transform: translateY(-200px) rotateX(1440deg);
  }
  60% {
    transform: translateY(-100px) rotateX(var(--final-rotation));
  }
  80% {
    transform: translateY(-20px) rotateX(var(--final-rotation));
  }
  100% {
    transform: translateY(0) rotateX(var(--final-rotation));
  }
}

.coin-front, .coin-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 50%;
}

.coin-front {
  transform: rotateX(0deg);
}

.coin-back {
  transform: rotateX(180deg);
}

.coin-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.coin-face.heads {
  background: linear-gradient(135deg, #ffd700 0%, #daa520 30%, #b8860b 70%, #8b6914 100%);
  box-shadow: 
    inset 0 5px 20px rgba(255,255,255,0.4),
    inset 0 -5px 20px rgba(0,0,0,0.3),
    0 0 0 8px #b8860b,
    0 10px 30px rgba(0,0,0,0.5);
}

.coin-face.tails {
  background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 30%, #808080 70%, #606060 100%);
  box-shadow: 
    inset 0 5px 20px rgba(255,255,255,0.4),
    inset 0 -5px 20px rgba(0,0,0,0.3),
    0 0 0 8px #606060,
    0 10px 30px rgba(0,0,0,0.5);
}

.coin-rim {
  position: absolute;
  top: 10px; left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border: 3px solid rgba(255,255,255,0.2);
  border-radius: 50%;
}

.coin-portrait, .coin-eagle {
  font-size: 50px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.coin-text-top {
  position: absolute;
  top: 15px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(0,0,0,0.5);
}

.coin-shadow {
  width: 120px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.5) 0%, transparent 70%);
  border-radius: 50%;
  margin-top: 20px;
}

.coin-shadow.coin-flipping {
  animation: shadowPulse 2.5s ease-out;
}

@keyframes shadowPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  20%, 40% { transform: scale(0.3); opacity: 0.2; }
  60% { transform: scale(0.8); opacity: 0.4; }
}

.coinflip-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.coinflip-bet-section label,
.coinflip-choice label {
  display: block;
  text-align: center;
  color: #ffd700;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.coinflip-bet-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cf-bet-adjust {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #8b4513, #5d3a1a);
  border: 2px solid #d2691e;
  color: #ffd700;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.cf-bet-adjust:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(210,105,30,0.5);
}

#cf-bet-amount {
  width: 100px;
  padding: 10px;
  text-align: center;
  background: rgba(0,0,0,0.5);
  border: 2px solid #8b4513;
  border-radius: 8px;
  color: #ffd700;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
}

.choice-buttons {
  display: flex;
  gap: 15px;
}

.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 25px;
  background: linear-gradient(180deg, rgba(60,40,20,0.9), rgba(40,25,10,0.9));
  border: 2px solid rgba(139,69,19,0.6);
  border-radius: 12px;
  color: #d2691e;
  cursor: pointer;
  transition: all 0.3s;
}

.choice-btn:hover {
  border-color: #daa520;
  background: linear-gradient(180deg, rgba(80,50,25,0.9), rgba(60,35,15,0.9));
}

.choice-btn.active {
  background: linear-gradient(180deg, #8b4513, #5d3a1a);
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 0 0 20px rgba(255,215,0,0.4);
}

.choice-icon {
  font-size: 32px;
}

.coinflip-btn {
  padding: 16px 40px;
  background: linear-gradient(180deg, #d4a017 0%, #b8860b 50%, #8b6914 100%);
  border: 3px solid #ffd700;
  border-radius: 12px;
  color: #1a1a1a;
  font-family: var(--font-game);
  font-size: 18px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(212,160,23,0.5);
}

.coinflip-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212,160,23,0.7);
}

.coinflip-result {
  min-height: 80px;
}

.cf-result-win, .cf-result-lose {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 30px;
  border-radius: 12px;
  animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cf-result-win {
  background: linear-gradient(180deg, rgba(39,174,96,0.9), rgba(30,130,76,0.9));
  border: 2px solid #2ecc71;
}

.cf-result-lose {
  background: linear-gradient(180deg, rgba(192,57,43,0.9), rgba(146,43,33,0.9));
  border: 2px solid #e74c3c;
}

.result-call, .result-outcome {
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

.cf-result-win .result-amount,
.cf-result-lose .result-amount {
  font-family: var(--font-game);
  font-size: 24px;
  margin-top: 5px;
}

.cf-result-win .result-amount { color: #a8e6cf; }
.cf-result-lose .result-amount { color: #fab1a0; }

.coinflip-balance {
  font-family: var(--font-ui);
  font-size: 18px;
  color: #5dfc8a;
}

/* ============================================
   DOUBLE OR NOTHING STYLES
   ============================================ */

.double-bg {
  background: radial-gradient(ellipse at center, #1a2a3a 0%, #0a1520 50%, #050a10 100%);
}

.double-stage {
  position: relative;
  padding: 30px;
}

.double-display {
  display: flex;
  align-items: center;
  gap: 20px;
}

.double-box {
  width: 140px;
  height: 160px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.double-box.left {
  background: linear-gradient(180deg, #27ae60 0%, #1e8449 50%, #196f3d 100%);
  border: 3px solid #2ecc71;
  box-shadow: 0 10px 30px rgba(39,174,96,0.3);
}

.double-box.right {
  background: linear-gradient(180deg, #c0392b 0%, #96281b 50%, #7b241c 100%);
  border: 3px solid #e74c3c;
  box-shadow: 0 10px 30px rgba(192,57,43,0.3);
}

.double-box.highlight {
  transform: scale(1.1);
  box-shadow: 0 0 40px currentColor;
}

.double-box.left.highlight {
  box-shadow: 0 0 40px rgba(46,204,113,0.8);
}

.double-box.right.highlight {
  box-shadow: 0 0 40px rgba(231,76,60,0.8);
}

.double-box.winner {
  animation: winnerPulse 0.5s ease-in-out 3;
}

@keyframes winnerPulse {
  0%, 100% { transform: scale(1.1); }
  50% { transform: scale(1.2); }
}

.double-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.double-symbol {
  font-size: 48px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.double-label {
  font-family: var(--font-game);
  font-size: 18px;
  color: #fff;
  letter-spacing: 2px;
}

.double-indicator {
  position: relative;
  z-index: 10;
  transition: transform 0.3s;
}

.indicator-arrow {
  font-size: 40px;
  color: #ffd700;
  filter: drop-shadow(0 0 10px rgba(255,215,0,0.5));
  animation: none;
}

.double-indicator.bouncing .indicator-arrow {
  animation: indicatorBounce 0.2s ease-in-out infinite alternate;
}

@keyframes indicatorBounce {
  0% { transform: translateX(-80px); }
  100% { transform: translateX(80px); }
}

.double-scanner {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0;
}

.double-scanner.scanning {
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.2), transparent);
  animation: scanEffect 0.3s linear infinite;
}

@keyframes scanEffect {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.double-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.double-bet-section label {
  display: block;
  text-align: center;
  color: #5dade2;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.double-bet-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dbl-bet-adjust {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3498db, #2980b9);
  border: 2px solid #5dade2;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.dbl-bet-adjust:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(52,152,219,0.5);
}

#dbl-bet-amount {
  width: 100px;
  padding: 10px;
  text-align: center;
  background: rgba(0,0,0,0.5);
  border: 2px solid #3498db;
  border-radius: 8px;
  color: #5dade2;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
}

.double-btn {
  padding: 16px 40px;
  background: linear-gradient(180deg, #9b59b6 0%, #8e44ad 50%, #7d3c98 100%);
  border: 3px solid #bb8fce;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-game);
  font-size: 18px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(155,89,182,0.5);
}

.double-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(155,89,182,0.7);
}

.double-result {
  min-height: 70px;
}

.dbl-result-win, .dbl-result-lose {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 30px;
  border-radius: 12px;
  animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dbl-result-win {
  background: linear-gradient(180deg, rgba(39,174,96,0.9), rgba(30,130,76,0.9));
  border: 2px solid #2ecc71;
}

.dbl-result-lose {
  background: linear-gradient(180deg, rgba(192,57,43,0.9), rgba(146,43,33,0.9));
  border: 2px solid #e74c3c;
}

.dbl-result-win .result-label,
.dbl-result-lose .result-label {
  font-family: var(--font-game);
  font-size: 24px;
  color: #fff;
}

.dbl-result-win .result-amount { color: #a8e6cf; font-size: 20px; font-weight: 700; }
.dbl-result-lose .result-amount { color: #fab1a0; font-size: 20px; font-weight: 700; }

.double-balance {
  font-family: var(--font-ui);
  font-size: 18px;
  color: #5dfc8a;
}

/* ============================================
   DICE CHALLENGE STYLES
   ============================================ */

.dice-bg {
  background: radial-gradient(ellipse at center, #2a1a1a 0%, #150a0a 50%, #0a0505 100%);
}

.dice-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 30px;
}

.dice-player-side, .dice-house-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.dice-label {
  font-family: var(--font-ui);
  font-size: 14px;
  letter-spacing: 3px;
}

.dice-player-side .dice-label { color: #5dade2; }
.dice-house-side .dice-label { color: #e74c3c; }

.dice-pair {
  display: flex;
  gap: 15px;
  perspective: 600px;
}

.dice-3d {
  width: 60px;
  height: 60px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.dice-3d:not(.house) {
  --dice-color: #3498db;
}

.dice-3d.house {
  --dice-color: #e74c3c;
}

.dice-face {
  position: absolute;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, 
    var(--dice-color) 0%, 
    color-mix(in srgb, var(--dice-color) 80%, black) 100%
  );
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  box-shadow: inset 0 2px 10px rgba(255,255,255,0.2);
}

.dice-face.front  { transform: translateZ(30px); }
.dice-face.back   { transform: rotateY(180deg) translateZ(30px); }
.dice-face.right  { transform: rotateY(90deg) translateZ(30px); }
.dice-face.left   { transform: rotateY(-90deg) translateZ(30px); }
.dice-face.top    { transform: rotateX(90deg) translateZ(30px); }
.dice-face.bottom { transform: rotateX(-90deg) translateZ(30px); }

.dice-vs {
  font-family: var(--font-game);
  font-size: 36px;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,0.5);
}

.dice-total {
  font-family: var(--font-game);
  font-size: 36px;
  color: #fff;
  background: rgba(0,0,0,0.5);
  padding: 10px 25px;
  border-radius: 25px;
  min-width: 80px;
  text-align: center;
}

.dice-player-side .dice-total {
  border: 2px solid rgba(52,152,219,0.5);
}

.dice-house-side .dice-total {
  border: 2px solid rgba(231,76,60,0.5);
}

.dice-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.dice-bet-section label {
  display: block;
  text-align: center;
  color: #e74c3c;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.dice-bet-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dice-bet-adjust {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #c0392b, #96281b);
  border: 2px solid #e74c3c;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.dice-bet-adjust:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(192,57,43,0.5);
}

#dice-bet-amount {
  width: 100px;
  padding: 10px;
  text-align: center;
  background: rgba(0,0,0,0.5);
  border: 2px solid #c0392b;
  border-radius: 8px;
  color: #e74c3c;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
}

.dice-roll-btn {
  padding: 16px 40px;
  background: linear-gradient(180deg, #e74c3c 0%, #c0392b 50%, #a93226 100%);
  border: 3px solid #ec7063;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-game);
  font-size: 18px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(231,76,60,0.5);
}

.dice-roll-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(231,76,60,0.7);
}

.dice-result {
  min-height: 80px;
}

.dice-result-win, .dice-result-lose, .dice-result-push {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 30px;
  border-radius: 12px;
  animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dice-result-win {
  background: linear-gradient(180deg, rgba(39,174,96,0.9), rgba(30,130,76,0.9));
  border: 2px solid #2ecc71;
}

.dice-result-lose {
  background: linear-gradient(180deg, rgba(192,57,43,0.9), rgba(146,43,33,0.9));
  border: 2px solid #e74c3c;
}

.dice-result-push {
  background: linear-gradient(180deg, rgba(52,73,94,0.9), rgba(44,62,80,0.9));
  border: 2px solid #7f8c8d;
}

.dice-result-win .result-label,
.dice-result-lose .result-label,
.dice-result-push .result-label {
  font-family: var(--font-game);
  font-size: 24px;
  color: #fff;
}

.result-detail {
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

.dice-result-win .result-amount { color: #a8e6cf; font-size: 20px; font-weight: 700; }
.dice-result-lose .result-amount { color: #fab1a0; font-size: 20px; font-weight: 700; }
.dice-result-push .result-amount { color: #bdc3c7; font-size: 16px; }

.dice-balance {
  font-family: var(--font-ui);
  font-size: 18px;
  color: #5dfc8a;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 500px) {
  .wheel-frame {
    width: 300px;
    height: 300px;
  }
  
  #wheel-canvas {
    width: 300px;
    height: 300px;
  }
  
  .wheel-lights-ring {
    width: 330px;
    height: 330px;
  }
  
  .wheel-light-bulb {
    transform: rotate(calc(var(--i) * 15deg)) translateX(155px);
  }
  
  .bj-card {
    width: 70px;
    height: 100px;
  }
  
  .coin-3d {
    width: 120px;
    height: 120px;
  }
  
  .double-box {
    width: 110px;
    height: 130px;
  }
  
  .dice-3d {
    width: 50px;
    height: 50px;
  }
  
  .dice-face {
    width: 50px;
    height: 50px;
    font-size: 32px;
  }
  
  .dice-face.front  { transform: translateZ(25px); }
  .dice-face.back   { transform: rotateY(180deg) translateZ(25px); }
  .dice-face.right  { transform: rotateY(90deg) translateZ(25px); }
  .dice-face.left   { transform: rotateY(-90deg) translateZ(25px); }
  .dice-face.top    { transform: rotateX(90deg) translateZ(25px); }
  .dice-face.bottom { transform: rotateX(-90deg) translateZ(25px); }
}
