:root {
  --bg: #07060f;
  --bg-2: #0f0d22;
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eeeaff;
  --muted: #9a95b8;
  --neon-1: #39ffb6;
  --neon-2: #ff3df2;
  --neon-3: #3dc8ff;
  --gold: #ffd23d;
  --radius: 18px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--neon-3); }
kbd {
  font: inherit; font-size: .8em; padding: 1px 6px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card);
}

/* ---------- Hareketli arka plan blob'ları ---------- */
.blobs { position: fixed; inset: 0; z-index: -1; filter: blur(80px); opacity: .55; pointer-events: none; }
.blobs span { position: absolute; width: 45vmax; height: 45vmax; border-radius: 50%; animation: drift 22s ease-in-out infinite alternate; }
.blobs span:nth-child(1) { background: #3b0a7a; top: -15%; left: -10%; }
.blobs span:nth-child(2) { background: #06456b; bottom: -20%; right: -10%; animation-duration: 28s; animation-delay: -6s; }
.blobs span:nth-child(3) { background: #6b0a52; top: 40%; left: 35%; width: 30vmax; height: 30vmax; animation-duration: 18s; animation-delay: -3s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8vw, 6vh) scale(1.15); }
  100% { transform: translate(-6vw, 10vh) scale(.9); }
}

/* ---------- Navigasyon ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(7, 6, 15, .6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  animation: slideDown .7s var(--ease-out) both;
}
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } }
.logo { font-family: "Bungee", sans-serif; color: var(--text); text-decoration: none; font-size: 20px; display: flex; align-items: center; gap: 10px; letter-spacing: 1px; }
.logo b { color: var(--neon-1); font-weight: 400; text-shadow: 0 0 12px var(--neon-1); }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--neon-2); box-shadow: 0 0 12px var(--neon-2); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .6; } }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 500; position: relative; transition: color .2s; }
.nav nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--neon-1); transform: scaleX(0); transition: transform .3s var(--ease-out); box-shadow: 0 0 8px var(--neon-1); }
.nav nav a:hover { color: var(--text); }
.nav nav a:hover::after { transform: scaleX(1); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 18px; cursor: pointer;
  transition: transform .2s var(--ease-spring), background .2s;
}
.icon-btn:hover { transform: scale(1.1) rotate(-6deg); background: rgba(255,255,255,.1); }
.icon-btn:active { transform: scale(.92); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s var(--ease-spring), box-shadow .25s, background .25s, opacity .2s;
  position: relative; overflow: hidden;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--neon-1), var(--neon-3)); color: #04121a; box-shadow: 0 8px 30px -8px var(--neon-1); }
.btn-primary:hover { box-shadow: 0 12px 40px -6px var(--neon-1); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%);
  transform: translateX(-100%); animation: sheen 3s ease-in-out infinite;
}
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #ff8a3d); color: #2a1600; box-shadow: 0 8px 30px -8px var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 78vh; display: grid; place-items: center; text-align: center; padding: 60px 16px 80px; overflow: hidden; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; max-width: 760px; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.title {
  font-family: "Bungee", sans-serif; font-weight: 400;
  font-size: clamp(48px, 12vw, 128px); line-height: .95; margin: 0 0 20px;
  letter-spacing: 2px;
}
.title .ch {
  display: inline-block;
  background: linear-gradient(180deg, #fff 10%, var(--neon-1) 60%, var(--neon-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(57, 255, 182, .45));
  animation: dropIn .9s var(--ease-spring) both, wave 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 70ms), calc(1s + var(--i) * 120ms);
}
.title .sp { display: inline-block; width: .35em; }
.title .word { display: inline-block; white-space: nowrap; }
@keyframes dropIn { from { transform: translateY(-120px) rotate(-20deg) scale(.4); opacity: 0; } }
@keyframes wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.lead { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 560px; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: clamp(16px, 5vw, 48px); justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: "Bungee", sans-serif; font-weight: 400; font-size: 32px; color: var(--neon-2); text-shadow: 0 0 16px rgba(255, 61, 242, .5); }
.hero-stats span { color: var(--muted); font-size: 13px; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--border); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--neon-1); animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Oyun alanı ---------- */
.play {
  display: grid; grid-template-columns: minmax(0, 560px) 300px;
  justify-content: center; align-items: start; gap: 28px;
  padding: 40px 16px 60px; scroll-margin-top: 70px;
}
.side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 86px; }
.game-card {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--border); border-radius: 24px; padding: 18px;
  box-shadow: 0 30px 80px -30px rgba(57, 255, 182, .25), inset 0 1px 0 rgba(255,255,255,.08);
  position: relative;
  touch-action: manipulation;       /* çift dokunuşla zoom yok */
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.swipe-hint { display: inline-block; font-size: 34px; margin-bottom: 6px; animation: swipe 1.6s ease-in-out infinite; }
@keyframes swipe {
  0%, 100% { transform: translateX(-18px) rotate(-10deg); opacity: .4; }
  50% { transform: translateX(18px) rotate(10deg); opacity: 1; }
}
.game-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
  background: conic-gradient(from var(--a, 0deg), var(--neon-1), var(--neon-2), var(--neon-3), var(--neon-1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite; opacity: .7;
}
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }

.hud { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hud-item { flex: 1; background: rgba(0,0,0,.3); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.hud-item span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.hud-item strong { font-family: "Bungee", sans-serif; font-weight: 400; font-size: 22px; display: inline-block; }
.hud-item strong.bump { animation: bump .35s var(--ease-spring); }
@keyframes bump { 50% { transform: scale(1.45); color: var(--neon-1); } }

.board { position: relative; border-radius: 14px; overflow: hidden; }
#game { display: block; width: 100%; aspect-ratio: 1; background: #05040c; touch-action: none; }

.overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 4, 12, .72); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.overlay-box { text-align: center; max-width: 340px; }
.overlay.show .overlay-box { animation: popIn .5s var(--ease-spring) both; }
@keyframes popIn { from { transform: scale(.6) translateY(20px); opacity: 0; } }
.overlay-box h2 { font-family: "Bungee", sans-serif; font-weight: 400; font-size: clamp(26px, 6vw, 38px); margin: 0 0 8px; }
.overlay-box p { color: var(--muted); margin: 0 0 20px; }
.overlay-box .big { font-family: "Bungee", sans-serif; font-size: 56px; color: var(--neon-1); text-shadow: 0 0 24px var(--neon-1); margin: 0 0 4px; line-height: 1; }
.overlay-box .actions { display: flex; flex-direction: column; gap: 10px; }
.overlay-box .new-record { color: var(--gold); font-weight: 700; animation: pulse 1s ease-in-out infinite; }

.dpad { display: none; grid-template-columns: repeat(3, 60px); grid-template-rows: repeat(2, 54px); gap: 8px; justify-content: center; margin-top: 16px; }
.dpad button { border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 20px; touch-action: manipulation; transition: transform .1s, background .1s; }
.dpad button:active { transform: scale(.9); background: rgba(57, 255, 182, .25); }
.dpad [data-dir="up"] { grid-column: 2; }
.dpad [data-dir="left"] { grid-column: 1; grid-row: 2; }
.dpad [data-dir="down"] { grid-column: 2; grid-row: 2; }
.dpad [data-dir="right"] { grid-column: 3; grid-row: 2; }
.keys-hint { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; scroll-margin-top: 90px; }
.panel h3 { margin: 0 0 12px; }
.panel ol { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.panel li { counter-increment: r; display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); animation: slideIn .5s var(--ease-out) both; animation-delay: calc(var(--i) * 80ms); }
.panel li:last-child { border-bottom: 0; }
.panel li::before { content: counter(r) "."; color: var(--neon-2); font-weight: 700; width: 28px; }
.panel li span { flex: 1; color: var(--muted); font-size: 13px; }
.panel li b { font-family: "Bungee", sans-serif; font-weight: 400; }
.panel li.fresh { color: var(--gold); }
.panel .empty { color: var(--muted); font-size: 14px; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }

/* ---------- Reklam alanları ---------- */
.ad-wrap { display: flex; justify-content: center; padding: 18px 16px 0; }
.ad-slot { position: relative; max-width: 100%; }
.ad-wrap[hidden], .ad-slot[hidden], #secondChanceInfo[hidden] { display: none; }
.ad-leader { width: 728px; min-height: 90px; }
.ad-sky { width: 160px; min-height: 600px; }
.ad-rect { width: 300px; min-height: 250px; }
.ad-slot .adsbygoogle { display: block; width: 100%; }
.ad-demo {
  position: absolute; inset: 0; border-radius: 12px; overflow: hidden;
  border: 1px dashed rgba(255,255,255,.18);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 10px, transparent 10px 20px);
  display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px;
}
.ad-demo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.07) 50%, transparent 80%);
  transform: translateX(-100%); animation: shimmer 2.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.ad-demo b { display: block; font-size: 11px; letter-spacing: 2px; color: var(--neon-3); margin-bottom: 4px; }
