/* Sweeply 777 Logo Color System
   Palette matched to the uploaded logo:
   deep navy background, aqua/teal logo text, emerald clover, gold 777/coins, red dice accents.
*/
:root {
  --lobby-header-offset: 92px;
  --bg: #020b1d;
  --panel: rgba(3, 14, 32, .74);
  --panel-strong: rgba(5, 20, 44, .94);
  --cyan: #13d8cf;
  --teal: #12c8b7;
  --pink: #ef2d30;
  --gold: #ffd43b;
  --orange: #ff8c1a;
  --green: #10d86a;
  --red: #ff2e32;
  --blue: #24dfff;
  --purple: #193e75;
  --text: #f8ffff;
  --muted: #a9c2c9;
  --border: rgba(32, 223, 220, .18);
  --shadow: 0 28px 80px rgba(0, 0, 0, .62);
}


/* Festival Theme System - Two Working Themes
   Change theme from the dropdown or set it manually:
   <html data-theme="christmas"> / <html data-theme="halloween">
*/
:root,
html[data-theme="default"] {
  --theme-bg-a: #063f4f;
  --theme-bg-b: #0a6f55;
  --theme-bg-c: #020817;
  --theme-bg-d: #031327;
  --theme-bg-e: #030b18;
  --cyan: #13d8cf;
  --teal: #12c8b7;
  --pink: #ef2d30;
  --gold: #ffd43b;
  --orange: #ff8c1a;
  --green: #10d86a;
  --red: #ff2e32;
  --blue: #24dfff;
  --theme-symbol: "✦";
  --theme-symbol-2: "◆";
  --theme-symbol-3: "777";
  --theme-float-opacity: .14;
}

html[data-theme="christmas"] {
    --theme-bg-a: #0c5f46;
    --theme-bg-b: #7a0617;
    --theme-bg-c: #020807;
    --theme-bg-d: #071f18;
    --theme-bg-e: #100207;
    --cyan: #9fffe0;
    --pink: #ff3b58;
    --gold: #ffe082;
    --green: #22ff88;
    --theme-symbol: "❄";
    --theme-symbol-2: "🎄";
    --theme-symbol-3: "✦";
    --theme-float-opacity: .20;
}

html[data-theme="halloween"] {
  --theme-bg-a: #33105c;
  --theme-bg-b: #8a3b00;
  --theme-bg-c: #07020d;
  --theme-bg-d: #17051f;
  --theme-bg-e: #160900;
  --cyan: #b86bff;
  --pink: #ff7a00;
  --gold: #ffd166;
  --orange: #ff7a00;
  --green: #72ff3f;
  --theme-symbol: "☾";
  --theme-symbol-2: "🎃";
  --theme-symbol-3: "✕";
  --theme-float-opacity: .22;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 20% 10%, var(--theme-bg-a) 0, transparent 35%), radial-gradient(circle at 80% 20%, var(--theme-bg-b) 0, transparent 32%), linear-gradient(135deg, var(--theme-bg-c), var(--theme-bg-d) 48%, var(--theme-bg-e));
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  z-index: 1;
}

.aurora {
  position: fixed;
  width: 44vw;
  height: 44vw;
  border-radius: 999px;
  filter: blur(70px);
  opacity: .35;
  pointer-events: none;
  animation: floatAurora 10s ease-in-out infinite alternate;
  z-index: 0;
}
.aurora-one { left: -12vw; top: 6vh; background: var(--cyan); }
.aurora-two { right: -16vw; bottom: -6vh; background: var(--pink); animation-delay: -4s; }

@keyframes floatAurora {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(8vw, -4vh, 0) scale(1.15); }
}

/* Login */
.login-screen { display: grid; place-items: center; }
.login-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.login-stage:before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(600px) rotateX(62deg) translateY(22vh);
  transform-origin: bottom;
  animation: gridMove 12s linear infinite;
  opacity: .34;
}
@keyframes gridMove { to { background-position: 0 560px, 560px 0; } }

