/* ====================================================================
   slot.css — the letsbuild yard cabinet
   only loaded on meet-game.php
   shares root variables with scaffolding.css
   ==================================================================== */


/* ----- page head strip ----- */

.slot-head {
  background: var(--asphalt);
  color: var(--site-paper);
  padding: 70px 0 56px;
  border-bottom: 4px solid var(--hi-vis-yellow);
  position: relative;
}

.slot-head::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 4px;
  background: var(--hi-vis-yellow);
}

.slot-head__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

.slot-head .kicker {
  background: rgba(254, 201, 36, 0.12);
  color: var(--hi-vis-yellow);
  border-left-color: var(--hi-vis-yellow);
}

.slot-head__title {
  font-family: var(--display-stack);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  margin-bottom: 18px;
  color: var(--site-paper);
}

.slot-head__sub {
  font-size: 16px;
  line-height: 1.65;
  color: var(--concrete-light);
  max-width: 660px;
}




/* ----- main rig wrap ----- */

.slot-rig {
  background:
    radial-gradient(circle at 30% 20%, rgba(254,201,36,0.05), transparent 50%),
    var(--crushed-stone);
  padding: 80px 0 100px;
  color: var(--site-paper);
}

.slot-rig__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}




/* ----- top readout ----- */

.slot-rig__readout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 26px;
  background: var(--asphalt);
  border: 2px solid var(--hi-vis-yellow);
  padding: 4px;
}

.readout-cell {
  background: #0c0e12;
  padding: 14px 18px;
  border: 1px solid #2a2d33;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.readout-cell__label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
}

.readout-cell__val {
  font-family: var(--display-stack);
  font-size: 26px;
  color: var(--hi-vis-yellow);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.readout-cell--mood .readout-cell__val {
  font-family: var(--body-stack);
  font-size: 13px;
  color: var(--site-paper);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: lowercase;
}




/* ----- the cabinet itself ----- */

.slot-rig__cabinet {
  position: relative;
  background: var(--asphalt);
  border: 4px solid var(--hi-vis-yellow);
  padding: 0 0 26px;
  box-shadow:
    0 0 0 4px var(--asphalt),
    0 0 0 8px var(--hi-vis-amber),
    18px 18px 0 var(--asphalt),
    24px 24px 0 var(--hi-vis-yellow);
}

.slot-rig__warning-strip {
  background: repeating-linear-gradient(
    -45deg,
    var(--hi-vis-yellow) 0 16px,
    var(--asphalt) 16px 32px
  );
  height: 22px;
  overflow: hidden;
  border-bottom: 3px solid var(--hi-vis-yellow);
}

.slot-rig__warning-strip span {
  display: inline-block;
  padding: 0 30px;
  line-height: 22px;
  color: var(--asphalt);
  font-family: var(--body-stack);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}




/* ----- reels grid ----- */

.slot-rig__reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 28px 26px;
  background: #0a0c10;
  margin: 0 4px;
}


.reel {
  position: relative;
  background: #16181c;
  border: 2px solid #2a2d33;
  overflow: hidden;
  aspect-ratio: 1 / 3;
}

.reel__strip {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cell {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, #1d2026 0%, #14161b 100%);
  border-bottom: 1px solid #2a2d33;
  transition: background 0.25s ease;
}

.cell:last-child { border-bottom: 0; }

.cell img {
  width: 64%;
  height: 64%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.4));
}


/* spin animation ---- the strip blurs while spinning */

.reel.is-spinning .reel__strip {
  animation: reel-blur 0.08s linear infinite;
}

.reel.is-spinning .cell img {
  filter: blur(3px) drop-shadow(0 2px 0 rgba(0,0,0,0.4));
  opacity: 0.5;
}

@keyframes reel-blur {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}


/* hits — when a cell is part of a winning line */

