:root {
  --void: #0a0510;
  --deep: #12081a;
  --glow: #ff2d6a;
  --gold: #ffc14d;
  --gold-dim: #c98a2e;
  --mint: #3dffce;
  --cream: #f4efe6;
  --glass: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 193, 77, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--void);
  color: var(--cream);
  -webkit-tap-highlight-color: transparent;
}

body {
  padding: 10px 14px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  background:
    radial-gradient(ellipse 100% 70% at 50% -20%, rgba(255, 45, 106, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(61, 255, 206, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse 70% 40% at 0% 80%, rgba(255, 193, 77, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--deep) 0%, var(--void) 100%);
}

body.is-spinning .reels-frame {
  box-shadow:
    0 0 0 1px rgba(255, 45, 106, 0.35),
    0 0 28px rgba(255, 45, 106, 0.2),
    inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.app {
  max-width: 400px;
  margin: 0 auto;
}

.brand {
  text-align: center;
  margin-bottom: 14px;
}

.brand-badge {
  display: inline-block;
  font-family: "Bungee", cursive;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  color: var(--mint);
  text-shadow: 0 0 12px rgba(61, 255, 206, 0.5);
  margin-bottom: 2px;
}

.brand h1 {
  font-family: "Bungee", cursive;
  font-size: 1.45rem;
  line-height: 1.15;
  margin: 0;
  background: linear-gradient(135deg, var(--cream) 0%, var(--gold) 55%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.brand p {
  margin: 6px 0 0;
  font-size: 0.82rem;
  opacity: 0.78;
  line-height: 1.35;
  font-weight: 500;
}

.stage {
  position: relative;
  padding: 16px 12px 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--glass) 0%, rgba(0, 0, 0, 0.25) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.squirrel-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.squirrel {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.squirrel.spinning {
  animation: sq 0.28s ease-in-out infinite;
}

@keyframes sq {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg) scale(1);
  }
  50% {
    transform: translateY(-5px) rotate(4deg) scale(1.03);
  }
}

.reels-shell {
  position: relative;
  padding: 3px;
  border-radius: 18px;
  background: linear-gradient(180deg, #3a2a4a 0%, #1a1024 50%, #0d0814 100%);
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.reels-frame {
  position: relative;
  padding: 10px 8px;
  border-radius: 15px;
  background: linear-gradient(180deg, #0f0a14 0%, #050308 100%);
  border: 2px solid var(--stroke);
  transition: box-shadow 0.2s ease;
}

.reels-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  pointer-events: none;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.85);
}

.payline {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: var(--cell, 60px);
  margin-top: calc(var(--cell, 60px) / -2);
  border-radius: 10px;
  border: 2px solid rgba(255, 45, 106, 0.55);
  background: linear-gradient(
    90deg,
    rgba(255, 45, 106, 0.06) 0%,
    rgba(61, 255, 206, 0.1) 50%,
    rgba(255, 45, 106, 0.06) 100%
  );
  pointer-events: none;
  z-index: 4;
  animation: linePulse 2.2s ease-in-out infinite;
}

@keyframes linePulse {
  0%,
  100% {
    opacity: 0.85;
    box-shadow: 0 0 12px rgba(255, 45, 106, 0.25);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(61, 255, 206, 0.2);
  }
}

.reels {
  --cell: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  position: relative;
  z-index: 2;
}

.reel-col {
  position: relative;
  height: calc(var(--cell) * 3);
  overflow: hidden;
  border-radius: 11px;
  background: #060308;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.reel-col::before,
.reel-col::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
  height: 22%;
}

.reel-col::before {
  top: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
}

.reel-col::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
}

.reel-strip {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.reel-strip.is-animating {
  filter: blur(3px) brightness(1.12);
}

.cell {
  height: var(--cell);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.cell .sym {
  width: 42px;
  height: 42px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.controls {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.btn-spin {
  font-family: "Bungee", cursive;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 16px 20px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  color: #1a0a12;
  background: linear-gradient(180deg, #fff0a8 0%, var(--gold) 40%, var(--gold-dim) 100%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.25),
    0 6px 0 #7a5218,
    0 12px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.06s ease, box-shadow 0.06s ease, filter 0.15s ease;
}

.btn-spin:hover {
  filter: brightness(1.05);
}

.btn-spin:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.2),
    0 2px 0 #7a5218,
    0 6px 16px rgba(0, 0, 0, 0.4);
}

.btn-spin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.status-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
}

.status {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 193, 77, 0.35);
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status.sub {
  margin-top: 4px;
  min-height: auto;
  font-weight: 600;
  font-size: 0.8rem;
  opacity: 0.82;
  color: var(--cream);
}

.paytable-wrap {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.paytable-wrap summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mint);
}

.paytable-wrap summary::-webkit-details-marker {
  display: none;
}

.paytable-wrap[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#paytable {
  margin: 0;
  padding: 8px 12px 12px;
  list-style: none;
  font-size: 0.76rem;
}

#paytable li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#paytable li:last-child {
  border-bottom: none;
}

.pt-name {
  font-weight: 700;
  color: var(--cream);
}

.pt-meta {
  opacity: 0.75;
  white-space: nowrap;
  color: var(--gold);
}

.footer-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 0.68rem;
  opacity: 0.45;
  line-height: 1.45;
}
