/* Game-Specific Styles */

/* Blackjack Styles */
.blackjack-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0.5rem;
  width: 100%;
  box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 40%, #1a5c2a 0%, #145224 30%, #0d4420 55%, #072e13 80%, #041f0d 100%);
  border-radius: 20px;
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
  border: 3px solid rgba(30, 80, 40, 0.6);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.game-title {
  text-align: center;
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  margin: 0 0 0.75rem;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 0.5rem;
}

.betting-section {
  background: rgba(15, 23, 42, 0.5);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

html[data-theme="light"] .betting-section {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.betting-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  color: var(--color-text);
  letter-spacing: 0.3px;
}

.bet-input-group {
  margin-bottom: 1rem;
}

.bet-input-group input {
  width: 100%;
  max-width: 100%;
  padding: clamp(0.7rem, 1.8vw, 0.85rem);
  border-radius: 10px;
  border: 2px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.98);
  color: var(--color-text);
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  outline: none;
}

.bet-input-group input:focus {
  border-color: var(--color-primary);
  background: rgba(15, 23, 42, 1);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 3px var(--color-primary-soft),
    0 2px 8px rgba(56, 189, 248, 0.2);
}

html[data-theme="light"] .bet-input-group input {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.8);
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .bet-input-group input:focus {
  border-color: var(--color-primary);
  background: #ffffff;
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    0 0 0 3px var(--color-primary-soft),
    0 2px 8px rgba(2, 132, 199, 0.15);
}

.quick-bets {
  display: flex;
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0.25rem;
}

.quick-bet-btn {
  padding: clamp(0.5rem, 1.5vw, 0.6rem) clamp(0.75rem, 2.2vw, 1.1rem);
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(34, 197, 94, 0.1));
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: clamp(0.85rem, 2.2vw, 0.95rem);
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(25% - 0.4rem);
  box-sizing: border-box;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.quick-bet-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.quick-bet-btn:hover::before {
  left: 100%;
}

html[data-theme="light"] .quick-bet-btn {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(13, 148, 136, 0.08));
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.quick-bet-btn:hover {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(34, 197, 94, 0.2));
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(56, 189, 248, 0.2);
}

.quick-bet-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .quick-bet-btn:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(13, 148, 136, 0.15));
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.15);
}

.game-area {
  margin-top: 0.25rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.25rem;
}

.dealer-section, .player-section {
  margin-bottom: 0.25rem;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.5rem;
}

.dealer-section h3, .player-section h3 {
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  margin: 0 0 0.25rem;
}

