:root {
  --bg-main: #060913;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(234, 179, 8, 0.35);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --gold: #eab308;
  --gold-glow: rgba(234, 179, 8, 0.4);
  --ruby: #f43f5e;
  --emerald: #10b981;
  --sapphire: #0ea5e9;
  
  --felt-green: #0a3d24;
  --felt-border: #14532d;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* BACKGROUND LIGHT GLOWS */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.orb-1 { width: 500px; height: 500px; background: #6366f1; top: -100px; left: -100px; }
.orb-2 { width: 450px; height: 450px; background: #eab308; bottom: -50px; right: -50px; }
.orb-3 { width: 350px; height: 350px; background: #f43f5e; top: 40%; left: 60%; }

.casino-container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 20px 60px 20px;
}

/* HEADER */
.casino-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.casino-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-emoji {
  font-size: 2.4rem;
  filter: drop-shadow(0 0 16px rgba(234, 179, 8, 0.6));
  animation: pulse-logo 2.5s infinite alternate;
}

@keyframes pulse-logo {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.4)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(234, 179, 8, 0.8)); }
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 40%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.6);
  padding: 6px 14px 6px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border-gold);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid var(--gold);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}

.user-kakera {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fef08a;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-nav-shop {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-nav-shop:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

/* STATE VIEWS */
.state-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(234, 179, 8, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-icon { font-size: 3rem; margin-bottom: 16px; }
.state-text { color: var(--text-muted); font-size: 1rem; max-width: 500px; margin-top: 8px; line-height: 1.5; }

/* TABS */
.casino-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  background: rgba(15, 23, 42, 0.4);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.casino-tabs::-webkit-scrollbar {
  display: none;
}

.casino-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.casino-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.casino-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(99, 102, 241, 0.25));
  border: 1px solid var(--border-gold);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.15);
}

/* CHIPS BAR */
.chips-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.chips-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.chips-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.3);
  background: #1e293b;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.chip-btn:hover {
  transform: translateY(-3px) scale(1.08);
}

