/* SocialPlay Casino — dark lounge, gold, and a little neon. */

:root {
  --bg: #07060f;
  --ink: #f6f1e7;
  --muted: #b3a8c4;
  --gold: #e8c872;
  --gold-2: #f8e7b0;
  --line: rgba(232, 200, 114, 0.28);
  --cyan: #67e8f9;
  --violet: #c4b5fd;
  --font: "Avenir Next", "Segoe UI", sans-serif;
  --display: Didot, "Iowan Old Style", Palatino, Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  scroll-padding-bottom: 140px;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: calc(124px + env(safe-area-inset-bottom));
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(109, 40, 217, 0.38), transparent 58%),
    radial-gradient(820px 480px at 110% 0%, rgba(14, 116, 144, 0.28), transparent 52%),
    radial-gradient(700px 420px at 50% 115%, rgba(180, 130, 40, 0.14), transparent 46%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

p, ul, h1, h2, h3 { margin: 0; }

button, input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 40;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--gold);
  color: #2a1c06;
  text-decoration: none;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.booting .balance-chip strong,
.booting .balance-figure {
  visibility: hidden;
}

/* Header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(7, 6, 15, 0.78);
  border-bottom: 1px solid rgba(232, 200, 114, 0.16);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #3a2808;
  background: radial-gradient(circle at 35% 30%, #fff6d4, #e8c872 42%, #b8862d);
  box-shadow: 0 0 18px rgba(232, 200, 114, 0.45);
  font-family: var(--display);
  font-size: 1.25rem;
}

.brand-name {
  font-family: var(--display);
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  letter-spacing: 0.01em;
}

.brand-name em {
  font-style: normal;
  color: var(--gold);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
}

.balance-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(232, 200, 114, 0.45);
  background: rgba(232, 200, 114, 0.08);
  box-shadow: 0 0 24px rgba(232, 200, 114, 0.08);
}

.balance-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.balance-label,
.dock-label,
.game-kicker,
.card-label,
.eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
}

.balance-label { color: var(--muted); }

.balance-chip strong,
.balance-figure {
  font-variant-numeric: tabular-nums;
  color: var(--gold-2);
}

.balance-chip strong { font-size: 1.25rem; }

.coin {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8dc, #f0d78c 35%, #c8962e 70%, #8a6416);
  box-shadow: 0 0 12px rgba(232, 200, 114, 0.7), inset 0 0 0 2px rgba(255, 236, 180, 0.45);
}

.coin::after {
  content: "S";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 14px;
  color: rgba(80, 50, 10, 0.85);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }

.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-gold {
  color: #2a1c06;
  background: linear-gradient(180deg, #f8e7b0, #d4a853 48%, #a97820);
  box-shadow: 0 8px 24px rgba(212, 168, 83, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn-sub {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(42, 28, 6, 0.14);
  font-size: 0.75rem;
}

#bonus-btn {
  min-width: 168px;
  white-space: nowrap;
}

.btn-small { min-height: 40px; padding: 0 14px; }

.btn-neon {
  color: var(--gold-2);
  background: rgba(232, 200, 114, 0.04);
  border-color: rgba(232, 200, 114, 0.7);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.22);
}

.btn-neon:hover:not(:disabled) {
  background: rgba(232, 200, 114, 0.12);
  box-shadow: 0 0 28px rgba(232, 200, 114, 0.32);
}

.btn-higher,
.btn-lower { width: 100%; }

.btn-higher {
  color: #e7fbff;
  border-color: rgba(103, 232, 249, 0.55);
  background: rgba(103, 232, 249, 0.08);
  box-shadow: 0 0 20px rgba(103, 232, 249, 0.15);
}

.btn-lower {
  color: #f3e8ff;
  border-color: rgba(196, 181, 253, 0.65);
  background: rgba(167, 139, 250, 0.1);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.18);
}

.btn-higher:hover:not(:disabled) { background: rgba(103, 232, 249, 0.18); }

.btn-lower:hover:not(:disabled) { background: rgba(167, 139, 250, 0.22); }

.nudge { animation: nudge 1.6s ease-in-out infinite; }

@keyframes nudge {
  0%, 100% { box-shadow: 0 0 0 rgba(232, 200, 114, 0.2); }
  50% { box-shadow: 0 0 22px rgba(232, 200, 114, 0.75); }
}

/* Broke banner */

