/* GameWeb — site design system (global, landing, lobby, rooms, fullscreen game shell). Game-specific rules live in style.css. */
:root {
  --bg: #07080f;
  --bg2: #0e1020;
  --panel: #12142a;
  --panel2: #181b36;
  --glass: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .16);
  --text: #f1f2ff;
  --muted: #9ba1c9;
  --accent: #7c5cff;
  --accent2: #ff5c8a;
  --accent3: #3ea6ff;
  --ok: #2fd4a7;
  --warn: #ffb02e;
  --danger: #ff5c6c;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --grad: linear-gradient(135deg, #7c5cff 0%, #c15cff 45%, #ff5c8a 100%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
  color: var(--text);
  line-height: 1.75;
  background:
    radial-gradient(900px 520px at 85% -8%, rgba(124, 92, 255, .28), transparent 60%),
    radial-gradient(700px 480px at 5% 12%, rgba(62, 166, 255, .14), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(255, 92, 138, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #7c5cff66; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #ffffff1c; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-track { background: transparent; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.hide { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 10px; z-index: 30; margin: 10px auto 0; width: min(1240px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 8px 16px;
  background: rgba(14, 16, 32, .66); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 6px 20px #7c5cff66; font-size: 1.05rem; }
#nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-link { padding: 7px 14px; border-radius: 12px; color: var(--muted); font-weight: 500; transition: .15s; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--glass); }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 5px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); transition: .15s; }
.user-chip:hover { border-color: var(--line2); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
  padding: 9px 18px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); color: var(--text);
  transition: transform .12s, border-color .15s, background .15s, box-shadow .15s, filter .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--line2); background: rgba(255, 255, 255, .08); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent3); outline-offset: 2px; }
