@import url('https://fonts.googleapis.com/css2?family=Anton&family=Barlow+Condensed:wght@400;700&family=Inter:wght@400;600&display=swap');

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

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #0a1628;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

header {
  text-align: center;
  width: 100%;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

h1 {
  font-family: 'Anton', sans-serif;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  margin: 0.25rem 0;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 1.5rem;
}

.slot-machine {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.reel {
  width: 80px;
  height: 80px;
  background: white;
  color: black;
  font-size: 2.8rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(1,56,147,0.4), 0 8px 20px rgba(0,0,0,0.4);
}

/* ── Reel animations ── */
@keyframes reelSpin {
  0%   { transform: scaleY(1) translateY(0); filter: blur(0px); }
  25%  { transform: scaleY(0.8) translateY(-6px); filter: blur(1px); }
  50%  { transform: scaleY(1.05) translateY(2px); filter: blur(0px); }
  75%  { transform: scaleY(0.9) translateY(-3px); filter: blur(0.5px); }
  100% { transform: scaleY(1) translateY(0); filter: blur(0px); }
}

@keyframes reelLand {
  0%   { transform: scale(1.35) translateY(-10px); }
  40%  { transform: scale(0.84) translateY(5px); }
  65%  { transform: scale(1.12) translateY(-3px); }
  82%  { transform: scale(0.96); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes flashWin {
  0%, 100% { box-shadow: 0 0 0 3px rgba(1,56,147,0.4), 0 8px 20px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(255,215,0,0.8), 0 8px 28px rgba(255,215,0,0.4); }
}

.reel.spinning {
  animation: reelSpin 0.18s ease-in-out infinite;
  opacity: 0.85;
}

.reel.landing {
  animation: reelLand 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ── Buttons ── */
.button, .spin-btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 2.5rem;
  background: #013893;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(1, 56, 147, 0.4);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.button:hover, .spin-btn:hover { background: #0047ab; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(1,56,147,0.5); }
.button:active, .spin-btn:active { transform: translateY(0); }
.spin-btn:disabled { background: #334; opacity: 0.6; transform: none; cursor: not-allowed; box-shadow: none; }

.back {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.back:hover { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }

/* ── Bet section ── */
.bet-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.bet-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

.bet-buttons {
  display: flex;
  gap: 8px;
}

.bet-btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.bet-btn:hover { border-color: rgba(255,255,255,0.35); color: white; background: rgba(255,255,255,0.12); }
.bet-btn.active {
  background: #013893;
  border-color: #013893;
  color: white;
  box-shadow: 0 4px 12px rgba(1,56,147,0.5);
}

/* ── Message ── */
#message {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.03em;
  max-width: 320px;
  min-height: 2.5rem;
  line-height: 1.35;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  transition: background 0.3s;
}
#message.jackpot  { color: #FFD700; text-shadow: 0 0 20px rgba(255,215,0,0.6); animation: flashWin 0.6s ease infinite; }
#message.triple   { color: #7ecfff; }
#message.pair     { color: #6ee892; }
#message.loss     { color: #ff8888; }
#message.skull    { color: #e53e3e; text-shadow: 0 0 14px rgba(229,62,62,0.6); }

/* ── Paytable ── */
.paytable {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 1rem 1rem 0.75rem;
  margin-top: 0.5rem;
}

.paytable h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 0.75rem;
  text-align: center;
}

.paytable table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.paytable thead th {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 0 0.5rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.paytable tbody tr { border-bottom: 1px solid rgba(255,255,255,0.05); }
.paytable tbody tr:last-child { border-bottom: none; }

.paytable td {
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
  line-height: 1.3;
}
.paytable td:first-child { font-size: 1.15rem; white-space: nowrap; }
.paytable td:nth-child(2) { color: rgba(255,255,255,0.55); letter-spacing: 0.04em; white-space: nowrap; }
.paytable td:last-child { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.paytable td strong { color: white; }

.row-jackpot td { color: #FFD700; }
.row-jackpot td:last-child { color: #FFD700; }
.row-jackpot td strong { color: #FFD700; }

.row-skull td:nth-child(2) { color: #fc8181; }
.row-skull td:last-child { color: #fc8181; }
.row-skull td strong { color: #fc8181; }

.row-pair td:nth-child(2) { color: rgba(255,255,255,0.45); }

/* ── Footer ── */
footer {
  margin-top: auto;
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  padding: 1rem 0;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin: 0;
}