.ad-label { position: absolute; top: -16px; left: 0; font-size: 10px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }

/* ---------- Nasıl oynanır ---------- */
.how { padding: 60px 16px; max-width: 1100px; margin: 0 auto; scroll-margin-top: 60px; }
.section-title { font-family: "Bungee", sans-serif; font-weight: 400; text-align: center; font-size: clamp(28px, 5vw, 44px); margin: 0 0 36px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: transform .4s var(--ease-spring), border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-8px) rotate(-1deg); border-color: rgba(57,255,182,.5); box-shadow: 0 20px 50px -20px rgba(57,255,182,.4); }
.card:hover .card-ico { transform: scale(1.25) rotate(12deg); }
.card-ico { font-size: 38px; transition: transform .4s var(--ease-spring); display: inline-block; }
.card h3 { margin: 12px 0 6px; }
.card p { margin: 0; color: var(--muted); line-height: 1.5; }

/* Scroll ile beliren öğeler */
.reveal { opacity: 0; transform: translateY(40px) scale(.97); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.cards .reveal:nth-child(2) { transition-delay: .1s; }
.cards .reveal:nth-child(3) { transition-delay: .2s; }
.cards .reveal:nth-child(4) { transition-delay: .3s; }

.footer { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); margin-top: 40px; }

