/* ===== Design tokens ===== */
:root {
  --bg: #0b0b10;
  --bg-2: #12121a;
  --panel: #15151f;
  --panel-2: #1c1c28;
  --line: #2c2a3a;
  --text: #f3ecd9;
  --muted: #b3aa94;
  --gold: #d4af37;
  --gold-hi: #f6dc84;
  --gold-lo: #8a6420;
  --green: #22a85a;
  --red: #e5384a;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, #2a2240 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, #1d1608 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
body:has(dialog[open]), body:has(.gate:not([hidden])) { overflow: hidden; }
html.age-ok .gate { display: none; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 .8em; }
a { color: var(--gold-hi); }
kbd { font: inherit; font-size: .85em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--panel-2); }
code { font-size: .88em; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: min(1100px, 100% - 24px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.noscript { background: var(--red); color: #fff; padding: 14px; text-align: center; font-weight: 700; position: relative; z-index: 1000; }

/* ===== Buttons ===== */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  padding: 12px 20px; border-radius: 999px; min-height: 46px; line-height: 1.2;
  transition: transform .12s ease, filter .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-gold { color: #1b1200; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #b58a1d); box-shadow: 0 4px 0 var(--gold-lo), 0 8px 20px rgba(212,175,55,.25); }
.btn-green { color: #04170c; background: linear-gradient(180deg, #7bf0a8, var(--green)); box-shadow: 0 4px 0 #14673a; }
.btn-ghost { color: var(--text); background: transparent; border: 1px solid var(--line); }
.btn-outline { color: var(--gold-hi); background: transparent; border: 2px solid var(--gold); }
.link-btn { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--gold-hi); text-decoration: underline; cursor: pointer; text-align: left; }
.link-btn:hover { color: #fff; }

/* ===== Age gate ===== */
.gate {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(800px 500px at 50% 20%, #2d2347 0%, #07070b 70%), #07070b;
  overflow: auto;
}
.gate-card {
  width: min(520px, 100%); text-align: center; padding: 32px 26px 24px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 2px solid var(--gold); border-radius: 20px;
  box-shadow: 0 0 0 6px rgba(212,175,55,.12), 0 30px 80px rgba(0,0,0,.7);
}
.gate-badge {
  width: 84px; height: 84px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 50%; font: 800 32px var(--font-display); color: #1b1200;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, #a97b1c);
  box-shadow: 0 0 0 5px #0b0b10, 0 0 0 7px var(--gold);
}
.gate h2 { font: 700 28px var(--font-display); color: var(--gold-hi); margin-bottom: 6px; }
.gate-game { color: var(--muted); font-size: .95rem; margin-bottom: 18px; overflow-wrap: anywhere; }
.gate-text { font-size: 1.08rem; font-weight: 600; margin-bottom: 22px; }
.gate-actions { display: grid; gap: 10px; }
.gate-actions .btn-gold { font-size: 1.05rem; padding-block: 15px; }
.gate-fine { margin: 18px 0 0; font-size: .8rem; color: var(--muted); }

/* ===== Header ===== */
.site-header { background: rgba(11,11,16,.92); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.site-header::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-icon { width: 40px; height: 40px; flex: none; }
.brand-text { min-width: 0; }
.brand-name { font: 700 clamp(1.05rem, 2.6vw, 1.5rem) var(--font-display); letter-spacing: .04em; color: var(--gold-hi); text-transform: uppercase; overflow-wrap: anywhere; }
.brand-tag { margin: 0; font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.header-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.pill-age { background: var(--red); color: #fff; }
.pill-free { background: rgba(34,168,90,.18); color: #7bf0a8; border: 1px solid rgba(34,168,90,.5); }
.session { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; padding: 0 4px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; min-height: 38px;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
#btn-sound .ico-off { display: none; }
#btn-sound[aria-pressed="true"] .ico-on { display: none; }
#btn-sound[aria-pressed="true"] .ico-off { display: block; }

/* ===== Disclaimer bar ===== */
.disclaimer {
  display: flex; align-items: center; gap: 12px; margin: 12px 0;
  background: linear-gradient(180deg, #ffe58a, #f5c542); color: #1a1200;
  border: 2px solid #fff3c0; border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 0 0 1px #8a6420, 0 8px 24px rgba(245,197,66,.25);
}
.disclaimer p { margin: 0; font-size: clamp(.78rem, 1.5vw, .92rem); line-height: 1.4; font-weight: 500; }
.disclaimer strong { font-weight: 900; letter-spacing: .02em; }
.disclaimer-badge { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #1a1200; color: #ffe58a; font-weight: 900; font-size: .9rem; }

/* ===== Game ===== */
.game { position: relative; display: flex; justify-content: center; margin-bottom: 28px; }
.machine {
  --reel-w: min(100%, 720px, max(300px, calc((100svh - 400px) * 1.6667)));
  width: min(100%, 780px);
  padding: 14px 14px 16px; border-radius: 22px;
  background: linear-gradient(180deg, #1f1b2e, #14121d);
  border: 1px solid #3a3350;
  box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
}
.reels-frame {
  width: var(--reel-w); margin-inline: auto; padding: 7px; border-radius: 18px;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 30%, var(--gold-lo) 55%, var(--gold) 80%, var(--gold-hi));
  box-shadow: 0 0 40px rgba(212,175,55,.2);
}
.reels-stage { position: relative; aspect-ratio: 5 / 3; border-radius: 12px; overflow: hidden; background: #07070c; }
.reels { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: radial-gradient(circle at 50% 40%, #232036, #0a0a12 75%); }
.reel { position: relative; overflow: hidden; border-left: 1px solid rgba(212,175,55,.25); }
.reel:first-child { border-left: 0; }
.reel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.45), transparent 22%, transparent 78%, rgba(0,0,0,.45)); z-index: 2; }
.strip { display: flex; flex-direction: column; width: 100%; height: 100%; will-change: transform; }
.reel.spinning .strip { filter: blur(1.6px); }
.cell { flex: 1 1 0; min-height: 0; display: grid; place-items: center; padding: 9%; transition: opacity .25s ease; }
.sym { width: 100%; height: 100%; display: block; overflow: visible; }
.reels.has-win .cell:not(.win) { opacity: .4; }
.cell.win { position: relative; z-index: 1; background: radial-gradient(circle, rgba(246,220,132,.38), transparent 70%); animation: cellPulse .9s ease-in-out infinite; }
.cell.win .sym { transform: scale(1.08); }
@keyframes cellPulse { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35) drop-shadow(0 0 6px rgba(246,220,132,.9)); } }

.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.lines polyline { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px currentColor); }
.lines circle { vector-effect: non-scaling-stroke; }

.win-msg { text-align: center; min-height: 1.6em; margin: 12px 0 8px; font-weight: 700; color: var(--gold-hi); font-size: clamp(.9rem, 2.4vw, 1.05rem); }

.refill { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 4px 0 12px; padding: 12px 16px; background: rgba(34,168,90,.12); border: 1px dashed rgba(34,168,90,.7); border-radius: 12px; text-align: center; }
.refill p { margin: 0; font-size: .92rem; }

.ui { display: grid; gap: 12px; }
.hud { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 8px 10px; background: #0c0b14; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.stat-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat-value { font: 700 clamp(1.15rem, 3.6vw, 1.7rem) var(--font-display); color: var(--gold-hi); font-variant-numeric: tabular-nums; line-height: 1.2; text-align: center; }
.stat-value small { font: 600 .7rem var(--font); color: var(--muted); letter-spacing: .05em; }
.stat-win .stat-value { color: #7bf0a8; }
.stat-win.flash { animation: statFlash .8s ease 2; }
@keyframes statFlash { 50% { border-color: #7bf0a8; box-shadow: 0 0 18px rgba(123,240,168,.5); } }

.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.bet { display: flex; align-items: center; gap: 8px; justify-self: start; }
.bet-display { display: flex; flex-direction: column; align-items: center; min-width: 110px; }
.bet-value { font: 700 1.5rem var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.bet-sub { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.step {
  appearance: none; cursor: pointer; width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; line-height: 1; font-weight: 700;
  color: var(--gold-hi); background: var(--panel-2); border: 2px solid var(--gold);
}
.step:hover:not(:disabled) { background: #2a2540; }
.step:disabled { opacity: .35; cursor: not-allowed; }
.max { justify-self: end; }
.spin {
  appearance: none; cursor: pointer; width: 120px; height: 120px; border-radius: 50%; border: 0; font: 900 1.35rem var(--font); letter-spacing: .08em;
  color: #1b1200; background: radial-gradient(circle at 35% 25%, #fff3b8, var(--gold) 50%, #a77a17);
  box-shadow: 0 7px 0 var(--gold-lo), 0 14px 28px rgba(212,175,55,.35), inset 0 -4px 10px rgba(0,0,0,.2);
  transition: transform .1s ease, box-shadow .1s ease, filter .15s ease;
}
.spin:hover:not(:disabled) { filter: brightness(1.08); }
.spin:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 var(--gold-lo), 0 6px 14px rgba(212,175,55,.3); }
.spin:disabled { opacity: .5; cursor: not-allowed; }
.spin.is-spinning { background: radial-gradient(circle at 35% 25%, #ffd1d6, var(--red) 55%, #8d1020); color: #fff; box-shadow: 0 7px 0 #6a0b18, 0 14px 28px rgba(229,56,74,.35); }
.hint { margin: 0; text-align: center; font-size: .78rem; color: var(--muted); }

/* Big win overlay */
.bigwin { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .3s ease; background: radial-gradient(circle, rgba(0,0,0,.55), rgba(0,0,0,.2) 70%); }
.bigwin.show { opacity: 1; }
.bigwin-inner { text-align: center; transform: scale(.7); }
.bigwin.show .bigwin-inner { animation: pop .6s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes pop { to { transform: scale(1); } }
.bigwin-title { font: 900 clamp(1.8rem, 8vw, 3.6rem) var(--font-display); letter-spacing: .06em; background: linear-gradient(180deg, #fff6c9, var(--gold) 60%, #a97b1c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #5a3d08) drop-shadow(0 0 18px rgba(246,220,132,.6)); }
.bigwin-amount { font: 800 clamp(1.2rem, 5vw, 2.1rem) var(--font-display); color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px #000; }
.bigwin-amount small { font: 600 .45em var(--font); color: var(--gold-hi); }
.coins { position: absolute; inset: 0; overflow: hidden; }
.coin { position: absolute; top: -12%; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b8, var(--gold) 55%, #8a6420); border: 2px solid #8a6420; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(130svh) rotate(540deg); } }

/* Break lock */
.lock { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(7,7,11,.9); backdrop-filter: blur(4px); border-radius: 22px; }
.lock-card { text-align: center; max-width: 420px; padding: 24px; background: var(--panel); border: 2px solid var(--gold); border-radius: 16px; }
.lock-card h2 { font: 700 1.5rem var(--font-display); color: var(--gold-hi); margin-bottom: 8px; }
.lock-count { font: 800 2.2rem var(--font-display); font-variant-numeric: tabular-nums; margin: 6px 0 14px; }

/* ===== Info sections ===== */
.info { margin-bottom: 28px; }
.info > h2 { font: 700 clamp(1.3rem, 3vw, 1.8rem) var(--font-display); color: var(--gold-hi); margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h3 { font-size: 1.05rem; color: var(--gold-hi); margin-bottom: 6px; }
.card p { margin: 0; color: #d8d0bb; font-size: .95rem; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: outside; }
.faq details[open] summary { color: var(--gold-hi); }
.faq details p { color: #d8d0bb; padding-bottom: 6px; }

/* ===== Footer ===== */
.site-footer { background: #07070b; border-top: 1px solid var(--line); padding: 28px 0 32px; font-size: .9rem; color: #cfc7b2; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1.2fr .9fr; gap: 28px; }
.footer-col h2 { font: 700 1rem var(--font-display); color: var(--gold-hi); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.footer-col p { font-size: .85rem; }
.imprint { margin: 0; display: grid; gap: 8px; }
.imprint dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.imprint dd { margin: 0; overflow-wrap: anywhere; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.copyright { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .8rem; }

/* ===== Dialogs ===== */
dialog {
  width: min(760px, calc(100% - 24px)); max-height: calc(100svh - 24px); padding: 0; margin: auto; overflow: hidden;
  color: var(--text); background: var(--panel); border: 2px solid var(--gold); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.7);
}
dialog::backdrop { background: rgba(3,3,6,.8); backdrop-filter: blur(2px); }
.dlg { display: flex; flex-direction: column; max-height: calc(100svh - 28px); }
.dlg-small { max-width: 460px; }
dialog:has(.dlg-small) { width: min(460px, calc(100% - 24px)); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-bottom: 1px solid var(--line); }
.dlg-head h2 { font: 700 1.3rem var(--font-display); color: var(--gold-hi); }
.dlg-x { appearance: none; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.dlg-x:hover { border-color: var(--gold); color: var(--gold-hi); }
.dlg-body { padding: 16px 18px 20px; overflow: auto; overscroll-behavior: contain; }
.dlg-body h3 { font-size: 1.05rem; color: var(--gold-hi); margin: 18px 0 6px; }
.dlg-body ul { padding-left: 1.2em; margin: 0 0 .8em; }
.dlg-body li { margin-bottom: 4px; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.legal p, .legal li { font-size: .95rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; }
.paytable { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; min-width: 520px; }
.paytable th, .paytable td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.paytable th { background: var(--panel-2); color: var(--gold-hi); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.paytable td:nth-child(2) { text-align: left; font-weight: 600; }
.paytable tr:last-child td { border-bottom: 0; }
.paytable svg { width: 38px; height: 38px; display: block; margin: 0 auto; }
.paylines-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.payline { text-align: center; font-size: .7rem; color: var(--muted); }
.payline svg { width: 100%; height: auto; background: #0a0a12; border: 1px solid var(--line); border-radius: 6px; }

.tools { display: grid; gap: 12px; margin-top: 8px; }
.tool { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tool label, .tool-title { display: block; font-weight: 700; margin-bottom: 6px; }
.tool p { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
select { font: inherit; color: var(--text); background: #0c0b14; border: 1px solid var(--gold); border-radius: 10px; padding: 9px 12px; min-height: 42px; width: 100%; max-width: 320px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { padding: 8px 16px; min-height: 40px; }
.rg-status { min-height: 1.4em; margin-top: 10px; color: #7bf0a8; font-weight: 600; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
  .brand-tag { display: none; }
  .header-tools { width: 100%; justify-content: space-between; }
  .header-tools .pill-free { display: none; }
  .icon-btn { padding: 7px 10px; font-size: .8rem; }
  .session-label { display: none; }
  .header-tools { gap: 6px; flex-wrap: nowrap; }
  #btn-sound span { display: none; }
  .machine { padding: 10px 8px 14px; border-radius: 18px; }
  .reels-frame { padding: 5px; border-radius: 14px; }
  .disclaimer { padding: 9px 10px; gap: 10px; margin-top: 8px; }
  .disclaimer-badge { width: 34px; height: 34px; font-size: .78rem; }
  .controls { grid-template-columns: 1fr 1fr; grid-template-areas: "spin spin" "bet max"; }
  .spin { grid-area: spin; width: 100%; height: 64px; border-radius: 999px; font-size: 1.25rem; justify-self: stretch; margin-bottom: 8px; }
  .bet { grid-area: bet; }
  .max { grid-area: max; }
  .bet-display { min-width: 84px; }
  .lock { border-radius: 18px; }
}
@media (max-width: 380px) {
  .session { display: none; }
  .bet-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
