*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --void: #000000;
  --void-1: #080808;
  --void-2: #0f0f0f;
  --void-3: #141414;
  --void-4: #1a1a1a;
  --glass: rgba(255,215,0,0.04);
  --glass-border: rgba(255,215,0,0.12);
  --gold: #FFD700;
  --gold-dim: #c9a800;
  --gold-glow: rgba(255,215,0,0.3);
  --text: #e8e8e8;
  --text-dim: #888;
  --text-muted: #555;
  --green: #00ff88;
  --red: #ff4455;
  --font-display: 'Orbitron', monospace;
  --font-ui: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --radius: 4px;
  --radius-lg: 8px;
  --nav-h: 58px;
  --trans: 0.25s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--void-1); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

.hidden { display: none !important; }

#bgCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.3; }

#gate-overlay {
  position: fixed; inset: 0; z-index: 9999; background: #000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#gate-overlay.dissolve { opacity: 0; visibility: hidden; }

.gate-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; max-width: 340px; }

.gate-logo { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--gold); display: flex; align-items: center; gap: 10px; letter-spacing: 2px; text-shadow: 0 0 20px var(--gold-glow); }

.gate-sun { font-size: 24px; animation: spinSlow 6s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }

.gate-shield { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }

.shield-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,215,0,0.25); animation: pulseRing 2s ease-in-out infinite; }
.shield-ring.r2 { inset: -12px; border-color: rgba(255,215,0,0.1); animation-delay: 0.5s; }
@keyframes pulseRing { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.5; } }

.shield-core { width: 44px; height: 44px; color: var(--gold); filter: drop-shadow(0 0 10px var(--gold-glow)); }

.gate-status { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: 1px; min-height: 18px; text-align: center; }

.gate-bar-wrap { width: 100%; max-width: 260px; height: 3px; background: var(--void-3); border-radius: 2px; overflow: hidden; }
.gate-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 2px; transition: width 0.1s linear; box-shadow: 0 0 8px var(--gold-glow); }

.turnstile-box { background: var(--void-2); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; padding: 14px 18px; width: 100%; max-width: 300px; display: flex; align-items: center; justify-content: space-between; opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; }
.turnstile-box.visible { opacity: 1; transform: translateY(0); }

.turnstile-label { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.turnstile-label input[type="checkbox"] { display: none; }

.turnstile-custom-check { width: 22px; height: 22px; border: 2px solid var(--text-muted); border-radius: 3px; display: flex; align-items: center; justify-content: center; transition: all var(--trans); flex-shrink: 0; }
.turnstile-label input:checked + .turnstile-custom-check { background: var(--gold); border-color: var(--gold); }
.check-icon { width: 12px; height: 12px; color: #000; opacity: 0; transition: opacity 0.2s; }
.turnstile-label input:checked + .turnstile-custom-check .check-icon { opacity: 1; }
.turnstile-text { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.cf-badge { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); }
.cf-badge svg { width: 24px; height: 24px; }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h); background: rgba(0,0,0,0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; gap: 12px;
}

.nav-brand { display: flex; align-items: center; gap: 7px; flex-shrink: 0; z-index: 201; }
.nav-sun { font-size: 18px; animation: spinSlow 8s linear infinite; filter: drop-shadow(0 0 6px var(--gold-glow)); }
.nav-title { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: 1.5px; text-shadow: 0 0 12px var(--gold-glow); }
.nav-ver { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); background: var(--void-3); padding: 2px 5px; border-radius: 2px; border: 1px solid var(--glass-border); display: none; }