.cell.is-hit {
  background:
    radial-gradient(circle at center, rgba(254,201,36,0.25), transparent 70%),
    linear-gradient(180deg, #1d2026 0%, #14161b 100%);
  animation: cell-hit 0.6s ease infinite alternate;
}

.cell.is-hit::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px solid var(--hi-vis-yellow);
  pointer-events: none;
  animation: cell-pulse 0.8s ease infinite alternate;
}

@keyframes cell-hit {
  from { box-shadow: inset 0 0 0 0 transparent; }
  to   { box-shadow: inset 0 0 28px rgba(254,201,36,0.35); }
}

@keyframes cell-pulse {
  from { opacity: 0.55; }
  to   { opacity: 1; }
}




/* ----- payline overlays ----- */

.payline-board {
  position: absolute;
  inset: 28px 26px;
  pointer-events: none;
}

.payline {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--hi-vis-yellow);
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 0 14px var(--hi-vis-yellow);
}

.payline.is-on { opacity: 0.9; }

.payline[data-line="top"] { top: 16.6%; }
.payline[data-line="mid"] { top: 50%;   transform: translateY(-50%); }
.payline[data-line="bot"] { top: 83.3%; }

.payline--diag-down {
  top: 16.6%;
  height: auto;
  bottom: 16.6%;
  background: transparent;
  border-top: 4px dashed var(--hi-vis-yellow);
  transform: rotate(0);
  box-shadow: none;
}

.payline--diag-up {
  top: 16.6%;
  height: auto;
  bottom: 16.6%;
  background: transparent;
  border-bottom: 4px dashed var(--hi-vis-amber);
  transform: rotate(0);
  box-shadow: none;
}




/* ----- result flash ----- */

.result-flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 5;
}

.result-flash.is-up {
  opacity: 1;
}

.result-flash__word {
  font-family: var(--display-stack);
  font-size: clamp(40px, 9vw, 96px);
  letter-spacing: 0.04em;
  padding: 14px 32px;
  border: 4px solid var(--asphalt);
  background: var(--hi-vis-yellow);
  color: var(--asphalt);
  transform: scale(0.6) rotate(-3deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 3px 3px 0 var(--asphalt);
  box-shadow: 8px 8px 0 var(--asphalt);
}

.result-flash.is-up .result-flash__word {
  transform: scale(1) rotate(-3deg);
}

.result-flash.is-loss .result-flash__word {
  background: var(--asphalt);
  color: var(--hi-vis-yellow);
  border-color: var(--hi-vis-yellow);
  text-shadow: none;
  box-shadow: 8px 8px 0 var(--warn-red);
}




/* ----- base panel: stake row + lever + reset ----- */

.slot-rig__base {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 22px;
  align-items: center;
  padding: 22px 28px 0;
}


.stake-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.stake-row__lbl {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--concrete-mid);
  font-weight: 700;
  margin-right: 6px;
}

.chip {
  font-family: var(--display-stack);
  font-size: 15px;
  width: 48px;
  height: 48px;
  background: #0a0c10;
  border: 2px solid var(--rebar-grey);
  color: var(--site-paper);
  cursor: pointer;
  transition: all 0.14s ease;
  letter-spacing: 0.04em;
}

.chip:hover { border-color: var(--hi-vis-yellow); color: var(--hi-vis-yellow); }

.chip.chip--on {
  background: var(--hi-vis-yellow);
  color: var(--asphalt);
  border-color: var(--hi-vis-yellow);
}