.chip-btn.active {
  border: 3px solid var(--gold);
  background: radial-gradient(circle, #854d0e 0%, #1e293b 80%);
  color: #fef08a;
  box-shadow: 0 0 16px var(--gold-glow);
  transform: translateY(-3px) scale(1.1);
}

.chip-all-in {
  width: 65px;
  border-radius: 9999px;
  background: radial-gradient(circle, #e11d48, #881337);
  border: 2px solid #fda4af;
  color: #fff;
}

.custom-bet-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.custom-bet-input {
  width: 130px;
  background: #0f172a;
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 34px 10px 14px;
}

.custom-bet-gem {
  position: absolute;
  right: 10px;
  font-size: 1rem;
  pointer-events: none;
}

/* ================================================= */
/* BLACKJACK VIEW */
/* ================================================= */
.felt-table {
  background: radial-gradient(circle at center, #0e4428 0%, #062314 85%);
  border: 6px solid #b45309;
  border-radius: 28px;
  padding: 30px 24px;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 12px 30px rgba(0, 0, 0, 0.6);
  position: relative;
}

.felt-inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-height: 380px;
  justify-content: space-between;
}

.bj-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.section-badge {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-pill {
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fef08a;
  font-size: 0.8rem;
}

.cards-hand {
  display: flex;
  gap: 12px;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* CARD DESIGN & 3D ANIMATIONS */
.playing-card {
  width: 78px;
  height: 114px;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.45), 0 4px 8px -2px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px;
  font-family: var(--font-heading);
  position: relative;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform-style: preserve-3d;
}

.playing-card:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.55);
}

/* Staggered 3D Card Dealing Animation */
.playing-card.card-dealing {
  animation: card-deal-slide 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes card-deal-slide {
  0% {
    opacity: 0;
    transform: perspective(800px) translate3d(70px, -100px, 60px) rotate(-14deg) scale(0.6);
  }
  70% {
    transform: perspective(800px) translate3d(0, 4px, 0) rotate(2deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: perspective(800px) translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

/* 3D Flip Reveal Animation for Dealer's Hidden Card */
.playing-card.card-revealed-flip {
  animation: card-flip-reveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes card-flip-reveal {
  0% { transform: perspective(600px) rotateY(180deg); }
  100% { transform: perspective(600px) rotateY(0deg); }
}

.playing-card.red { color: #dc2626; }
.playing-card.black { color: #0f172a; }

.card-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.card-corner.bottom-right {
  align-items: flex-end;
  transform: rotate(180deg);
}

.card-val {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.card-suit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.card-suit-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.card-center-pip {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-center-pip svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Authentic Luxury Casino Hidden Card Back */
.playing-card.card-hidden {
  background: linear-gradient(135deg, #091328 0%, #15274d 100%);
  border: 2px solid #eab308;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.card-back-pattern {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: 8px;
  background: 
    repeating-linear-gradient(45deg, rgba(234, 179, 8, 0.08) 0px, rgba(234, 179, 8, 0.08) 4px, transparent 4px, transparent 8px),
    repeating-linear-gradient(-45deg, rgba(234, 179, 8, 0.08) 0px, rgba(234, 179, 8, 0.08) 4px, transparent 4px, transparent 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-back-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-back-crest {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(234, 179, 8, 0.6));
}

.table-center-msg {
  text-align: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 20px;
  border-radius: 9999px;
  border: 1px dashed rgba(234, 179, 8, 0.3);
  max-width: 500px;
  margin: 0 auto;
}

.bj-actions-bar {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn-action {
  padding: 14px 26px;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.btn-action:hover {
  transform: translateY(-2px);
}

.btn-action:active {
  transform: translateY(1px);
}

.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
}

.btn-purple {
  background: linear-gradient(135deg, #9333ea, #7e22ce);
  color: #fff;
}

/* ================================================= */
/* ROULETTE VIEW */
/* ================================================= */
/* ================================================= */
/* ROULETTE VIEW */
/* ================================================= */
.roulette-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
}

.roulette-wheel-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px 20px;
  gap: 16px;
}

.wheel-outer {
  width: 340px;
  height: 340px;
  max-width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.roulette-canvas {
  width: 330px;
  height: 330px;
  max-width: 96%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.8));
  display: block;
}

/* WINNER RESULT POPUP CARD */
.roulette-winner-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 12px 18px;
  animation: pop-winner 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop-winner {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.winner-number-pill {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.5);
  border: 2px solid #fef08a;
  flex-shrink: 0;
}

.winner-number-pill.num-green { background: #16a34a !important; }
.winner-number-pill.num-red { background: #dc2626 !important; }
.winner-number-pill.num-black { background: #0f172a !important; }

.winner-details {
  display: flex;
  flex-direction: column;
}

.winner-color-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fef08a;
}

.winner-payout-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
}

.roulette-history-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.history-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.recent-roulette-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.roulette-history-chip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.roulette-history-chip.num-green { background: #16a34a; }
.roulette-history-chip.num-red { background: #dc2626; }
.roulette-history-chip.num-black { background: #0f172a; }

.result-callout {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

.result-callout strong {
  color: var(--gold);
}

.result-callout.result-win {
  color: #86efac;
}

.result-callout.result-win strong {
  color: #4ade80;
}

.result-callout.result-loss {
  color: #fca5a5;
}

.result-callout.result-loss strong {
  color: #f87171;
}

.btn-spin-roulette {
  width: 100%;
  justify-content: center;
}

.roulette-board {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.board-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.board-hint strong {
  color: var(--gold);
}

.outside-bets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-outside-bet {
  padding: 12px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outside-bet:hover {
  background: #334155;
  color: #fff;
}

.btn-outside-bet.active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(234, 179, 8, 0.15));
  border: 1px solid var(--gold);
  color: #fef08a;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.3);
}

.badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 6px currentColor;
}

.badge-dot.red-dot {
  background: #dc2626;
  color: rgba(220, 38, 38, 0.7);
}

.badge-dot.black-dot {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.3);
}

.numbers-board-wrap {
  display: flex;
  gap: 8px;
}

.number-zero-wrap {
  width: 48px;
}

.btn-num-bet {
  width: 100%;
  height: 100%;
  min-height: 44px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: all 0.15s ease;
}

.btn-num-bet:hover {
  transform: scale(1.06);
  z-index: 2;
}

.btn-num-bet.active {
  box-shadow: 0 0 14px #eab308;
  border: 2px solid #eab308;
  transform: scale(1.1);
  z-index: 3;
}

.num-green { background: #16a34a; }
.num-red { background: #dc2626; }
.num-black { background: #0f172a; }

.numbers-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 44px);
  gap: 6px;
}

/* ================================================= */
/* SLOTS VIEW */
/* ================================================= */
.slots-machine {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.slots-casing {
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
  border: 4px solid var(--border-gold);
  border-radius: 28px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.slots-banner {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-gold);
  padding: 10px 24px;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: #fef08a;
  display: flex;
  align-items: center;
  gap: 12px;
}

.slot-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #eab308;
  box-shadow: 0 0 10px #eab308;
  animation: blink 0.8s infinite alternate;
}

@keyframes blink {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.reels-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  border: 4px solid #334155;
  border-radius: 22px;
  padding: 16px 20px;
  gap: 16px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.95), 0 8px 24px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.reels-frame.reel-winner {
  border-color: #facc15;
  box-shadow: inset 0 0 35px rgba(250, 204, 21, 0.4), 0 0 35px rgba(250, 204, 21, 0.7);
  animation: winner-frame-pulse 1s infinite alternate;
}

@keyframes winner-frame-pulse {
  0% { box-shadow: inset 0 0 20px rgba(250, 204, 21, 0.3), 0 0 20px rgba(250, 204, 21, 0.5); }
  100% { box-shadow: inset 0 0 40px rgba(250, 204, 21, 0.6), 0 0 45px rgba(250, 204, 21, 0.85); }
}

.reels-glass-glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 5;
}

.reels-payline-bar {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(234, 179, 8, 0.4), transparent);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 4;
}

.reel-window {
  width: 120px;
  height: 130px;
  background: linear-gradient(180deg, #090d16 0%, #172033 50%, #090d16 100%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 10px 18px rgba(0, 0, 0, 0.85), inset 0 -10px 18px rgba(0, 0, 0, 0.85);
}

.reel-strip {
  display: flex;
  flex-direction: column;
  width: 100%;
  will-change: transform;
}

.reel-strip.strip-blur {
  filter: blur(2px);
}

.slot-tile {
  width: 100%;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
  flex-shrink: 0;
}

.slot-tile svg {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.slot-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reel-divider {
  width: 4px;
  height: 110px;
  background: #1e293b;
  border-radius: 2px;
}

.slots-win-display {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #cbd5e1;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-spin-slots {
  width: 260px;
  justify-content: center;
  font-size: 1.1rem;
  padding: 16px 30px;
}

.paytable-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 20px;
}

.paytable-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.paytable-title svg {
  color: var(--gold);
}

.paytable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paytable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #1e293b;
  border-radius: 10px;
  font-size: 0.85rem;
}

.paytable-row.jackpot-row {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(244, 63, 94, 0.2));
  border: 1px solid var(--border-gold);
  color: #fef08a;
}

.paytable-row.minor-row {
  background: rgba(30, 41, 59, 0.5);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pay-sym-combo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pay-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.rainbow-tag {
  background: linear-gradient(135deg, #f43f5e, #fbbf24, #10b981, #06b6d4, #8b5cf6);
  color: #fff;
}
.red-tag { background: #e11d48; color: #fff; }
.green-tag { background: #10b981; color: #000; }
.yellow-tag { background: #f59e0b; color: #000; }
.blue-tag { background: #3b82f6; color: #fff; }
.diamond-tag { background: #06b6d4; color: #000; }
.cherry-tag { background: #be123c; color: #fff; }
.pair-tag { background: rgba(255, 255, 255, 0.15); color: #fff; }

.pay-label {
  font-weight: 600;
  color: #e2e8f0;
}

.pay-mult {
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--gold);
}

/* RECENT TICKER */
.casino-recent-bets {
  margin-top: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px 20px;
}

.recent-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.recent-header h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

.recent-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.recent-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.recent-profit.positive { color: #4ade80; font-weight: 700; }
.recent-profit.negative { color: #f87171; font-weight: 700; }

/* TOAST */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 90vw;
}

.toast {
  background: #1e293b;
  border-left: 4px solid var(--gold);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ================================================= */
/* JUEGO 4: APOSTAR PERSONAJES (DOBLE O NADA) */
/* ================================================= */
.duel-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

/* CHARACTERS LIST BOX */
.duel-chars-box {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 640px;
}

.duel-box-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.duel-box-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.duel-box-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.duel-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-muted);
}

.duel-search-wrap:focus-within {
  border-color: #fbbf24;
  color: #fbbf24;
}

.duel-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.85rem;
  width: 100%;
}

.duel-harem-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 480px;
  padding-right: 4px;
}

.duel-harem-list::-webkit-scrollbar {
  width: 5px;
}
.duel-harem-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

/* CHARACTER SELECTION ITEM */
.duel-char-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: #fff;
  width: 100%;
}

.duel-char-item:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateX(2px);
}

.duel-char-item.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(180, 83, 9, 0.2));
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.duel-char-thumb {
  width: 44px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #111827;
}

.duel-char-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.duel-char-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duel-char-series {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duel-char-payout {
  font-size: 0.76rem;
  font-weight: 700;
  color: #38bdf8;
}

.duel-empty-harem {
  padding: 24px 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ARENA BOX */
.duel-arena-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* RULES BANNER */
.duel-rules-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 10px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #fef08a;
}

.rules-badge {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* SHOWCASE */
.duel-selected-showcase {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: 16px 20px;
  min-height: 110px;
  display: flex;
  align-items: center;
}

.showcase-unselected {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.showcase-active {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.duel-showcase-thumb {
  width: 72px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border-gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.duel-showcase-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.showcase-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fbbf24;
}

.duel-showcase-details h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.duel-series-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.showcase-payout-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.payout-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.payout-pill.val-cur {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.payout-pill.val-win {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

/* DUEL TABLE FELT */
.duel-table-felt {
  background: radial-gradient(circle at 50% 50%, #1e3a2f 0%, #064e3b 60%, #022c22 100%);
  border: 6px solid #78350f;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 16px 36px rgba(0, 0, 0, 0.5);
  border-radius: 24px;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
}

.duel-fighter-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.fighter-tag {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fde047;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.duel-card-slot {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-desc {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
  min-height: 20px;
}

.duel-vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  border: 2px solid #fef08a;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
  color: white;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.btn-gamble-char {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.05rem;
}

/* ================================================= */
/* JUEGO 5: MINAS DE KAKERA (MINES) */
/* ================================================= */
.mines-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
  align-items: start;
}

.mines-sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mines-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mines-panel-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.mines-panel-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.mines-settings-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mines-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mines-select {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 12px;
  color: #fef08a;
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  width: 100%;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mines-select:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.3);
}

.mines-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mines-stats-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mines-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.stat-lbl {
  color: var(--text-muted);
}

.stat-val {
  font-family: var(--font-heading);
  font-weight: 800;
}

.highlight-gold {
  color: #facc15;
  font-size: 1.05rem;
}

.highlight-cyan {
  color: #38bdf8;
  font-size: 1rem;
}

.highlight-green {
  color: #4ade80;
}

.btn-mines-main {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 800;
}

.btn-green {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  border: 1px solid #86efac;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.4);
}

.btn-green:hover:not(:disabled) {
  background: linear-gradient(135deg, #15803d, #16a34a);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.55);
}

/* MINES BOARD */
.mines-board-panel {
  background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.mines-banner {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

.mines-banner strong {
  color: var(--gold);
}

.mines-grid-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: center;
}

.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  aspect-ratio: 1;
}

.mines-tile {
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(145deg, #1e293b, #090d16);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.08), 0 4px 10px rgba(0, 0, 0, 0.5);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.mines-tile:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #fbbf24;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}

.mines-tile:active:not(:disabled) {
  transform: scale(0.96);
}

.mines-tile:disabled {
  cursor: default;
}

/* TILE REVEALED AS GEM */
.mines-tile.tile-gem {
  background: radial-gradient(circle, #064e3b 0%, #022c22 100%);
  border-color: #10b981;
  box-shadow: inset 0 0 14px rgba(16, 185, 129, 0.4), 0 0 20px rgba(16, 185, 129, 0.45);
  animation: tilePop 0.35s ease forwards;
}

/* TILE REVEALED AS MINE */
.mines-tile.tile-mine {
  background: radial-gradient(circle, #7f1d1d 0%, #450a0a 100%);
  border-color: #ef4444;
  box-shadow: inset 0 0 16px rgba(239, 68, 68, 0.5), 0 0 26px rgba(239, 68, 68, 0.7);
  animation: tileExplode 0.45s ease forwards;
}

/* FADED MINES SHOWN AT GAME OVER */
.mines-tile.tile-mine-faded {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(239, 68, 68, 0.35);
  opacity: 0.6;
}

.tile-svg {
  width: 55%;
  height: 55%;
  transition: transform 0.2s ease;
}

@keyframes tilePop {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes tileExplode {
  0% { transform: scale(0.7); filter: brightness(2); }
  40% { transform: scale(1.2); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* ================================================= */
/* JUEGO 6: CARA O CRUZ 3D (COINFLIP) */
/* ================================================= */
.coinflip-layout {
  display: flex;
  justify-content: center;
  width: 100%;
}

.coinflip-box {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.coinflip-header {
  text-align: center;
}

.coinflip-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.coinflip-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.coin-arena {
  width: 170px;
  height: 170px;
  position: relative;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.coin-shadow {
  position: absolute;
  bottom: -10px;
  width: 120px;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transition: all 0.3s ease;
}

.coin-shadow.flipping {
  animation: shadowPulse 2.2s cubic-bezier(0.12, 0.8, 0.3, 1) forwards;
}

@keyframes shadowPulse {
  0% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(0.5); opacity: 0.25; }
  100% { transform: scale(1); opacity: 0.75; }
}

.coin-3d {
  width: 145px;
  height: 145px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.coin-side {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.25);
}

.coin-face-heads {
  background: radial-gradient(circle, #fde047 0%, #eab308 55%, #b45309 100%);
  border: 5px solid #fef08a;
  transform: rotateY(0deg);
}

.coin-face-tails {
  background: radial-gradient(circle, #d8b4fe 0%, #a855f7 55%, #581c87 100%);
  border: 5px solid #f3e8ff;
  transform: rotateY(180deg);
}

.coin-inner-rim {
  width: 86%;
  height: 86%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.coin-crest-svg {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.coin-lbl {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* 3D FLIP ANIMATIONS */
.coin-3d.flipping-to-heads {
  animation: flipToHeadsAnim 2.2s cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}

.coin-3d.flipping-to-tails {
  animation: flipToTailsAnim 2.2s cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}

@keyframes flipToHeadsAnim {
  0% { transform: translateY(0) rotateY(0) scale(1); }
  50% { transform: translateY(-75px) rotateY(1080deg) scale(1.15); }
  100% { transform: translateY(0) rotateY(2160deg) scale(1); }
}

@keyframes flipToTailsAnim {
  0% { transform: translateY(0) rotateY(0) scale(1); }
  50% { transform: translateY(-75px) rotateY(1080deg) scale(1.15); }
  100% { transform: translateY(0) rotateY(2340deg) scale(1); }
}

/* CHOICE BUTTONS */
.coin-choice-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}

.coin-choice-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  color: #fff;
}

.coin-choice-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(251, 191, 36, 0.4);
  transform: translateY(-2px);
}

.coin-choice-btn.active {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.coin-choice-btn[data-side="cruz"].active {
  border-color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.choice-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

.choice-badge.purp {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
}

.choice-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
}

.choice-mult {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
}

.btn-toss-coin {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.05rem;
}

/* RESPONSIVE RULES */
@media (max-width: 900px) {
  .mines-layout {
    grid-template-columns: 1fr;
  }
  .mines-grid-wrap {
    max-width: 350px;
  }
}

@media (max-width: 640px) {
  .mines-grid {
    gap: 6px;
  }
  .mines-tile {
    border-radius: 8px;
  }
}

/* ================================================= */
/* SWITCH PLAYER BUTTON */
/* ================================================= */
.btn-switch-player {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fef08a;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  margin-left: 4px;
}

.btn-switch-player:hover {
  background: rgba(251, 191, 36, 0.3);
  border-color: #fbbf24;
  transform: translateY(-1px);
}

/* ================================================= */
/* PLAYER SELECTOR VIEW (CARD & MODAL) */
/* ================================================= */
.player-select-card {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.15);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 620px;
  width: 100%;
  margin: 20px auto;
  text-align: center;
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.select-card-header {
  margin-bottom: 24px;
}

.select-badge-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(180, 83, 9, 0.2));
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.select-card-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.select-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
}

/* SEARCH INPUT */
.player-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
  color: var(--text-muted);
}

.player-search-box:focus-within {
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
  background: rgba(30, 41, 59, 0.85);
  color: #fbbf24;
}

.player-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.player-search-input::placeholder {
  color: #64748b;
}

/* PLAYERS GRID */
.players-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.players-list-grid::-webkit-scrollbar {
  width: 6px;
}

.players-list-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

/* PLAYER BUTTON ITEM */
.player-select-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
  width: 100%;
}

.player-select-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.player-avatar-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.player-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-meta-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta-kakera {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #38bdf8;
}

.player-arrow {
  color: #64748b;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.player-select-btn:hover .player-arrow {
  color: #fbbf24;
  transform: translateX(3px);
}

.players-empty-msg {
  padding: 24px 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* SWITCH MODAL */
.switch-modal-card {
  max-width: 520px;
  width: 100%;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-search-box {
  margin-bottom: 14px;
}

.modal-players-grid {
  grid-template-columns: 1fr;
  max-height: 320px;
}

/* ================================================= */
/* COMPREHENSIVE MOBILE RESPONSIVENESS */
/* ================================================= */
@media (max-width: 900px) {
  .roulette-layout {
    grid-template-columns: 1fr;
  }
  .slots-machine {
    grid-template-columns: 1fr;
  }
  .duel-layout {
    grid-template-columns: 1fr;
  }
  .chips-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .chips-group {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .casino-container {
    padding: 10px 10px 40px 10px;
  }

  .casino-header {
    padding: 12px 14px;
    border-radius: 16px;
    margin-bottom: 14px;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .header-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .casino-logo .logo-title {
    font-size: 1.25rem;
  }

  .casino-logo .logo-badge {
    font-size: 0.65rem;
  }

  .header-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .user-pill {
    padding: 4px 8px 4px 6px;
    gap: 6px;
  }

  .btn-switch-player {
    padding: 3px 8px;
    font-size: 0.7rem;
    gap: 3px;
  }

  .btn-nav-shop {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .player-select-card {
    padding: 22px 14px;
    border-radius: 18px;
    margin: 8px auto;
  }

  .select-badge-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
  }

  .select-card-header h2 {
    font-size: 1.35rem;
  }

  .select-subtitle {
    font-size: 0.84rem;
  }

  .players-list-grid {
    grid-template-columns: 1fr;
    max-height: 290px;
  }

  /* TABS */
  .casino-tabs {
    gap: 6px;
    padding: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    -ms-overflow-style: none;
  }

  .casino-tabs::-webkit-scrollbar {
    display: none;
  }

  .casino-tab-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
    gap: 6px;
    flex: 0 0 auto;
    flex-direction: row;
    white-space: nowrap;
  }

  .casino-tab-btn svg {
    width: 16px;
    height: 16px;
  }

  /* CHIPS */
  .chips-bar {
    padding: 10px 12px;
    border-radius: 14px;
    margin-bottom: 16px;
    gap: 10px;
  }

  .chips-label {
    text-align: center;
    font-size: 0.82rem;
  }

  .chips-group {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    justify-content: flex-start;
  }

  .chip-btn {
    width: 44px;
    height: 44px;
    font-size: 0.72rem;
    flex-shrink: 0;
  }

  .custom-bet-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .custom-bet-input {
    width: 100%;
    max-width: 180px;
    text-align: center;
    padding: 8px 30px 8px 12px;
    font-size: 0.95rem;
  }

  /* 21 / BLACKJACK */
  .felt-table {
    padding: 16px 10px;
    border-width: 4px;
    border-radius: 20px;
  }

  .felt-inner {
    min-height: auto;
    gap: 18px;
  }

  .cards-hand {
    gap: 6px;
    min-height: 96px;
  }

  .playing-card {
    width: 64px;
    height: 94px;
    border-radius: 10px;
    padding: 5px 6px;
  }

  .card-val {
    font-size: 0.92rem;
  }

  .card-suit-icon svg {
    width: 10px;
    height: 10px;
  }

  .card-center-pip svg {
    width: 26px;
    height: 26px;
  }

  .card-back-crest {
    width: 24px;
    height: 24px;
  }

  .table-center-msg {
    font-size: 0.85rem;
    padding: 8px 14px;
  }

  .bj-actions-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
  }

  .btn-action {
    padding: 12px 14px;
    font-size: 0.88rem;
    justify-content: center;
  }

  #btn-bj-deal {
    grid-column: 1 / -1;
  }

  /* RULETA */
  .roulette-wheel-box {
    padding: 16px 10px;
    border-radius: 18px;
    gap: 12px;
  }

  .wheel-outer {
    width: 280px;
    height: 280px;
  }

  .roulette-canvas {
    width: 270px;
    height: 270px;
  }

  .roulette-board {
    padding: 14px 10px;
    border-radius: 18px;
    gap: 12px;
  }

  .board-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .board-header h3 {
    font-size: 1rem;
  }

  .numbers-board-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 4px;
    width: 100%;
  }

  .number-zero-wrap {
    width: 32px;
    flex-shrink: 0;
  }

  .numbers-grid {
    min-width: 300px;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, 34px);
    gap: 3px;
  }

  .btn-num-bet {
    font-size: 0.72rem;
    border-radius: 4px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .outside-bets-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }

  .btn-outside-bet {
    padding: 8px 4px;
    font-size: 0.72rem;
  }

  .roulette-history-box {
    padding: 6px 10px;
    gap: 6px;
  }

  .roulette-history-chip {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  /* SLOTS */
  .slots-casing {
    padding: 16px 10px;
    border-radius: 20px;
    border-width: 3px;
    gap: 16px;
  }

  .slots-banner {
    padding: 6px 16px;
    font-size: 0.8rem;
  }

  .reels-frame {
    padding: 10px 6px;
    border-radius: 16px;
    border-width: 3px;
    gap: 6px;
    width: 100%;
    justify-content: center;
  }

  .reel-window {
    width: 31%;
    max-width: 95px;
    height: 105px;
    border-radius: 10px;
  }

  .slot-tile {
    height: 105px;
  }

  .slot-tile svg {
    width: 44px;
    height: 44px;
  }

  .slot-tile-label {
    font-size: 0.65rem;
  }

  .reel-divider {
    width: 3px;
    height: 85px;
  }

  .btn-spin-slots {
    width: 100%;
    font-size: 1rem;
    padding: 14px 20px;
  }

  .paytable-box {
    padding: 14px 10px;
    border-radius: 18px;
  }

  .paytable-row {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  .pay-tag {
    font-size: 0.68rem;
    padding: 1px 5px;
  }

  .pay-label {
    font-size: 0.78rem;
  }

  .pay-mult {
    font-size: 0.88rem;
  }

  /* DUEL MOBILE */
  .duel-chars-box {
    max-height: 260px;
    padding: 12px;
  }

  .duel-harem-list {
    max-height: 160px;
  }

  .duel-table-felt {
    padding: 16px 8px;
    gap: 8px;
  }

  .showcase-active {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .showcase-payout-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .duel-rules-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.78rem;
  }

  .duel-card-slot {
    min-height: 100px;
  }

  /* TOAST */
  .toast-container {
    bottom: 14px;
    right: 14px;
    left: 14px;
  }
}

@media (max-width: 360px) {
  .wheel-outer {
    width: 250px;
    height: 250px;
  }

  .roulette-canvas {
    width: 240px;
    height: 240px;
  }

  .playing-card {
    width: 58px;
    height: 86px;
    padding: 4px 5px;
  }

  .card-val {
    font-size: 0.82rem;
  }
}

.hidden {
  display: none !important;
}