.login-shell { position: relative; width: min(440px, 94vw); }
.brand-badge { text-align: center; margin-bottom: 22px; animation: fadeUp .7s ease both; }
.brand-badge h1, .logo-mark {
  margin: 0;
  font-family: "Bebas Neue", Inter, sans-serif;
  letter-spacing: 1px;
  font-size: 60px;
  line-height: .86;
  text-decoration: none;
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(19,216,207,.62), 0 0 42px rgba(16,216,106,.28);
}
.brand-badge h1, .logo-mark span {
  background: linear-gradient(180deg, #24fff0 0%, var(--cyan) 45%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-badge h1 strong, .logo-mark strong {
  display: block;
  color: var(--gold);
  background: linear-gradient(180deg, #fff6a8 0%, var(--gold) 46%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 72px;
  text-shadow: 0 0 26px rgba(255,212,59,.58), 0 0 42px rgba(16,216,106,.32);
}
.brand-badge p { margin: 8px 0 0; color: var(--muted); }
.mini-chip {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  box-shadow: 0 0 28px rgba(255,43,214,.35);
}

.neon-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(22px);
}
.login-card { border-radius: 34px; padding: 30px; animation: fadeUp .7s .1s ease both; }
.card-glow {
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, transparent, var(--cyan), transparent, var(--pink), transparent, var(--gold), transparent);
  opacity: .55;
  filter: blur(18px);
  animation: spin 8s linear infinite;
  z-index: -1;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.login-title { text-align: center; }
.login-title p { margin: 0 0 6px; color: var(--cyan); font-size: 13px; text-transform: uppercase; letter-spacing: 2px; font-weight: 900; }
.login-title h2 { margin: 0; font-size: 30px; }
.pulse-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(45,255,114,.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(45,255,114,0); } 100% { box-shadow: 0 0 0 0 rgba(45,255,114,0); } }
.pin-window {
  margin: 24px 0;
  height: 64px;
  border-radius: 22px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: inset 0 0 30px rgba(0,0,0,.26);
}
.pin-window span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.32);
  transition: .2s;
}
.pin-window span.filled { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 18px rgba(255,209,102,.75); transform: scale(1.12); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.keypad button {
  min-height: 68px;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 12px 24px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.keypad button:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(9,251,211,.18), inset 0 1px 0 rgba(255,255,255,.28); }
.keypad button:active { transform: translateY(1px) scale(.98); }
.keypad .danger { background: linear-gradient(135deg, var(--red), #d50f48); }
.keypad .success { background: linear-gradient(135deg, var(--green), #00b857); color: #04140a; }
.helper-text { min-height: 22px; margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.helper-text.error { color: #ff8fab; }
.helper-text.ok { color: var(--green); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-5px); } }

.theme-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(19,216,207,.12), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(255,212,59,.1), transparent 18%),
    rgba(2, 8, 23, .82);
  backdrop-filter: blur(18px);
}
.theme-modal.hidden { display: none !important; }
.theme-modal--sheet {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
  background: rgba(2, 8, 23, .22);
  backdrop-filter: blur(3px);
}
.theme-modal--sheet .theme-modal__panel {
  width: min(520px, calc(100vw - 40px));
  height: min(82vh, 820px);
  max-height: min(82vh, 820px);
  transform: translate3d(0, 48px, 0) scale(.97);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}
.theme-modal--sheet.is-open .theme-modal__panel {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}
.theme-modal__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(88vh, 920px);
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(22px);
}
.theme-modal__panel--compact { width: min(760px, 100%); }
.theme-modal__panel--settings {
  border-radius: 30px;
  border: 1px solid var(--border);
  background: rgba(4, 12, 22, .98);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.16);
}
.theme-modal__panel--settings::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transform: translateX(-50%);
  pointer-events: none;
}
.theme-modal__panel--settings::before {
  opacity: 0;
  animation: none;
}
.theme-modal__panel::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, transparent, var(--cyan), transparent, var(--pink), transparent, var(--gold), transparent);
  opacity: .5;
  filter: blur(18px);
  animation: spin 8s linear infinite;
  z-index: -1;
  pointer-events: none;
}
.theme-modal__panel::after {
  content: "777 777 777";
  position: absolute;
  right: -24px;
  bottom: -26px;
  font-family: "Bebas Neue", Inter, sans-serif;
  font-size: clamp(70px, 8vw, 140px);
  letter-spacing: 12px;
  color: rgba(255,255,255,.04);
  pointer-events: none;
}
.theme-modal__shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: min(88vh, 920px);
  padding: 30px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 84% 18%, rgba(255,209,102,.28), transparent 22%),
    radial-gradient(circle at 12% 88%, rgba(9,251,211,.18), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  overflow: hidden;
}
.theme-modal__shell--settings {
  display: flex;
  flex-direction: column;
  gap: 13px;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding: 34px 18px 18px;
  background: linear-gradient(135deg, rgba(8, 26, 35, .98), rgba(3, 11, 20, .98));
}
.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 42px;
  margin-bottom: 0;
}
.settings-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #f5f6ef;
  line-height: 1;
}
.theme-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: transform .18s ease, color .18s ease;
}
.theme-modal__close:hover {
  transform: translateY(-2px);
  color: #ffd43b;
}
.theme-modal__close span {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.theme-modal__eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  box-shadow: 0 0 28px rgba(255,43,214,.35);
}
.theme-modal__header h2 {
  margin: 12px 0 8px;
  font-family: "Bebas Neue", Inter, sans-serif;
  font-size: clamp(38px, 5vw, 64px);
  line-height: .88;
  letter-spacing: 1px;
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(19,216,207,.38), 0 0 42px rgba(16,216,106,.18);
}
.theme-modal__header p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.7;
}
.theme-modal__body {
  overflow-y: auto;
  padding: 22px;
  border-radius: 24px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 0 30px rgba(0,0,0,.26);
}
.theme-modal__body::-webkit-scrollbar { width: 10px; }
.theme-modal__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--gold));
}
.theme-legal-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}
.theme-legal-copy strong { color: #fff; }
.theme-legal-note {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.theme-legal-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.theme-legal-list li {
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.1);
}
.theme-legal-list li p {
  margin: 8px 0 0;
  color: var(--muted);
}
.theme-legal-sublist {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.theme-legal-sublist li + li { margin-top: 6px; }
.theme-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.theme-btn:hover { transform: translateY(-2px); }
.theme-btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #160900;
  box-shadow: 0 14px 28px rgba(255,138,0,.22);
}
.theme-btn--green {
  background: linear-gradient(135deg, var(--green), #00b857);
  color: #04140a;
  box-shadow: 0 14px 28px rgba(16,216,106,.2);
}
.theme-btn--full {
  width: 100%;
  justify-content: center;
}
.theme-credit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.theme-credit-option {
  cursor: pointer;
}
.theme-credit-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.theme-credit-pill {
  display: block;
  padding: 18px 18px;
  border-radius: 22px;
  text-align: center;
  font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 12px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.theme-credit-option:hover .theme-credit-pill {
  transform: translateY(-4px);
  border-color: rgba(9,251,211,.45);
  box-shadow: 0 18px 36px rgba(9,251,211,.16), inset 0 1px 0 rgba(255,255,255,.24);
}
.theme-credit-option input:checked + .theme-credit-pill {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #150700;
  border-color: rgba(255,212,59,.8);
  box-shadow: 0 18px 36px rgba(255,138,0,.24);
}
.theme-credit-footnote {
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.floating-chip, .floating-card {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
  animation: bob 3s ease-in-out infinite alternate;
  pointer-events: none;
}
.floating-chip { width: 70px; height: 70px; background: radial-gradient(circle, var(--gold), var(--orange)); color: #2b1200; box-shadow: 0 20px 40px rgba(255,138,0,.26); }
.chip-a { left: -50px; top: 215px; }
.chip-b { right: -42px; bottom: 110px; animation-delay: -1.3s; }
.floating-card { width: 52px; height: 72px; border-radius: 12px; background: #fff; color: #12051f; box-shadow: 0 20px 40px rgba(0,0,0,.25); transform: rotate(-12deg); }
.floating-card.card-b { right: -24px; top: 112px; color: #ca1645; transform: rotate(15deg); animation-delay: -.8s; }
@keyframes bob { to { transform: translateY(-18px) rotate(8deg); } }

/* Lobby */
.lobby-screen { background-color: var(--bg); }
.lobby-header {
  position: sticky;
  top: 0;
  z-index: 9;
  height: 92px;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  background: rgba(7, 3, 20, .72);
  border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}
.logo-mark { font-size: 38px; text-align: center; line-height: .82; }
.logo-mark strong { font-size: 46px; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.header-balance-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(5,10,16,.92), rgba(12,24,22,.76));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.user-pill__icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd35a, #ffb62d);
  color: #6b4300;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(255,182,45,.18);
}
.user-pill__name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
}
.wallet-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.wallet-pill span { color: rgba(255,255,255,.78); font-size: 14px; }
.wallet-pill strong { color: #fff; font-size: 18px; }
.wallet-pill.blue { background: linear-gradient(135deg, rgba(75,123,255,.86), rgba(31,56,155,.72)); }
.wallet-pill.bronze { background: linear-gradient(135deg, rgba(255,138,0,.72), rgba(126,60,6,.72)); }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.icon-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(9,251,211,.4);
  background: rgba(255,255,255,.14);
  box-shadow: 0 14px 28px rgba(9,251,211,.14);
}
.right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  width: 100%;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  overflow: hidden;
  margin-bottom: 0;
  flex-shrink: 0;
  z-index: 3;
  box-shadow: 0 14px 24px rgba(0, 0, 0, .24);
}
.settings-tab {
  min-width: 0;
  padding: 13px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,.84);
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  min-height: 52px;
}
.settings-tab.active {
  color: #07140f;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 12px 24px color-mix(in srgb, var(--cyan) 24%, transparent);
}
.settings-tab span:first-child {
  font-size: 18px;
  line-height: 1;
}
.settings-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.settings-panel.active {
  display: flex;
  flex-direction: column;
}
.settings-panel--profile {
  overflow: hidden;
  padding-right: 0;
}
.settings-form,
.settings-transactions {
  border-radius: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.settings-profile-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0 0 2px;
}
.settings-avatar {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #160900;
  font-size: 31px;
  font-weight: 900;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent), 0 8px 20px color-mix(in srgb, var(--orange) 18%, transparent);
}
.settings-profile-name {
  text-align: center;
}
.settings-profile-name strong {
  display: block;
  font-size: 21px;
  color: #fbfbf2;
  line-height: 1.1;
}
.settings-profile-name span {
  color: rgba(255,255,255,.58);
  font-size: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 8px;
}
.settings-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-field--full { grid-column: 1 / -1; }
.settings-field span {
  color: rgba(255,255,255,.8);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.settings-field input {
  width: 100%;
  min-height: 43px;
  border-radius: 14px;
  border: 1px solid rgba(19,216,207,.24);
  background: rgba(2, 8, 15, .82);
  color: #fff;
  padding: 0 14px;
  outline: 0;
  font-size: 14px;
}
.settings-field input::placeholder {
  color: rgba(248,255,255,.62);
}
.settings-field input:focus {
  border-color: color-mix(in srgb, var(--cyan) 70%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 18%, transparent);
}
.settings-field input.is-invalid {
  border-color: rgba(255,46,50,.74);
  box-shadow: 0 0 0 3px rgba(255,46,50,.1);
}
.settings-error {
  min-height: 0;
  color: #ff8fab;
  font-size: 11px;
}
.settings-form__footer {
  margin-top: 9px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.settings-status,
.settings-transactions__status {
  margin: 0;
  color: rgba(255,255,255,.6);
  line-height: 1.3;
  font-size: 12px;
  text-align: center;
}
.settings-support-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #160900;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.settings-support-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--orange) 22%, transparent);
}
.settings-support-btn:disabled {
  opacity: .7;
  cursor: wait;
}
.settings-transactions {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 12px;
  min-height: 0;
}
.settings-transaction-list {
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.settings-transaction {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.12);
}
.settings-transaction__icon {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
}
.settings-transaction__icon--credit {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #04140a;
}
.settings-transaction__icon--debit {
  background: linear-gradient(135deg, var(--red), var(--orange));
}
.settings-transaction__body strong {
  display: block;
  color: #fbfff4;
  font-size: 18px;
  margin-bottom: 3px;
}
.settings-transaction__body span,
.settings-transaction__body small {
  display: block;
  color: rgba(255,255,255,.7);
}
.settings-transaction__body small {
  margin-top: 4px;
}
.settings-transaction__bonus {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 48%, transparent);
  color: #ffe08a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.settings-transaction__bonus--negative {
  background: color-mix(in srgb, var(--red) 16%, transparent);
  border-color: color-mix(in srgb, var(--red) 42%, transparent);
  color: #ffb0a5;
}
.settings-transaction__amount {
  text-align: right;
}
.settings-transaction__amount strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
}
.settings-transaction__amount span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
}
.settings-transaction__amount--credit strong,
.settings-transaction__amount--credit span {
  color: #2ed470;
}
.settings-transaction__amount--debit strong {
  color: #ff6f6f;
}
.settings-transaction__amount--debit span {
  color: #f0c15d;
}
.settings-table__empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(255,255,255,.56);
  padding: 26px 16px;
  border-radius: 18px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.12);
}