.score-display {
  font-size: clamp(0.85rem, 2.2vw, 1.1rem);
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.15rem 0.6rem;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.score-display span {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  font-weight: 800;
}

.cards-container {
  display: flex;
  justify-content: center;
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
  flex-wrap: wrap;
  min-height: auto;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.25rem;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* ============================
   Playing Cards (PNG Images)
   ============================ */

.card {
  width: clamp(56px, 14vw, 85px);
  height: clamp(78px, 19.5vw, 119px);
  min-width: clamp(56px, 14vw, 85px);
  min-height: clamp(78px, 19.5vw, 119px);
  border-radius: 6px;
  position: relative;
  background-color: #fff;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1.5px solid rgba(200, 200, 200, 0.4);
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================
   Card Back (Dealer Hidden Card)
   ============================ */

.card.card-back {
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 4px,
      rgba(212, 175, 55, 0.08) 4px,
      rgba(212, 175, 55, 0.08) 8px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 4px,
      rgba(212, 175, 55, 0.08) 4px,
      rgba(212, 175, 55, 0.08) 8px
    ),
    linear-gradient(135deg, #1a1040 0%, #251555 50%, #1a1040 100%);
  border: 2px solid rgba(212, 175, 55, 0.3);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 0 15px rgba(0, 0, 0, 0.3),
    inset 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* ============================
   Card Animations
   ============================ */

/* Dealing animation */
@keyframes dealCard {
  0% {
    opacity: 0;
    transform: translateX(120px) translateY(-30px) rotate(15deg) scale(0.7);
  }
  60% {
    opacity: 1;
    transform: translateX(-5px) translateY(2px) rotate(-2deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  }
}

.card.card-dealing {
  animation: dealCard 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Card flip animation for revealing dealer's hidden card */
@keyframes cardFlipReveal {
  0% {
    transform: rotateY(0deg) scale(1);
  }
  50% {
    transform: rotateY(90deg) scale(1.1);
  }
  100% {
    transform: rotateY(0deg) scale(1);
  }
}

.card.card-revealing {
  animation: cardFlipReveal 0.6s ease-in-out;
}


/* Coinflip Styles */
.coinflip-container {
  max-width: 700px;
  margin: 0 auto;
}

.choice-section {
  margin: 2rem 0;
}

.choice-section p {
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
}

.choice-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.choice-btn,
.btn-choice {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

html[data-theme="light"] .choice-btn,
html[data-theme="light"] .btn-choice {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--color-text);
}

html[data-theme="dark"] .choice-btn,
html[data-theme="dark"] .btn-choice {
  background: rgba(15, 23, 42, 0.95);
  color: var(--color-text);
}

.choice-btn:hover,
.btn-choice:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(148, 163, 184, 0.8);
}

.choice-btn.selected,
.btn-choice.selected {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.heads-btn.selected,
.btn-heads.selected {
  border-color: #22c55e;
  background: rgba(20, 83, 45, 0.95);
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.6);
  color: #22c55e;
}

html[data-theme="light"] .heads-btn.selected,
html[data-theme="light"] .btn-heads.selected {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #16a34a;
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.3);
}

.tails-btn.selected,
.btn-tails.selected {
  border-color: #38bdf8;
  background: rgba(30, 58, 138, 0.95);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
  color: #38bdf8;
}

html[data-theme="light"] .tails-btn.selected,
html[data-theme="light"] .btn-tails.selected {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #0284c7;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
}

.btn-heads {
  border: 2px solid #22c55e;
  background: rgba(20, 83, 45, 0.9);
  color: #22c55e;
}

html[data-theme="light"] .btn-heads {
  background: #ffffff;
  border-color: #22c55e;
  color: #16a34a;
}

.btn-heads:hover {
  border-color: #22c55e;
  background: rgba(20, 83, 45, 0.95);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

html[data-theme="light"] .btn-heads:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #16a34a;
}

.btn-heads.selected {
  border-color: #22c55e;
  background: rgba(20, 83, 45, 1);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
  color: #22c55e;
}

html[data-theme="light"] .btn-heads.selected {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #16a34a;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.btn-tails {
  border: 2px solid #38bdf8;
  background: rgba(30, 58, 138, 0.9);
  color: #38bdf8;
}

html[data-theme="light"] .btn-tails {
  background: #ffffff;
  border-color: #38bdf8;
  color: #0284c7;
}

.btn-tails:hover {
  border-color: #38bdf8;
  background: rgba(30, 58, 138, 0.95);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

html[data-theme="light"] .btn-tails:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: #38bdf8;
  color: #0284c7;
}

.btn-tails.selected {
  border-color: #38bdf8;
  background: rgba(30, 58, 138, 1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  color: #38bdf8;
}

html[data-theme="light"] .btn-tails.selected {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #0284c7;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.choice-icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-choice .choice-icon {
  display: none;
}

.btn-choice span:not(.choice-icon) {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.coin-area {
  text-align: center;
  margin-top: 2rem;
}

.coin-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  gap: 0.5rem;
  padding: 0 clamp(0.5rem, 1.5vw, 1rem);
}

.coin {
  width: clamp(140px, 35vw, 220px);
  height: clamp(140px, 35vw, 220px);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  perspective: 1000px;
}

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: bold;
  backface-visibility: hidden;
  border: 4px solid rgba(255, 215, 0, 0.5);
}

.coin-front {
  background:
    conic-gradient(from 0deg, #fbbf24, #fde68a, #f59e0b, #fbbf24, #fde68a, #d97706, #fbbf24);
  color: #78350f;
  transform: rotateY(0deg);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.5),
    inset 0 4px 12px rgba(255, 255, 255, 0.35),
    inset 0 -4px 12px rgba(0, 0, 0, 0.25);
}

.coin-back {
  background:
    conic-gradient(from 0deg, #6366f1, #a5b4fc, #4f46e5, #6366f1, #818cf8, #3730a3, #6366f1);
  color: #e0e7ff;
  transform: rotateY(180deg);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.5),
    inset 0 4px 12px rgba(255, 255, 255, 0.25),
    inset 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.coin-edge {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translateZ(-4px);
  box-shadow:
    0 0 0 1px #b8860b,
    0 0 0 2px #daa520,
    0 0 0 3px #b8860b,
    0 0 0 4px #cd853f,
    0 0 0 5px #b8860b,
    0 0 0 6px #daa520,
    0 0 0 7px #b8860b,
    0 0 0 8px #8b6914;
  pointer-events: none;
}

.coin.flipping-heads {
  animation: coinFlipHeads 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.coin.flipping-tails {
  animation: coinFlipTails 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.coin.show-heads {
  transform: rotateY(0deg);
}

.coin.show-tails {
  transform: rotateY(180deg);
}

/* Both animations start IDENTICALLY — rapid spinning + vertical bounce arc.
   Only the final ~15% diverges to land on the correct face.
   Heads: ends at rotateY(1800deg) = 5 full rotations → front face
   Tails: ends at rotateY(1980deg) = 5.5 rotations → back face */

@keyframes coinFlipHeads {
  0%   { transform: rotateY(0deg) translateY(0) scale(1); }
  5%   { transform: rotateY(180deg) translateY(-40px) scale(1.05); }
  10%  { transform: rotateY(360deg) translateY(-80px) scale(1.08); }
  15%  { transform: rotateY(540deg) translateY(-120px) scale(1.1); }
  20%  { transform: rotateY(720deg) translateY(-150px) scale(1.12); }
  25%  { transform: rotateY(900deg) translateY(-170px) scale(1.14); }
  30%  { transform: rotateY(1080deg) translateY(-180px) scale(1.15); }
  35%  { transform: rotateY(1170deg) translateY(-175px) scale(1.14); }
  40%  { transform: rotateY(1260deg) translateY(-165px) scale(1.13); }
  45%  { transform: rotateY(1350deg) translateY(-150px) scale(1.11); }
  50%  { transform: rotateY(1440deg) translateY(-130px) scale(1.1); }
  55%  { transform: rotateY(1500deg) translateY(-110px) scale(1.08); }
  60%  { transform: rotateY(1548deg) translateY(-90px) scale(1.06); }
  65%  { transform: rotateY(1590deg) translateY(-65px) scale(1.05); }
  70%  { transform: rotateY(1630deg) translateY(-45px) scale(1.03); }
  75%  { transform: rotateY(1665deg) translateY(-25px) scale(1.02); }
  80%  { transform: rotateY(1700deg) translateY(-12px) scale(1.01); }
  85%  { transform: rotateY(1735deg) translateY(-4px) scale(1.005); }
  /* Diverges here — heading to 1800deg (front face) with slight wobble */
  88%  { transform: rotateY(1755deg) translateY(0px) rotateX(2deg) scale(1); }
  91%  { transform: rotateY(1775deg) translateY(4px) rotateX(-1deg) scale(1); }
  94%  { transform: rotateY(1790deg) translateY(2px) rotateX(0.5deg) scale(1); }
  97%  { transform: rotateY(1796deg) translateY(0px) rotateX(0deg) scale(1); }
  100% { transform: rotateY(1800deg) translateY(0px) rotateX(0deg) scale(1); }
}

@keyframes coinFlipTails {
  0%   { transform: rotateY(0deg) translateY(0) scale(1); }
  5%   { transform: rotateY(180deg) translateY(-40px) scale(1.05); }
  10%  { transform: rotateY(360deg) translateY(-80px) scale(1.08); }
  15%  { transform: rotateY(540deg) translateY(-120px) scale(1.1); }
  20%  { transform: rotateY(720deg) translateY(-150px) scale(1.12); }
  25%  { transform: rotateY(900deg) translateY(-170px) scale(1.14); }
  30%  { transform: rotateY(1080deg) translateY(-180px) scale(1.15); }
  35%  { transform: rotateY(1170deg) translateY(-175px) scale(1.14); }
  40%  { transform: rotateY(1260deg) translateY(-165px) scale(1.13); }
  45%  { transform: rotateY(1350deg) translateY(-150px) scale(1.11); }
  50%  { transform: rotateY(1440deg) translateY(-130px) scale(1.1); }
  55%  { transform: rotateY(1500deg) translateY(-110px) scale(1.08); }
  60%  { transform: rotateY(1548deg) translateY(-90px) scale(1.06); }
  65%  { transform: rotateY(1590deg) translateY(-65px) scale(1.05); }
  70%  { transform: rotateY(1630deg) translateY(-45px) scale(1.03); }
  75%  { transform: rotateY(1665deg) translateY(-25px) scale(1.02); }
  80%  { transform: rotateY(1700deg) translateY(-12px) scale(1.01); }
  85%  { transform: rotateY(1735deg) translateY(-4px) scale(1.005); }
  /* Diverges here — heading to 1980deg (back face) with slight wobble */
  88%  { transform: rotateY(1800deg) translateY(0px) rotateX(2deg) scale(1); }
  91%  { transform: rotateY(1870deg) translateY(4px) rotateX(-1deg) scale(1); }
  94%  { transform: rotateY(1930deg) translateY(2px) rotateX(0.5deg) scale(1); }
  97%  { transform: rotateY(1965deg) translateY(0px) rotateX(0deg) scale(1); }
  100% { transform: rotateY(1980deg) translateY(0px) rotateX(0deg) scale(1); }
}


/* Roulette Styles */
.roulette-casino-container {
  max-width: 1400px;
  margin: 0 auto;
}

.roulette-game-area {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  margin-top: 2rem;
}

.roulette-display-container,
.roulette-wheel-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Digital Roulette Display */
.digital-roulette-display {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border-radius: 20px;
  padding: 3rem 2rem;
  border: 3px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

html[data-theme="light"] .digital-roulette-display {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.95));
  border-color: rgba(148, 163, 184, 0.5);
}

.digital-roulette-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

.display-header {
  margin-bottom: 2rem;
  z-index: 1;
  position: relative;
}

.display-label {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-primary);
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
  }
  to {
    text-shadow: 0 0 30px rgba(56, 189, 248, 0.8), 0 0 40px rgba(56, 189, 248, 0.4);
  }
}

.roulette-display {
  width: 280px;
  height: 280px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.95);
  border: 4px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 1;
}

html[data-theme="light"] .roulette-display {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(148, 163, 184, 0.6);
}

.roulette-display.spinning {
  border-color: var(--color-primary);
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(56, 189, 248, 0.6),
    0 0 100px rgba(56, 189, 248, 0.3);
  animation: pulse-border 0.5s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% {
    box-shadow: 
      inset 0 0 30px rgba(0, 0, 0, 0.8),
      0 0 60px rgba(56, 189, 248, 0.6),
      0 0 100px rgba(56, 189, 248, 0.3);
  }
  50% {
    box-shadow: 
      inset 0 0 30px rgba(0, 0, 0, 0.8),
      0 0 80px rgba(56, 189, 248, 0.8),
      0 0 120px rgba(56, 189, 248, 0.5);
  }
}

.roulette-display.reveal {
  animation: reveal-pulse 0.6s ease-out;
}

@keyframes reveal-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.roulette-display.red {
  border-color: #dc2626;
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(220, 38, 38, 0.6),
    0 0 100px rgba(220, 38, 38, 0.3);
}

.roulette-display.black {
  border-color: #000000;
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(0, 0, 0, 0.8),
    0 0 100px rgba(0, 0, 0, 0.5);
}

.roulette-display.green {
  border-color: #22c55e;
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(34, 197, 94, 0.6),
    0 0 100px rgba(34, 197, 94, 0.3);
}

.number-display {
  font-size: 6rem;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  color: #ffffff;
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.8),
    0 0 40px rgba(255, 255, 255, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.8);
  line-height: 1;
  z-index: 2;
  transition: all 0.1s ease;
}

.roulette-display.spinning .number-display {
  animation: number-flash 0.1s ease-in-out infinite;
}

@keyframes number-flash {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.color-indicator {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-top: 1.5rem;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  z-index: 2;
}

.color-indicator.red {
  background: radial-gradient(circle, #dc2626, #991b1b);
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(220, 38, 38, 0.6);
}

.color-indicator.black {
  background: radial-gradient(circle, #1f1f1f, #000000);
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 0, 0, 0.8);
}

.color-indicator.green {
  background: radial-gradient(circle, #22c55e, #16a34a);
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(34, 197, 94, 0.6);
}

/* Legacy wheel styles for backward compatibility */
.wheel-container {
  position: relative;
  width: 500px;
  height: 500px;
  margin: 0 auto;
}

.roulette-wheel {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  border: 12px solid #475569;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(0, 0, 0, 0.3);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  overflow: hidden;
  background: transparent;
}

.wheel-inner {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
}

.wheel-numbers {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.wheel-segment {
  position: absolute;
  width: 50%;
  height: 50%;
  left: 50%;
  top: 0;
  transform-origin: 0 100%;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 2;
}

.wheel-segment.red {
  background: #dc2626;
}

.wheel-segment.black {
  background: #000000;
}

.wheel-segment.green {
  background: #22c55e;
}

.number-label {
  position: absolute;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 5;
  pointer-events: none;
}

.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 #fbbf24;
  z-index: 100;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.wheel-pointer::after {
  content: '';
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 30px;
  background: #fbbf24;
  border-radius: 2px;
}

.winning-number {
  margin-top: 2rem;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 12px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.winning-number.red {
  background: rgba(220, 38, 38, 0.15);
  border: 2px solid #dc2626;
  color: #dc2626;
}

.winning-number.black {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #000000;
  color: #ffffff;
}

.winning-number.green {
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid #22c55e;
  color: #22c55e;
}

.betting-board {
  background: rgba(15, 23, 42, 0.5);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

html[data-theme="light"] .betting-board {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.betting-options h3 {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
}

.bet-group {
  margin-bottom: 2rem;
}

.bet-group h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--color-muted);
}

.color-bets, .range-bets {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bet-option {
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

html[data-theme="light"] .bet-option {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.7);
}

.bet-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  transform: translateY(-2px);
}

.bet-option.red-bet {
  background: rgba(220, 38, 38, 0.2);
  border-color: #dc2626;
}

.bet-option.black-bet {
  background: rgba(0, 0, 0, 0.3);
  border-color: #000000;
}

.bet-option.green-bet {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.number-btn {
  padding: 0.75rem;
  border: 2px solid rgba(148, 163, 184, 0.5);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

html[data-theme="light"] .number-btn {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.7);
}

.number-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.number-btn.red {
  background: rgba(220, 38, 38, 0.3);
  border-color: #dc2626;
  color: white;
}

.number-btn.black {
  background: rgba(0, 0, 0, 0.4);
  border-color: #000000;
  color: white;
}

.number-btn.green {
  background: rgba(34, 197, 94, 0.3);
  border-color: #22c55e;
  color: white;
}

.bet-summary {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(148, 163, 184, 0.3);
}

.bet-summary h3 {
  margin: 0 0 1rem;
}

.bet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.bet-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.bet-list li.total {
  border-top: 2px solid rgba(148, 163, 184, 0.3);
  border-bottom: none;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.bet-summary .btn {
  width: 100%;
  margin-top: 1rem;
}

/* Roulette Additional Styles */
.next-spin-timer {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  padding: 0.75rem 1.5rem;
  background: rgba(56, 189, 248, 0.1);
  border: 2px solid var(--color-primary);
  border-radius: 10px;
  display: inline-block;
}

.next-spin-timer.spinning {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.betting-section-roulette {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.betting-controls {
  background: rgba(15, 23, 42, 0.5);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

html[data-theme="light"] .betting-controls {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.betting-controls h3 {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
}

.color-bets-section {
  margin-top: 1.5rem;
}

.color-bets-section h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--color-muted);
}

.color-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-bet-btn {
  flex: 1;
  min-width: 120px;
  padding: 1.5rem 2rem;
  border: 3px solid;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.color-bet-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.color-bet-btn.red-btn {
  background: #dc2626;
  border-color: #b91c1c;
}

.color-bet-btn.red-btn:hover {
  background: #b91c1c;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
}

.color-bet-btn.black-btn {
  background: #000000;
  border-color: #1f1f1f;
}

.color-bet-btn.black-btn:hover {
  background: #1f1f1f;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.color-bet-btn.green-btn {
  background: #22c55e;
  border-color: #16a34a;
}

.color-bet-btn.green-btn:hover {
  background: #16a34a;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.current-bet-display {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid rgba(148, 163, 184, 0.3);
  text-align: center;
}

.current-bet-display p {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.all-bets-section {
  background: rgba(15, 23, 42, 0.5);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  max-height: 400px;
  overflow-y: auto;
}

html[data-theme="light"] .all-bets-section {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.all-bets-section h3 {
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
}

.all-bets-list {
  min-height: 100px;
}

.no-bets {
  text-align: center;
  color: var(--color-muted);
  font-style: italic;
  padding: 2rem 0;
}

.bets-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-radius: 10px;
  border: 2px solid;
  background: rgba(15, 23, 42, 0.3);
}

html[data-theme="light"] .bet-item {
  background: rgba(241, 245, 249, 0.5);
}

.bet-item.red {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.bet-item.black {
  border-color: #000000;
  background: rgba(0, 0, 0, 0.2);
}

.bet-item.green {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.bet-player {
  font-weight: 600;
  flex: 1;
}

.bet-color {
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.bet-amount {
  font-weight: 600;
  color: #f59e0b;
}

/* Roulette History Section */
.roulette-history-section {
  margin-top: 0;
  background: rgba(15, 23, 42, 0.5);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

html[data-theme="light"] .roulette-history-section {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.roulette-history-section h3 {
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
  text-align: center;
}

.roulette-history {
  min-height: 100px;
}

.no-history {
  text-align: center;
  color: var(--color-muted);
  font-style: italic;
  padding: 2rem 0;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.history-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(148, 163, 184, 0.3);
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 70px;
}

html[data-theme="light"] .history-item {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(148, 163, 184, 0.5);
}

.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.history-item.red {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.history-item.black {
  border-color: #000000;
  background: rgba(0, 0, 0, 0.15);
}

.history-item.green {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.history-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.history-color-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.history-color-indicator.red {
  background: radial-gradient(circle, #dc2626, #991b1b);
}

.history-color-indicator.black {
  background: radial-gradient(circle, #1f1f1f, #000000);
}

.history-color-indicator.green {
  background: radial-gradient(circle, #22c55e, #16a34a);
}

/* Coinflip Casino Styles */
.coinflip-casino-container {
  max-width: 1000px;
  margin: 0 auto;
}

.game-section {
  margin-top: 2rem;
}

.room-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  min-height: 100px;
}

.room-item {
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-radius: 15px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

html[data-theme="light"] .room-item {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.6);
}

.room-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.room-item-info h3 {
  color: var(--color-primary);
  margin: 0 0 0.75rem;
}

.room-item-info p {
  margin: 0.5rem 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.room-item button {
  width: 100%;
  margin-top: 1rem;
}

.game-room-section {
  margin-top: 2rem;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
}

html[data-theme="light"] .room-header {
  background: rgba(241, 245, 249, 0.8);
}

.room-id-display {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
}

.players-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  align-items: center;
  margin: clamp(0.5rem, 1.5vw, 1rem) 0;
}

.player-card {
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  padding: clamp(1.25rem, 3.5vw, 1.75rem) clamp(1rem, 3vw, 1.5rem);
  text-align: left;
  transition: all 0.3s ease;
  min-height: 160px;
}

html[data-theme="light"] .player-card {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.6);
}

.player-card.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.player-card-header {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.player-card-name {
  font-size: clamp(1.2rem, 3.2vw, 1.6rem);
  font-weight: 600;
  flex: 1 1 auto;
  text-align: left;
}

.player-card-bet {
  color: #f59e0b;
  font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  white-space: nowrap;
}

.player-card-choice {
  font-size: clamp(1.4rem, 3.8vw, 1.9rem);
  font-weight: bold;
  padding: clamp(0.875rem, 2.5vw, 1.25rem);
  border-radius: 8px;
  margin-top: 0.75rem;
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-card-choice.heads {
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid #22c55e;
  color: #22c55e;
}

.player-card-choice.tails {
  background: rgba(56, 189, 248, 0.15);
  border: 2px solid #38bdf8;
  color: #38bdf8;
}

.confirmation-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.confirmation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.confirmation-section {
  position: relative;
  z-index: 1;
  background: rgba(15, 23, 42, 0.98);
  padding: 2rem;
  border-radius: 15px;
  border: 2px solid rgba(148, 163, 184, 0.4);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html[data-theme="light"] .confirmation-section {
  background: rgba(241, 245, 249, 0.98);
  border-color: rgba(148, 163, 184, 0.6);
}

.confirmation-info h3 {
  margin: 0 0 1.5rem;
  text-align: center;
}

.choice-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.choice-display {
  padding: 1.5rem;
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  border: 3px solid;
}

.choice-display.heads {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #22c55e;
}

.choice-display.tails {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.confirmation-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.confirmation-buttons button {
  flex: 1;
}

.results-section {
  text-align: center;
  margin-top: 2rem;
}

.result-message {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 1.5rem;
  border-radius: 12px;
}

.result-message.win {
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid #22c55e;
  color: #22c55e;
}

.result-message.lose {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid #ef4444;
  color: #ef4444;
}

.connection-status {
  text-align: center;
  margin: 1rem 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
}

.connection-status.hidden {
  display: none;
}

/* Coinflip Additional Styles */
.room-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.room-selection-header h3 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.btn-create-room {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  white-space: nowrap;
}

.bet-setup-section {
  position: relative;
  z-index: 1;
  background: rgba(15, 23, 42, 0.98);
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 15px;
  border: 2px solid rgba(148, 163, 184, 0.4);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html[data-theme="light"] .bet-setup-section {
  background: var(--color-surface);
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.bet-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.3);
}

.bet-setup-header h4 {
  margin: 0;
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-close {
  background: transparent;
  border: 2px solid rgba(148, 163, 184, 0.5);
  color: var(--color-text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  font-size: 1rem;
}

.btn-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  transform: rotate(90deg);
}

.bet-setup-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bet-setup-section .bet-input-group {
  margin-bottom: 0;
}

.bet-setup-section .bet-input-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: clamp(0.95rem, 2.2vw, 1rem);
  color: var(--color-text);
}

.bet-setup-section .bet-input-group input {
  width: 100%;
  padding: clamp(0.75rem, 2vw, 0.9rem);
  border-radius: 10px;
  border: 2px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  color: var(--color-text);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  text-align: center;
  margin-bottom: 1rem;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

html[data-theme="light"] .bet-setup-section .bet-input-group input {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.7);
}

.bet-setup-section .bet-input-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.choice-section {
  margin: 0;
}

.choice-section label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: clamp(0.95rem, 2.2vw, 1rem);
  color: var(--color-text);
  text-align: center;
}

.bet-setup-section .choice-buttons {
  margin: 0;
}

.btn-create-confirm {
  width: 100%;
  padding: clamp(0.75rem, 2vw, 0.9rem) 1.5rem;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  font-weight: 600;
  margin-top: 0.5rem;
}

.quick-bet-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-quick-bet {
  padding: 0.6rem 1.2rem;
  border: 2px solid rgba(148, 163, 184, 0.5);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

html[data-theme="light"] .btn-quick-bet {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.7);
}

.btn-quick-bet:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  transform: translateY(-2px);
}

.game-status {
  background: rgba(15, 23, 42, 0.5);
  padding: 1.5rem;
  border-radius: 15px;
  margin: 2rem 0;
  text-align: center;
  border: 2px solid rgba(148, 163, 184, 0.3);
}

html[data-theme="light"] .game-status {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.status-message {
  font-size: 1.2rem;
  color: var(--color-text);
  margin: 0 0 1rem 0;
}

.btn-play-bot {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.bet-input-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
}

.bet-input-group input[type="number"] {
  width: 100%;
  padding: 0.9rem;
  border-radius: 10px;
  border: 2px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  color: var(--color-text);
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 1rem;
}

html[data-theme="light"] .bet-input-group input[type="number"] {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.7);
}

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

  .wheel-container {
    width: 400px;
    height: 400px;
  }

  .players-container {
    grid-template-columns: 1fr;
  }

  .coin-container {
    order: -1;
  }
}

@media (max-width: 768px) {
  /* Roulette Tablet/Mobile Compact */
  .roulette-casino-container {
    padding: 0 0.75rem;
  }

  .roulette-game-area {
    gap: 1rem;
    margin-top: 1rem;
    display: flex !important;
    flex-direction: column !important;
  }

  .roulette-game-area .betting-section-roulette {
    order: -1 !important; /* Betting controls FIRST on mobile */
  }

  .digital-roulette-display {
    padding: 1rem;
    min-height: auto;
  }

  .display-header {
    margin-bottom: 1rem;
  }

  .display-label {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
  }

  .roulette-display {
    width: 140px;
    height: 140px;
  }

  .number-display {
    font-size: 3rem;
  }

  .color-indicator {
    width: 50px;
    height: 50px;
    margin-top: 0.5rem;
  }

  .winning-number {
    margin-top: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    padding: 0.625rem 1rem;
  }

  .next-spin-timer {
    margin-top: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    padding: 0.625rem 1.25rem;
  }

  .betting-section-roulette {
    gap: 1.5rem;
  }

  .betting-controls {
    padding: 1.5rem 1.25rem;
  }

  .betting-controls h3 {
    margin: 0 0 1rem;
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  }

  .color-bet-btn {
    padding: 1.25rem 1.75rem;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
  }

  .roulette-history-section {
    margin-top: 0;
    padding: 1.5rem 1.25rem;
  }

  .roulette-history-section h3 {
    margin: 0 0 1rem;
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  }

  .blackjack-container {
    padding: 1rem 0.75rem;
  }

  .betting-section {
    padding: 1rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .quick-bet-btn {
    max-width: calc(50% - 0.3rem);
    min-width: calc(50% - 0.3rem);
  }

  .cards-container {
    gap: 0.4rem;
    padding: 0 0.5rem;
    min-height: clamp(90px, 20vw, 110px);
  }

  .card {
    width: clamp(50px, 13vw, 68px);
    height: clamp(70px, 18vw, 95px);
    min-width: clamp(50px, 13vw, 68px);
    min-height: clamp(70px, 18vw, 95px);
  }

  .dealer-section, .player-section {
    margin-bottom: 0.4rem;
  }

  .game-controls {
    flex-direction: row;
    align-items: center;
    margin-top: 0.5rem;
    gap: 0.35rem;
  }

  .game-controls .btn {
    max-width: none;
    width: auto;
    flex: 1;
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    min-width: 0;
    letter-spacing: 0;
  }
}

@media (max-width: 480px) {
  .blackjack-container {
    padding: 0.75rem 0.5rem;
  }

  .betting-section {
    padding: 0.875rem 0.625rem;
    margin-bottom: 0.625rem;
  }

  .quick-bets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .quick-bet-btn {
    max-width: none;
    min-width: 0;
    padding: 0.65rem 0.5rem;
    font-size: 0.9rem;
    border-radius: 10px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cards-container {
    gap: 0.3rem;
    padding: 0 0.25rem;
    min-height: clamp(80px, 18vw, 95px);
  }

  .card {
    width: clamp(44px, 14vw, 60px);
    height: clamp(62px, 20vw, 84px);
    min-width: clamp(44px, 14vw, 60px);
    min-height: clamp(62px, 20vw, 84px);
  }

  .dealer-section, .player-section {
    padding: 0 0.25rem;
    margin-bottom: 0.35rem;
  }

  .result-display {
    margin: 0.25rem 0;
    padding: 0.4rem;
  }
}

/* Coinflip Mobile Responsive */
@media (max-width: 768px) {
  .room-selection-header {
    flex-direction: column;
    align-items: stretch;
  }

  .room-selection-header h3 {
    text-align: center;
  }

  .btn-create-room {
    width: 100%;
    justify-content: center;
  }

  .room-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .bet-setup-section {
    padding: 1.5rem 1rem;
  }

  .bet-setup-header {
    flex-wrap: wrap;
  }

  .players-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: clamp(0.75rem, 2vw, 1rem);
    margin: 0.75rem 0;
    position: relative;
  }

  .coin-container {
    grid-column: 1 / -1;
    grid-row: 1;
    order: 0;
    margin: 0;
    padding: 0.5rem 0;
    position: relative;
  }

  .coin {
    width: clamp(100px, 25vw, 150px);
    height: clamp(100px, 25vw, 150px);
    margin: 0 auto;
  }

  .coin-face {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }

  .player-card {
    padding: clamp(1.25rem, 3.5vw, 1.75rem) clamp(1rem, 3vw, 1.5rem);
    max-width: 100%;
    min-height: 160px;
    text-align: left;
  }

  #player1Card {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  #player2Card {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .player-card-header {
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .player-card-name {
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    text-align: left;
  }

  .player-card-bet {
    font-size: clamp(1.1rem, 3.2vw, 1.4rem);
  }

  .player-card-choice {
    font-size: clamp(1.4rem, 3.8vw, 1.9rem);
    padding: clamp(0.875rem, 2.5vw, 1.25rem);
    margin-top: 0.75rem;
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .confirmation-section {
    padding: 1.5rem 1rem;
    max-width: 90%;
  }

  .choice-buttons {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .coinflip-casino-container {
    padding: 0 0.5rem;
  }

  .room-selection-header {
    margin-bottom: 1rem;
  }

  .room-list {
    gap: 0.75rem;
  }

  .room-item {
    padding: 1.25rem;
  }

  .bet-setup-section {
    padding: 1.25rem 0.75rem;
    margin-top: 1rem;
  }

  .bet-setup-header h4 {
    font-size: 1.1rem;
  }

  .bet-setup-content {
    gap: 1.25rem;
  }

  .quick-bet-buttons {
    gap: 0.5rem;
  }

  .btn-quick-bet {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .players-container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    margin: 0.5rem 0;
  }

  .coin-container {
    padding: 0.25rem 0;
  }

  .coin {
    width: clamp(140px, 35vw, 200px);
    height: clamp(140px, 35vw, 200px);
  }

  .coin-face {
    font-size: clamp(3rem, 8vw, 5rem);
  }

  .player-card {
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem);
    max-width: 100%;
    min-height: 70px;
    width: 100%;
    text-align: left;
  }

  .player-card-header {
    margin-bottom: 0.5rem;
    gap: 0.375rem;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .player-card-name {
    font-size: clamp(1rem, 2.8vw, 1.3rem);
    text-align: left;
  }

  .player-card-bet {
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  }

  .player-card-choice {
    font-size: clamp(1.2rem, 3.2vw, 1.6rem);
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    margin-top: 0.5rem;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .confirmation-section {
    padding: 1.25rem 0.875rem;
    max-width: 95%;
  }

  .choice-comparison {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

  .choice-btn,
  .btn-choice {
    min-width: 100%;
    max-width: 100%;
    padding: 1.5rem;
    font-size: 1.2rem;
  }

  .btn-choice .choice-icon {
    display: none;
  }

  .btn-choice span:not(.choice-icon) {
    font-size: 1.2rem;
  }

  .number-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .roulette-wheel {
    width: 250px;
    height: 250px;
  }

  .digital-roulette-display {
    padding: 2rem 1.5rem;
    min-height: 300px;
  }

  .history-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
  }

  .history-item {
    min-height: 60px;
    padding: 0.5rem 0.25rem;
  }

  .history-number {
    font-size: 1.1rem;
  }

  .history-color-indicator {
    width: 20px;
    height: 20px;
  }

  .roulette-display {
    width: 220px;
    height: 220px;
  }

  .number-display {
    font-size: 4.5rem;
  }

  .color-indicator {
    width: 90px;
    height: 90px;
    margin-top: 1rem;
  }

  .display-label {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  /* Roulette Mobile Compact Layout */
  .roulette-casino-container {
    padding: 0 0.5rem;
  }

  .roulette-game-area {
    gap: 1rem;
    margin-top: 1rem;
  }

  .digital-roulette-display {
    padding: clamp(1rem, 3vw, 1.5rem) clamp(0.75rem, 2vw, 1rem);
    min-height: auto;
  }

  .display-header {
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
  }

  .display-label {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    letter-spacing: 1px;
  }

  .roulette-display {
    width: clamp(160px, 40vw, 200px);
    height: clamp(160px, 40vw, 200px);
    border-radius: 15px;
  }

  .number-display {
    font-size: clamp(3.5rem, 12vw, 4.5rem);
  }

  .color-indicator {
    width: clamp(70px, 18vw, 90px);
    height: clamp(70px, 18vw, 90px);
    margin-top: clamp(0.5rem, 1.5vw, 1rem);
    border-width: 3px;
  }

  .winning-number {
    margin-top: clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    min-height: auto;
  }

  .next-spin-timer {
    margin-top: clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    padding: clamp(0.5rem, 1.5vw, 0.625rem) clamp(0.75rem, 2vw, 1rem);
  }

  .betting-section-roulette {
    gap: clamp(1rem, 3vw, 1.5rem);
  }

  .betting-controls {
    padding: clamp(1rem, 3vw, 1.5rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: 12px;
  }

  .betting-controls h3 {
    margin: 0 0 clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(1rem, 2.8vw, 1.2rem);
  }

  .bet-input-group {
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
  }

  .bet-input-group label {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    margin-bottom: clamp(0.375rem, 1vw, 0.5rem);
  }

  .bet-input-group input {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
  }

  .quick-bets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .quick-bet-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
    border-radius: 10px;
    min-height: 44px;
    max-width: none;
    min-width: 0;
  }

  .color-bets-section {
    margin-top: clamp(0.75rem, 2vw, 1rem);
  }

  .color-bets-section h4 {
    margin: 0 0 clamp(0.5rem, 1.5vw, 0.75rem);
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
  }

  .color-buttons {
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    flex-direction: column;
  }

  .color-bet-btn {
    min-width: 100%;
    padding: clamp(0.875rem, 2.5vw, 1.25rem) clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    border-width: 2px;
    border-radius: 10px;
  }

  .current-bet-display {
    margin-top: clamp(0.75rem, 2vw, 1rem);
    padding-top: clamp(0.75rem, 2vw, 1rem);
  }

  .current-bet-display p {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
  }

  .current-bet-display .btn {
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(0.85rem, 2.2vw, 1rem);
  }

  .all-bets-section {
    padding: clamp(1rem, 3vw, 1.5rem) clamp(0.75rem, 2vw, 1rem);
  }

  .all-bets-section h3 {
    margin: 0 0 clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(1rem, 2.8vw, 1.2rem);
  }

  .all-bets-list {
    max-height: clamp(120px, 30vw, 180px);
    overflow-y: auto;
  }

  .bet-item {
    padding: clamp(0.5rem, 1.5vw, 0.75rem);
    margin-bottom: clamp(0.375rem, 1vw, 0.5rem);
    font-size: clamp(0.8rem, 2.2vw, 0.95rem);
  }

  .roulette-history-section {
    margin-top: 0;
    padding: clamp(1rem, 3vw, 1.5rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: 12px;
  }

  .roulette-history-section h3 {
    margin: 0 0 clamp(0.75rem, 2vw, 1rem);
    font-size: clamp(1rem, 2.8vw, 1.2rem);
  }

  .roulette-history {
    min-height: auto;
    max-height: clamp(150px, 35vw, 200px);
    overflow-y: auto;
  }

  .history-grid {
    gap: clamp(0.375rem, 1vw, 0.5rem);
  }

  .history-item {
    min-height: clamp(45px, 12vw, 55px);
    padding: clamp(0.375rem, 1vw, 0.5rem) clamp(0.25rem, 0.8vw, 0.375rem);
    border-radius: 8px;
  }

  .history-number {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  }

  .history-color-indicator {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
  }

  .no-history {
    padding: clamp(1rem, 3vw, 1.5rem) 0;
    font-size: clamp(0.85rem, 2.2vw, 1rem);
  }



/* CS2 Betting Styles */
.cs2-betting-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.cs2-disclaimer {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: #f59e0b;
}

html[data-theme="light"] .cs2-disclaimer {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.7);
}

.cs2-betting-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 1024px) {
  .cs2-betting-layout {
    grid-template-columns: 1fr;
  }
}

/* Events Panel */
.cs2-events-panel {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 500px;
}

html[data-theme="light"] .cs2-events-panel {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.events-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.events-panel-header h3 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--color-primary);
}

.cs2-events-list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1rem);
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 0.5rem;
  min-height: 100px;
}

.cs2-events-list:empty::before {
  content: 'No matches available';
  display: block;
  text-align: center;
  color: var(--color-muted);
  padding: 2rem;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
}

.cs2-events-list::-webkit-scrollbar {
  width: 8px;
}

.cs2-events-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.cs2-events-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 4px;
}

.cs2-events-list::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

/* Tournament Header */
.tournament-header {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  padding: clamp(0.5rem, 1.3vw, 0.7rem) clamp(0.75rem, 1.8vw, 1rem);
  margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
  margin-top: clamp(0.5rem, 1.3vw, 0.7rem);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  box-sizing: border-box;
}

.tournament-header:first-child {
  margin-top: 0;
}

html[data-theme="light"] .tournament-header {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(148, 163, 184, 0.5);
}

.tournament-icon {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  flex-shrink: 0;
}

.tournament-name {
  font-size: clamp(0.85rem, 1.9vw, 1rem);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Event Card */
.cs2-event-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  padding: clamp(0.6rem, 1.5vw, 0.85rem);
  margin-bottom: clamp(0.4rem, 1.2vw, 0.6rem);
  transition: all 0.3s ease;
  position: relative;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.cs2-event-card * {
  box-sizing: border-box;
  max-width: 100%;
}

html[data-theme="light"] .cs2-event-card {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
}

.cs2-event-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.cs2-event-card.live {
  border-color: #dc2626;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.cs2-event-card.finished {
  opacity: 0.7;
  filter: grayscale(50%);
}

/* New Match Layout Styles */
.event-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: clamp(0.3rem, 1vw, 0.5rem);
  margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.match-time-status {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
}

.match-time {
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  color: var(--color-text);
  font-weight: 500;
}

.match-live-badge {
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  color: #dc2626;
  font-weight: 600;
  padding: clamp(0.2rem, 0.8vw, 0.35rem) clamp(0.5rem, 1.2vw, 0.7rem);
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.5);
  border-radius: 12px;
  animation: pulse 2s infinite;
}

.event-match-content {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: clamp(0.6rem, 1.5vw, 0.9rem);
  align-items: start;
  width: 100%;
}

/* Desktop: Align team rows with odds cards - both sections now have headers */
@media (min-width: 769px) {
  /* Both headers align at the top, so no padding-top offset needed */
  .teams-header {
    margin-bottom: 0;
    padding-bottom: clamp(0.15rem, 0.6vw, 0.3rem);
  }
  
  .odds-header {
    margin-bottom: 0;
    padding-bottom: clamp(0.15rem, 0.6vw, 0.3rem);
  }
  
  /* Ensure matching gaps and heights for proper alignment */
  .event-teams-list {
    gap: clamp(0.4rem, 1.2vw, 0.6rem);
  }
  
  .event-odds-section {
    gap: clamp(0.4rem, 1.2vw, 0.6rem);
  }
  
  .event-team-row {
    min-height: 44px;
    align-items: center;
  }
  
  .odds-card {
    min-height: 44px;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .event-match-content {
    grid-template-columns: 1fr;
    gap: clamp(0.75rem, 2vw, 1rem);
    align-items: stretch;
  }
}

.event-teams-list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
  width: 100%;
}

.event-team-row {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 0.7rem);
  padding: clamp(0.25rem, 0.8vw, 0.4rem) 0;
  width: 100%;
}

.event-team-row .team-logo-container {
  width: clamp(24px, 6vw, 32px);
  height: clamp(24px, 6vw, 32px);
  min-width: clamp(24px, 6vw, 32px);
  min-height: clamp(24px, 6vw, 32px);
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-team-row .team-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback acronym styling */
.event-team-row .team-logo-container .team-acronym {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.6rem, 3vw, 0.75rem);
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Temporary message notification */
.cs2-temp-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
}

.cs2-temp-message-success {
  background: #22c55e;
  color: white;
  border: 1px solid #16a34a;
}

.cs2-temp-message-error {
  background: #ef4444;
  color: white;
  border: 1px solid #dc2626;
}

.cs2-temp-message-info {
  background: #3b82f6;
  color: white;
  border: 1px solid #2563eb;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.event-team-row .team-name {
  font-size: clamp(0.85rem, 1.9vw, 1rem);
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.25;
}

.teams-header {
  font-size: clamp(0.75rem, 1.6vw, 0.9rem);
  font-weight: 600;
  color: var(--color-muted);
  text-align: left;
  padding-bottom: clamp(0.15rem, 0.6vw, 0.3rem);
  margin: 0;
  line-height: 1.3;
}

.event-odds-section {
  display: flex;
  flex-direction: column;
  gap: clamp(0.35rem, 1vw, 0.5rem);
  width: 100%;
  padding-right: clamp(0.5rem, 1.5vw, 1rem);
  box-sizing: border-box;
}

.odds-header {
  font-size: clamp(0.75rem, 1.6vw, 0.9rem);
  font-weight: 600;
  color: var(--color-muted);
  text-align: right;
  padding-bottom: clamp(0.15rem, 0.6vw, 0.3rem);
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .odds-header {
    text-align: left;
  }
}

.odds-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  padding: clamp(0.5rem, 1.3vw, 0.7rem);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: clamp(0.25rem, 0.7vw, 0.4rem);
  text-align: right;
  width: 100%;
  box-sizing: border-box;
  min-height: fit-content;
}

@media (max-width: 768px) {
  .odds-card {
    text-align: left;
  }
}

html[data-theme="light"] .odds-card {
  background: rgba(51, 65, 85, 0.7);
  border-color: rgba(148, 163, 184, 0.5);
}

.odds-card:hover:not(.disabled) {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.odds-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.4);
}

.odds-team-name {
  font-size: clamp(0.75rem, 1.6vw, 0.85rem);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.odds-card .odds-value {
  font-size: clamp(1rem, 2.3vw, 1.25rem);
  font-weight: 700;
  color: #a855f7;
  line-height: 1.1;
}

html[data-theme="light"] .odds-card .odds-value {
  color: #9333ea;
}

.odds-card:active:not(.disabled) {
  transform: translateY(0);
}

.event-header-section {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  margin-bottom: clamp(0.75rem, 2vw, 1rem);
  padding-bottom: clamp(0.75rem, 2vw, 1rem);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .event-header-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.event-tournament {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.tournament-badge {
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  color: var(--color-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.event-status-section {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  flex-wrap: wrap;
}

.event-date-mobile {
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--color-muted);
  font-weight: 500;
  display: block;
}

.event-time-desktop {
  display: none;
}

.event-time-mobile {
  display: inline;
}

@media (min-width: 640px) {
  .event-date-mobile {
    display: none;
  }

  .event-time-desktop {
    display: inline;
  }

  .event-time-mobile {
    display: none;
  }
}

.event-status-badge {
  font-size: clamp(0.85rem, 2vw, 1rem);
  padding: clamp(0.4rem, 1vw, 0.5rem) clamp(0.7rem, 1.5vw, 0.9rem);
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  line-height: 1.2;
}

.event-status-badge.scheduled {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
}

.event-status-badge.live {
  background: rgba(220, 38, 38, 0.2);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.event-status-badge.finished {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .cs2-event-card {
    overflow: hidden;
    padding: clamp(1rem, 2.5vw, 1.25rem);
  }
  
  .event-odds-section {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  
  .odds-card {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    overflow: hidden;
    word-wrap: break-word;
  }
  
  .odds-card .odds-team-name {
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
  }
  
  .odds-card .odds-value {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* My Bets Panel */
.cs2-my-bets-panel {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 500px;
}

html[data-theme="light"] .cs2-my-bets-panel {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.cs2-my-bets-panel h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--color-primary);
}

.bets-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.3);
}

.bet-tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--color-muted);
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: -2px;
}

.bet-tab:hover {
  color: var(--color-text);
}

.bet-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.cs2-my-bets {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1rem);
}

/* Bet Card - Improved UI */
.cs2-bet-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: clamp(1rem, 2.5vw, 1.25rem);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1rem);
  flex-shrink: 0;
  overflow: visible;
}

.cs2-bet-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.cs2-bet-card.pending {
  border-left: 4px solid #f59e0b;
}

.cs2-bet-card.won {
  border-left: 4px solid #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.cs2-bet-card.lost {
  border-left: 4px solid #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.cs2-bet-card.void {
  border-left: 4px solid #94a3b8;
  background: rgba(148, 163, 184, 0.1);
}

.bet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: clamp(0.5rem, 1.2vw, 0.75rem);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.bet-id {
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  color: var(--color-muted);
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

.bet-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  font-weight: 600;
  padding: clamp(0.25rem, 0.6vw, 0.4rem) clamp(0.5rem, 1.2vw, 0.75rem);
  border-radius: 20px;
}

.bet-status.pending {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.bet-status.won {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.bet-status.lost {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.15);
}

.bet-status.void {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.15);
}

.bet-match {
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.bet-selection {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--color-text);
  line-height: 1.5;
}

.bet-selection strong {
  color: var(--color-primary);
  font-weight: 700;
}

.bet-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
  padding: clamp(0.75rem, 2vw, 1rem);
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.bet-details > div {
  font-size: clamp(0.85rem, 1.9vw, 0.95rem);
  color: var(--color-text);
  line-height: 1.5;
}

.bet-details strong {
  color: #f59e0b;
  font-weight: 700;
  display: block;
  margin-top: 0.25rem;
  font-size: clamp(1rem, 2.3vw, 1.15rem);
}

.bet-settled {
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  color: var(--color-muted);
  font-style: italic;
  padding-top: clamp(0.5rem, 1.2vw, 0.75rem);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

html[data-theme="light"] .cs2-bet-card {
  background: rgba(241, 245, 249, 0.7);
  border-color: rgba(148, 163, 184, 0.4);
}

html[data-theme="light"] .bet-details {
  background: rgba(241, 245, 249, 0.5);
}

.no-bets, .no-events, .loading-text {
  text-align: center;
  color: var(--color-muted);
  padding: 2rem;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
}

.error-text {
  color: #dc2626;
  text-align: center;
  padding: 1rem;
  background: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

/* Bet Slip Modal (Popup) */
.cs2-betslip-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.cs2-betslip-modal:not(.hidden) {
  pointer-events: auto;
}

.cs2-betslip-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cs2-betslip-modal-content {
  position: relative;
  z-index: 1;
  background: rgba(15, 23, 42, 0.98);
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

html[data-theme="light"] .cs2-betslip-modal-content {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(148, 163, 184, 0.6);
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.betslip-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.3);
}

.betslip-modal-header h3 {
  margin: 0;
  font-size: clamp(1.3rem, 3.5vw, 1.6rem);
  color: var(--color-primary);
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  line-height: 1;
}

.close-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #dc2626;
  transform: rotate(90deg);
}

.cs2-betslip {
  margin-bottom: 1.5rem;
}

.betslip-selection {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
}

html[data-theme="light"] .betslip-selection {
  background: rgba(241, 245, 249, 0.8);
}

.selection-match {
  margin-bottom: 1rem;
}

.match-tournament {
  display: block;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  color: var(--color-text);
}

.vs-text {
  color: var(--color-muted);
  font-weight: 700;
}

.selection-outcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.outcome-label {
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  color: var(--color-muted);
}

.outcome-value {
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  font-weight: 700;
  color: var(--color-primary);
}

.cs2-bet-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cs2-bet-controls.hidden {
  display: none;
}

.potential-payout {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  padding: 1rem;
}

.payout-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  color: var(--color-text);
}

.payout-info div strong {
  color: #22c55e;
}

.betslip-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.betslip-actions .btn {
  flex: 1;
  min-width: 120px;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.no-selection {
  text-align: center;
  color: var(--color-muted);
  padding: 2rem;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cs2-betting-container {
    padding: clamp(0.5rem, 1.5vw, 1rem);
  }

  .cs2-betting-layout {
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.5vw, 1.5rem);
  }

  .cs2-events-panel,
  .cs2-my-bets-panel {
    padding: clamp(0.75rem, 2vw, 1.25rem);
    min-height: auto;
  }

  .events-panel-header {
    margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(0.75rem, 2vw, 1rem);
  }

  .events-panel-header h3 {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    margin: 0;
  }

  .events-panel-header .btn {
    align-self: flex-end;
    width: auto;
  }

  .cs2-events-list {
    gap: clamp(0.75rem, 2vw, 1rem);
    max-height: 65vh;
    padding-right: clamp(0.25rem, 1vw, 0.5rem);
  }

  .cs2-event-card {
    padding: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 2vw, 1rem);
  }

  .event-header-section {
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    padding-bottom: clamp(0.75rem, 2vw, 1rem);
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
  }

  .event-tournament {
    width: 100%;
  }

  .tournament-badge {
    font-size: clamp(0.9rem, 2.3vw, 1.05rem);
    line-height: 1.4;
    word-break: break-word;
    display: inline-flex;
    flex-wrap: wrap;
  }

  .event-status-section {
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .event-date-mobile {
    font-size: clamp(0.85rem, 2.1vw, 1rem);
    display: block;
  }

  .event-status-badge {
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    padding: clamp(0.4rem, 1vw, 0.5rem) clamp(0.7rem, 1.5vw, 0.9rem);
    flex-shrink: 0;
  }


  .cs2-betslip-modal-content {
    padding: clamp(1rem, 3vw, 1.5rem);
    margin: clamp(0.5rem, 1.5vw, 1rem);
    max-width: calc(100% - 1rem);
  }

  .betslip-actions {
    flex-direction: column;
    gap: clamp(0.75rem, 2vw, 1rem);
  }

  .betslip-actions .btn {
    width: 100%;
    min-width: auto;
  }

  .cs2-my-bets-panel {
    margin-top: clamp(1rem, 2.5vw, 1.5rem);
  }

  .cs2-my-bets-panel h3 {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
  }
}

@media (max-width: 480px) {
  .cs2-betting-container {
    padding: clamp(0.5rem, 1.2vw, 0.75rem);
  }

  .cs2-events-panel {
    padding: clamp(0.75rem, 2vw, 1rem);
  }

  .cs2-events-list {
    gap: clamp(0.75rem, 2vw, 1rem);
    max-height: 60vh;
  }

  .cs2-event-card {
    padding: clamp(0.875rem, 2.2vw, 1.125rem);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    gap: clamp(0.75rem, 2vw, 1rem);
    overflow: hidden;
  }

  .event-match-content {
    grid-template-columns: 1fr;
    gap: clamp(0.875rem, 2.2vw, 1.125rem);
    align-items: stretch;
  }

  .event-match-header {
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
    padding-bottom: clamp(0.4rem, 1.2vw, 0.6rem);
  }

  .event-teams-list {
    width: 100%;
  }

  .event-odds-section {
    width: 100%;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
  }

  .odds-header {
    text-align: left;
    padding-bottom: clamp(0.25rem, 0.8vw, 0.4rem);
  }

  .odds-card {
    width: 100%;
    padding: clamp(0.5rem, 1.3vw, 0.65rem) clamp(0.75rem, 1.8vw, 0.9rem);
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.5rem, 1.2vw, 0.75rem);
  }

  .odds-card .odds-team-name {
    flex: 1;
  }

  .odds-card .odds-value {
    flex-shrink: 0;
  }

  .event-header-section {
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
    padding-bottom: clamp(0.75rem, 2vw, 1rem);
  }

  .tournament-badge {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    line-height: 1.4;
  }

  .event-status-badge {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    padding: clamp(0.35rem, 1vw, 0.45rem) clamp(0.6rem, 1.5vw, 0.8rem);
  }

  .event-date-mobile {
    font-size: clamp(0.8rem, 2vw, 0.95rem);
  }


  .events-panel-header h3 {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
  }
}


/* ========== POKER STYLES (v2 — visual overhaul) ========== */

.poker-casino-container { max-width:1100px; margin:0 auto; padding:0 .75rem; }
.btn-full { width:100%; }

/* ---- Lobby ---- */
.poker-lobby { max-width:900px; margin:0 auto; }
.lobby-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.5rem; }
.lobby-header h3 { margin:0; font-size:1.4rem; }
.poker-tables-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:1.25rem; }
.no-tables { text-align:center; color:var(--color-muted); font-style:italic; padding:3rem 1rem; grid-column:1/-1; }

.poker-table-card { background:rgba(15,23,42,.75); border:2px solid rgba(148,163,184,.25); border-radius:14px; padding:1.25rem; transition:all .25s; }
html[data-theme="light"] .poker-table-card { background:rgba(241,245,249,.85); border-color:rgba(148,163,184,.5); }
.poker-table-card:hover { border-color:var(--color-primary); transform:translateY(-3px); box-shadow:0 8px 24px rgba(0,0,0,.3); }

.ptc-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:.75rem; }
.ptc-header h4 { margin:0; font-size:1.1rem; color:var(--color-primary); }
.ptc-status { font-size:.7rem; font-weight:700; text-transform:uppercase; padding:.2rem .6rem; border-radius:6px; background:rgba(34,197,94,.15); color:#22c55e; border:1px solid rgba(34,197,94,.3); }
.ptc-status.betting,.ptc-status.dealing { background:rgba(245,158,11,.15); color:#f59e0b; border-color:rgba(245,158,11,.3); }
.ptc-status.showdown { background:rgba(56,189,248,.15); color:#38bdf8; border-color:rgba(56,189,248,.3); }
.ptc-stats { margin-bottom:1rem; }
.ptc-stats > div { display:flex; justify-content:space-between; padding:.25rem 0; font-size:.9rem; color:var(--color-muted); }
.ptc-stats > div span:last-child { color:var(--color-text); font-weight:600; }

/* ---- Modals ---- */
.poker-modal { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:1rem; }
.poker-modal.hidden { display:none; }
.poker-modal-overlay { position:absolute; inset:0; background:rgba(0,0,0,.7); backdrop-filter:blur(4px); }
.poker-modal-content { position:relative; z-index:1; background:rgba(15,23,42,.98); border:2px solid rgba(148,163,184,.4); border-radius:16px; max-width:440px; width:100%; max-height:90vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,.5); animation:pokerModalIn .3s ease-out; }
html[data-theme="light"] .poker-modal-content { background:rgba(255,255,255,.98); border-color:rgba(148,163,184,.5); }
@keyframes pokerModalIn { from{opacity:0;transform:translateY(-20px) scale(.95)} to{opacity:1;transform:translateY(0) scale(1)} }
.poker-modal-header { display:flex; justify-content:space-between; align-items:center; padding:1.25rem 1.5rem; border-bottom:1px solid rgba(148,163,184,.2); }
.poker-modal-header h3 { margin:0; font-size:1.2rem; }
.btn-close-modal { background:none; border:2px solid rgba(148,163,184,.4); color:var(--color-text); width:32px; height:32px; border-radius:50%; font-size:1.2rem; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all .2s; }
.btn-close-modal:hover { background:rgba(239,68,68,.15); border-color:#ef4444; color:#ef4444; }
.poker-modal-body { padding:1.5rem; }
.poker-modal-body .form-group { margin-bottom:1rem; }
.poker-modal-body .form-group label { display:block; margin-bottom:.4rem; font-weight:600; font-size:.9rem; }
.poker-modal-body .checkbox-group label { display:flex; align-items:center; gap:.5rem; }
.poker-modal-body input[type="text"],
.poker-modal-body input[type="number"] { width:100%; padding:.65rem .85rem; border-radius:8px; border:2px solid rgba(148,163,184,.4); background:rgba(15,23,42,.8); color:var(--color-text); font-size:.95rem; box-sizing:border-box; }
html[data-theme="light"] .poker-modal-body input[type="text"],
html[data-theme="light"] .poker-modal-body input[type="number"] { background:#fff; border-color:rgba(148,163,184,.6); }
.poker-modal-body input:focus { outline:none; border-color:var(--color-primary); }
.quick-buy-in { display:flex; gap:.5rem; margin-top:.5rem; }
.quick-buy-in .quick-buy-btn { flex:1; padding:.5rem; border:2px solid rgba(148,163,184,.3); border-radius:8px; background:rgba(56,189,248,.1); color:var(--color-text); cursor:pointer; font-weight:600; font-size:.85rem; transition:all .2s; }
.quick-buy-in .quick-buy-btn:hover { border-color:var(--color-primary); background:rgba(56,189,248,.2); }
.join-table-info > div { display:flex; justify-content:space-between; padding:.3rem 0; font-size:.9rem; }
.join-table-info { margin-bottom:1rem; }

/* ---- Table Top Bar ---- */
.poker-table-top-bar { display:flex; justify-content:space-between; align-items:center; margin-bottom:.75rem; padding:.6rem 1rem; background:rgba(15,23,42,.5); border-radius:10px; border:1px solid rgba(148,163,184,.15); }
html[data-theme="light"] .poker-table-top-bar { background:rgba(241,245,249,.8); }
.poker-table-info { display:flex; align-items:center; gap:1rem; }
.table-name-label { font-weight:700; font-size:1.05rem; }
.table-blinds-label { font-size:.85rem; color:var(--color-muted); }

/* ============================================
   THE POKER TABLE (green felt)
   ============================================ */
.poker-felt-wrapper { max-width:900px; margin:0 auto 1rem; }

.poker-felt {
  position: relative;
  background: radial-gradient(ellipse at 50% 50%, #1a6b30 0%, #145a26 40%, #0d4a1e 70%, #092912 100%);
  border-radius: 200px / 140px;
  border: 10px solid #3d2b1f;
  box-shadow:
    0 0 0 5px #5a3e2b,
    0 0 0 10px rgba(0,0,0,.35),
    inset 0 0 60px rgba(0,0,0,.5),
    0 20px 60px rgba(0,0,0,.5);
  min-height: 440px;
  padding: 70px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Felt Center (pot + community cards + winner) --- */
.felt-center { text-align:center; z-index:5; position:relative; }
.pot-display {
  font-size:1rem; font-weight:700; color:#fbbf24;
  text-shadow:0 2px 4px rgba(0,0,0,.6);
  margin-bottom:.6rem;
  background:rgba(0,0,0,.45); padding:.35rem 1.2rem; border-radius:20px; display:inline-flex; align-items:center; gap:.4rem;
}
.pot-icon { font-size:1.1rem; }
.pot-value { font-size:1.15rem; }
.community-cards { display:flex; gap:.5rem; justify-content:center; flex-wrap:nowrap; min-height:90px; align-items:center; }

/* ============================================
   PLAYING CARDS (CSS-only)
   ============================================ */
.playing-card {
  width: 58px;
  height: 82px;
  border-radius: 7px;
  background: #fff;
  border: 1.5px solid #bbb;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Georgia', 'Times New Roman', serif;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
  overflow: hidden;
}
.playing-card:hover { transform:translateY(-4px); box-shadow:0 6px 16px rgba(0,0,0,.4); }

/* Rank & suit corners */
.card-corner { position:absolute; display:flex; flex-direction:column; align-items:center; line-height:1; }
.card-tl { top:4px; left:5px; }
.card-br { bottom:4px; right:5px; transform:rotate(180deg); }
.card-rank { font-size:.85rem; font-weight:800; }
.card-suit-sm { font-size:.7rem; line-height:1; }

/* Center suit (big) */
.card-center-suit { font-size:1.8rem; opacity:.85; line-height:1; }

/* Colors */
.playing-card.red { color:#dc2626; }
.playing-card.red .card-center-suit { color:#dc2626; }
.playing-card.black { color:#1e293b; }
.playing-card.black .card-center-suit { color:#1e293b; }

/* My cards glow */
.playing-card.my-card { border-color:#38bdf8; box-shadow:0 0 12px rgba(56,189,248,.5), 0 2px 8px rgba(0,0,0,.3); }

/* Card back */
.playing-card.card-back {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 50%, #1e3a5f 100%);
  border-color: #1a3050;
}
.card-back-pattern {
  width: 70%; height: 70%;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,.15);
  background: repeating-linear-gradient(
    45deg,
    transparent, transparent 4px,
    rgba(255,255,255,.06) 4px,
    rgba(255,255,255,.06) 8px
  );
}

/* Placeholder (empty slot) */
.playing-card.card-placeholder {
  background: rgba(255,255,255,.06);
  border: 2px dashed rgba(255,255,255,.15);
  box-shadow: none;
}
.playing-card.card-placeholder:hover { transform:none; box-shadow:none; }

/* ---- Winner Announcement ---- */
.winner-announcement { z-index:10; margin-top:.75rem; text-align:center; }
.winner-announcement.hidden { display:none; }
.winner-line {
  background:rgba(0,0,0,.65); color:#fbbf24; padding:.5rem 1.25rem; border-radius:10px;
  font-size:.95rem; font-weight:600; margin:.25rem; display:inline-block;
  text-shadow:0 1px 3px rgba(0,0,0,.5);
  animation:winPulse .5s ease-out;
}
@keyframes winPulse { 0%{transform:scale(.85);opacity:0} 60%{transform:scale(1.05)} 100%{transform:scale(1);opacity:1} }

/* ============================================
   SEAT POSITIONING (6 seats around felt)
   ============================================ */
.poker-seat {
  position: absolute;
  text-align: center;
  width: 140px;
  z-index: 6;
  transition: all .25s;
}

/* Bottom center (player seat — "hero" position) */
.poker-seat.seat-0 { bottom:-40px; left:50%; transform:translateX(-50%); }
/* Bottom left */
.poker-seat.seat-1 { bottom:10%; left:2%; }
/* Top left */
.poker-seat.seat-2 { top:10%; left:2%; }
/* Top center */
.poker-seat.seat-3 { top:-40px; left:50%; transform:translateX(-50%); }
/* Top right */
.poker-seat.seat-4 { top:10%; right:2%; }
/* Bottom right */
.poker-seat.seat-5 { bottom:10%; right:2%; }

/* Seat Panel (name/chips box) */
.seat-panel {
  background: rgba(10,18,32,.92);
  border: 2px solid rgba(148,163,184,.25);
  border-radius: 10px;
  padding: .35rem .6rem;
  min-width: 100px;
  transition: all .2s;
}
html[data-theme="light"] .seat-panel { background:rgba(241,245,249,.95); border-color:rgba(148,163,184,.5); }
.seat-name { font-size:.8rem; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.seat-chips { font-size:.75rem; color:#fbbf24; font-weight:600; }

/* Empty seat */
.poker-seat.empty .seat-name { color:var(--color-muted); font-weight:400; font-style:italic; font-size:.75rem; }
.poker-seat.empty .seat-panel { border-style:dashed; opacity:.5; }

/* Occupied */
.poker-seat.occupied .seat-panel { border-color:rgba(56,189,248,.35); }

/* My seat */
.poker-seat.is-me .seat-panel { border-color:#38bdf8; box-shadow:0 0 14px rgba(56,189,248,.35); }

/* Active turn */
.poker-seat.active-turn .seat-panel {
  border-color:#fbbf24;
  box-shadow:0 0 18px rgba(251,191,36,.55);
  animation:turnGlow 1.4s ease-in-out infinite;
}
@keyframes turnGlow { 0%,100%{box-shadow:0 0 12px rgba(251,191,36,.4)} 50%{box-shadow:0 0 26px rgba(251,191,36,.75)} }

/* Folded */
.poker-seat.folded { opacity:.4; }

/* All-in */
.poker-seat.all-in .seat-panel { border-color:#a855f7; box-shadow:0 0 14px rgba(168,85,247,.4); }

/* Seat badges (D / SB / BB) */
.seat-badge-row { display:flex; gap:.2rem; justify-content:center; margin-top:.15rem; }
.badge { font-size:.55rem; font-weight:800; padding:.1rem .35rem; border-radius:4px; text-transform:uppercase; letter-spacing:.5px; }
.badge-d { background:#fbbf24; color:#000; }
.badge-sb { background:rgba(56,189,248,.3); color:#38bdf8; border:1px solid rgba(56,189,248,.4); }
.badge-bb { background:rgba(239,68,68,.3); color:#ef4444; border:1px solid rgba(239,68,68,.4); }

/* Seat cards */
.seat-cards { display:flex; gap:3px; justify-content:center; margin-bottom:.3rem; position:relative; }
.seat-cards .playing-card { width:42px; height:60px; }
.seat-cards .playing-card .card-rank { font-size:.75rem; }
.seat-cards .playing-card .card-suit-sm { font-size:.6rem; }
.seat-cards .playing-card .card-center-suit { font-size:1.3rem; }

/* Hand result label */
.hand-label {
  position:absolute; bottom:-16px; left:50%; transform:translateX(-50%);
  font-size:.6rem; font-weight:700; color:#22c55e;
  background:rgba(0,0,0,.75); padding:.15rem .5rem; border-radius:4px; white-space:nowrap;
}

/* Bet chip near seat */
.seat-bet-chip { min-height:1.2rem; margin-top:.15rem; text-align:center; }
.chip-bet {
  display:inline-flex; align-items:center; gap:.25rem;
  background:linear-gradient(135deg,#f59e0b,#d97706); color:#fff;
  font-size:.7rem; font-weight:700; padding:.15rem .55rem; border-radius:12px;
  box-shadow:0 2px 4px rgba(0,0,0,.35);
}
.chip-icon { width:12px; height:12px; border-radius:50%; background:#fff; border:2px solid #d97706; display:inline-block; }

/* ---- Actions Panel ---- */
.poker-actions {
  background:rgba(15,23,42,.7); border:1px solid rgba(148,163,184,.2);
  border-radius:12px; padding:1rem; margin-bottom:.75rem; max-width:900px; margin-left:auto; margin-right:auto;
}
html[data-theme="light"] .poker-actions { background:rgba(241,245,249,.9); border-color:rgba(148,163,184,.4); }
.poker-actions.hidden { display:none; }
.poker-actions-info { font-size:.85rem; color:var(--color-muted); margin-bottom:.6rem; text-align:center; }
.poker-action-btns { display:flex; gap:.5rem; justify-content:center; flex-wrap:wrap; }
.pa-btn {
  padding:.6rem 1.2rem; border:2px solid; border-radius:10px;
  font-size:.95rem; font-weight:700; cursor:pointer; transition:all .2s; min-width:80px;
}
.pa-btn.hidden { display:none; }
.pa-btn:hover { transform:translateY(-2px); }
.pa-btn:active { transform:translateY(0); }
.pa-fold { background:rgba(239,68,68,.12); border-color:#ef4444; color:#ef4444; }
.pa-fold:hover { background:rgba(239,68,68,.25); }
.pa-check { background:rgba(56,189,248,.12); border-color:#38bdf8; color:#38bdf8; }
.pa-check:hover { background:rgba(56,189,248,.25); }
.pa-call { background:rgba(34,197,94,.12); border-color:#22c55e; color:#22c55e; }
.pa-call:hover { background:rgba(34,197,94,.25); }
.pa-bet, .pa-raise { background:rgba(245,158,11,.12); border-color:#f59e0b; color:#f59e0b; }
.pa-bet:hover, .pa-raise:hover { background:rgba(245,158,11,.25); }
.pa-allin { background:rgba(168,85,247,.12); border-color:#a855f7; color:#a855f7; }
.pa-allin:hover { background:rgba(168,85,247,.25); }

/* Bet controls */
.poker-bet-controls { margin-top:.75rem; padding:.75rem; background:rgba(0,0,0,.2); border-radius:10px; }
.poker-bet-controls.hidden { display:none; }
.poker-bet-controls input[type="range"] { width:100%; margin-bottom:.5rem; accent-color:var(--color-primary); }
.bet-ctrl-row { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.bet-ctrl-row input[type="number"] { width:90px; padding:.4rem .5rem; border-radius:8px; border:2px solid rgba(148,163,184,.4); background:rgba(15,23,42,.8); color:var(--color-text); font-size:1rem; font-weight:700; text-align:center; }
html[data-theme="light"] .bet-ctrl-row input[type="number"] { background:#fff; border-color:rgba(148,163,184,.6); }
.bet-presets { display:flex; gap:.35rem; }
.bp-btn { padding:.3rem .6rem; border:2px solid rgba(148,163,184,.25); border-radius:6px; background:rgba(56,189,248,.08); color:var(--color-text); cursor:pointer; font-size:.78rem; font-weight:600; transition:all .2s; }
.bp-btn:hover { border-color:var(--color-primary); background:rgba(56,189,248,.2); }

/* ---- Game Status ---- */
.poker-game-status {
  text-align:center; padding:1.25rem; max-width:900px; margin:0 auto .75rem;
  background:rgba(15,23,42,.5); border-radius:12px; border:1px solid rgba(148,163,184,.2);
}
html[data-theme="light"] .poker-game-status { background:rgba(241,245,249,.8); }
.poker-game-status.hidden { display:none; }
#statusMessage { margin:0 0 .5rem; font-size:1rem; }
#startHandBtn.hidden { display:none; }

/* ---- Chat ---- */
.poker-chat-section { max-width:900px; margin:.5rem auto 0; }
.poker-chat-toggle-bar { cursor:pointer; padding:.5rem 1rem; background:rgba(15,23,42,.5); border:1px solid rgba(148,163,184,.15); border-radius:8px; color:var(--color-muted); font-size:.85rem; display:inline-block; transition:all .2s; }
.poker-chat-toggle-bar:hover { background:rgba(15,23,42,.7); color:var(--color-text); }
.poker-chat-body { margin-top:.5rem; background:rgba(15,23,42,.6); border:1px solid rgba(148,163,184,.15); border-radius:10px; overflow:hidden; }
html[data-theme="light"] .poker-chat-body { background:rgba(241,245,249,.9); }
.poker-chat-body.hidden { display:none; }
.poker-chat-msgs { height:130px; overflow-y:auto; padding:.6rem; display:flex; flex-direction:column; gap:.25rem; }
.poker-chat-msg { font-size:.85rem; }
.poker-chat-msg strong { color:var(--color-primary); margin-right:.3rem; }
.poker-chat-input-row { display:flex; gap:.5rem; padding:.4rem .6rem; border-top:1px solid rgba(148,163,184,.15); }
.poker-chat-input-row input { flex:1; padding:.35rem .6rem; border-radius:6px; border:1px solid rgba(148,163,184,.3); background:rgba(15,23,42,.6); color:var(--color-text); font-size:.85rem; }
html[data-theme="light"] .poker-chat-input-row input { background:#fff; border-color:rgba(148,163,184,.5); }
.poker-chat-input-row input:focus { outline:none; border-color:var(--color-primary); }

/* ---- Responsive ---- */
@media (max-width:768px) {
  .poker-felt { min-height:360px; padding:50px 25px; border-width:7px; border-radius:160px/110px; }
  .poker-seat { width:115px; }
  .seat-panel { padding:.25rem .4rem; min-width:80px; }
  .seat-name { font-size:.7rem; }
  .seat-chips { font-size:.65rem; }
  .playing-card { width:48px; height:68px; }
  .seat-cards .playing-card { width:36px; height:50px; }
  .seat-cards .playing-card .card-rank { font-size:.65rem; }
  .seat-cards .playing-card .card-center-suit { font-size:1rem; }
  .pa-btn { padding:.5rem .8rem; font-size:.85rem; min-width:60px; }
  .poker-seat.seat-1,.poker-seat.seat-2 { left:-5px; }
  .poker-seat.seat-4,.poker-seat.seat-5 { right:-5px; }
  .lobby-header { flex-direction:column; gap:.75rem; }
  .poker-tables-list { grid-template-columns:1fr; }
}
@media (max-width:480px) {
  .poker-felt { min-height:300px; padding:40px 15px; border-width:5px; border-radius:130px/90px; }
  .poker-seat { width:95px; }
  .seat-panel { padding:.2rem .3rem; min-width:65px; }
  .seat-name { font-size:.6rem; }
  .seat-chips { font-size:.55rem; }
  .badge { font-size:.5rem; padding:.05rem .2rem; }
  .playing-card { width:40px; height:58px; }
  .seat-cards .playing-card { width:30px; height:42px; }
  .seat-cards .playing-card .card-center-suit { font-size:.85rem; }
  .pa-btn { padding:.4rem .6rem; font-size:.75rem; min-width:50px; }
  .bet-ctrl-row { flex-direction:column; align-items:stretch; }
  .bet-ctrl-row input[type="number"] { width:100%; }
  .bet-presets { flex-wrap:wrap; }
}

/* ========== END POKER STYLES ========== */

/* ========== CRASH STYLES ========== */
.crash-container { max-width:1100px; margin:0 auto; padding:0 .75rem; }
.crash-layout { display:grid; grid-template-columns:1fr 300px; gap:1.25rem; }
.crash-main { min-width:0; }
.crash-canvas-wrap { position:relative; background:#0a0e1a; border-radius:14px; border:2px solid rgba(56,189,248,.15); overflow:hidden; margin-bottom:.75rem; }
.crash-canvas-wrap canvas { display:block; width:100%; }
.crash-multiplier { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:3.5rem; font-weight:900; color:#22c55e; text-shadow:0 0 30px rgba(34,197,94,.5); pointer-events:none; font-family:'Georgia',serif; transition:color .3s; }
.crash-multiplier.crashed { color:#ef4444; text-shadow:0 0 30px rgba(239,68,68,.6); animation:crashShake .4s ease; }
.crash-multiplier.running { color:#22c55e; }
@keyframes crashShake { 0%,100%{transform:translate(-50%,-50%)} 25%{transform:translate(-48%,-52%)} 50%{transform:translate(-52%,-48%)} 75%{transform:translate(-50%,-50%) scale(1.05)} }
.crash-status { position:absolute; bottom:12px; left:50%; transform:translateX(-50%); font-size:.95rem; font-weight:700; padding:.3rem 1rem; border-radius:8px; }
.crash-status.betting { background:rgba(251,191,36,.2); color:#fbbf24; }
.crash-status.crashed { background:rgba(239,68,68,.2); color:#ef4444; }

.crash-history { display:flex; flex-wrap:wrap; gap:.35rem; }
.crash-hist-pill { padding:.2rem .55rem; border-radius:6px; font-size:.8rem; font-weight:700; }
.crash-hist-pill.high { background:rgba(34,197,94,.15); color:#22c55e; border:1px solid rgba(34,197,94,.3); }
.crash-hist-pill.mid { background:rgba(245,158,11,.15); color:#f59e0b; border:1px solid rgba(245,158,11,.3); }
.crash-hist-pill.low { background:rgba(239,68,68,.15); color:#ef4444; border:1px solid rgba(239,68,68,.3); }

.crash-sidebar { display:flex; flex-direction:column; gap:1rem; }
.crash-bet-section, .crash-feed-section { background:rgba(15,23,42,.6); border:1px solid rgba(148,163,184,.15); border-radius:12px; padding:1rem; }
html[data-theme="light"] .crash-bet-section, html[data-theme="light"] .crash-feed-section { background:rgba(241,245,249,.9); }
.crash-bet-section h3, .crash-feed-section h3 { margin:0 0 .75rem; font-size:1rem; }
.crash-bet-group { margin-bottom:.75rem; }
.crash-bet-group label { display:block; font-size:.85rem; font-weight:600; margin-bottom:.3rem; }
.crash-bet-group input { width:100%; padding:.5rem .7rem; border-radius:8px; border:2px solid rgba(148,163,184,.3); background:rgba(15,23,42,.8); color:var(--color-text); font-size:.95rem; box-sizing:border-box; }
html[data-theme="light"] .crash-bet-group input { background:#fff; border-color:rgba(148,163,184,.5); }
.crash-quick-bets { display:flex; gap:.35rem; margin-top:.35rem; }
.cqb { flex:1; padding:.4rem; border:2px solid rgba(148,163,184,.25); border-radius:6px; background:rgba(56,189,248,.08); color:var(--color-text); cursor:pointer; font-weight:600; font-size:.8rem; transition:all .2s; }
.cqb:hover { border-color:var(--color-primary); background:rgba(56,189,248,.2); }
.crash-cashout-btn { background:linear-gradient(135deg,#22c55e,#16a34a)!important; color:#fff!important; border:none; font-size:1.1rem; padding:.75rem; animation:cashoutPulse 1s ease-in-out infinite; }
.crash-cashout-btn.hidden { display:none; }
@keyframes cashoutPulse { 0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,.4)} 50%{box-shadow:0 0 0 8px rgba(34,197,94,0)} }
.crash-bet-status { font-size:.85rem; margin-top:.5rem; font-weight:600; }
.crash-bet-status.win { color:#22c55e; }
.crash-bet-status.loss { color:#ef4444; }
.crash-bet-status.ok { color:#38bdf8; }
.crash-bet-status.err { color:#ef4444; }

.crash-feed { max-height:200px; overflow-y:auto; }
.feed-empty { color:var(--color-muted); font-style:italic; font-size:.85rem; }
.feed-item { display:flex; justify-content:space-between; padding:.25rem 0; font-size:.82rem; border-bottom:1px solid rgba(148,163,184,.1); }
.feed-name { font-weight:600; }
.feed-mult { color:#fbbf24; font-weight:700; }
.feed-win { color:#22c55e; font-weight:600; }

@media (max-width:768px) {
  .crash-layout { grid-template-columns:1fr; }
  .crash-multiplier { font-size:2.5rem; }
}

/* ========== PACHINKO STYLES ========== */
.pachinko-container { max-width:900px; margin:0 auto; padding:0 .75rem; }
.pachinko-layout { display:grid; grid-template-columns:1fr 280px; gap:1.25rem; align-items:start; }
.pachinko-canvas-wrap { position:relative; background:#0a0e1a; border-radius:14px; border:2px solid rgba(168,85,247,.2); overflow:hidden; }
.pachinko-canvas-wrap canvas { display:block; width:100%; }

.pachinko-controls { display:flex; flex-direction:column; gap:.75rem; }
.pach-group { background:rgba(15,23,42,.6); border:1px solid rgba(148,163,184,.15); border-radius:12px; padding:.85rem; }
html[data-theme="light"] .pach-group { background:rgba(241,245,249,.9); }
.pach-group label { display:block; font-size:.85rem; font-weight:600; margin-bottom:.35rem; }
.pach-group input[type="number"] { width:100%; padding:.5rem .7rem; border-radius:8px; border:2px solid rgba(148,163,184,.3); background:rgba(15,23,42,.8); color:var(--color-text); font-size:.95rem; box-sizing:border-box; }
html[data-theme="light"] .pach-group input[type="number"] { background:#fff; border-color:rgba(148,163,184,.5); }
.pach-quick { display:flex; gap:.35rem; margin-top:.35rem; }
.pqb { flex:1; padding:.4rem; border:2px solid rgba(148,163,184,.25); border-radius:6px; background:rgba(168,85,247,.08); color:var(--color-text); cursor:pointer; font-weight:600; font-size:.8rem; transition:all .2s; }
.pqb:hover { border-color:#a855f7; background:rgba(168,85,247,.2); }

.pach-risk-btns, .pach-ball-btns { display:flex; gap:.4rem; }
.prb, .pbb { flex:1; padding:.5rem; border:2px solid rgba(148,163,184,.25); border-radius:8px; background:transparent; color:var(--color-text); cursor:pointer; font-weight:600; font-size:.85rem; transition:all .2s; text-align:center; }
.prb:hover, .pbb:hover { border-color:var(--color-primary); }
.prb.active { border-color:#a855f7; background:rgba(168,85,247,.2); color:#a855f7; }
.pbb.active { border-color:#38bdf8; background:rgba(56,189,248,.2); color:#38bdf8; }

.pach-drop-btn { font-size:1.1rem; padding:.75rem; margin-top:.25rem; background:linear-gradient(135deg,#a855f7,#7c3aed)!important; border:none; }
.pach-drop-btn:hover { background:linear-gradient(135deg,#9333ea,#6d28d9)!important; transform:translateY(-2px); }

.pach-results { background:rgba(15,23,42,.6); border:1px solid rgba(148,163,184,.15); border-radius:12px; padding:.75rem; max-height:180px; overflow-y:auto; }
.pach-result { display:flex; justify-content:space-between; padding:.25rem .4rem; font-size:.85rem; border-radius:6px; margin-bottom:.25rem; font-weight:600; }
.pach-result.big-win { background:rgba(168,85,247,.15); color:#a855f7; }
.pach-result.win { background:rgba(34,197,94,.1); color:#22c55e; }
.pach-result.loss { background:rgba(239,68,68,.1); color:#ef4444; }

@media (max-width:768px) {
  .pachinko-layout { grid-template-columns:1fr; }
}
/* ========== DARK THEME CONSISTENCY IMPROVEMENTS ========== */
/* Ensure all games use consistent dark theme colors */
.game-title {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Consistent background colors for game sections */
.betting-section, .game-area, .pach-group, .crash-bet-section, 
.poker-modal-content, .bet-setup-section, .confirmation-modal .bet-setup-section {
  background: rgba(15, 23, 42, 0.5) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  border-radius: 12px;
}

/* Consistent text colors */
.game-section h3, .game-section h4, 
.betting-controls h3, .betting-controls h4,
.poker-lobby h3, .crash-bet-section h3 {
  color: #e2e8f0;
  margin-bottom: 1rem;
}

/* Consistent muted text */
.game-section p, .bet-info, .poker-table-info,
.crash-bet-status, .feed-item {
  color: #94a3b8;
}

/* Consistent input styling */
input[type="number"], input[type="text"], input[type="password"] {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 2px solid rgba(148, 163, 184, 0.5) !important;
  color: #e2e8f0 !important;
  border-radius: 8px;
}

input[type="number"]:focus, input[type="text"]:focus, input[type="password"]:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2) !important;
}

/* Consistent button styling */
.btn-primary, .quick-bet-btn, .color-bet-btn, 
.pqb, .prb.active, .pbb.active, .cqb {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border: 2px solid #f59e0b !important;
  color: #0a0e1a !important;
  font-weight: 600;
}

.btn-primary:hover, .quick-bet-btn:hover, .color-bet-btn:hover {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  transform: translateY(-2px);
}

/* Win/Loss colors consistency */
.win, .profit, .bh-value.profit {
  color: #22c55e !important;
}

.loss, .bh-value.loss {
  color: #ef4444 !important;
}

/* Credit amount styling consistency */
.credit-amount, .credits-amount, .balance-amount {
  color: #f59e0b !important;
  font-weight: 700;
}

/* Canvas game backgrounds */
.pachinko-canvas-wrap, .crash-canvas-wrap {
  background: #0a0e1a !important;
  border: 2px solid rgba(148, 163, 184, 0.2) !important;
}

/* Modal overlays */
.poker-modal-overlay, .confirmation-overlay, .bet-history-modal {
  background: rgba(0, 0, 0, 0.8) !important;
}

/* ========== MOBILE TOUCH TARGET IMPROVEMENTS ========== */
@media (max-width: 768px) {
  /* Ensure all buttons have proper 44px minimum touch targets */
  button, .btn, .clickable {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  
  /* Specific button improvements */
  .quick-bet-btn, .color-bet-btn, .pqb, .prb, .pbb, .cqb {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  
  /* Game control buttons */
  .game-controls .btn, .casino-header-actions .btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  
  /* Back to lobby button */
  .back-btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  
  /* Input fields for better mobile interaction */
  input[type="number"], input[type="text"] {
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Canvas controls wrapper padding for easier touch */
  .pachinko-controls, .crash-sidebar {
    padding: 1rem;
  }
  
  /* Better spacing for mobile cards */
  .playing-card {
    margin: 0.25rem;
    min-width: 50px;
    min-height: 70px;
  }
  
  /* Improved tap targets for color bet buttons */
  .color-bet-btn {
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  /* Extra small screens - even more generous touch targets */
  .quick-bet-btn, .color-bet-btn, .btn {
    min-height: 48px;
    font-size: 0.95rem;
  }
  
  /* Stack color buttons vertically on very small screens */
  .color-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .color-bet-btn {
    width: 100%;
    padding: 1rem;
  }
}
/* ========== END NEW GAME STYLES ========== */