/* ---------- Onay bandı ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 720px; margin: 0 auto;
  display: flex; gap: 16px; align-items: center; padding: 16px 18px;
  background: rgba(20, 17, 40, .92); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: rise .6s var(--ease-spring) both;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: 14px; color: var(--muted); flex: 1; }
.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
.consent .btn { padding: 10px 18px; font-size: 14px; }
@keyframes rise { from { transform: translateY(140%); } }

/* ---------- Demo reklam modalı ---------- */
.ad-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.8); backdrop-filter: blur(8px); animation: fade .3s both; }
.ad-modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.ad-modal-box { width: min(420px, 100%); background: var(--bg-2); border: 1px solid var(--border); border-radius: 22px; padding: 22px; text-align: center; animation: popIn .5s var(--ease-spring) both; }
.ad-modal-tag { display: inline-block; font-size: 11px; letter-spacing: 2px; padding: 4px 10px; border-radius: 999px; background: var(--gold); color: #2a1600; font-weight: 700; }
.ad-modal-creative { margin: 18px 0; padding: 26px 16px; border-radius: 16px; background: linear-gradient(135deg, #1b1240, #0d2a3a); }
.ad-modal-creative p { margin: 14px 0 0; color: var(--text); }
.ad-modal-creative small { color: var(--muted); }
.ad-demo-art { font-size: 54px; animation: wobble 1.2s ease-in-out infinite; display: inline-block; }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.15); } }
.ad-progress { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 16px; }
.ad-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--neon-2)); }

.toast {
  position: fixed; left: 50%; top: 84px; z-index: 120; transform: translate(-50%, -30px);
  background: var(--bg-2); border: 1px solid var(--border); padding: 12px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease-spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Giriş butonu (nav) ---------- */
.auth-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; max-width: 200px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text);
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: transform .2s var(--ease-spring), background .2s, border-color .2s;
}
.auth-btn[hidden] { display: none; }
.auth-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.1); border-color: rgba(57,255,182,.5); }
.auth-btn #authLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-ava {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 14px;
  background: rgba(255,255,255,.08);
}
.auth-btn.in .auth-ava { background: linear-gradient(135deg, var(--neon-2), var(--neon-3)); color: #07060f; font-family: "Bungee", sans-serif; }

/* ---------- Duyuru bandı ---------- */
.announce {
  position: sticky; top: 69px; z-index: 40; display: flex; align-items: center; justify-content: center;
  padding: 10px 48px 10px 16px; text-align: center; font-weight: 500; font-size: 14px;
  background: linear-gradient(90deg, rgba(57,255,182,.18), rgba(61,200,255,.18)); border-bottom: 1px solid rgba(57,255,182,.35);
  backdrop-filter: blur(10px); animation: slideDown .5s var(--ease-out) both;
}
.announce[hidden] { display: none; }
.announce[data-tone="warn"] { background: linear-gradient(90deg, rgba(255,210,61,.22), rgba(255,138,61,.2)); border-color: rgba(255,210,61,.45); }
.announce[data-tone="party"] { background: linear-gradient(90deg, rgba(255,61,242,.22), rgba(61,200,255,.2)); border-color: rgba(255,61,242,.45); }
.announce button { position: absolute; right: 10px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--text); cursor: pointer; font-size: 14px; }
.announce button:hover { background: rgba(255,255,255,.1); }