.lobby-wrap { position: relative; z-index: 2; width: min(1440px, 94vw); margin: 0 auto; padding: 42px 0 70px; }
.hero-lobby {
  position: relative;
  overflow: hidden;
  border-radius: 38px;
  padding: 56px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background:
    radial-gradient(circle at 82% 20%, rgba(255,209,102,.38), transparent 22%),
    radial-gradient(circle at 12% 88%, rgba(9,251,211,.24), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.035));
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero-lobby:after {
  content: "777 777 777 777 777";
  position: absolute;
  left: -30px;
  right: -30px;
  bottom: -32px;
  font-family: "Bebas Neue";
  font-size: clamp(74px, 11vw, 180px);
  letter-spacing: 18px;
  color: rgba(255,255,255,.045);
  white-space: nowrap;
  animation: marquee 16s linear infinite;
}
@keyframes marquee { to { transform: translateX(-240px); } }
.section-kicker { color: var(--cyan); text-transform: uppercase; letter-spacing: 3px; font-weight: 900; font-size: 13px; }
.hero-copy { max-width: 650px; position: relative; z-index: 2; }
.hero-copy h1 { margin: 12px 0; font-size: clamp(42px, 6vw, 78px); line-height: .95; letter-spacing: 0; }
.hero-copy p { max-width: 620px; color: var(--muted); line-height: 1.6; font-size: 17px; }
.hero-copy p + p { margin-top: 6px; }
.jackpot-card {
  position: relative;
  z-index: 2;
  min-width: min(360px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.16);
  text-align: center;
}
.jackpot-card span, .jackpot-card small { display: block; color: var(--muted); }
.jackpot-card strong {
  display: block;
  margin: 10px 0;
  color: var(--gold);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(255,209,102,.45);
}

