:root {
  --neon-cyan: #00f3ff;
  --neon-pink: #ff007f;
  --neon-green: #39ff14;
}

/* Global Reset & Dark Theme */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0b0d17;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Main Slot Container */
.slot-container {
  background: #121420;
  border: 2px solid #232738;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.game-title {
  color: #00ffff;
  font-size: 26px;
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

/* Reel Frame */
.reel-frame {
  background: #080a10;
  border: 3px solid #2a2f45;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 20px;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

canvas {
  display: block;
  background: #000;
  border-radius: 6px;
}

/* Control Panel */
.control-panel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.stat-box {
  background: #181b2e;
  border: 1px solid #2a2f45;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-box .label {
  font-size: 10px;
  color: #8c93b0;
  font-weight: bold;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.stat-box .value {
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
}

.stat-box .value.cyan {
  color: #00ffff;
}

.stat-box .value.green {
  color: #00ff88;
}

.counter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.counter button {
  background: #232738;
  border: 1px solid #3b4260;
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.counter button:hover {
  background: #3b4260;
}

/* Action Bar */
.action-bar {
  display: flex;
  gap: 15px;
  width: 100%;
  margin-bottom: 20px;
}

.btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-purple {
  background: linear-gradient(135deg, #7f00ff 0%, #e100ff 100%);
}

.btn-orange {
  background: linear-gradient(135deg, #ff7e00 0%, #ff0000 100%);
}

.btn:hover {
  opacity: 0.9;
}

/* Stats Footer */
.stats-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.stat-sub-box {
  background: #181b2e;
  border: 1px solid #2a2f45;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.sub-label {
  display: block;
  font-size: 10px;
  color: #8c93b0;
  margin-bottom: 4px;
}

.sub-value.yellow {
  color: #ffcc00;
  font-size: 15px;
  font-weight: bold;
}

/* Bottom Bar */
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.bonus-tag {
  color: #ffcc00;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
}

.btn-payout {
  background: #232738;
  border: 1px solid #3b4260;
  padding: 10px 20px;
  flex: unset;
  font-size: 13px;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  background: #141622;
  border: 2px solid #2a2f45;
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  z-index: 1001;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.modal-close-x {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #8c93b0;
  font-size: 24px;
  cursor: pointer;
}

.modal-title-yellow {
  color: #ffcc00;
  font-size: 22px;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* Payout Grid */
.payout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 5px;
}

.payout-card {
  background: #181b2e;
  border: 1px solid #2a2f45;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.payout-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 8px;
}

.payout-name {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 6px;
}

.payout-rates {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #8c93b0;
  gap: 2px;
}

.payout-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid #232738;
  padding-top: 15px;
}

.wild-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #181b2e;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #2a2f45;
}

.wild-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.wild-info .wild-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 2px;
}

.wild-info .wild-desc {
  font-size: 11px;
  color: #8c93b0;
}

.bet-info-card {
  background: #181b2e;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #2a2f45;
}

.bet-info-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 6px;
  text-align: center;
}

.bet-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8c93b0;
  padding: 2px 0;
}

@media (max-width: 768px) {
  .slot-container {
    width: 100%;
    padding: 16px;
  }

  .control-panel,
  .action-bar,
  .stats-footer,
  .bottom-bar {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  #slotCanvas {
    width: 100%;
    height: auto;
  }
}