/* Roulette Game - Classic Layout */

.roulette-game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  height: 100vh;
  background: linear-gradient(145deg, #0a4a2a, #1f7a1f);
  padding: 10px;
  font-family: 'Karantina', sans-serif;
  color: #fff;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

/* Main Layout: Wheel + Board */
.roulette-main-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 30px;
  width: 100%;
  max-width: 1400px;
  height: calc(100vh - 80px);
}

/* Wheel Section - Left Side */
.roulette-wheel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.wheel-container {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-image {
  transition: transform 10s cubic-bezier(0.3, 1, 0.7, 1);
  will-change: transform;
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
  width: 100%;
  max-width: 280px;
  border: 6px solid #FFD700;
}

.wheel-arrow {
  width: 0;
  height: 0;
  border: 25px solid transparent;
  border-top: 40px solid #DC143C;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  border-radius: 0.35em;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transition: all 0.3s ease;
}

.wheel-arrow.winner {
  animation: arrowWin 0.6s ease-in-out;
}

@keyframes arrowWin {
  0%, 100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.3);
    filter: drop-shadow(0 8px 30px rgba(255, 215, 0, 1));
  }
}

.wheel-arrow::after {
  content: '';
  position: absolute;
  top: -45px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: #FFD700;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* Ball on wheel */
.ball-track {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 25;
  transition: transform 10s cubic-bezier(0.3, 1, 0.7, 1);
  will-change: transform;
}

.roulette-ball {
  position: absolute;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 30% 30%, #ffffff, #e0e0e0, #aaa);
  border-radius: 50%;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 
              inset -2px -2px 8px rgba(0, 0, 0, 0.5),
              0 0 20px rgba(255, 255, 255, 0.6);
  border: 2px solid #fff;
}

.roulette-ball.landed {
  animation: ballLanded 0.5s ease-out;
}

@keyframes ballLanded {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { 
    transform: translateX(-50%) scale(1.5);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 1);
  }
}

/* Spin Button */
.spin-button {
  margin-top: 15px;
  padding: 12px 40px;
  font-size: 32px;
  font-weight: bold;
  font-family: 'Karantina', sans-serif;
  background: linear-gradient(145deg, #FFD700, #FFA500);
  color: #000;
  border: 3px solid #FFA500;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
  transition: all 0.3s ease;
}

.spin-button:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.8);
}

.spin-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Game Info Compact */
.game-info-compact {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #FFD700;
  border-radius: 15px;
}

.game-info-compact .info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-info-compact .info-label {
  font-size: 20px;
  color: #FFD700;
}

.game-info-compact .info-value {
  font-size: 24px;
  color: #fff;
  font-weight: bold;
}

/* History Bar */
.history-bar {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  min-height: 40px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 280px;
}

.history-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  border: 2px solid #FFD700;
  animation: historyPop 0.3s ease-out;
}

