.screen {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  z-index: 30;
  background: radial-gradient(ellipse at 50% 20%, rgba(122,58,255,0.25), transparent 60%), rgba(4,3,10,0.88);
  backdrop-filter: blur(2px);
}

.logo {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(57,255,224,0.35);
}
.subtitle {
  font-size: 13px;
  letter-spacing: 0.25em;
  color: #a9a6c4;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), #17c9a8);
  color: #04140f;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.04em;
  padding: 14px 42px;
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(57,255,224,0.45), 0 8px 18px rgba(0,0,0,0.4);
  transition: transform 0.12s ease;
}
.btn-primary:active { transform: scale(0.96); }

.menu-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.menu-row button, #screen-menu > button:not(.btn-primary) {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: #e6e6f5;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 10px;
}

.best-score {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #8f8bb0;
  font-weight: 700;
}
.best-score span { color: var(--neon-gold); font-size: 15px; margin-left: 4px; }

/* -------------------------------------------------------------- countdown */
#screen-countdown { background: rgba(4,3,10,0.55); backdrop-filter: none; }
#countdown-num {
  font-size: 96px;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 40px rgba(57,255,224,0.6);
}

/* ------------------------------------------------------------------ pause */
#screen-pause h2 { font-size: 28px; letter-spacing: 0.15em; }

/* --------------------------------------------------------------- gameover */
#screen-gameover h2 { font-size: 30px; font-weight: 900; letter-spacing: 0.08em; color: #ff5c7a; }
.stat-row { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: #b7b3d6; }
.stat-row span { display: block; font-size: 26px; color: #fff; margin-top: 2px; }
#go-newbest { color: var(--neon-gold); font-weight: 900; font-size: 16px; animation: pulseScale 0.6s ease infinite alternate; }

#nickname-form { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; max-width: 280px; }
#nickname-form label { font-size: 11px; letter-spacing: 0.15em; color: #8f8bb0; font-weight: 700; }
#nickname-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 15px;
  text-align: center;
}
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
#go-submitted { color: var(--neon-cyan); font-weight: 700; }

/* ------------------------------------------------------------------ modal */
.modal {
  position: absolute; inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2,1,6,0.78);
  padding: 20px;
}
.modal-body {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 82%;
  overflow-y: auto;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 22px 18px;
}
.modal-body h2 { font-size: 18px; margin-bottom: 10px; letter-spacing: 0.06em; }
.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  font-size: 15px;
}

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #a9a6c4;
}
.tab.active { background: var(--neon-cyan); color: #04140f; }

#leaderboard-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.lb-rank { width: 34px; font-weight: 800; color: var(--neon-gold); }
.lb-name { flex: 1; text-align: left; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 800; color: var(--neon-cyan); }
.lb-empty, .lb-loading { text-align: center; padding: 20px; color: #8f8bb0; font-size: 13px; }
#leaderboard-your-rank {
  background: rgba(57,255,224,0.08);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
}

/* ----------------------------------------------------------------- garage */
.garage-gold-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; }
.garage-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.garage-tab { flex: 1; padding: 8px; border-radius: 8px; background: rgba(255,255,255,0.05); font-size: 12px; font-weight: 700; }
.garage-tab.active { background: var(--neon-pink); color: #1a021c; }
.garage-pane { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.skin-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.skin-card.equipped { border-color: var(--neon-cyan); box-shadow: 0 0 12px rgba(57,255,224,0.35); }
.skin-swatch { width: 100%; height: 40px; border-radius: 8px; border: 2px solid; }
.skin-name { font-size: 12px; font-weight: 700; }
.skin-action {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px;
  font-size: 12px;
  font-weight: 800;
}
.skin-action:disabled { opacity: 0.55; }

/* ------------------------------------------------------------ achievements */
#achievements-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ach-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px;
  text-align: left;
}
.ach-card.unlocked { border-color: var(--neon-gold); background: rgba(255,210,63,0.08); }
.ach-name { font-size: 12px; font-weight: 800; }
.ach-desc { font-size: 10px; color: #a9a6c4; margin-top: 2px; }

/* -------------------------------------------------------------- settings */
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; font-weight: 600; }
.switch { position: relative; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: rgba(255,255,255,0.15); border-radius: 999px; transition: 0.2s; }
.switch .slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .slider { background: var(--neon-cyan); }
.switch input:checked + .slider::before { transform: translateX(18px); }

.howto-list { text-align: left; font-size: 13px; line-height: 1.6; color: #d3d0ec; }
.howto-list b { color: var(--neon-cyan); }

#domain-blocked h2 { font-size: 22px; color: #ff5c7a; }

/* ----------------------------------------------------------------- footer */
.site-footer {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 0 20px 40px;
  color: #8f8bb0;
  font-size: 12px;
  text-align: center;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 380px) {
  .logo { font-size: 34px; }
  .btn-primary { padding: 12px 32px; font-size: 16px; }
}

@media (max-width: 540px) {
  .page-header { padding: 10px 16px 6px; }
  .page-tagline { display: none; }
  .ad-slot-top { min-height: 50px; margin: 8px auto; }
}

/* ----------------------------------------------------------- page chrome */
.page-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 20px 8px;
  text-align: center;
}
.page-h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-tagline { font-size: 13px; color: #a9a6c4; margin-top: 6px; }

main { padding: 10px 0 4px; }

.ad-slot {
  max-width: 728px;
  min-height: 90px;
  margin: 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a4768;
  font-size: 11px;
  letter-spacing: 0.1em;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 8px;
}

.seo-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 22px 20px;
  line-height: 1.7;
  color: #cfccea;
  font-size: 14px;
}
.seo-section h2 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.seo-faq details {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px 0;
}
.seo-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: #e6e6f5;
}
.seo-faq p { margin-top: 8px; color: #b7b3d6; }

.related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.related-grid a {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  color: #e6e6f5;
}
.related-grid a:hover { border-color: var(--neon-cyan); }