.game-toolbar { margin: 32px 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.search-wrap {
  flex: 1 1 390px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  scroll-margin-top: calc(var(--lobby-header-offset) + 18px);
}
.search-wrap:focus-within {
  border-color: rgba(19,216,207,.48);
  box-shadow: 0 0 0 1px rgba(19,216,207,.22), 0 16px 32px rgba(0,0,0,.18);
}
.search-wrap span { font-size: 26px; color: var(--cyan); }
.search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: 16px; }
.search-wrap input::placeholder { color: rgba(255,255,255,.48); }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs button {
  border: 0;
  border-radius: 999px;
  padding: 15px 22px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.tabs button.active { color: #07140f; background: linear-gradient(135deg, var(--cyan), var(--green)); box-shadow: 0 0 24px rgba(19,216,207,.32); }

.games-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.game-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 370px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 50px rgba(0,0,0,.36);
  transform-style: preserve-3d;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: cardIn .55s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.game-card:hover { transform: translateY(-10px) rotateX(3deg); border-color: rgba(9,251,211,.45); box-shadow: 0 26px 70px rgba(9,251,211,.12); }
.game-art {
  height: 255px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.game-art:before {
  content: "";
  position: absolute;
  inset: -35%;
  background: conic-gradient(from 0deg, rgba(255,255,255,.2), transparent 18%, rgba(255,255,255,.16), transparent 42%, rgba(255,255,255,.2));
  animation: spin 8s linear infinite;
}
.game-art span {
  position: relative;
  z-index: 2;
  font-family: "Bebas Neue";
  font-size: 92px;
  color: #fff;
  text-shadow: 0 8px 0 rgba(0,0,0,.2), 0 0 30px rgba(255,255,255,.45);
}
.art-1 { background: radial-gradient(circle, #ffcf33, #f94144 58%, #520008); }
.art-2 { background: radial-gradient(circle, #ffff6b, #ff7b00 55%, #5e0808); }
.art-3 { background: radial-gradient(circle, #ff5ed1, #ff2f6d 52%, #48002e); }
.art-4 { background: radial-gradient(circle, #9bf6ff, #2563eb 58%, #0b174c); }
.art-5 { background: radial-gradient(circle, #ffd166, #7c3aed 58%, #13072e); }
.art-6 { background: radial-gradient(circle, #2dff72, #06b6d4 54%, #06283d); }
.art-7 { background: radial-gradient(circle, #ffe066, #fb8500 56%, #4b2500); }
.art-8 { background: radial-gradient(circle, #ffafcc, #ff4d00 56%, #2b0500); }
.game-info { padding: 22px; }
.game-info h3 {
  margin: 0 0 6px;
  font-size: 21px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-info p { margin: 0 0 18px; color: var(--muted); }
.game-info button {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #1a0900;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(255,138,0,.22);
}
.game-card.hidden { display: none; }

@media (max-width: 1250px) {
    .games-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hero-lobby { align-items: flex-start; flex-direction: column; }
    .game-art {
        height: 235px;
    }
}
@media (max-width: 1050px) {
  .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-art { height: 260px; }
}
@media (max-width: 820px) {
  .main-container {
    padding-top: var(--lobby-header-offset);
  }

  .lobby-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: 104px;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 20px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    justify-items: stretch;
    gap: 12px;
    align-items: center;
    overflow: visible;
  }
  .logo-mark {
    order: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    margin: 0 auto;
    padding: 0;
  }
  .logo-mark img {
    height: 58px;
  }
  .user-pill {
    order: 1;
    width: fit-content;
    max-width: 100%;
    padding: 7px 12px 7px 7px;
    justify-content: flex-start;
    margin: 0;
    align-self: center;
    cursor: pointer;
  }
  .user-pill__name {
    max-width: 120px;
    font-size: 14px;
  }
  .header-actions {
    order: 3;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    min-width: 0;
  }
  .header-balance-group {
    width: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
  }
  .wallet-pill {
    justify-content: flex-start;
    padding: 0;
    gap: 0;
    border: 0;
    box-shadow: none;
    background: transparent !important;
    border-radius: 0;
  }
  .wallet-pill span {
    min-width: 66px;
    color: rgba(255,255,255,.76);
    font-size: 14px;
    font-weight: 800;
  }
  .wallet-pill strong {
    font-size: 20px;
    line-height: 1;
  }
  #profileActionsMenu {
    position: absolute !important;
    top: calc(50% + 24px) !important;
    left: 24px !important;
    right: auto !important;
    width: auto !important;
    z-index: 12;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(7, 12, 20, .94);
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 18px 40px rgba(0,0,0,.32);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(.96);
    transition: opacity .18s ease, transform .18s ease;
  }
  #profileActionsMenu.is-visible,
  .lobby-header.profile-actions-open #profileActionsMenu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  .icon-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    font-size: 22px;
  }
  .hero-lobby { padding: 34px 22px; border-radius: 28px; }
  .games-grid { gap: 16px; }
  .game-art { height: 230px; }
  .game-card { min-height: 320px; border-radius: 22px; }
  .floating-chip, .floating-card { display: none; }
}
@media (max-width: 550px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .game-card {
    min-height: 0;
    border-radius: 20px;
  }
  .game-art {
    height: 185px;
  }
}
@media (max-width: 520px) {
  .login-stage { padding: 24px 12px; }
  .login-shell { width: min(440px, 100%); }
  .brand-badge h1 { font-size: 46px; }
  .brand-badge h1 strong { font-size: 58px; }
  .login-card { padding: 22px; border-radius: 26px; }
  .keypad { gap: 10px; }
  .keypad button { min-height: 58px; border-radius: 18px; }
  .lobby-header {
    position: fixed;
    height: auto;
    min-height: 98px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 12px 16px;
    gap: 8px;
  }
  .logo-mark { padding: 0; }
  .logo-mark img { height: 42px; }
  .user-pill {
    gap: 7px;
    padding: 5px 9px 5px 5px;
  }
  .user-pill__icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  .user-pill__name {
    max-width: 86px;
    font-size: 13px;
  }
  .wallet-pill span {
    min-width: 50px;
    font-size: 12px;
  }
  .wallet-pill strong { font-size: 16px; }
  .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
  .right-controls { gap: 7px; }
  .search-wrap {
    height: 56px;
    scroll-margin-top: calc(var(--lobby-header-offset) + 14px);
  }
  .lobby-wrap { padding: 20px 0 56px; }
  .hero-lobby {
    min-height: 0;
    padding: 26px 18px;
    gap: 18px;
    border-radius: 24px;
  }
  .hero-copy h1 {
    margin: 8px 0;
    font-size: clamp(32px, 9vw, 42px);
    line-height: .96;
  }
  .hero-copy p { font-size: 15px; }
  .jackpot-card {
    min-width: 0;
    padding: 20px 18px;
    border-radius: 22px;
  }
  .jackpot-card strong { font-size: clamp(22px, 7vw, 28px); }
  .game-toolbar { margin: 22px 0 18px; }
  .games-grid {
    gap: 12px;
  }
  .game-card {
    min-height: 0;
    border-radius: 18px;
  }
  .game-art {
    height: 170px;
  }
  .game-info {
    padding: 14px;
  }
  .game-info h3 {
    font-size: 15px;
  }
  .game-info p {
    margin-bottom: 12px;
    font-size: 12px;
  }
  .game-info button {
    height: 42px;
    border-radius: 14px;
    font-size: 13px;
  }
  .wallet-pill, .user-pill { justify-content: center; }
  .header-actions { width: 100%; }
  .right-controls { width: 100%; justify-content: center; }
  .lobby-header #profileActionsMenu {
    width: auto !important;
    left: 16px !important;
    top: calc(50% + 20px) !important;
    gap: 6px;
    padding: 7px;
    justify-content: center;
  }
  .user-pill__name { max-width: 100%; }
  .lobby-header .user-pill__name { max-width: 86px; }
  body.search-focus-active .lobby-header {
    background: rgba(4, 10, 18, .94);
  }
  .theme-modal { padding: 14px; }
  .theme-modal__shell { padding: 22px 18px 18px; gap: 18px; }
  .theme-modal__body { padding: 16px; }
  .theme-credit-grid { grid-template-columns: 1fr; }
  .theme-btn { width: 100%; }
  .theme-modal--sheet {
    align-items: flex-end;
    justify-content: stretch;
    padding: 10px;
  }
  .theme-modal--sheet .theme-modal__panel {
    width: 100%;
    max-height: 88vh;
  }
  .theme-modal__panel::after {
    right: -8px;
    bottom: -16px;
    font-size: 56px;
    letter-spacing: 8px;
  }
  .settings-field--full {
    grid-column: auto;
  }
  .settings-transaction {
    grid-template-columns: auto 1fr;
  }
  .settings-transaction__amount {
    grid-column: 2;
    text-align: left;
  }
}


/* Decorative festival particles */
.festival-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  opacity: var(--theme-float-opacity);
}
.festival-layer:before,
.festival-layer:after {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: -100%;
  color: #fff;
  font-size: 28px;
  letter-spacing: 72px;
  line-height: 92px;
  text-shadow: 0 0 18px currentColor;
  white-space: pre-wrap;
  animation: festivalFall 22s linear infinite;
}
.festival-layer:before {
  content: var(--theme-symbol) "  " var(--theme-symbol-2) "  " var(--theme-symbol-3) "  " var(--theme-symbol) "  " var(--theme-symbol-2) "\A" var(--theme-symbol-3) "  " var(--theme-symbol) "  " var(--theme-symbol-2) "  " var(--theme-symbol) "  " var(--theme-symbol-3) "\A" var(--theme-symbol-2) "  " var(--theme-symbol-3) "  " var(--theme-symbol) "  " var(--theme-symbol-2) "  " var(--theme-symbol);
}
.festival-layer:after {
  content: var(--theme-symbol-2) "  " var(--theme-symbol) "  " var(--theme-symbol-3) "  " var(--theme-symbol-2) "  " var(--theme-symbol) "\A" var(--theme-symbol) "  " var(--theme-symbol-3) "  " var(--theme-symbol-2) "  " var(--theme-symbol) "  " var(--theme-symbol-3) "\A" var(--theme-symbol-3) "  " var(--theme-symbol-2) "  " var(--theme-symbol) "  " var(--theme-symbol-3) "  " var(--theme-symbol-2);
  animation-duration: 30s;
  animation-delay: -10s;
  transform: translateX(46px);
}
@keyframes festivalFall {
  from { transform: translate3d(-4vw, -15%, 0) rotate(0deg); }
  to { transform: translate3d(4vw, 120%, 0) rotate(10deg); }
}

.theme-switcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(7, 3, 20, .72);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 48px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter: blur(16px);
}
.theme-switcher label {
  color: rgba(255,255,255,.74);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.theme-switcher select {
  border: 0;
  outline: 0;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 9px 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
}
.theme-switcher select option { color: #111; }

@media (max-width: 520px) {
  .theme-switcher { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
  .festival-layer:before,
  .festival-layer:after {
    font-size: 22px;
    letter-spacing: 38px;
    line-height: 76px;
  }
  .festival-layer:after { transform: translateX(12px); }
}