.btn.primary { background: var(--grad); border: 0; font-weight: 700; box-shadow: 0 8px 24px rgba(124, 92, 255, .38); }
.btn.primary:hover { filter: brightness(1.1); box-shadow: 0 10px 30px rgba(193, 92, 255, .5); }
.btn.danger { background: rgba(255, 92, 108, .12); border-color: rgba(255, 92, 108, .4); color: #ffb4bd; }
.btn.ok { background: rgba(47, 212, 167, .12); border-color: rgba(47, 212, 167, .4); color: #8ff0d3; }
.btn.ghost { background: transparent; }
.btn.big { padding: 13px 30px; font-size: 1.05rem; border-radius: 15px; }
.btn.small { padding: 5px 13px; font-size: .85rem; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; box-shadow: none; }
input, select {
  width: 100%; padding: 11px 14px; border-radius: 13px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: border-color .15s, background .15s;
}
input:hover, select:hover { border-color: var(--line2); }
input:focus, select:focus { border-color: var(--accent); background: rgba(124, 92, 255, .08); }
select option { background: #151831; }
label { display: block; margin: 14px 0 5px; color: var(--muted); font-size: .88rem; }
.error { color: var(--danger); min-height: 1.5em; margin: 8px 0 0; font-size: .92rem; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; padding: 2px 10px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.playing { background: rgba(255, 176, 46, .12); border-color: rgba(255, 176, 46, .4); color: var(--warn); }
.tag.waiting { background: rgba(47, 212, 167, .1); border-color: rgba(47, 212, 167, .35); color: #8ff0d3; }
.ok-tag { background: rgba(47, 212, 167, .12); border-color: rgba(47, 212, 167, .4); color: #8ff0d3; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 15px; border-radius: 99px; background: rgba(124, 92, 255, .14); border: 1px solid rgba(124, 92, 255, .4); color: #cfc4ff; font-size: .85rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.avatar { --c: var(--accent); width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); box-shadow: 0 0 0 2px rgba(255, 255, 255, .12) inset; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.9rem; } .avatar.xs { width: 26px; height: 26px; font-size: .78rem; }
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.card h2, .card h3 { font-size: 1.08rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 16px 60px; }
.empty { text-align: center; padding: 34px 10px; color: var(--muted); }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 120; display: flex; background: rgba(4, 5, 12, .66); backdrop-filter: blur(8px); padding: 16px; animation: fade .2s; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.modal { margin: auto; width: 100%; max-width: 460px; background: linear-gradient(180deg, #181b38, #12142a); border-radius: 24px; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); position: relative; padding: 26px; }
.modal.wide { max-width: 860px; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.96); } }
.modal-x { position: absolute; top: 14px; inset-inline-end: 14px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; background: var(--glass); color: var(--muted); z-index: 2; }
.modal-x:hover { color: var(--text); border-color: var(--line2); }
#toasts { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 300; display: grid; gap: 8px; }
.toast { padding: 11px 18px; border-radius: 14px; background: rgba(20, 23, 44, .95); border: 1px solid var(--line2); box-shadow: var(--shadow); backdrop-filter: blur(10px); animation: pop .25s; }
.toast.err { border-color: var(--danger); }
.auth-modal { max-width: 430px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 40px 0 20px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.auth-tabs a { text-align: center; padding: 9px; border-radius: 11px; color: var(--muted); font-weight: 500; }
.auth-tabs a.on { background: var(--panel2); color: var(--text); font-weight: 700; box-shadow: 0 2px 10px #0006; }
.auth-title { margin: 0; font-size: 1.45rem; } .auth-sub { margin: 4px 0 0; }

/* ---------- landing ---------- */
.lp-container { max-width: 1160px; margin: 0 auto; padding: 0 20px; position: relative; }
.lp-hero { position: relative; overflow: hidden; padding: 70px 0 30px; }
.lp-glow { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.lp-glow.g1 { width: 520px; height: 520px; background: #7c5cff; top: -180px; inset-inline-start: -140px; }
.lp-glow.g2 { width: 460px; height: 460px; background: #ff5c8a; bottom: -160px; inset-inline-end: -120px; opacity: .3; animation-delay: -5s; }
.lp-glow.g3 { width: 380px; height: 380px; background: #3ea6ff; top: 30%; inset-inline-end: 30%; opacity: .16; animation-delay: -9s; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.1); } }
.lp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.lp-hero-copy h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); font-weight: 800; margin: 20px 0 16px; line-height: 1.22; letter-spacing: -.02em; }
.lp-hero-copy p { color: var(--muted); font-size: 1.12rem; max-width: 540px; margin: 0 0 28px; }
.lp-actions { flex-wrap: wrap; }
.lp-trust { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; padding: 0; margin: 24px 0 0; color: var(--muted); font-size: .92rem; }
.lp-hero-visual { position: relative; display: grid; place-items: center; justify-items: stretch; width: 100%; padding: 20px; min-height: 420px; }
.hv-stack { position: relative; width: min(100%, 440px); height: 400px; margin-inline: auto; }
.hv-card { position: absolute; width: 62%; aspect-ratio: 3 / 4; border-radius: 24px; display: grid; place-items: center; font-size: 4.5rem; box-shadow: 0 26px 70px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .22); background: linear-gradient(145deg, var(--c1), var(--c2)); overflow: hidden; animation: bob 7s ease-in-out infinite; }
.hv-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, .35), transparent 45%); }
.hv-card small { position: absolute; bottom: 14px; inset-inline: 0; text-align: center; font-size: .95rem; font-weight: 700; z-index: 1; text-shadow: 0 2px 8px #0008; }
.hv-card.a { inset-inline-start: 0; top: 40px; --r: -9deg; transform: rotate(-9deg); }
.hv-card.b { inset-inline-end: 0; top: 0; --r: 8deg; transform: rotate(8deg); animation-delay: -2.4s; }
.hv-card.c { inset-inline-start: 19%; bottom: 0; width: 56%; transform: rotate(-2deg); animation-delay: -4.6s; z-index: 2; }
@keyframes bob { 50% { translate: 0 -12px; } }
.hv-chip { white-space: nowrap; position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: rgba(14, 16, 32, .85); backdrop-filter: blur(10px); border: 1px solid var(--line2); font-size: .85rem; box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite; }
.hv-chip.one { top: 6%; inset-inline-start: -4%; } .hv-chip.two { bottom: 14%; inset-inline-end: -2%; animation-delay: -3s; }
.wave { display: inline-flex; align-items: center; gap: 2px; height: 16px; }
.wave u { width: 3px; height: 100%; background: var(--ok); border-radius: 2px; animation: wv 1s ease-in-out infinite; }
.wave u:nth-child(2) { animation-delay: .15s; } .wave u:nth-child(3) { animation-delay: .3s; } .wave u:nth-child(4) { animation-delay: .45s; }
@keyframes wv { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 52px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .03); backdrop-filter: blur(10px); overflow: hidden; }
.lp-stats div { text-align: center; padding: 20px 10px; }
.lp-stats div + div { border-inline-start: 1px solid var(--line); }
.lp-stats b { display: block; font-size: 2.1rem; line-height: 1.2; } .lp-stats span { color: var(--muted); font-size: .9rem; }
.lp-section { padding: 84px 0; }
.lp-section.alt { background: rgba(255, 255, 255, .02); border-block: 1px solid var(--line); }
.lp-head { text-align: center; margin-bottom: 44px; }
.lp-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); margin: 14px 0 8px; letter-spacing: -.02em; }
.lp-head p { color: var(--muted); margin: 0 auto; max-width: 560px; }
.lp-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.gc { position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s; }
.gc:hover { transform: translateY(-6px); border-color: var(--line2); box-shadow: 0 24px 50px rgba(0, 0, 0, .5); }
.gc-cover { position: relative; height: 130px; display: grid; place-items: center; font-size: 3.4rem; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.gc-cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .35), transparent 50%); }
.gc-cover span { position: relative; z-index: 1; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .4)); transition: transform .25s; }
.gc:hover .gc-cover span { transform: scale(1.14) rotate(-6deg); }
.gc-cat { position: absolute; z-index: 2; top: 10px; inset-inline-start: 10px; font-size: .72rem; padding: 2px 10px; border-radius: 99px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.gc-body { padding: 16px 18px 18px; display: grid; gap: 8px; flex: 1; align-content: start; }
.gc-body h3 { margin: 0; font-size: 1.12rem; } .gc-body p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.gc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.gc-actions { padding: 0 18px 18px; display: flex; gap: 8px; }
.gc-actions .btn { flex: 1; }
.lp-features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.lp-features .card { grid-column: span 2; padding: 26px; transition: transform .2s, border-color .2s; }
.lp-features .card.w3 { grid-column: span 3; }
.lp-features .card:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, .6); }
.lp-features .ico { width: 54px; height: 54px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 16px; background: linear-gradient(135deg, rgba(124, 92, 255, .3), rgba(255, 92, 138, .2)); margin-bottom: 14px; }
.lp-features h3 { font-size: 1.15rem; } .lp-features p { color: var(--muted); margin: 0; font-size: .95rem; }
.lp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.step { text-align: center; padding: 10px 16px; } .step p { color: var(--muted); margin: 0; }
.step .num { width: 60px; height: 60px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; border-radius: 50%; background: var(--grad); box-shadow: 0 10px 34px rgba(124, 92, 255, .5); }
.lp-cta { text-align: center; padding: 64px 20px; border-radius: 28px; background: radial-gradient(700px 240px at 50% 0, rgba(124, 92, 255, .4), transparent), linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); }
.lp-cta h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); } .lp-cta p { color: var(--muted); margin: 0 0 24px; }
.lp-footer { padding: 28px 0; border-top: 1px solid var(--line); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- lobby ---------- */
.lb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.lb-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; } .lb-head p { margin: 4px 0 0; }
.lb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; font-size: 1.1rem; font-weight: 700; }
.rail { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.rail .gc { flex: 0 0 230px; scroll-snap-align: start; cursor: pointer; }
.rail .gc-cover { height: 104px; font-size: 2.8rem; }
.rail .gc.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 20px 44px rgba(124, 92, 255, .3); }
.rail .gc-body { padding: 12px 14px 14px; gap: 6px; } .rail .gc-body p { display: none; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 5px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--glass); cursor: pointer; font-size: .85rem; color: var(--muted); transition: .15s; }
.chip:hover { color: var(--text); border-color: var(--line2); } .chip.on { background: rgba(124, 92, 255, .22); border-color: var(--accent); color: #fff; }
.room-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.room-item { position: relative; display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02)); border: 1px solid var(--line); transition: .18s; overflow: hidden; }
.room-item::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--c1), var(--c2)); }
.room-item:hover { transform: translateY(-3px); border-color: var(--line2); }
.ri-top { display: flex; align-items: center; gap: 12px; }
.ri-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: linear-gradient(135deg, var(--c1), var(--c2)); flex: none; }
.ri-top b { display: block; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ri-top small { color: var(--muted); }
.ri-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.user-list { display: grid; gap: 6px; max-height: 240px; overflow: auto; margin-top: 10px; }
.user-list .row { padding: 5px 8px; border-radius: 10px; } .user-list .row:hover { background: var(--glass); }
.dot-on { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); display: inline-block; }

