@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Geist", "Plus Jakarta Sans", system-ui, sans-serif;
  --ink: #f5f0df;
  --muted: #a7b8ad;
  --gold: #d6aa4c;
  --gold-bright: #f1cf79;
  --green-950: #03130f;
  --green-900: #061c16;
  --green-800: #0b2d22;
  --green-700: #14543e;
  --panel: rgba(8, 36, 28, .9);
  --line: rgba(239, 207, 121, .2);
  --danger: #e96b68;
  --success: #69c692;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --radius: 18px;
  color-scheme: dark;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--green-950); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 50% -20%, #17513e 0, var(--green-900) 44%, var(--green-950) 100%); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: #fff0b8; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.025em; }
h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: .92; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1; }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow { color: var(--gold); font-size: .73rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(18px, 4vw, 60px); border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(3,19,15,.75); backdrop-filter: blur(18px); position: relative; z-index: 20; }
/* brand rules moved below */
.compact-brand span { min-width: 38px; height: 38px; }
.text-link { font-size: .88rem; font-weight: 600; }
.primary-button, .secondary-button, .ghost-button, .google-button, .icon-button {
  min-height: 44px; border-radius: 999px; border: 1px solid transparent; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.primary-button { color: #102016; background: linear-gradient(145deg, var(--gold-bright), #c89031); box-shadow: 0 8px 26px rgba(214,170,76,.18); }
.secondary-button { background: rgba(214,170,76,.09); color: var(--gold-bright); border-color: rgba(214,170,76,.45); }
.ghost-button { background: rgba(255,255,255,.04); color: var(--ink); border-color: rgba(255,255,255,.13); }
.icon-button { min-width: 42px; min-height: 42px; padding: 0; border-color: rgba(255,255,255,.15); background: rgba(0,0,0,.16); }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover, .google-button:hover, .icon-button:hover { transform: translateY(-1px); }
button:disabled { opacity: .42; cursor: not-allowed; transform: none !important; }
.wide { width: 100%; }
label { display: grid; gap: 8px; margin: 0 0 16px; color: #d7ded9; font-size: .82rem; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 47px; border: 1px solid rgba(255,255,255,.13); border-radius: 11px; background: rgba(0,0,0,.2); padding: 11px 13px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,170,76,.12); }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 18px; height: 18px; accent-color: var(--gold); }
input[type="range"] { padding: 0; accent-color: var(--gold); }
.form-grid { display: grid; gap: 0 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-note, .privacy-note { color: var(--muted); font-size: .78rem; line-height: 1.55; }
.alert { padding: 13px 15px; border-radius: 10px; margin: 14px 0; font-size: .84rem; line-height: 1.5; }
.alert.error { background: rgba(186,54,54,.15); border: 1px solid rgba(233,107,104,.35); color: #ffb6b3; }
.alert.success { background: rgba(59,165,101,.15); border: 1px solid rgba(105,198,146,.35); }
dialog { border: 0; padding: 0; color: var(--ink); background: transparent; max-width: calc(100vw - 24px); }
dialog::backdrop { background: rgba(0,10,7,.72); backdrop-filter: blur(9px); }
.dialog-card { position: relative; width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 800px); overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(155deg, #10392c, #061b15); padding: clamp(24px, 5vw, 42px); box-shadow: var(--shadow); }
.dialog-close { position: absolute; top: 13px; right: 13px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.06); font-size: 1.4rem; }
.toast-stack { position: fixed; right: 16px; bottom: 18px; z-index: 100; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(4,25,19,.96); box-shadow: var(--shadow); animation: toast-in .25s ease; }
.toast.error { border-color: rgba(233,107,104,.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 16px; }
.section-title h2 { margin: 0; }
.skeleton { min-height: 120px; border-radius: var(--radius); background: linear-gradient(100deg, rgba(255,255,255,.03), rgba(255,255,255,.08), rgba(255,255,255,.03)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 680px) {
  .topbar { min-height: 62px; padding: 10px 14px; }
  .brand { letter-spacing: .12em; }
  .brand span { min-width: 38px; height: 38px; }
  .domain-brand { font-size: .76rem; letter-spacing: .025em; }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; }
  .dialog-card { width: 100%; max-width: 100%; max-height: 88dvh; border-radius: 22px 22px 0 0; padding: 28px 20px max(24px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

/* Brand logo */
.brand { color: var(--ink); font-size: .82rem; font-weight: 800; letter-spacing: .045em; display: inline-flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 11px;
  object-fit: cover; display: block;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
  border: 1px solid rgba(232,201,106,.28);
}
.brand-text { letter-spacing: .04em; text-transform: lowercase; white-space: nowrap; }
.domain-brand { gap: 8px; letter-spacing: .045em; text-transform: lowercase; white-space: nowrap; }
.domain-brand span, .domain-brand .brand-text { font-size: .95rem; font-weight: 700; text-transform: lowercase; }
/* Legacy circle mark fallback if used without logo */
.brand > span:not(.brand-text) { display: grid; place-items: center; min-width: 42px; height: 42px; border: 1px solid var(--gold); color: var(--gold-bright); border-radius: 50%; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0; }

/* Select / dropdown contrast fix */
select {
  color: #f3efe6 !important;
  background-color: rgba(6, 22, 16, .92) !important;
  background-image: linear-gradient(45deg, transparent 50%, #d6aa4c 50%), linear-gradient(135deg, #d6aa4c 50%, transparent 50%) !important;
  background-position: calc(100% - 16px) calc(50% + 2px), calc(100% - 11px) calc(50% + 2px) !important;
  background-size: 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  padding-right: 34px !important;
}
select option,
select optgroup {
  background-color: #10261c !important;
  color: #f5f0e6 !important;
}
select:focus {
  border-color: var(--gold);
  color: #fff !important;
}
select:disabled {
  opacity: .65;
  color: #c7d3cc !important;
}

/* Google button — official look */
.google-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff !important;
  color: #1f1f1f !important;
  border: 1px solid #dadce0 !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.google-button:hover {
  background: #f7f8f8 !important;
  color: #1f1f1f !important;
  border-color: #c6c6c6 !important;
}
.google-logo {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
}
.google-btn-text {
  color: #1f1f1f !important;
  font-size: .95rem;
  font-weight: 600;
}
.google-mark { display: none; }

@media (max-width: 720px) {
  .brand-logo { width: 36px; height: 36px; border-radius: 9px; }
  .domain-brand .brand-text { font-size: .82rem; }
}

/* Login and lobby — classic casino typography.
   Uses only system fonts so the UI stays CSP-safe and works offline. */
.auth-page,
.lobby-page {
  --font-body: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --font-display: Copperplate, "Copperplate Gothic Light", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-family: var(--font-body);
  letter-spacing: .012em;
  font-variant-numeric: lining-nums tabular-nums;
}

.auth-page h1,
.auth-page h2,
.auth-page h3,
.lobby-page h1,
.lobby-page h2,
.lobby-page h3,
.auth-page legend,
.lobby-page legend {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .022em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .7), 0 0 18px rgba(214, 170, 76, .12);
}

.auth-page .brand,
.auth-page .brand-text,
.lobby-page .brand,
.lobby-page .brand-text,
.auth-page .eyebrow,
.lobby-page .eyebrow,
.auth-page button,
.auth-page .primary-button,
.auth-page .secondary-button,
.auth-page .ghost-button,
.lobby-page button,
.lobby-page .primary-button,
.lobby-page .secondary-button,
.lobby-page .ghost-button {
  font-family: var(--font-display);
  letter-spacing: .045em;
}

.auth-page label,
.lobby-page label,
.auth-page input,
.auth-page select,
.auth-page textarea,
.lobby-page input,
.lobby-page select,
.lobby-page textarea {
  font-family: var(--font-body);
}

.auth-page .google-button,
.auth-page .google-btn-text {
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: .01em;
}

@media (max-width: 680px) {
  .auth-page h1,
  .lobby-page h1 {
    letter-spacing: .012em;
  }

  .auth-page button,
  .lobby-page button,
  .auth-page .brand,
  .lobby-page .brand {
    letter-spacing: .025em;
  }
}

