/* Existing CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-red: #e74c3c;
  --primary-gold: #f1c40f;
  --dark-bg: #0a0a0a;
  --card-bg: #1a1a1a;
  --border-color: #333;
  --text-light: #ffffff;
  --text-muted: #bdc3c7;
  --success-green: #2ecc71;
  --danger-red: #e74c3c;
  --purple-accent: #9b59b6;
  --blue-accent: #3498db;

  /* Default Skin Colors */
  --skin-bg-gradient-start: var(--dark-bg);
  --skin-bg-gradient-end: #111;
  --skin-top-bar-gradient-start: rgba(231, 76, 60, 0.2);
  --skin-top-bar-gradient-end: rgba(241, 196, 15, 0.2);
  --skin-top-bar-border: var(--primary-red);
  --skin-card-bg-gradient-start: var(--card-bg);
  --skin-card-bg-gradient-end: #222;
  --skin-card-border: var(--border-color);
  --skin-title-gradient-start: var(--primary-red);
  --skin-title-gradient-middle: var(--primary-gold);
  --skin-title-gradient-end: var(--primary-red);
  --skin-jackpot-glow: rgba(231, 76, 60, 0.3);
  --skin-jackpot-glow-strong: rgba(231, 76, 60, 0.6);
  --skin-button-glow: rgba(231, 76, 60, 0.4);
  --skin-button-glow-strong: rgba(231, 76, 60, 0.8);
}

/* Skin: Ocean Blue */
body.skin-ocean-blue {
  --skin-bg-gradient-start: #0a1a2a;
  --skin-bg-gradient-end: #05101a;
  --skin-top-bar-gradient-start: rgba(52, 152, 219, 0.2);
  --skin-top-bar-gradient-end: rgba(46, 204, 113, 0.2);
  --skin-top-bar-border: #3498db;
  --skin-card-bg-gradient-start: #102030;
  --skin-card-bg-gradient-end: #152535;
  --skin-card-border: #3498db;
  --skin-title-gradient-start: #3498db;
  --skin-title-gradient-middle: #2ecc71;
  --skin-title-gradient-end: #3498db;
  --skin-jackpot-glow: rgba(52, 152, 219, 0.3);
  --skin-jackpot-glow-strong: rgba(52, 152, 219, 0.6);
  --skin-button-glow: rgba(52, 152, 219, 0.4);
  --skin-button-glow-strong: rgba(52, 152, 219, 0.8);
  --primary-gold: #2ecc71; /* Adjust gold for better contrast */
}

/* Skin: Royal Purple */
body.skin-royal-purple {
  --skin-bg-gradient-start: #1a0a2a;
  --skin-bg-gradient-end: #10051a;
  --skin-top-bar-gradient-start: rgba(155, 89, 182, 0.2);
  --skin-top-bar-gradient-end: rgba(142, 68, 173, 0.2);
  --skin-top-bar-border: #9b59b6;
  --skin-card-bg-gradient-start: #201030;
  --skin-card-bg-gradient-end: #251535;
  --skin-card-border: #9b59b6;
  --skin-title-gradient-start: #9b59b6;
  --skin-title-gradient-middle: #8e44ad;
  --skin-title-gradient-end: #9b59b6;
  --skin-jackpot-glow: rgba(155, 89, 182, 0.3);
  --skin-jackpot-glow-strong: rgba(155, 89, 182, 0.6);
  --skin-button-glow: rgba(155, 89, 182, 0.4);
  --skin-button-glow-strong: rgba(155, 89, 182, 0.8);
  --primary-gold: #f1c40f; /* Keep gold for contrast */
}

body {
  font-family: "Roboto", sans-serif;
  background: linear-gradient(135deg, var(--skin-bg-gradient-start), var(--skin-bg-gradient-end));
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--skin-bg-gradient-start), var(--skin-bg-gradient-end));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-content {
  text-align: center;
}