/* chat */
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat-log { flex: 1; min-height: 170px; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 2px; }
.chat-log.tall { max-height: none; }
.msg { font-size: .92rem; word-break: break-word; padding: 5px 11px; border-radius: 12px; background: var(--glass); width: fit-content; max-width: 100%; }
.msg b { margin-inline-end: 6px; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- create room / game picker ---------- */
.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 14px 0 6px; max-height: 46vh; overflow-y: auto; padding: 4px; }
.gp { position: relative; text-align: start; cursor: pointer; padding: 0; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: .15s; color: inherit; }
.gp:hover { border-color: var(--line2); transform: translateY(-2px); }
.gp.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 14px 34px rgba(124, 92, 255, .3); }
.gp-cover { height: 70px; display: grid; place-items: center; font-size: 2.2rem; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.gp-info { padding: 10px 12px 12px; display: grid; gap: 4px; } .gp-info b { font-size: .98rem; } .gp-info small { color: var(--muted); }
.gp.on::after { content: '✓'; position: absolute; top: 8px; inset-inline-end: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: .85rem; font-weight: 800; }
.gi { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin: 12px 0; }
.gi-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; padding: 6px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); min-width: 90px; } .stat small { color: var(--muted); font-size: .72rem; } .stat b { font-size: .95rem; }