.nav-hamburger { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 201; flex-shrink: 0; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--gold); border-radius: 1px; transition: all 0.3s ease; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-collapse { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; background: rgba(0,0,0,0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); padding: 16px; flex-direction: column; gap: 16px; z-index: 199; animation: slideDown 0.25s ease; }
.nav-collapse.open { display: flex; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.nav-links { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.nav-link { font-family: var(--font-ui); font-weight: 600; font-size: 15px; color: var(--text-dim); text-decoration: none; padding: 10px 14px; border-radius: var(--radius); transition: all var(--trans); letter-spacing: 0.5px; text-transform: uppercase; display: block; }
.nav-link:hover, .nav-link.active { color: var(--gold); background: var(--glass); }

.nav-auth, .nav-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-avatar-wrap { display: flex; align-items: center; gap: 8px; }
.nav-avatar-wrap img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
#navUsername { font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--gold); }

.btn-primary { background: var(--gold); color: #000; border: none; padding: 9px 18px; font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.5px; border-radius: var(--radius); cursor: pointer; transition: all var(--trans); text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn-primary svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary:hover { background: #ffe433; box-shadow: 0 0 20px var(--gold-glow); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.97); box-shadow: none; }
.btn-primary.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-primary.btn-full { width: 100%; }

.btn-outline { background: transparent; color: var(--gold); border: 1px solid var(--gold); padding: 9px 18px; font-family: var(--font-ui); font-weight: 600; font-size: 13px; border-radius: var(--radius); cursor: pointer; transition: all var(--trans); text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn-outline:hover { background: var(--glass); box-shadow: 0 0 16px var(--gold-glow); }
.btn-outline:active { transform: scale(0.97); }
.btn-outline.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-outline.btn-sm { padding: 7px 14px; font-size: 12px; }

.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--glass-border); padding: 8px 14px; font-family: var(--font-ui); font-weight: 600; font-size: 12px; border-radius: var(--radius); cursor: pointer; transition: all var(--trans); text-transform: uppercase; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

.btn-ghost-sm { background: transparent; color: var(--text-dim); border: 1px solid var(--glass-border); padding: 5px 10px; font-family: var(--font-ui); font-weight: 600; font-size: 11px; border-radius: var(--radius); cursor: pointer; transition: all var(--trans); white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn-ghost-sm:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger-sm { background: transparent; color: var(--red); border: 1px solid rgba(255,68,85,0.3); padding: 5px 10px; font-family: var(--font-ui); font-weight: 600; font-size: 11px; border-radius: var(--radius); cursor: pointer; transition: all var(--trans); white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn-danger-sm:hover { background: rgba(255,68,85,0.1); border-color: var(--red); }

#app { position: relative; z-index: 1; padding-top: var(--nav-h); }

.section { min-height: calc(100vh - var(--nav-h)); padding: 40px 16px 60px; max-width: 1200px; margin: 0 auto; width: 100%; }
.section-inner { width: 100%; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-family: var(--font-display); font-size: clamp(22px,6vw,44px); font-weight: 900; color: var(--gold); text-shadow: 0 0 30px var(--gold-glow); letter-spacing: 2px; margin-bottom: 6px; }
.section-header p { color: var(--text-dim); font-size: 13px; font-family: var(--font-mono); }

.hero-wrap { display: flex; flex-direction: column; gap: 32px; padding-top: 24px; position: relative; }
.hero-glow { position: absolute; top: -10%; left: -20%; width: 400px; height: 400px; background: radial-gradient(circle,rgba(255,215,0,0.06) 0%,transparent 70%); pointer-events: none; z-index: 0; }
.hero-content { position: relative; z-index: 1; }
.hero-badge { display: inline-block; font-family: var(--font-mono); font-size: 10px; color: var(--gold); background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.2); padding: 4px 10px; border-radius: 2px; letter-spacing: 2px; margin-bottom: 16px; }
.hero-title { font-family: var(--font-display); font-size: clamp(36px,10vw,72px); font-weight: 900; line-height: 0.95; letter-spacing: -1px; display: flex; flex-direction: column; margin-bottom: 18px; }
.title-line { color: var(--text); }
.title-line.gold { color: var(--gold); text-shadow: 0 0 30px var(--gold-glow), 0 0 60px rgba(255,215,0,0.1); }
.hero-sub { font-size: 15px; color: var(--text-dim); line-height: 1.6; margin-bottom: 28px; font-weight: 500; max-width: 500px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.stat-chip { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold); }
.stat-chip span:last-child { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px; }

.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cube-wrap { width: 120px; height: 120px; perspective: 600px; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: rotateCube 12s linear infinite; }
@keyframes rotateCube { from { transform: rotateX(20deg) rotateY(0deg); } to { transform: rotateX(20deg) rotateY(360deg); } }
.cube-face { position: absolute; width: 120px; height: 120px; border: 1px solid rgba(255,215,0,0.2); background: rgba(255,215,0,0.02); }
.cube-face.front  { transform: translateZ(60px); }
.cube-face.back   { transform: translateZ(-60px) rotateY(180deg); }
.cube-face.right  { transform: translateX(60px) rotateY(90deg); }
.cube-face.left   { transform: translateX(-60px) rotateY(-90deg); }
.cube-face.top    { transform: translateY(-60px) rotateX(90deg); }
.cube-face.bottom { transform: translateY(60px) rotateX(-90deg); }

.floating-tags { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; max-width: 280px; }
.ftag { font-family: var(--font-mono); font-size: 11px; color: var(--gold); background: rgba(255,215,0,0.06); border: 1px solid rgba(255,215,0,0.15); padding: 4px 10px; border-radius: 2px; animation: floatTag 3s ease-in-out infinite; animation-delay: var(--d); }
@keyframes floatTag { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.features-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.feat-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 20px; position: relative; overflow: hidden; transition: all var(--trans); }
.feat-card:hover { border-color: rgba(255,215,0,0.3); box-shadow: 0 0 24px rgba(255,215,0,0.06); }
.feat-icon { font-size: 24px; margin-bottom: 10px; line-height: 1; }
.feat-card h3 { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: 1px; margin-bottom: 12px; text-transform: uppercase; }
.feat-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.feat-list li { font-size: 13px; color: var(--text-dim); font-family: var(--font-mono); padding-left: 12px; position: relative; }
.feat-list li::before { content: '›'; position: absolute; left: 0; color: var(--gold-dim); }
.feat-desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 14px; }
.feat-compat { display: flex; gap: 5px; flex-wrap: wrap; }
.compat-badge { font-family: var(--font-mono); font-size: 10px; color: var(--gold); background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.2); padding: 2px 7px; border-radius: 2px; }
.feat-tag { position: absolute; top: 14px; right: 14px; font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); letter-spacing: 1.5px; }

.download-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.dl-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 22px; transition: border-color var(--trans); }
.dl-card:hover { border-color: rgba(255,215,0,0.25); }
.main-dl { border-color: rgba(255,215,0,0.2); box-shadow: 0 0 40px rgba(255,215,0,0.04); }
.dl-version-badge { font-family: var(--font-mono); font-size: 10px; color: #000; background: var(--gold); padding: 3px 7px; border-radius: 2px; letter-spacing: 1px; display: inline-block; margin-bottom: 8px; }
.dl-header h3 { font-family: var(--font-display); font-size: 18px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.dl-sub { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.dl-stats-row { display: flex; gap: 24px; padding: 16px 0; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); margin-bottom: 20px; }
.dl-stat { display: flex; flex-direction: column; gap: 2px; }
.dl-num { font-family: var(--font-display); font-size: 22px; font-weight: 900; color: var(--gold); }
.dl-stat span:last-child { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.dl-changelog { margin-bottom: 20px; }
.changelog-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; display: block; margin-bottom: 8px; }
.dl-changelog ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.dl-changelog li { font-size: 12px; color: var(--text-dim); padding-left: 14px; position: relative; }
.dl-changelog li::before { content: '—'; position: absolute; left: 0; color: var(--gold-dim); font-size: 10px; }
.dl-note { text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 10px; }
.dl-side { display: flex; flex-direction: column; gap: 10px; }
.dl-card-sm { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.dl-card-sm h4 { font-family: var(--font-ui); font-weight: 700; font-size: 13px; color: var(--text); }
.dl-card-sm p { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.dl-card-guide .guide-steps { list-style: none; counter-reset: steps; display: flex; flex-direction: column; gap: 5px; }
.dl-card-guide .guide-steps li { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); counter-increment: steps; padding-left: 18px; position: relative; }
.dl-card-guide .guide-steps li::before { content: counter(steps) '.'; position: absolute; left: 0; color: var(--gold-dim); font-size: 11px; }

.game-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid var(--glass-border); }
.game-tab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); font-family: var(--font-ui); font-weight: 700; font-size: 14px; padding: 10px 20px; cursor: pointer; transition: all var(--trans); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: -1px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.game-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.game-tab:hover { color: var(--text); }

.game-panel { display: none; }
.game-panel.active { display: block; }

.game-wrap { display: flex; flex-direction: column; gap: 12px; }

.game-hud { display: flex; gap: 0; background: var(--void-2); border: 1px solid var(--glass-border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.hud-stat { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 12px 4px; border-right: 1px solid var(--glass-border); gap: 2px; }
.hud-stat:last-child { border-right: none; }
.hud-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; }
.hud-val { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold); transition: color 0.2s; }

.game-arena { background: var(--void-1); border: 1px solid var(--glass-border); border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); height: 55vw; min-height: 280px; max-height: 440px; position: relative; overflow: hidden; cursor: crosshair; touch-action: none; -webkit-user-select: none; user-select: none; }