.casino-logo {
  font-family: "Orbitron", monospace;
  font-size: 3em;
  font-weight: 900;
  background: linear-gradient(45deg, var(--primary-red), var(--primary-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--primary-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-text {
  color: var(--text-muted);
  font-size: 1.1em;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(231, 76, 60, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(241, 196, 15, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(46, 204, 113, 0.05) 0%, transparent 50%);
  animation: backgroundShift 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes backgroundShift {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  33% {
    transform: translateX(-20px) translateY(-10px);
  }
  66% {
    transform: translateX(20px) translateY(10px);
  }
}

.top-bar {
  background: linear-gradient(90deg, var(--skin-top-bar-gradient-start), var(--skin-top-bar-gradient-end));
  border-bottom: 2px solid var(--skin-top-bar-border);
  padding: 15px 0;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-bar-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.user-info {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  white-space: nowrap;
}

.info-item i {
  font-size: 1.2em;
  flex-shrink: 0;
}

.balance {
  color: var(--primary-gold);
  font-size: 1.3em;
  font-weight: 700;
}

.educational-badge {
  background: linear-gradient(45deg, var(--primary-red), var(--primary-gold));
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  animation: pulse 2s infinite;
  white-space: nowrap;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.main-header {
  text-align: center;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}

.casino-title {
  font-family: "Orbitron", monospace;
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 900;
  background: linear-gradient(
    45deg,
    var(--skin-title-gradient-start),
    var(--skin-title-gradient-middle),
    var(--skin-title-gradient-end)
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite, titleBounce 4s ease-in-out infinite;
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(231, 76, 60, 0.5);
  cursor: pointer;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes titleBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.casino-subtitle {
  font-size: clamp(1.2em, 3vw, 1.5em);
  color: var(--text-muted);
  margin-bottom: 30px;
}

.header-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 2em;
  flex-wrap: wrap;
}

.header-icons i {
  animation: iconFloat 3s ease-in-out infinite;
  animation-delay: calc(var(--delay) * 0.5s);
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.jackpot-section {
  margin: 60px 0;
}

.jackpot-card {
  background: linear-gradient(145deg, var(--skin-card-bg-gradient-start), var(--skin-card-bg-gradient-end));
  border: 2px solid var(--primary-red);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: jackpotGlow 2s ease-in-out infinite alternate;
}

@keyframes jackpotGlow {
  0% {
    box-shadow: 0 0 20px var(--skin-jackpot-glow);
  }
  100% {
    box-shadow: 0 0 40px var(--skin-jackpot-glow-strong);
  }
}

.jackpot-title {
  font-size: clamp(1.8em, 4vw, 2.5em);
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.jackpot-amount {
  font-family: "Orbitron", monospace;
  font-size: clamp(2.5em, 6vw, 4em);
  font-weight: 900;
  color: var(--primary-gold);
  margin-bottom: 15px;
  animation: jackpotPulse 1s ease-in-out infinite;
}

@keyframes jackpotPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.jackpot-subtitle {
  font-size: clamp(1.1em, 2.5vw, 1.3em);
  color: var(--text-muted);
  margin-bottom: 30px;
}

.jackpot-controls {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.jackpot-btn {
  background: linear-gradient(45deg, var(--primary-red), #c0392b);
  font-size: clamp(1.1em, 2.5vw, 1.3em);
  padding: 20px 40px;
  animation: buttonGlow 2s ease-in-out infinite alternate;
}

@keyframes buttonGlow {
  0% {
    box-shadow: 0 0 15px var(--skin-button-glow);
  }
  100% {
    box-shadow: 0 0 25px var(--skin-button-glow-strong);
  }
}

.games-section {
  margin: 60px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(2em, 5vw, 3em);
  font-weight: 700;
  margin-bottom: 50px;
  color: var(--text-light);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.game-card {
  background: linear-gradient(145deg, var(--skin-card-bg-gradient-start), var(--skin-card-bg-gradient-end));
  border: 2px solid var(--skin-card-border);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-card::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;
}

.game-card:hover::before {
  left: 100%;
}

.game-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-red);
  box-shadow: 0 20px 40px rgba(231, 76, 60, 0.3);
}

.game-icon {
  font-size: 4em;
  margin-bottom: 20px;
  background: linear-gradient(45deg, var(--primary-red), var(--primary-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.game-title {
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-light);
}

.game-description {
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.game-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  font-size: 0.9em;
  gap: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-label {
  color: var(--text-muted);
  margin-bottom: 5px;
  font-size: 0.85em;
}

.stat-value {
  color: var(--primary-gold);
  font-weight: 700;
  font-size: 1.1em;
}

.vip-section {
  margin: 60px 0;
}

.vip-card {
  background: linear-gradient(145deg, rgba(155, 89, 182, 0.2), rgba(142, 68, 173, 0.2));
  border: 2px solid var(--purple-accent);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
}

.vip-title {
  font-size: clamp(1.8em, 4vw, 2.5em);
  font-weight: 700;
  color: var(--purple-accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.vip-subtitle {
  font-size: clamp(1.1em, 2.5vw, 1.3em);
  color: var(--text-muted);
  margin-bottom: 30px;
}

.vip-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.vip-game {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--purple-accent);
  border-radius: 15px;
  padding: 25px;
}

.vip-game h3 {
  color: var(--purple-accent);
  margin-bottom: 10px;
  font-size: 1.3em;
}

.vip-game p {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.vip-status {
  color: var(--danger-red);
  font-weight: 700;
  margin-top: 10px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.5;
  }
}

.vip-btn {
  background: linear-gradient(45deg, var(--purple-accent), #8e44ad);
  font-size: 1.2em;
  padding: 15px 30px;
}

.stats-section {
  background: linear-gradient(145deg, var(--skin-card-bg-gradient-start), var(--skin-card-bg-gradient-end));
  border: 2px solid var(--skin-card-border);
  border-radius: 20px;
  padding: 40px;
  margin: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.stat-card {
  background: #111;
  border: 1px solid var(--skin-card-border);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-red);
}

.stat-icon {
  font-size: 2em;
  color: var(--primary-gold);
  margin-bottom: 15px;
}

.stat-number {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 10px;
  word-break: break-all;
}

.stat-number.positive {
  color: var(--success-green);
}

.stat-number.negative {
  color: var(--danger-red);
}

.stat-number.neutral {
  color: var(--primary-gold);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9em;
}

.stats-actions {
  text-align: center;
}

.reset-btn {
  background: linear-gradient(45deg, #34495e, #2c3e50);
}

.btn {
  background: linear-gradient(45deg, var(--primary-red), #c0392b);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-width: 120px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(231, 76, 60, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.game-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, var(--skin-card-bg-gradient-start), var(--skin-card-bg-gradient-end));
  border: 2px solid var(--primary-red);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.modal-title {
  font-size: 2em;
  font-weight: 700;
  color: var(--primary-gold);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 2em;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 5px;
}

.close-btn:hover {
  color: var(--primary-red);
}

.game-area {
  background: #111;
  border: 2px solid var(--skin-card-border);
  border-radius: 15px;
  padding: 30px;
  margin: 20px 0;
  text-align: center;
}

.bet-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.bet-input {
  background: #333;
  border: 2px solid var(--skin-card-border);
  border-radius: 8px;
  padding: 10px 15px;
  color: var(--text-light);
  font-size: 1.1em;
  width: 120px;
  text-align: center;
}

.bet-input:focus {
  outline: none;
  border-color: var(--primary-red);
}

.slot-machine {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.slot-reel {
  width: 80px;
  height: 100px;
  background: #222;
  border: 3px solid var(--primary-gold);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  position: relative;
  overflow: hidden;
}

.slot-reel.spinning {
  animation: slotSpin 2s ease-out;
}

@keyframes slotSpin {
  0% {
    transform: rotateX(0deg);
  }
  100% {
    transform: rotateX(1440deg);
  } /* 5 full spins */
}

.roulette-wheel {
  width: 200px;
  height: 200px;
  border: 5px solid var(--primary-gold);
  border-radius: 50%;
  margin: 20px auto;
  position: relative;
  background: conic-gradient(
    #e74c3c 0deg 18deg,
    #2c3e50 18deg 36deg,
    #e74c3c 36deg 54deg,
    #2c3e50 54deg 72deg,
    #e74c3c 72deg 90deg,
    #2c3e50 90deg 108deg,
    #e74c3c 108deg 126deg,
    #2c3e50 126deg 144deg,
    #e74c3c 144deg 162deg,
    #2c3e50 162deg 180deg,
    #e74c3c 180deg 198deg,
    #2c3e50 198deg 216deg,
    #e74c3c 216deg 234deg,
    #2c3e50 234deg 252deg,
    #e74c3c 252deg 270deg,
    #2c3e50 270deg 288deg,
    #e74c3c 288deg 306deg,
    #2c3e50 306deg 324deg,
    #e74c3c 324deg 342deg,
    #2c3e50 342deg 360deg
  );
}

.roulette-wheel::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--primary-gold);
  border-radius: 50%;
}

.roulette-wheel.spinning {
  animation: rouletteSpin 3s ease-out;
}

@keyframes rouletteSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(1800deg);
  }
}

.roulette-bets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.roulette-bet {
  background: #333;
  border: 2px solid var(--skin-card-border);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-light);
  text-align: center;
  font-size: 0.9em;
}

.roulette-bet:hover {
  border-color: var(--primary-red);
  background: #444;
}

.roulette-bet.selected {
  border-color: var(--primary-gold);
  background: rgba(241, 196, 15, 0.2);
}

.blackjack-table {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.card-hand {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.playing-card {
  width: 60px;
  height: 90px;
  background: white;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  position: relative;
  animation: cardDeal 0.5s ease-out;
}

@keyframes cardDeal {
  0% {
    transform: translateY(-50px) rotateY(180deg);
    opacity: 0;
  }
  100% {
    transform: translateY(0) rotateY(0deg);
    opacity: 1;
  }
}

.playing-card.red {
  color: #e74c3c;
}

.hand-info {
  text-align: center;
  margin: 10px 0;
}

.hand-total {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--primary-gold);
}

.dice-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.dice {
  width: 80px;
  height: 80px;
  background: white;
  border: 3px solid #333;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5em;
  color: #333;
  font-weight: bold;
}

.dice.rolling {
  animation: diceRoll 1s ease-out;
}

@keyframes diceRoll {
  0%,
  100% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: rotateX(90deg) rotateY(0deg);
  }
  50% {
    transform: rotateX(180deg) rotateY(90deg);
  }
  75% {
    transform: rotateX(270deg) rotateY(180deg);
  }
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 400px;
  margin: 20px auto;
}

.memory-card {
  aspect-ratio: 1;
  background: #333;
  border: 2px solid var(--skin-card-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.memory-card:hover {
  border-color: var(--primary-red);
}

.memory-card.flipped {
  background: var(--primary-gold);
  color: #333;
  transform: rotateY(180deg);
}

.memory-card.matched {
  background: var(--success-green);
  color: white;
}

.game-result {
  text-align: center;
  padding: 20px;
  margin: 20px 0;
  border-radius: 10px;
  font-size: 1.3em;
  font-weight: 700;
}

.game-result.win {
  background: rgba(46, 204, 113, 0.2);
  border: 2px solid var(--success-green);
  color: var(--success-green);
}

.game-result.lose {
  background: rgba(231, 76, 60, 0.2);
  border: 2px solid var(--danger-red);
  color: var(--danger-red);
}

.footer {
  background: #000;
  border-top: 2px solid var(--skin-card-border);
  padding: 40px 0 20px;
  margin-top: 80px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-section h3,
.footer-section h4 {
  color: var(--primary-gold);
  margin-bottom: 15px;
}

.footer-title {
  font-size: 1.5em;
  font-weight: 700;
}

.footer-text {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 15px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social i {
  font-size: 1.5em;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.footer-social i:hover {
  color: var(--primary-gold);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-gold);
}

.footer-bottom {
  border-top: 1px solid var(--skin-card-border);
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
}

.disclaimer {
  font-size: 0.9em;
  margin-top: 10px;
  line-height: 1.5;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(145deg, var(--skin-card-bg-gradient-start), var(--skin-card-bg-gradient-end));
  border: 2px solid var(--primary-gold);
  border-radius: 10px;
  padding: 15px 20px;
  z-index: 3000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  max-width: 300px;
}

.notification.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-icon {
  font-size: 1.5em;
  flex-shrink: 0;
}

.notification-text {
  color: var(--text-light);
  font-weight: 500;
  word-wrap: break-word;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-red);
  animation: spin 1s ease-in-out infinite;
}

/* New game specific styles */
.coin-container {
  margin: 30px 0;
  perspective: 1000px;
}

.coin {
  width: 100px;
  height: 100px;
  background-color: var(--primary-gold);
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  font-weight: bold;
  color: #333;
  border: 5px solid #b8860b;
  box-shadow: 0 0 15px rgba(241, 196, 15, 0.5);
  transform-style: preserve-3d;
  transition: transform 0.5s ease-out;
}

.coin.flipping {
  animation: coinFlipAnimation 1.5s ease-out forwards;
}

@keyframes coinFlipAnimation {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(1800deg);
  } /* 5 full spins */
}

.higher-lower-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.higher-lower-card {
  width: 100px;
  height: 150px;
  background: white;
  border: 2px solid #333;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  color: #333;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.higher-lower-card.red {
  color: var(--danger-red);
}

.higher-lower-card .suit {
  font-size: 0.6em;
  position: absolute;
  top: 5px;
  left: 5px;
}

.higher-lower-card .suit.bottom-right {
  top: auto;
  left: auto;
  bottom: 5px;
  right: 5px;
  transform: rotate(180deg);
}

.keno-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  max-width: 550px;
  margin: 20px auto;
}

.keno-number {
  background: #333;
  border: 1px solid var(--skin-card-border);
  border-radius: 5px;
  padding: 10px 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-light);
  text-align: center;
  font-size: 1em;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.keno-number:hover {
  border-color: var(--primary-red);
  background: #444;
}

.keno-number.selected {
  background: var(--primary-gold);
  color: #333;
  border-color: var(--primary-gold);
}

.keno-number.drawn {
  background: var(--blue-accent);
  color: white;
  border-color: var(--blue-accent);
}

.keno-number.matched {
  background: var(--success-green);
  color: white;
  border-color: var(--success-green);
  animation: pulse 0.5s 3;
}

.keno-drawn-numbers {
  margin-top: 20px;
  font-size: 1.1em;
  color: var(--text-light);
  min-height: 30px;
}

.keno-drawn-numbers span {
  display: inline-block;
  margin: 0 3px;
  padding: 3px 8px;
  background: #444;
  border-radius: 5px;
}

/* Shop Section Styles */
.shop-section {
  margin: 60px 0;
  text-align: center;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.shop-item-card {
  background: linear-gradient(145deg, var(--skin-card-bg-gradient-start), var(--skin-card-bg-gradient-end));
  border: 2px solid var(--skin-card-border);
  border-radius: 20px;
  padding: 0;
  text-align: center;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.shop-item-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-gold);
  box-shadow: 0 15px 30px rgba(241, 196, 15, 0.2);
}

.shop-item-card.active-skin {
  border-color: var(--success-green);
  box-shadow: 0 0 20px var(--success-green);
}

.shop-item-header {
  padding: 20px 20px 0;
}

.shop-item-header h3 {
  font-size: 1.6em;
  color: var(--primary-gold);
  margin-bottom: 0;
}

.shop-item-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Skin gradient backgrounds */
.skin-gradient {
  width: 100%;
  height: 150px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.skin-gradient .skin-icon {
  font-size: 4em;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: iconPulse 2s ease-in-out infinite;
}

.shop-item-card.skin:hover .skin-gradient {
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* Power-up gradient backgrounds */
.power-up-gradient {
  width: 100%;
  height: 150px;
  background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.power-up-gradient .power-up-icon {
  font-size: 4em;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: iconPulse 2s ease-in-out infinite;
}

.shop-item-card.power-up:hover .power-up-gradient {
  background: linear-gradient(135deg, var(--primary-gold), var(--primary-red));
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.shop-item-description {
  flex-grow: 1;
  margin-bottom: 20px;
}

.shop-item-description p {
  color: var(--text-muted);
  font-size: 0.9em;
  line-height: 1.5;
  text-align: left;
  max-height: 120px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 3px solid var(--primary-gold);
}

.shop-item-description p::-webkit-scrollbar {
  width: 4px;
}

.shop-item-description p::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 2px;
}

.shop-item-card .price {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--primary-red);
  margin-bottom: 15px;
}

.shop-item-card .btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 1em;
  margin-top: auto;
}

.shop-item-card .btn.purchased {
  background: linear-gradient(45deg, var(--success-green), #27ae60);
  cursor: pointer;
}

.shop-item-card .btn.purchased:hover {
  box-shadow: 0 10px 20px rgba(46, 204, 113, 0.4);
}

.shop-item-card .btn.applied {
  background: linear-gradient(45deg, #3498db, #2980b9);
  cursor: default;
}

.shop-item-card .btn.applied:hover {
  box-shadow: none;
  transform: none;
}

/* New: Power-up specific styles */
.shop-item-card.power-up .btn.use-power-up {
  background: linear-gradient(45deg, var(--blue-accent), #2980b9);
}

.shop-item-card.power-up .btn.use-power-up:hover {
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.4);
}

.shop-item-card .power-up-quantity {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--primary-gold);
  margin-bottom: 15px;
}

/* Bonus Section Styles */
.bonus-section {
  margin: 60px 0;
  text-align: center;
}

.bonus-card h2 {
  font-size: clamp(1.8em, 4vw, 2.5em);
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 20px;
}

.bonus-card p {
  font-size: clamp(1.1em, 2.5vw, 1.3em);
  color: var(--text-muted);
  margin-bottom: 30px;
}

.bonus-card .btn {
  background: linear-gradient(45deg, var(--success-green), #27ae60);
}

.bonus-card .btn:disabled {
  background: linear-gradient(45deg, #333, #222);
  color: var(--text-muted);
}

/* Active Power-up Display */
.active-power-up-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(46, 204, 113, 0.2), rgba(52, 152, 219, 0.2));
  border: 1px solid var(--success-green);
  border-radius: 10px;
  padding: 8px 15px;
  margin-top: 15px;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text-light);
  animation: pulse 1.5s infinite alternate;
}

.active-power-up-display i {
  font-size: 1.2em;
  color: var(--primary-gold);
}

/* New Games Styles */

/* Poker Styles */
.poker-table {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.community-cards {
  text-align: center;
  margin-bottom: 20px;
}

.poker-hands {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.poker-hands > div {
  flex: 1;
  text-align: center;
}

.hand-rank {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--primary-gold);
}

/* Baccarat Styles */
.baccarat-table {
  margin: 20px 0;
}

.baccarat-hands {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
}

.baccarat-hands > div {
  flex: 1;
  text-align: center;
}

.baccarat-bets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

/* Craps Styles */
.craps-bets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}

/* Wheel of Fortune Styles */
.wheel-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  perspective: 1000px;
}

.fortune-wheel {
  width: 250px;
  height: 250px;
  border: 8px solid var(--primary-gold);
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    #e74c3c 0deg 15deg,
    #f1c40f 15deg 30deg,
    #e74c3c 30deg 45deg,
    #f1c40f 45deg 60deg,
    #e74c3c 60deg 75deg,
    #f1c40f 75deg 90deg,
    #e74c3c 90deg 105deg,
    #f1c40f 105deg 120deg,
    #e74c3c 120deg 135deg,
    #f1c40f 135deg 150deg,
    #e74c3c 150deg 165deg,
    #f1c40f 165deg 180deg,
    #e74c3c 180deg 195deg,
    #f1c40f 195deg 210deg,
    #e74c3c 210deg 225deg,
    #f1c40f 225deg 240deg,
    #e74c3c 240deg 255deg,
    #f1c40f 255deg 270deg,
    #e74c3c 270deg 285deg,
    #f1c40f 285deg 300deg,
    #e74c3c 300deg 315deg,
    #f1c40f 315deg 330deg,
    #e74c3c 330deg 345deg,
    #f1c40f 345deg 360deg
  );
  transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid var(--primary-red);
  z-index: 10;
}

.wheel-bets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

/* Scratch Card Styles */
.scratch-card {
  max-width: 300px;
  margin: 20px auto;
  \
  background: linear-gradient(145deg, #silver, #lightgray);
  border: 3px solid var(--primary-gold);
  border-radius: 15px;
  padding: 20px;
}

.scratch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.scratch-cell {
  aspect-ratio: 1;
  background: #888;
  border: 2px solid #666;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-weight: bold;
}

.scratch-cell:hover {
  background: #999;
  transform: scale(1.05);
}

.scratch-cell.scratched {
  background: white;
  color: #333;
  border-color: var(--primary-gold);
  cursor: default;
  animation: scratchReveal 0.5s ease-out;
}

@keyframes scratchReveal {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Plinko Styles */
.plinko-board {
  width: 100%;
  max-width: 500px;
  height: 300px;
  margin: 20px auto;
  position: relative;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  border: 3px solid var(--primary-gold);
  border-radius: 15px;
  overflow: hidden;
}

.plinko-slots {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  height: 50px;
}

.plinko-slot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: bold;
  color: white;
  border: 1px solid var(--primary-gold);
  background: linear-gradient(180deg, var(--primary-red), #c0392b);
}

.plinko-slot[data-multiplier="100"] {
  background: linear-gradient(180deg, var(--success-green), #27ae60);
}

.plinko-slot[data-multiplier="50"] {
  background: linear-gradient(180deg, var(--blue-accent), #2980b9);
}

.plinko-slot[data-multiplier="0.5"] {
  background: linear-gradient(180deg, #95a5a6, #7f8c8d);
}

.plinko-ball {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #f1c40f, #f39c12);
  border-radius: 50%;
  border: 2px solid #d68910;
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 10px rgba(241, 196, 15, 0.5);
  z-index: 5;
}

@media (max-width: 768px) {
  .top-bar-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .user-info {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 20px;
    width: 95%;
  }

  .bet-controls {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .jackpot-controls {
    flex-direction: column;
  }

  .jackpot-amount {
    font-size: 2.5em;
  }

  .casino-title {
    font-size: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .game-stats {
    flex-direction: column;
    gap: 15px;
  }

  .stat-item {
    flex-direction: row;
    justify-content: space-between;
  }

  .roulette-bets {
    grid-template-columns: repeat(2, 1fr);
  }

  .keno-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .game-card,
  .jackpot-card,
  .vip-card,
  .shop-item-card,
  .bonus-card {
    padding: 20px;
  }

  .shop-item-content {
    padding: 15px;
  }

  .jackpot-title {
    font-size: 1.8em;
  }

  .section-title {
    font-size: 2em;
  }

  .info-item {
    font-size: 0.9em;
  }

  .notification {
    right: 10px;
    left: 10px;
    transform: translateY(-100px);
    max-width: none;
  }

  .notification.show {
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-red);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c0392b;
}

.touch-device .btn:active,
.touch-device .game-card:active {
  transform: scale(0.95);
}

@media (prefers-contrast: high) {
  :root {
    --border-color: #666;
    --text-muted: #ccc;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