/* ---------- waiting room ---------- */
.wr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.wr-head h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); } .wr-head .tag { vertical-align: middle; }
.wr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.wr-hero { position: relative; overflow: hidden; border-radius: 26px; padding: 30px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.wr-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 15% 0, rgba(255, 255, 255, .3), transparent 50%), linear-gradient(0deg, rgba(0, 0, 0, .25), transparent); pointer-events: none; }
.wr-hero > * { position: relative; z-index: 1; }
.wr-ico { font-size: 4.6rem; line-height: 1; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .4)); }
.wr-hero h2 { font-size: 1.8rem; margin: 0 0 4px; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); } .wr-hero p { margin: 0 0 10px; opacity: .92; max-width: 520px; }
.wr-hero .tag { background: rgba(0, 0, 0, .3); border-color: rgba(255, 255, 255, .25); color: #fff; }
.wr-start { margin-inline-start: auto; text-align: center; display: grid; gap: 8px; justify-items: center; }
.wr-start .btn.primary { background: #fff; color: #17142e; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.wr-wait { padding: 8px 18px; border-radius: 14px; background: rgba(0, 0, 0, .3); }
.wr-sec { margin-top: 18px; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.member { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 15px; background: var(--glass); border: 1px solid var(--line); transition: .15s; }
.member .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member.speaking { border-color: var(--ok); box-shadow: 0 0 18px rgba(47, 212, 167, .35); }
.member.speaking .avatar { box-shadow: 0 0 0 3px var(--ok); }
.member input[type=range] { width: 60px; padding: 0; accent-color: var(--accent); }
.badge { font-size: .85rem; }
.voice-bar { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); margin-top: 12px; }
.chat-card { display: flex; flex-direction: column; height: min(640px, calc(100vh - 150px)); min-height: 380px; position: sticky; top: 84px; }
.sandbox { width: 100%; max-width: 380px; margin: 0 auto; } .big-click { width: 100%; padding: 36px; font-size: 1.6rem; border: 0; border-radius: 22px; cursor: pointer; background: var(--grad); font-weight: 800; color: #fff; box-shadow: 0 14px 40px rgba(124, 92, 255, .4); } .big-click:active { transform: scale(.97); }
.board { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; text-align: start; } .board li { display: flex; justify-content: space-between; padding: 8px 14px; border-radius: 12px; background: var(--glass); } .board li.me { outline: 1px solid var(--accent); }

/* ---------- fullscreen game shell (all games) ---------- */
body.gs-open { overflow: hidden; }
.gs { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; color: var(--text); background:
  radial-gradient(900px 520px at 85% -8%, rgba(124, 92, 255, .25), transparent 60%),
  radial-gradient(700px 480px at 0% 100%, rgba(62, 166, 255, .12), transparent 60%), var(--bg); }
.gs-top { display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-height: 58px; background: rgba(10, 11, 24, .82); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); z-index: 3; }
.gs-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; white-space: nowrap; min-width: 0; }
.gs-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: linear-gradient(135deg, var(--c1), var(--c2)); flex: none; }
.gs-title small { color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; max-width: 22vw; display: block; }
.gs-spacer { flex: 1; }
.gs-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.gs-body { flex: 1; min-height: 0; display: flex; position: relative; }
.gs-stage { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 14px 18px; display: block; }
.gs-drawer { width: 330px; flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px; background: rgba(10, 11, 24, .7); backdrop-filter: blur(14px); border-inline-start: 1px solid var(--line); min-height: 0; transition: margin .25s; }
.gs-drawer.closed { margin-inline-end: -330px; }
.gs-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.gs-tabs button { border: 0; background: transparent; padding: 6px; border-radius: 9px; cursor: pointer; color: var(--muted); } .gs-tabs button.on { background: var(--panel2); color: var(--text); font-weight: 700; }
.gs-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; } .gs-pane[hidden] { display: none; }
.gs-pane .chat-log { flex: 1; max-height: none; }
.gs-badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent2); font-size: .7rem; display: grid; place-items: center; padding: 0 4px; }