.game-start-screen, .game-over-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(0,0,0,0.88); backdrop-filter: blur(8px); z-index: 10; padding: 20px; text-align: center; }
.game-start-icon { font-size: 40px; }
.game-start-screen h3, .game-over-screen h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--gold); letter-spacing: 2px; }
.game-start-screen p { font-size: 13px; color: var(--text-dim); max-width: 280px; font-family: var(--font-mono); line-height: 1.6; }
.final-score { font-family: var(--font-display); font-size: 52px; font-weight: 900; color: var(--gold); text-shadow: 0 0 30px var(--gold-glow); line-height: 1; }
.final-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-top: -6px; }
.final-stats { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); flex-wrap: wrap; justify-content: center; }

.target-dot { position: absolute; border-radius: 50%; background: radial-gradient(circle,#ffe066 0%,var(--gold) 50%,transparent 100%); box-shadow: 0 0 18px var(--gold-glow),0 0 36px rgba(255,215,0,0.15); cursor: crosshair; transform: scale(0); transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s; will-change: transform; display: flex; align-items: center; justify-content: center; touch-action: none; }
.target-dot.active { transform: scale(1); }
.target-dot.dying { transform: scale(0); opacity: 0; }
.target-inner { width: 28%; height: 28%; border-radius: 50%; background: rgba(0,0,0,0.35); pointer-events: none; }
.hit-particle { position: absolute; pointer-events: none; font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--gold); text-shadow: 0 0 8px var(--gold-glow); animation: hitFloat 0.6s ease-out forwards; z-index: 20; }
@keyframes hitFloat { 0% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { transform: translate(-50%,calc(-50% - 40px)) scale(0.7); opacity: 0; } }
.miss-flash { position: absolute; inset: 0; background: rgba(255,68,85,0.1); pointer-events: none; animation: missFlash 0.3s ease-out forwards; z-index: 5; }
@keyframes missFlash { 0% { opacity: 1; } 100% { opacity: 0; } }

.snake-arena-wrap { position: relative; background: var(--void-1); border: 1px solid var(--glass-border); border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; line-height: 0; }
.snake-canvas { display: block; width: 100%; aspect-ratio: 1/1; max-height: 420px; image-rendering: pixelated; }
.snake-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(0,0,0,0.88); backdrop-filter: blur(8px); z-index: 10; padding: 20px; text-align: center; }
.snake-overlay h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--gold); letter-spacing: 2px; }
.snake-overlay p { font-size: 13px; color: var(--text-dim); max-width: 280px; font-family: var(--font-mono); line-height: 1.6; }
.snake-overlay.hidden { display: none; }