.broke-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(232, 200, 114, 0.45);
  background: rgba(232, 200, 114, 0.1);
}

.broke-banner p { color: var(--gold-2); }

.noscript {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* Hero */

.hero { padding: 52px 0 20px; }

.eyebrow { margin-bottom: 12px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
}

h1 { font-size: clamp(2.7rem, 6vw, 4.8rem); }

h1 span {
  display: block;
  margin-top: 6px;
  color: var(--gold-2);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 span {
    background: linear-gradient(100deg, #f8e7b0, #e8c872 40%, #c4b5fd 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }

h3 { font-size: 1.85rem; }

.lede {
  max-width: 40rem;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.08rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(232, 200, 114, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.facts strong {
  display: block;
  font-family: var(--display);
  color: var(--gold-2);
  font-size: 1.45rem;
}

.facts span { color: var(--muted); font-size: 0.92rem; }

.demo-note {
  margin-top: 16px;
  color: #ddd0f5;
  font-size: 0.95rem;
}

.hero-cta { margin-top: 22px; }

/* Tables */

.tables { padding: 28px 0 12px; }

#games { scroll-margin-top: 96px; }

.section-head { margin-bottom: 22px; }

.section-head p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 38rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.game-card {
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(12, 10, 24, 0.82);
  border: 1px solid rgba(232, 200, 114, 0.22);
  box-shadow:
    0 0 0 1px rgba(196, 181, 253, 0.05),
    0 22px 50px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(109, 40, 217, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(232, 200, 114, 0.38),
    0 26px 60px rgba(0, 0, 0, 0.42),
    0 0 48px rgba(167, 139, 250, 0.16);
}

.game-kicker { margin-bottom: 8px; }

.rules {
  margin-top: 8px;
  color: var(--muted);
}

/* Slots */

.machine {
  margin: 18px 0;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(232, 200, 114, 0.16), transparent 46%),
    linear-gradient(180deg, #16132a, #0c0a14);
  box-shadow: inset 0 0 0 1px rgba(232, 200, 114, 0.22), inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.machine.is-spinning { animation: machineGlow 0.45s ease-in-out infinite alternate; }

.machine.jackpot {
  animation: jackpotGlow 0.7s ease-in-out 2;
  box-shadow:
    inset 0 0 0 1px rgba(232, 200, 114, 0.9),
    0 0 36px rgba(232, 200, 114, 0.42);
}

.reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reels::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 200, 114, 0.75), transparent);
  pointer-events: none;
}

.reel {
  height: 108px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, #221c3d, #100e1c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 -16px 24px rgba(0, 0, 0, 0.4);
  user-select: none;
}

.reel-symbol {
  font-size: 52px;
  line-height: 1;
}

.reel.shuffling .reel-symbol { animation: shuffle 0.09s linear infinite; }

.reel.landed .reel-symbol { animation: land 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.15); }

.reel.match {
  box-shadow:
    inset 0 0 0 1px rgba(232, 200, 114, 0.85),
    0 0 22px rgba(232, 200, 114, 0.4);
}

.reel.match .reel-symbol { filter: drop-shadow(0 0 10px rgba(232, 200, 114, 0.8)); }

@keyframes shuffle {
  0% { transform: translateY(-46%); opacity: 0.35; filter: blur(1.4px); }
  100% { transform: translateY(46%); opacity: 1; filter: blur(0); }
}

@keyframes land {
  0% { transform: translateY(-16px) scale(1.06); filter: blur(2px); }
  100% { transform: none; filter: blur(0); }
}

@keyframes machineGlow {
  from { box-shadow: inset 0 0 0 1px rgba(232, 200, 114, 0.25), 0 0 12px rgba(103, 232, 249, 0.12); }
  to { box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.7), 0 0 28px rgba(167, 139, 250, 0.35); }
}

@keyframes jackpotGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

/* Bets and results */

.bet-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input {
  width: 140px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
}

.field input.invalid {
  border-color: #fb7185;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.25);
}

.shake { animation: shake 0.35s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.grow { flex: 1; }

.guess-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.result {
  min-height: 3.4em;
  margin-top: 16px;
}

.result strong {
  display: block;
  font-size: 1.05rem;
}

.result span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.result.show strong { animation: rise 0.35s ease; }

.result.win strong {
  color: var(--gold-2);
  text-shadow: 0 0 18px rgba(232, 200, 114, 0.45);
}

.result.lose strong { color: #f3c1d8; }

.result.warn strong { color: #f0d7a2; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* High / Low card */

.card-label {
  margin: 18px 0 10px;
  text-align: center;
  color: var(--muted);
}

.card-stage {
  display: grid;
  place-items: center;
  perspective: 800px;
  margin-bottom: 18px;
}

.playing-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 232px;
  border-radius: 16px;
  color: #1c140c;
  background: linear-gradient(165deg, #fffdf8, #f3e6c4);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.65);
  font-family: var(--display);
  user-select: none;
}

.playing-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid currentColor;
  border-radius: 10px;
  opacity: 0.35;
  pointer-events: none;
}

.playing-card.red { color: #b4233a; }

.playing-card.flipping { animation: cardFlip 0.42s ease; }

.playing-card.win-card {
  box-shadow:
    0 0 0 2px #e8c872,
    0 0 28px rgba(232, 200, 114, 0.55),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.playing-card.lose-card {
  box-shadow:
    0 0 0 2px rgba(243, 193, 216, 0.9),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.card-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-size: 1.2rem;
  z-index: 1;
}

.card-corner small { font-size: 0.9rem; }

.card-corner.tl { top: 16px; left: 16px; }

.card-corner.br {
  right: 16px;
  bottom: 16px;
  transform: rotate(180deg);
}

.card-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 1;
}

.suit-big {
  font-size: 68px;
  line-height: 0.9;
}

.card-value {
  font-family: var(--font);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

@keyframes cardFlip {
  0% { transform: rotateY(0); }
  45% { transform: rotateY(90deg); }
  100% { transform: rotateY(0); }
}

/* Sticky balance */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(8, 7, 16, 0.9);
  border-top: 1px solid rgba(232, 200, 114, 0.3);
}

.dock-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
}

.dock-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.balance-figure {
  display: inline-block;
  font-size: 1.65rem;
  padding: 0 2px;
  border-radius: 8px;
}

.dock-amount span,
.dock-note { color: var(--muted); }

.dock-note { font-size: 0.92rem; }

.pulse { animation: goldPulse 0.75s ease; }

@keyframes goldPulse {
  0% { box-shadow: 0 0 0 rgba(232, 200, 114, 0); filter: brightness(1); }
  40% { box-shadow: 0 0 28px rgba(232, 200, 114, 0.9); filter: brightness(1.28); }
  100% { box-shadow: 0 0 0 rgba(232, 200, 114, 0); filter: brightness(1); }
}

/* Toast */

.toast {
  position: fixed;
  top: var(--toast-top, 88px);
  left: 50%;
  z-index: 30;
  width: min(440px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(232, 200, 114, 0.4);
  background: rgba(20, 16, 36, 0.95);
  color: var(--gold-2);
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 860px) {
  .game-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar-inner { align-items: stretch; }
  .topbar-actions {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  #bonus-btn {
    min-width: 0;
    flex: 1 1 auto;
  }
  .balance-chip { flex: 0 0 auto; }
  .balance-label { display: none; }
}

@media (max-width: 420px) {
  .btn-sub { display: none; }
  #bonus-btn { padding: 0 12px; font-size: 0.92rem; }
}

@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; }
  .broke-banner { flex-direction: column; align-items: stretch; }
  .bet-form { flex-direction: column; align-items: stretch; }
  .field input,
  .grow { width: 100%; }
  .guess-row { width: 100%; min-width: 0; }
  .dock-label {
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
  .dock-note {
    max-width: 7.5rem;
    text-align: right;
    font-size: 0.75rem;
    line-height: 1.35;
  }
  .balance-figure { font-size: 1.4rem; }
  .playing-card { width: 148px; height: 208px; }
  .suit-big { font-size: 58px; }
  .hero { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