.lever {
  position: relative;
  width: 130px;
  height: 90px;
  background: linear-gradient(180deg, #ff8a3d 0%, #d4471a 100%);
  border: 3px solid var(--asphalt);
  cursor: pointer;
  font-family: var(--display-stack);
  color: var(--asphalt);
  padding: 0;
  box-shadow:
    inset 0 4px 0 rgba(255,255,255,0.2),
    inset 0 -4px 0 rgba(0,0,0,0.3),
    6px 6px 0 var(--hi-vis-yellow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.lever:hover { transform: translateY(-2px); box-shadow: inset 0 4px 0 rgba(255,255,255,0.2), inset 0 -4px 0 rgba(0,0,0,0.3), 6px 8px 0 var(--hi-vis-yellow); }

.lever:active { transform: translate(4px, 4px); box-shadow: inset 0 4px 0 rgba(255,255,255,0.2), inset 0 -4px 0 rgba(0,0,0,0.3), 2px 2px 0 var(--hi-vis-yellow); }

.lever[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.lever__face { display: flex; flex-direction: column; line-height: 1; padding: 14px 14px 22px; }

.lever__top { font-size: 28px; letter-spacing: 0.04em; }
.lever__bot { font-size: 11px; letter-spacing: 0.2em; opacity: 0.85; margin-top: 4px; }

.lever__rod {
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 8px;
  background: #4a4e57;
  border: 2px solid var(--asphalt);
}

.lever__ball {
  position: absolute;
  right: -38px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cfd2d8, #6b7280);
  border: 2px solid var(--asphalt);
}


.reset-btn {
  background: transparent;
  color: var(--concrete-light);
  border: 1px dashed var(--rebar-grey);
  padding: 10px 14px;
  font-family: var(--body-stack);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.reset-btn:hover { color: var(--hi-vis-yellow); border-color: var(--hi-vis-yellow); }




/* ----- legend below ----- */

.slot-rig__legend {
  margin-top: 50px;
  background: var(--asphalt);
  border: 2px solid var(--rebar-grey);
  padding: 30px 32px;
}

.legend__title {
  font-family: var(--display-stack);
  font-size: 18px;
  color: var(--hi-vis-yellow);
  margin-bottom: 22px;
  letter-spacing: 0.04em;
}

.legend__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0a0c10;
  padding: 10px 12px;
  border: 1px solid #2a2d33;
}

.legend__sym {
  width: 50px;
  height: 50px;
  flex: none;
  background: var(--site-paper);
  padding: 4px;
  border: 1px solid #2a2d33;
}

.legend__name {
  font-family: var(--display-stack);
  font-size: 13px;
  color: var(--site-paper);
  margin-bottom: 2px;
  letter-spacing: 0.04em;
}

.legend__pay {
  font-size: 10.5px;
  color: var(--concrete-mid);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.legend__note {
  font-size: 13px;
  color: var(--concrete-light);
  line-height: 1.6;
  border-top: 1px dashed var(--rebar-grey);
  padding-top: 16px;
  margin-top: 6px;
}


.slot-rig__small-print {
  margin-top: 26px;
  font-size: 12px;
  color: var(--concrete-mid);
  text-align: center;
  font-style: italic;
}

.slot-rig__small-print .link-inline {
  color: var(--concrete-light);
  text-decoration-color: var(--hi-vis-yellow);
}




/* ----- responsive ----- */

@media (max-width: 920px) {

  .slot-rig__readout    { grid-template-columns: repeat(2, 1fr); }

  .slot-rig__base       { grid-template-columns: 1fr; gap: 16px; }
  .stake-row            { justify-content: center; }

  .legend__grid         { grid-template-columns: repeat(2, 1fr); }

}

@media (max-width: 560px) {

  .slot-rig__cabinet    { box-shadow: 0 0 0 4px var(--asphalt), 0 0 0 8px var(--hi-vis-amber), 10px 10px 0 var(--asphalt), 14px 14px 0 var(--hi-vis-yellow); }

  .slot-rig__reels      { padding: 18px 14px; gap: 5px; }
  .payline-board        { inset: 18px 14px; }

  .slot-rig__base       { padding: 18px 18px 0; }

  .lever                { width: 110px; height: 78px; }
  .lever__top           { font-size: 22px; }

  .legend__grid         { grid-template-columns: 1fr; }

  .slot-rig__legend     { padding: 22px 18px; }

}