.snake-dpad { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; }
.dpad-row { display: flex; gap: 4px; }
.dpad-btn { width: 52px; height: 52px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); color: var(--gold); font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--trans); -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
.dpad-btn:active, .dpad-btn.pressed { background: rgba(255,215,0,0.15); border-color: var(--gold); transform: scale(0.93); }
.dpad-center { background: transparent; border-color: transparent; }

.game-leaderboard { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 16px; }
.game-leaderboard h4 { font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; text-transform: uppercase; }
.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-entry { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; }
.lb-rank { color: var(--text-muted); width: 18px; }
.lb-name { color: var(--text-dim); flex: 1; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { color: var(--gold); font-weight: bold; }

.modal-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.modal-box { background: var(--void-2); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 24px 20px; width: 100%; max-width: 400px; position: relative; box-shadow: 0 0 60px rgba(0,0,0,0.8); animation: modalIn 0.25s ease; margin: auto; }
.modal-box-wide { max-width: 680px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-close { position: absolute; top: 14px; right: 14px; background: none; border: none; color: var(--text-muted); font-size: 15px; cursor: pointer; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); transition: all var(--trans); -webkit-tap-highlight-color: transparent; }
.modal-close:hover { color: var(--text); background: var(--void-3); }

.modal-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--glass-border); }
.modal-tab { background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); font-family: var(--font-ui); font-weight: 700; font-size: 13px; padding: 8px 18px; cursor: pointer; transition: all var(--trans); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: -1px; -webkit-tap-highlight-color: transparent; }
.modal-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.form-group input { background: var(--void-3); border: 1px solid var(--glass-border); color: var(--text); padding: 11px 13px; font-family: var(--font-mono); font-size: 14px; border-radius: var(--radius); outline: none; transition: border-color var(--trans); width: 100%; -webkit-appearance: none; appearance: none; }
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus { border-color: rgba(255,215,0,0.4); box-shadow: 0 0 12px rgba(255,215,0,0.06); }
.form-error { font-family: var(--font-mono); font-size: 11px; color: var(--red); padding: 7px 11px; background: rgba(255,68,85,0.08); border: 1px solid rgba(255,68,85,0.2); border-radius: var(--radius); }
.form-success { font-family: var(--font-mono); font-size: 11px; color: var(--green); padding: 7px 11px; background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.15); border-radius: var(--radius); }