.history-number.red { background: #DC143C; }
.history-number.black { background: #1a1a1a; }
.history-number.green { background: #00a000; }

@keyframes historyPop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* Betting Section - Right Side */
.betting-section-classic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Chip Selector */
.chip-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.chip {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 4px dashed;
  font-family: 'Karantina', sans-serif;
}

.chip-10 { background: #DC143C; border-color: #fff; color: #fff; }
.chip-50 { background: #2196F3; border-color: #fff; color: #fff; }
.chip-100 { background: #4CAF50; border-color: #fff; color: #fff; }
.chip-500 { background: #9C27B0; border-color: #FFD700; color: #FFD700; }

.chip:hover, .chip.selected {
  transform: scale(1.15);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
}

/* Classic Roulette Table */
.classic-table {
  display: flex;
  flex-direction: column;
  background: #0a5c36;
  border: 4px solid #8B4513;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Zero Section */
.zero-section {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 3px;
}

.zero-btn {
  width: 55px !important;
  height: 100px !important;
  font-size: 36px !important;
  background: #00a000 !important;
  border: 3px solid #FFD700 !important;
  color: #ffffff !important;
}

/* Numbers Grid */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
}

.numbers-grid .bet-button {
  width: 50px;
  height: 45px;
  font-size: 26px;
  padding: 0;
  border-radius: 6px;
}

/* Bet Buttons */
.bet-button {
  font-family: 'Karantina', sans-serif;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.bet-button.red {
  background: linear-gradient(145deg, #DC143C, #8B0000);
}

.bet-button.black {
  background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
}

.bet-button.green {
  background: linear-gradient(145deg, #00a000, #006400);
}

.bet-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  border-color: #FFD700;
  z-index: 10;
}

.bet-button.active {
  background: linear-gradient(145deg, #FFD700, #FFA500) !important;
  color: #000 !important;
  border-color: #fff !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Dozens Row */
.dozens-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 3px;
}

.dozen-btn {
  height: 40px;
  font-size: 22px;
  background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
  border-radius: 6px;
  color: #ffffff !important;
}

/* Outside Bets Row */
.outside-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin-top: 3px;
}

.outside-btn {
  height: 40px;
  font-size: 20px;
  background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
  border-radius: 6px;
  color: #ffffff !important;
}

.outside-btn.red-btn {
  background: linear-gradient(145deg, #DC143C, #8B0000);
  font-size: 24px;
}

.outside-btn.black-btn {
  background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
  font-size: 24px;
}

/* Clear Button */
.clear-btn {
  margin-top: 10px;
  padding: 10px 30px;
  font-size: 20px;
  font-weight: bold;
  font-family: 'Karantina', sans-serif;
  background: linear-gradient(145deg, #DC143C, #8B0000);
  color: #fff;
  border: 2px solid #FFD700;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(220, 20, 60, 0.6);
}

/* Result Display Popup */
.result-display {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
  padding: 40px 60px;
  border-radius: 30px;
  border: 8px solid #FFD700;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.95), 
              0 0 80px rgba(255, 215, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  text-align: center;
  font-family: 'Karantina', sans-serif;
  visibility: hidden;
}

.result-display.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  visibility: visible;
}

.result-logo {
  width: 120px;
  height: auto;
  margin-bottom: 15px;
  filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.5));
}

.result-number {
  font-size: 80px;
  font-weight: bold;
  text-shadow: 0 0 30px currentColor;
  margin: 10px 0;
}

.result-message {
  font-size: 38px;
  font-weight: bold;
  color: #FFD700;
  text-shadow: 2px 2px 4px #000;
  margin: 10px 0;
  line-height: 1.4;
  padding: 0 15px;
}

.result-amount {
  font-size: 64px;
  font-weight: bold;
  color: #00FF00;
  text-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
  margin: 15px 0;
}

.bonus-message {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700;
  text-shadow: 2px 2px 4px #000;
  margin: 10px 0 20px 0;
  padding: 12px 20px;
  background: linear-gradient(145deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 15px;
  animation: bonusPulse 2s ease-in-out infinite;
}

@keyframes bonusPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
  50% { transform: scale(1.03); box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); }
}

.whatsapp-cta {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 15px 40px;
  margin-top: 15px;
  font-size: 28px;
  font-weight: bold;
  background: linear-gradient(145deg, #25D366, #128C7E);
  color: #fff;
  border: 3px solid #1EBE5F;
  border-radius: 40px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
  transition: all 0.3s ease;
}

.whatsapp-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.8);
}

.whatsapp-icon { font-size: 36px; }
.cta-text { display: flex; flex-direction: column; align-items: flex-start; }
.cta-main { font-size: 28px; line-height: 1; }
.cta-sub { font-size: 18px; opacity: 0.9; }
.close-hint { margin-top: 15px; font-size: 16px; color: #888; }

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1100px) {
  .roulette-main-layout {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    height: auto;
    padding-bottom: 20px;
  }
  
  .wheel-container {
    width: 220px;
    height: 220px;
  }
  
  .wheel-image { max-width: 220px; }
  .ball-track { width: 200px; height: 200px; }
  
  .numbers-grid .bet-button {
    width: 42px;
    height: 38px;
    font-size: 22px;
  }
  
  .zero-btn {
    width: 45px !important;
    height: 85px !important;
    font-size: 30px !important;
  }
  
  .dozen-btn {
    height: 36px;
    font-size: 20px;
  }
  
  .outside-btn {
    height: 36px;
    font-size: 18px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .roulette-game-wrapper {
    padding: 60px 5px 10px 5px;
    min-height: auto;
    height: auto;
    overflow-y: auto;
  }
  
  .roulette-main-layout {
    flex-direction: column;
    gap: 10px;
  }
  
  .wheel-container {
    width: 180px;
    height: 180px;
  }
  
  .wheel-image { max-width: 180px; border-width: 4px; }
  .ball-track { width: 160px; height: 160px; }
  .roulette-ball { width: 14px; height: 14px; }
  
  .wheel-arrow {
    border-width: 18px;
    border-top-width: 28px;
    top: -15px;
  }
  
  .spin-button {
    padding: 10px 30px;
    font-size: 26px;
  }
  
  .game-info-compact {
    gap: 15px;
    padding: 8px 15px;
  }
  
  .game-info-compact .info-label { font-size: 16px; }
  .game-info-compact .info-value { font-size: 20px; }
  
  .history-bar {
    max-width: 100%;
    padding: 5px 10px;
  }
  
  .history-number {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .chip {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .classic-table {
    padding: 5px;
    border-width: 3px;
  }
  
  .numbers-grid .bet-button {
    width: 30px;
    height: 30px;
    font-size: 18px;
    border-width: 1px;
  }
  
  .zero-btn {
    width: 32px !important;
    height: 65px !important;
    font-size: 24px !important;
  }
  
  .dozen-btn {
    height: 30px;
    font-size: 16px;
  }
  
  .outside-btn {
    height: 30px;
    font-size: 14px;
  }
  
  .clear-btn {
    padding: 8px 20px;
    font-size: 16px;
  }
  
  /* Popup Mobile */
  .result-display {
    padding: 25px 30px;
    border-width: 5px;
    max-width: 90%;
  }
  
  .result-logo { width: 80px; }
  .result-number { font-size: 50px; }
  .result-message { font-size: 26px; line-height: 1.3; padding: 0 10px; }
  .result-amount { font-size: 40px; }
  .bonus-message { font-size: 18px; padding: 10px 15px; }
  
  .whatsapp-cta {
    padding: 12px 25px;
    font-size: 20px;
    gap: 10px;
  }
  
  .whatsapp-icon { font-size: 28px; }
  .cta-main { font-size: 22px; }
  .cta-sub { font-size: 14px; }
}

/* Small Mobile */
@media (max-width: 480px) {
  .roulette-game-wrapper {
    padding: 55px 3px 10px 3px;
  }
  
  .wheel-container {
    width: 150px;
    height: 150px;
  }
  
  .wheel-image { max-width: 150px; }
  .ball-track { width: 135px; height: 135px; }
  .roulette-ball { width: 12px; height: 12px; }
  
  .spin-button {
    padding: 8px 25px;
    font-size: 22px;
  }
  
  .chip {
    width: 35px;
    height: 35px;
    font-size: 12px;
    border-width: 3px;
  }
  
  .numbers-grid .bet-button {
    width: 26px;
    height: 26px;
    font-size: 16px;
  }
  
  .zero-btn {
    width: 28px !important;
    height: 55px !important;
    font-size: 20px !important;
  }
  
  .dozen-btn {
    height: 26px;
    font-size: 14px;
  }
  
  .outside-btn {
    height: 26px;
    font-size: 12px;
  }
  
  .result-display { padding: 20px 25px; }
  .result-logo { width: 60px; }
  .result-number { font-size: 40px; }
  .result-message { font-size: 22px; line-height: 1.3; padding: 0 8px; }
  .result-amount { font-size: 32px; }
  .bonus-message { font-size: 14px; }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .numbers-grid .bet-button {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
  
  .zero-btn {
    width: 26px !important;
    height: 50px !important;
    font-size: 18px !important;
  }
  
  .dozen-btn {
    height: 24px;
    font-size: 12px;
  }
  
  .outside-btn {
    height: 24px;
    font-size: 11px;
  }
  
  .chip {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
}