/* ---------- Skor tablosu sekmeleri ---------- */
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid var(--border); }
.seg[hidden] { display: none; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s;
}
.seg button.on { background: rgba(255,255,255,.1); color: var(--text); }
.panel ol[hidden] { display: none; }
.panel ol.global li span { color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 10px; }
.panel ol.global li:nth-child(1)::before { content: "🥇"; }
.panel ol.global li:nth-child(2)::before { content: "🥈"; }
.panel ol.global li:nth-child(3)::before { content: "🥉"; }
.panel li.empty::before { content: none !important; width: 0; }
.panel ol.global li.me, .panel ol.global li.me span { color: var(--neon-1); font-weight: 700; }
.board-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.board-note[hidden] { display: none; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--neon-3); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--neon-1); }
.overlay-box .online-note { margin: -10px 0 18px; font-size: 14px; }
.overlay-box .online-note:empty { display: none; }
.overlay-box .online-note b { color: var(--neon-1); }

/* ---------- Giriş penceresi ---------- */
.auth-modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; background: rgba(3,2,10,.78); backdrop-filter: blur(10px); animation: fade .3s both; overflow-y: auto; }
.auth-modal[hidden] { display: none; }
.auth-modal.busy .auth-box { opacity: .75; }
.auth-box {
  position: relative; width: min(400px, 100%); padding: 28px 26px 22px; border-radius: 24px; text-align: center;
  background: linear-gradient(180deg, rgba(30,24,64,.96), rgba(12,10,28,.98)); border: 1px solid var(--border);
  box-shadow: 0 40px 100px -30px rgba(255,61,242,.35), inset 0 1px 0 rgba(255,255,255,.08);
  animation: popIn .5s var(--ease-spring) both; transition: opacity .2s;
}
.auth-box [hidden] { display: none !important; }
.auth-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; }
.auth-close:hover { color: var(--text); background: rgba(255,255,255,.1); }
.auth-badge { font-family: "Bungee", sans-serif; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: 1px; color: var(--muted); }
.auth-badge b { color: var(--neon-1); font-weight: 400; }
.auth-badge .logo-dot { width: 9px; height: 9px; }
.auth-box h2 { font-family: "Bungee", sans-serif; font-weight: 400; font-size: 28px; margin: 10px 0 4px; overflow-wrap: anywhere; }
.auth-sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; overflow-wrap: anywhere; }
.auth-tabs { display: flex; margin-bottom: 16px; }
.auth-tabs button { flex: 1; padding: 9px 12px; font-size: 14px; }
#authForm { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 16px; color: var(--text); padding: 12px 14px; border-radius: 12px;
  background: rgba(0,0,0,.35); border: 1px solid var(--border); outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--neon-1); box-shadow: 0 0 0 3px rgba(57,255,182,.18); }
.field input::placeholder, .field textarea::placeholder { color: rgba(154,149,184,.6); }
.auth-forgot { align-self: flex-end; font-size: 13px; margin-top: -4px; }
.auth-err { margin: 0; color: #ff7a9c; font-size: 13px; text-align: center; }
.auth-err:empty { display: none; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-google { width: 100%; }
.auth-guest { display: block; margin: 16px auto 0; font-size: 14px; color: var(--muted); }
.acc-ava {
  width: 72px; height: 72px; margin: 4px auto 0; border-radius: 50%; display: grid; place-items: center;
  font-family: "Bungee", sans-serif; font-size: 30px; color: #07060f;
  background: linear-gradient(135deg, var(--neon-2), var(--neon-3)); box-shadow: 0 0 30px -4px var(--neon-2);
}
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.acc-stats div { padding: 10px 6px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--border); display: flex; flex-direction: column; }
.acc-stats strong { font-family: "Bungee", sans-serif; font-weight: 400; font-size: 20px; color: var(--neon-1); }
.acc-stats span { font-size: 11px; color: var(--muted); }
.name-form { display: flex; gap: 8px; align-items: flex-end; text-align: left; margin-bottom: 12px; }
.name-form .field { flex: 1; min-width: 0; }
.name-form .btn { padding: 12px 16px; }
.acc-logout { width: 100%; margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .play { grid-template-columns: minmax(0, 560px) 300px; }
  .side-left { display: none; }
}
@media (max-width: 860px) {
  .play { grid-template-columns: minmax(0, 560px); }
  .side { position: static; align-items: center; }
  .side-right .panel { width: 100%; }
  .nav nav { display: none; }
  .nav .icon-btn { margin-left: auto; }
  .nav .auth-btn { margin-left: auto; }
  .nav .auth-btn:not([hidden]) + .icon-btn { margin-left: 0; }
}
@media (hover: none), (max-width: 640px) {
  .dpad { display: grid; }
}
@media (max-width: 640px) {
  .consent { flex-direction: column; align-items: stretch; }
  .consent-actions .btn { flex: 1; }
  .game-card { padding: 12px; }
  .hud-item strong { font-size: 18px; }
  .auth-btn { max-width: 150px; }
}

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