/* Variables y Reset */
:root {
  --bg-color: #0f1016;
  --cabinet-bg: #1a1b26;
  --accent-gold: #f9ca24;
  --accent-red: #eb4d4b;
  --accent-green: #6ab04c;
  --accent-blue: #4834d4;
  --border-glow: #e056fd;
  --text-main: #ffffff;
  --text-muted: #95afc0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

body {
  background: radial-gradient(circle at center, #1e202e 0%, #0c0d14 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Cabina Arcade */
.arcade-cabinet {
  background: var(--cabinet-bg);
  border: 4px solid #30336b;
  border-radius: 20px;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8), 0 0 15px rgba(224, 86, 253, 0.4);
  padding: 20px;
  width: 100%;
  max-width: 860px;
}

.cabinet-header {
  text-align: center;
  margin-bottom: 15px;
}

.cabinet-header h1 {
  font-size: 2rem;
  letter-spacing: 4px;
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(249, 202, 36, 0.7), 0 0 20px rgba(240, 147, 43, 0.5);
}

/* Tablero 7x7 */
.board-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 8px;
  position: relative;
  background: #13141f;
  border: 3px solid #30336b;
  border-radius: 14px;
  padding: 10px;
}

/* Casillas Perimetrales */
.slot-cell {
  background: #222538;
  border: 2px solid #3a3f5a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1;
  position: relative;
  transition: transform 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease;
  overflow: hidden;
}

.slot-cell .cell-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.slot-cell .cell-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.slot-cell .cell-emoji-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 0.8rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.75);
  padding: 2px 3px;
  border-radius: 4px;
  z-index: 2;
}

.slot-cell .cell-multi {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.75);
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 2;
}

.slot-cell.active {
  background: #fff;
  border-color: #ffeaa7;
  box-shadow: 0 0 25px #fffa65, inset 0 0 10px #ffeaa7;
  transform: scale(1.08);
  z-index: 5;
}

.slot-cell.active .cell-multi {
  color: #111;
}

.slot-cell.winner-pulse {
  animation: pulseWin 0.6s infinite alternate;
}

@keyframes pulseWin {
  0% { transform: scale(1.05); box-shadow: 0 0 20px #2ed573; }
  100% { transform: scale(1.15); box-shadow: 0 0 35px #7bed9f; }
}

/* Panel Central */
.center-stage {
  grid-column: 2 / 7;
  grid-row: 2 / 7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  background: #171926;
  border-radius: 10px;
  border: 2px solid #282b3d;
}

/* Marcadores */
.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.score-box {
  background: #0d0e16;
  border: 2px solid #2f3542;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.score-box.highlight {
  border-color: var(--accent-gold);
}

.score-box .label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.score-box .value {
  display: block;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent-gold);
  font-family: 'Courier New', Courier, monospace;
}

.status-message {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #a4b0be;
  min-height: 24px;
}

/* Panel de Apuestas */
.bet-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chip-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.chip-btn {
  background: #2f3542;
  color: #fff;
  border: 2px solid #57606f;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.chip-btn.active {
  background: var(--accent-gold);
  color: #111;
  border-color: #fff;
  transform: scale(1.1);
}

.bet-symbols-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.bet-tile {
  background: #222538;
  border: 2px solid #373b54;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s, border-color 0.2s;
}

.bet-tile:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.bet-tile .tile-icon {
  font-size: 1.4rem;
}

.bet-tile .tile-img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
}

.bet-tile .tile-name {
  font-size: 0.7rem;
  font-weight: bold;
  margin-top: 2px;
}

.bet-tile .tile-multi {
  font-size: 0.65rem;
  color: var(--accent-gold);
}

.bet-tile .tile-current-bet {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-red);
  color: white;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 2px 6px;
  display: none;
}

.bet-tile.has-bet .tile-current-bet {
  display: block;
}

/* Acciones */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}

.action-btn {
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}

.action-btn:active {
  transform: scale(0.97);
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.clear-btn {
  background: #57606f;
  color: white;
}

.spin-btn {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: white;
  letter-spacing: 2px;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

/* Responsive */
@media (max-width: 650px) {
  .arcade-cabinet {
    padding: 10px;
  }
  .board-grid {
    gap: 4px;
    padding: 6px;
  }
  .slot-cell .cell-icon {
    font-size: 1.2rem;
  }
  .slot-cell .cell-emoji-badge {
    font-size: 0.65rem;
    padding: 1px 2px;
  }
  .slot-cell .cell-multi {
    font-size: 0.55rem;
  }
  .bet-symbols-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .bet-tile {
    padding: 4px;
  }
}
