/* slot game page — keep contrast high, animations short, no jitter on mobile */
.game-page-wrap {
  padding: 36px 0 80px;
  background: linear-gradient(180deg, #07051a 0%, #050314 100%);
  position: relative;
  overflow: hidden;
}
.game-page-wrap__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .28;
  z-index: 0;
  pointer-events: none;
}
.game-page-wrap > .page-width {
  position: relative;
  z-index: 1;
}
.game-page__head {
  text-align:center;
  max-width: 720px;
  margin: 0 auto 28px;
}
.game-page__eyebrow {
  display:inline-block;
  padding: 4px 12px;
  font-size: 11px;
  letter-spacing: .26em;
  color:#cdb8ff;
  border: 1px dashed rgba(205,184,255,.35);
  border-radius: 2px;
  margin-bottom: 14px;
  font-weight: 600;
}
.game-page__h {
  margin: 0 0 10px;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: .14em;
  color:#ffffff;
}
.game-page__sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
}

.slot-shell {
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(160deg, rgba(122,78,255,0.08) 0%, rgba(7,5,26,0.6) 100%);
  border:1px solid rgba(122,78,255,.28);
  border-radius: 8px;
  padding: 18px;
  position:relative;
}

.slot-status-bar {
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
}
.ss-cell { display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; }
.ss-label {
  font-size: 10px;
  letter-spacing: .22em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  font-weight: 500;
}
.ss-value {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #ffffff;
  letter-spacing: .04em;
}
.ss-value--accent { color: #ffd166; }

/* ---- reels ---- */
.slot-stage {
  position:relative;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(122,78,255,.18) 0%, transparent 60%),
    linear-gradient(180deg, #0a0626 0%, #050314 100%);
  border: 1px solid rgba(122,78,255,0.3);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 16px;
  overflow: hidden;
  aspect-ratio: 5 / 3;
  min-height: 180px;
}
.slot-grid {
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  height: 100%;
}
.reel {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  position:relative;
}
.cell {
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(180deg, #170c36, #0a0620);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 3px;
  transition: all .25s ease 0s;
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 6px;
  box-sizing: border-box;
}
.cell__art {
  max-width: 78%;
  max-height: 78%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* per-symbol look — borders + tints around the artwork */
.cell.sym-crystal  { background: linear-gradient(180deg, #1a1041, #0a0620); }
.cell.sym-comet    { background: linear-gradient(180deg, #0a1a3a, #050314); }
.cell.sym-nebula   { background: linear-gradient(180deg, #1d1147, #0c0726); box-shadow: inset 0 0 16px rgba(122,78,255,0.25); }
.cell.sym-captain  { background: linear-gradient(180deg, #2a1f0a, #120a02); box-shadow: inset 0 0 18px rgba(255,209,102,0.22); }
.cell.sym-wild     { background: linear-gradient(180deg, #3a0a18, #14040a); box-shadow: inset 0 0 22px rgba(255,77,109,0.3); }

.cell--win {
  border-color: #ffd166 !important;
  box-shadow: 0 0 0 2px rgba(255,209,102,0.6), inset 0 0 24px rgba(255,209,102,0.4) !important;
  animation: cellPulse .9s ease-in-out infinite alternate;
}
@keyframes cellPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.04); }
}

/* rolling state */
.reel--rolling .cell {
  animation: reelBlur .12s linear infinite;
  filter: blur(1.5px);
  opacity: .85;
}
@keyframes reelBlur {
  0%   { transform: translateY(-2px); }
  50%  { transform: translateY(2px); }
  100% { transform: translateY(-2px); }
}
.reel--stopped .cell {
  animation: reelLand .26s ease-out 1;
}
@keyframes reelLand {
  0%   { transform: translateY(-8px); }
  60%  { transform: translateY(3px); }
  100% { transform: translateY(0); }
}

.payline-svg {
  position: absolute;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  pointer-events: none;
  z-index: 3;
}
.pl-line {
  fill: none;
  stroke: #ffd166;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
  filter: drop-shadow(0 0 6px rgba(255,209,102,0.7));
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: lineDraw .55s ease-out forwards;
}
.pl-line--1 { stroke: #93c5fd; }
.pl-line--2 { stroke: #ff4d6d; }
.pl-line--3 { stroke: #7a4eff; }
.pl-line--4 { stroke: #4ade80; }
.pl-line--5 { stroke: #f472b6; }
.pl-line--6 { stroke: #38bdf8; }
.pl-line--7 { stroke: #fb923c; }
.pl-line--8 { stroke: #a78bfa; }
.pl-line--9 { stroke: #facc15; }

@keyframes lineDraw { to { stroke-dashoffset: 0; } }

.spin-status {
  position: absolute;
  bottom: 6px;
  left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: .04em;
  pointer-events: none;
  z-index: 4;
}

/* ---- controls ---- */
.slot-controls {
  display:flex;
  flex-direction: column;
  gap: 14px;
}
.ctrl-row {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ctrl {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.ctrl__label {
  font-size: 10px;
  letter-spacing: .22em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  font-weight: 500;
}
.ctrl__label.small { display:block; margin-bottom: 8px; }
.ctrl__pmgrp {
  display:inline-flex;
  align-items:center;
  gap: 8px;
}
.pm-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(122,78,255,0.14);
  border: 1px solid rgba(122,78,255,0.4);
  color: #ffffff;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: background .2s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height: 1;
}
.pm-btn:hover { background: rgba(122,78,255,0.3); }
.pm-val {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  min-width: 28px;
  text-align: center;
  color: #ffffff;
}

.line-picker {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 12px;
}
.lp-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}
.lp-chip {
  height: 32px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s ease;
}
.lp-chip:hover { color: #ffffff; border-color: rgba(122,78,255,0.5); }
.lp-chip.is-on {
  background: rgba(122,78,255,0.25);
  border-color: #7a4eff;
  color: #ffffff;
}

.ctrl-row--actions {
  grid-template-columns: 1fr;
  gap: 10px;
}
.spin-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(180deg, #ff4d6d, #c9162a);
  border: 1px solid #ff3850;
  border-radius: 100px;
  color: #ffffff;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .3em;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 18px 40px -16px rgba(255,77,109,0.55);
  transition: transform .15s ease, background .25s ease;
}
.spin-btn:hover { transform: translateY(-1px); }
.spin-btn:active { transform: translateY(1px); }
.spin-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.spin-btn.is-spinning .spin-btn__inner::after { content:' …'; }

.reset-btn {
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  color: rgba(255,255,255,0.7);
  font-family: Rajdhani, sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s ease;
}
.reset-btn:hover { color: #ffffff; border-color: rgba(255,255,255,0.4); }

.ctrl-foot {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  display:flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.rules-link {
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #cdb8ff;
  transition: color .2s ease;
}
.rules-link:hover { color: #ffffff; }
.ctrl-foot__note {
  margin: 0;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

/* ---- result banner ---- */
.result-banner {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 4px;
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  animation: bannerIn .4s ease-out;
}
@keyframes bannerIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-banner.is-win {
  background: linear-gradient(135deg, rgba(255,209,102,0.18), rgba(255,209,102,0.05));
  border: 1px solid rgba(255,209,102,0.5);
}
.result-banner.is-lose {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
}
.rb-tag {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.is-win .rb-tag { color: #ffd166; }
.is-lose .rb-tag { color: rgba(255,255,255,0.5); }
.rb-amt {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: .04em;
}
.is-win .rb-amt { color: #ffd166; }
.is-lose .rb-amt { color: rgba(255,255,255,0.45); }
.rb-txt {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.4;
}

/* ---- responsive ---- */
@media(min-width: 750px) {
  .slot-shell { padding: 26px; }
  .ss-value { font-size: 26px; }
  .game-page__h { font-size: 44px; }
  .ctrl-row--actions {
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    align-items: center;
  }
  .reset-btn { width: auto; }
  .ctrl-foot {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
  }
  .ctrl-foot__note { text-align: right; max-width: 320px; }
}
@media(min-width: 990px) {
  .game-page-wrap { padding: 50px 0 100px; }
}
@media(max-width: 480px) {
  .lp-grid { grid-template-columns: repeat(5, 1fr); }
  .cell { font-size: 22px; }
  .spin-btn { font-size: 18px; letter-spacing: .22em; padding: 16px; }
  .ctrl { flex-direction: column; align-items: flex-start; gap: 6px; }
}
