/* ==========================================
   GameSelection.org – Game Page Styles
   ========================================== */

:root {
  --game-color: #f0c040;
}

body.game-page {
  background: linear-gradient(180deg, #0d0820 0%, #1a0f35 50%, #2d1a00 100%);
  min-height: 100vh;
}

/* ---- GAME WRAPPER ---- */
.game-wrapper {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ---- JACKPOT BAR ---- */
.jackpot-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.jp-box {
  background: linear-gradient(135deg, #1a1035 0%, #0d0820 100%);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.jp-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.jp-box.grand { border-color: rgba(240,192,64,0.5); }
.jp-box.grand::before { background: var(--gold); }
.jp-box.grand .jp-val { color: var(--gold); }

.jp-box.major { border-color: rgba(0,230,118,0.4); }
.jp-box.major::before { background: var(--accent-green); }
.jp-box.major .jp-val { color: var(--accent-green); }

.jp-box.minor { border-color: rgba(64,196,255,0.4); }
.jp-box.minor::before { background: var(--accent-blue); }
.jp-box.minor .jp-val { color: var(--accent-blue); }

.jp-box.mini { border-color: rgba(180,100,255,0.4); }
.jp-box.mini::before { background: #b464ff; }
.jp-box.mini .jp-val { color: #b464ff; }

.jp-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.jp-val {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

/* ---- GAME TITLE ---- */
.game-title-bar {
  text-align: center;
  margin-bottom: 16px;
}

.game-title-text {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--game-color, var(--gold));
  text-shadow: 0 0 30px currentColor;
}

/* ---- GAME LAYOUT ---- */
.game-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

/* ---- SIDE PANEL ---- */
.game-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* Bonus Button */
.bonus-side-btn {
  background: linear-gradient(135deg, #cc2200 0%, #ff4422 100%);
  border: none;
  border-radius: 12px;
  padding: 18px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(200,40,0,0.4);
  width: 72px;
}

.bonus-side-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,40,0,0.5);
}

.bonus-side-btn .btn-icon { font-size: 24px; }
.bonus-side-btn .btn-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

/* ---- GRID CONTAINER ---- */
.grid-outer {
  background: linear-gradient(135deg, #1a1035, #0d0820);
  border: 3px solid rgba(240,192,64,0.5);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 0 40px rgba(240,192,64,0.1), inset 0 0 40px rgba(0,0,0,0.3);
}

#game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 280px;
}

/* ---- GRID CELL ---- */
.grid-cell {
  background: linear-gradient(135deg, #2a1a50 0%, #1a0f35 100%);
  border: 2px solid rgba(240,192,64,0.3);
  border-radius: 10px;
  width: 82px;
  height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.grid-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.cell-symbol { font-size: 32px; line-height: 1; }

.cell-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.cell-bonus-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Win highlight */
.win-cell {
  border-color: var(--gold) !important;
  background: linear-gradient(135deg, rgba(240,192,64,0.2) 0%, rgba(240,192,64,0.05) 100%) !important;
  box-shadow: 0 0 16px rgba(240,192,64,0.5);
  animation: winPulse 0.6s ease-in-out 3;
}

@keyframes winPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* Spinning animation */
.spinning-cell {
  animation: cellSpin 0.12s linear;
}

@keyframes cellSpin {
  0% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.1); opacity: 0.3; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* ---- RIGHT CONTROLS ---- */
.game-controls-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* Spin button */
.spin-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2050 0%, #1a1035 100%);
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  color: var(--text-light);
}

.spin-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3a3060 0%, #2a2050 100%);
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

.spin-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.spinning-btn { animation: spinRotate 0.5s linear infinite; }

@keyframes spinRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Turbo button */
.turbo-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c05000 0%, #ff8c00 100%);
  border: none;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  white-space: pre-line;
  text-align: center;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(200,100,0,0.4);
}

.turbo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(200,100,0,0.5);
}

.turbo-active {
  background: linear-gradient(135deg, #ff8c00 0%, #ffb300 100%) !important;
  box-shadow: 0 0 20px rgba(255,140,0,0.6) !important;
}

/* Fast forward */
.fast-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2050 0%, #1a1035 100%);
  border: 2px solid rgba(255,255,255,0.12);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}

.fast-btn:hover {
  color: var(--text-light);
  border-color: rgba(255,255,255,0.25);
}

/* ---- STATS BAR ---- */
.stats-bar {
  background: linear-gradient(135deg, #0a0618 0%, #0d0820 100%);
  border: 1px solid var(--purple-border);
  border-radius: 12px;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-light);
}

.stat-value.win { color: var(--gold); }

.bet-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.bet-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
}

.bet-btn:hover {
  background: rgba(240,192,64,0.15);
  border-color: rgba(240,192,64,0.4);
  color: var(--gold);
}

.bet-val-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

/* ---- SOUND + INFO BUTTONS ---- */
.bottom-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-light);
}

/* ---- PAYTABLE MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--purple-card);
  border: 1px solid var(--purple-border);
  border-radius: 16px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.25s;
}

.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.paytable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.paytable-sym {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-light);
}

.paytable-sym .sym-icon { font-size: 24px; }

.paytable-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

.modal-close {
  width: 100%;
  margin-top: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.13); }

/* ---- GAME PAGE RESPONSIVE ---- */
@media (max-width: 640px) {
  .jackpot-bar { grid-template-columns: repeat(2, 1fr); }
  .game-layout { grid-template-columns: 1fr; justify-items: center; }
  .game-side { flex-direction: row; }
  .game-controls-right { flex-direction: row; }
  #game-grid { width: 260px; }
  .grid-cell { width: 76px; height: 76px; }
  .cell-symbol { font-size: 28px; }
  .stats-bar { grid-template-columns: 1fr 1fr; gap: 12px; }
}