/* the seated board games fill the shell */
.gs-stage .bg { max-width: 1500px; margin: 0 auto; }
.gs-stage .game-area { display: block; }

/* ---------- profile ---------- */
.pf-card { max-width: 480px; margin: 30px auto; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .lb-grid, .wr-grid { grid-template-columns: 1fr; }
  .chat-card { position: static; height: 420px; }
  .lp-hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lp-hero-copy p { margin-inline: auto; } .lp-actions, .lp-trust { justify-content: center; }
  .lp-hero-visual { order: -1; max-width: 440px; margin: 0 auto; min-height: 340px; } .hv-stack { height: 330px; }
  .lp-features { grid-template-columns: 1fr 1fr; } .lp-features .card, .lp-features .card.w3 { grid-column: span 1; }
  .lp-stats { grid-template-columns: 1fr 1fr; } .lp-stats div:nth-child(3) { border-inline-start: 0; } .lp-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lp-section { padding: 56px 0; }
  .gs-drawer { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(92vw, 340px); z-index: 4; }
  .gs-drawer.closed { margin-inline-end: calc(min(92vw, 340px) * -1 - 4px); }
  .gs-title small { display: none; }
}
@media (max-width: 640px) {
  .lp-features { grid-template-columns: 1fr; }
  .topbar { padding: 6px 8px 6px 12px; }
  .wr-hero { padding: 22px; } .wr-start { margin-inline: auto; }
  .gs-stage { padding: 10px; }
  .gs-top { flex-wrap: wrap; padding: 6px 10px; gap: 6px; min-height: 0; }
  .gs-title { flex: 1 1 60%; } .gs-spacer { display: none; } .gs-btns { flex: 1 1 100%; justify-content: flex-end; }
  .btn .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* image pack */
.brand-mark { background: none !important; box-shadow: none !important; overflow: hidden; } .brand-mark img { width: 34px; height: 34px; display: block; filter: drop-shadow(0 4px 10px #7c5cff77); }
.hv-art { width: min(100%, 560px); height: auto; margin-inline: auto; display: block; filter: drop-shadow(0 30px 50px rgba(124, 92, 255, .45)); animation: bob 7s ease-in-out infinite; position: relative; z-index: 1; }
.lb-head { position: relative; overflow: hidden; padding: 26px 28px; border-radius: 24px; border: 1px solid var(--line); background-size: cover; background-position: center; isolation: isolate; }
.lb-head::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(270deg, rgba(7, 8, 15, .92) 25%, rgba(7, 8, 15, .45) 70%, rgba(7, 8, 15, .7)); }

/* image pack: covers, icons, empty states, textures */
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gc:hover .cover-img { transform: scale(1.07); }
.gc-cover::after, .gp-cover::after { background: linear-gradient(0deg, rgba(7, 8, 15, .45), transparent 55%) !important; }
.gp-cover { position: relative; overflow: hidden; height: 84px; } .gp-cover img { transition: transform .3s; } .gp:hover .gp-cover img { transform: scale(1.08); }
.ico-img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.ri-ico, .gs-ico { padding: 4px; } .ri-ico { background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 55%, #000), color-mix(in srgb, var(--c2) 55%, #000)); }
.wr-ico { width: 120px; height: 120px; flex: none; } .wr-ico .ico-img { filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .5)); }
.feat-img { width: 76px; height: 76px; object-fit: contain; margin: -4px 0 8px; filter: drop-shadow(0 8px 14px rgba(124, 92, 255, .4)); transition: transform .25s; } .lp-features .card:hover .feat-img { transform: translateY(-4px) scale(1.06); }
.empty-img { width: min(240px, 60%); height: auto; display: block; margin: 0 auto 8px; filter: drop-shadow(0 14px 24px rgba(124, 92, 255, .35)); animation: bob 6s ease-in-out infinite; }
.wait-img { width: 54px; height: 54px; object-fit: contain; display: block; margin: 0 auto 4px; }
.chat-log:empty { min-height: 170px; background: url(/assets/site/empty-chat.png) center / 110px no-repeat; opacity: .55; }
.hk-table { background-image: radial-gradient(ellipse at center, rgba(31, 107, 69, .3), rgba(6, 30, 18, .7) 85%), url(/assets/site/texture-felt.jpg) !important; background-size: auto, 300px !important; }
.bgm-board { background: linear-gradient(rgba(25, 14, 8, .3), rgba(25, 14, 8, .3)), url(/assets/site/texture-wood.jpg) !important; background-size: auto, 360px !important; }
.bgm-bar, .bgm-tray { background: rgba(18, 10, 5, .6) !important; }
.rail { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.rail::-webkit-scrollbar { height: 6px; }
/* board games: side panel next to the board whenever the stage is wide enough */
.gs-stage { container-type: inline-size; }
.gs-stage .bg-main { grid-template-columns: 1fr; }
@container (min-width: 820px) { .gs-stage .bg-main { grid-template-columns: minmax(0, 1fr) 320px; } }
.gs-stage .sk-lobby { margin: 4vh auto; text-align: center; }
.gs-stage .sk-lobby, .gs-stage .bp { max-width: 520px; }
@media (max-width: 640px) {
  #nav { flex-wrap: nowrap; gap: 4px; } .topbar { flex-wrap: nowrap; }
  .user-chip { padding: 3px; } .user-chip span:not(.avatar) { display: none; }
  .nav-link { padding: 6px 10px; } #pickHint { display: none; }
  .modal { padding: 18px; } .modal.wide { max-width: 100%; } .gp-grid { grid-template-columns: repeat(2, 1fr); max-height: 38vh; }
  .lb-head { padding: 18px; } .wr-ico { width: 84px; height: 84px; }
}
