:root {
  --lake-gold: #ffcf5c;
  --lake-gold-deep: #b8860b;
  --lake: #58c8e0;
  --accent: #58c8e0;
  --accent-2: #10344a;
}

/* Background is the shared dark casino-floor backdrop from slot.css. */

.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-content { width: 360px; max-width: 90vw; padding: 20px 24px; }
.modal-content h2 { margin-top: 0; color: var(--lake-gold); }
.modal-content .hint { font-size: 0.8rem; color: #cfe6f0; line-height: 1.55; }

.paytable-list { list-style: none; padding: 0; margin: 12px 0; }
.paytable-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #2f5a72;
  font-size: 0.9rem;
}
.paytable-list li span:last-child { font-weight: bold; white-space: nowrap; color: var(--lake-gold); }

/* ---------- Cabinet ---------- */

.cabinet#reelCabinet {
  width: 600px;
  max-width: 95vw;
  padding: 22px 24px 26px;
  border: 3px solid var(--lake-gold);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 22%),
    linear-gradient(165deg, #1b3f52, #10222f);
  box-shadow:
    0 30px 70px rgba(8, 24, 40, 0.55),
    0 0 0 5px rgba(255, 207, 92, 0.18),
    0 0 0 8px rgba(40, 90, 120, 0.4),
    inset 0 0 26px rgba(88, 200, 224, 0.12);
}

#reelCabinet .title {
  margin: 4px 0 12px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--lake-gold);
  text-shadow: 0 0 10px rgba(255, 207, 92, 0.6), 0 0 26px var(--lake);
  animation: title-pulse 2.6s ease-in-out infinite;
}

#reelCabinet .bonus-banner {
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--lake-gold);
  border-radius: 10px;
  background: linear-gradient(90deg, var(--lake), var(--lake-gold));
  color: #0d2436;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  animation: pulse 1s infinite alternate;
}
#reelCabinet .bonus-banner.hidden { display: none; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.02); } }

.frame-flourish {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d8, var(--lake-gold) 45%, var(--lake-gold-deep) 100%);
  box-shadow: 0 0 12px rgba(255, 207, 92, 0.7), 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.frame-flourish.tl { top: 8px; left: 8px; }
.frame-flourish.tr { top: 8px; right: 8px; }
.frame-flourish.bl { bottom: 8px; left: 8px; }
.frame-flourish.br { bottom: 8px; right: 8px; }

/* ---------- Reel window ---------- */

#reelCabinet .screen {
  position: relative;
  padding: 10px;
  margin-bottom: 12px;
  border: 3px solid var(--lake-gold);
  border-radius: 14px;
  background: linear-gradient(180deg, #0b2130, #0e3a52 60%, #0b2130);
  box-shadow:
    inset 0 2px 16px rgba(0, 0, 0, 0.6),
    0 0 0 3px var(--lake-gold-deep),
    0 0 26px rgba(88, 200, 224, 0.25);
}
#reelCabinet .screen::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; top: 8px;
  height: 30%;
  border-radius: 10px 10px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
  z-index: 4;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
}

#reelCabinet .cell {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.16), transparent 62%),
    linear-gradient(180deg, #1a4863, #0c2438);
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
#reelCabinet .cell .symbol {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 6px rgba(88, 200, 224, 0.25));
}
@media (max-width: 430px) {
  #reelCabinet .cell .symbol { font-size: 1.55rem; }
}

#reelCabinet .cell.win {
  border-color: var(--lake);
  animation: reel-winframe 0.8s ease-in-out infinite;
}
@keyframes reel-winframe {
  0%, 100% { box-shadow: 0 0 0 2px var(--lake), 0 0 12px 0 rgba(88, 200, 224, 0.7); }
  50%      { box-shadow: 0 0 0 2px var(--lake), 0 0 22px 3px rgba(88, 200, 224, 0.9); }
}
#reelCabinet .cell.win .symbol { animation: symbol-pop 0.5s ease-in-out infinite alternate; }
@keyframes symbol-pop { from { transform: scale(1); } to { transform: scale(1.13); } }

/* angler wild */
#reelCabinet .cell.angler-cell {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.3), transparent 60%),
    linear-gradient(180deg, #1f6b4a, #123a28);
  border-color: #4bbf8c;
  box-shadow: 0 0 14px rgba(75, 191, 140, 0.55), inset 0 0 10px rgba(75, 191, 140, 0.4);
}
#reelCabinet .cell.collecting {
  border-color: var(--lake-gold);
  animation: collecting 0.7s ease-in-out;
}
@keyframes collecting {
  0%, 100% { box-shadow: 0 0 0 2px var(--lake-gold), 0 0 10px rgba(255, 207, 92, 0.6); }
  50%      { box-shadow: 0 0 0 3px var(--lake-gold), 0 0 26px 6px rgba(255, 207, 92, 0.9); transform: scale(1.06); }
}

/* money fish */
#reelCabinet .cell.fish-cell {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.24), transparent 60%),
    linear-gradient(180deg, #14506b, #0a2c3e);
  border-color: var(--lake-gold);
}
.fish-value {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1;
  padding: 3px 2px;
  border-radius: 6px;
  color: #1a1206;
  background: linear-gradient(160deg, var(--lake-gold), #d99a2b);
  box-shadow: 0 0 8px rgba(255, 207, 92, 0.7);
  font-variant-numeric: tabular-nums;
}

.cell.spinning .symbol { animation: reel-spin-blur 0.12s linear infinite; }
@keyframes reel-spin-blur {
  0%   { transform: translateY(-38%); filter: blur(2px); opacity: 0.6; }
  50%  { transform: translateY(0); filter: blur(0.5px); opacity: 1; }
  100% { transform: translateY(38%); filter: blur(2px); opacity: 0.6; }
}

@keyframes flash { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.6); } }
.win-flash { animation: flash 0.3s ease-in-out 3; }

/* ---------- Paylines ---------- */

.payline-overlay { pointer-events: none; }
.payline-overlay polyline {
  stroke: var(--lake);
  fill: none;
  stroke-width: 4;
  opacity: 0;
  filter: drop-shadow(0 0 4px var(--lake));
}
.payline-overlay polyline.show {
  opacity: 0.95;
  animation: dash-move 0.5s linear infinite, line-glow-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes dash-move { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes line-glow-pulse {
  from { filter: drop-shadow(0 0 4px var(--lake)); }
  to   { filter: drop-shadow(0 0 12px var(--lake)); }
}

#reelCabinet .message { color: #d9edf5; }