.dash-header { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--glass-border); }
.dash-avatar-zone { display: flex; align-items: center; gap: 14px; }
.dash-avatar-wrap { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.dash-avatar-wrap img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.avatar-upload-btn { position: absolute; bottom: -2px; right: -2px; width: 22px; height: 22px; background: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--trans); }
.avatar-upload-btn svg { width: 11px; height: 11px; color: #000; }
.avatar-upload-btn:hover { background: #ffe433; transform: scale(1.1); }
.dash-user-info { display: flex; flex-direction: column; gap: 5px; }
.dash-user-info h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); }
.rank-badge { font-family: var(--font-mono); font-size: 9px; color: var(--gold); background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.2); padding: 2px 7px; border-radius: 2px; letter-spacing: 1px; display: inline-block; }
.status-badge { font-family: var(--font-mono); font-size: 10px; color: var(--green); letter-spacing: 1px; }
.dash-uuid-box { display: flex; align-items: center; gap: 8px; background: var(--void-3); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 9px 12px; overflow: hidden; }
.uuid-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); letter-spacing: 2px; flex-shrink: 0; }
.uuid-val { font-family: var(--font-mono); font-size: 11px; color: var(--gold-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 3px; border-radius: 3px; display: flex; align-items: center; flex-shrink: 0; -webkit-tap-highlight-color: transparent; }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn:hover { color: var(--gold); }

.dash-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.dash-card { background: var(--void-3); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.dash-card h4 { font-family: var(--font-display); font-size: 10px; font-weight: 700; color: var(--gold); letter-spacing: 2px; text-transform: uppercase; }
.stats-rows { display: flex; flex-direction: column; gap: 8px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.stat-val { color: var(--text); }
.stat-val.green { color: var(--green); }
.stat-val.gold { color: var(--gold); font-weight: bold; }
.perks-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }
.perk { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 8px; border-radius: var(--radius); font-family: var(--font-mono); font-size: 10px; text-align: center; line-height: 1.3; }
.perk span { font-size: 13px; font-weight: bold; line-height: 1; }
.perk.active { background: rgba(0,255,136,0.06); border: 1px solid rgba(0,255,136,0.15); color: var(--text-dim); }
.perk.active span { color: var(--green); }
.perk.locked { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); color: var(--text-muted); }
.perk.locked span { color: var(--text-muted); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; background: var(--void-3); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 12px 18px; font-family: var(--font-mono); font-size: 12px; color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,0.5); animation: toastIn 0.3s ease; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.toast.toast-success { border-color: rgba(0,255,136,0.3); color: var(--green); }
.toast.toast-error { border-color: rgba(255,68,85,0.3); color: var(--red); }
.toast.toast-info { border-color: rgba(255,215,0,0.3); color: var(--gold); }

.site-footer { background: var(--void-1); border-top: 1px solid var(--glass-border); padding: 24px 16px; position: relative; z-index: 1; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-brand { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: 2px; display: flex; align-items: center; gap: 6px; }
.footer-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); text-decoration: none; transition: color var(--trans); letter-spacing: 1px; }
.footer-links a:hover { color: var(--gold); }

.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-2 { transition-delay: 0.15s; }

@media (min-width: 480px) {
  .nav-ver { display: inline-block; }
  .stat-num { font-size: 24px; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .dl-side { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
  .perks-grid { grid-template-columns: repeat(4,1fr); }
  .snake-dpad { display: none; }
}

@media (min-width: 768px) {
  :root { --nav-h: 64px; }
  body { font-size: 16px; }
  .navbar { padding: 0 28px; }
  .nav-hamburger { display: none; }
  .nav-collapse { display: flex !important; position: static; flex-direction: row; align-items: center; background: none; border: none; padding: 0; gap: 8px; flex: 1; animation: none; }
  .nav-links { flex-direction: row; flex: 1; gap: 2px; }
  .nav-link { padding: 6px 12px; font-size: 13px; }
  .section { padding: 56px 28px 80px; }
  .hero-wrap { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: calc(100vh - 124px); gap: 40px; padding-top: 0; }
  .hero-title { font-size: clamp(42px,6vw,72px); }
  .cube-wrap { width: 160px; height: 160px; }
  .cube-face { width: 160px; height: 160px; }
  .cube-face.front  { transform: translateZ(80px); }
  .cube-face.back   { transform: translateZ(-80px) rotateY(180deg); }
  .cube-face.right  { transform: translateX(80px) rotateY(90deg); }
  .cube-face.left   { transform: translateX(-80px) rotateY(-90deg); }
  .cube-face.top    { transform: translateY(-80px) rotateX(90deg); }
  .cube-face.bottom { transform: translateY(80px) rotateX(-90deg); }
  .features-grid { grid-template-columns: repeat(3,1fr); }
  .feat-card-wide { grid-column: span 2; }
  .download-grid { grid-template-columns: 1fr 320px; }
  .dl-side { display: flex; flex-direction: column; gap: 10px; }
  .game-wrap { display: grid; grid-template-columns: 1fr 200px; gap: 16px; }
  .game-hud { grid-column: 1 / -1; }
  .game-arena { grid-column: 1; height: auto; min-height: 380px; max-height: 460px; }
  .snake-arena-wrap { grid-column: 1; }
  .snake-dpad { display: none; }
  .game-leaderboard { display: flex; flex-direction: column; grid-column: 2; }
  .hud-val { font-size: 24px; }
  .dash-grid { grid-template-columns: repeat(2,1fr); }
  .dash-card-full { grid-column: span 2; }
  .dash-header { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (min-width: 1024px) {
  .section { padding: 60px 32px 80px; }
  .navbar { padding: 0 32px; }
}
