/* ============ RESET & BASE ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --neon-pink: #ff2d95;
  --neon-cyan: #00f0ff;
  --neon-purple: #b14aff;
  --neon-yellow: #f9f871;
  --bg-dark: #0a0e1a;
  --bg-darker: #060810;
  --panel: #10162a;
}

html, body {
  background: var(--bg-darker);
  color: #e8eaf6;
  font-family: 'Rajdhani', 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* ============ HEADER ============ */
.site-header {
  text-align: center;
  padding: 28px 16px 10px;
  background:
    radial-gradient(ellipse at top, rgba(177, 74, 255, 0.15), transparent 60%),
    var(--bg-darker);
}

.site-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.3rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  text-shadow:
    0 0 8px rgba(0, 240, 255, 0.8),
    0 0 22px rgba(0, 240, 255, 0.4);
}

.site-header .subtitle {
  color: #9aa3c4;
  font-size: 0.95rem;
  margin-top: 8px;
}

/* ============ GAME SECTION ============ */
.game-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
}

.game-wrapper {
  position: relative;
  width: min(400px, 92vw);
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 2px rgba(0, 240, 255, 0.5),
    0 0 30px rgba(0, 240, 255, 0.25),
    0 0 70px rgba(177, 74, 255, 0.2),
    0 20px 50px rgba(0, 0, 0, 0.6);
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #0a0e1a;
  touch-action: manipulation;
}

/* ============ OVERLAYS ============ */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(6, 8, 16, 0.82);
  text-align: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.glow-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.15;
  color: var(--neon-cyan);
  text-shadow:
    0 0 6px rgba(0, 240, 255, 0.9),
    0 0 18px rgba(0, 240, 255, 0.6),
    0 0 40px rgba(0, 240, 255, 0.35);
}

.glow-text.glow-red {
  color: var(--neon-pink);
  text-shadow:
    0 0 6px rgba(255, 45, 149, 0.9),
    0 0 18px rgba(255, 45, 149, 0.6),
    0 0 40px rgba(255, 45, 149, 0.35);
  font-size: 1.7rem;
}

.overlay p {
  color: #c4cae6;
  font-size: 0.95rem;
}

.overlay .hint code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.hidden {
  display: none !important;
}

kbd {
  background: #1a2238;
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: monospace;
  color: var(--neon-cyan);
}

/* ============ NEW BEST BADGE ============ */
.new-best {
  font-family: 'Orbitron', sans-serif;
  color: var(--neon-yellow);
  font-size: 0.95rem;
  text-shadow: 0 0 10px rgba(249, 248, 113, 0.7);
}

/* ============ CHALLENGE MESSAGE ============ */
.challenge-msg {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #9aa3c4;
  max-width: 260px;
}

/* ============ BUTTON ============ */
.btn {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  padding: 13px 32px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow:
    0 0 16px rgba(255, 45, 149, 0.6),
    0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 0 24px rgba(255, 45, 149, 0.85),
    0 6px 18px rgba(0, 0, 0, 0.5);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ============ HUD ============ */
.hud {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  text-shadow:
    0 0 8px rgba(0, 240, 255, 0.9),
    0 0 20px rgba(0, 240, 255, 0.5);
  pointer-events: none;
}

/* ============ CONTROLS INFO ============ */
.controls-info {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #7c87ab;
  text-align: center;
}

/* ============ AD SLOTS ============ */
/* Ads are kept visually distinct from game UI and content, with clear
   spacing so they never overlap or get confused with game controls. */
.ad-slot {
  max-width: 720px;
  margin: 28px auto;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90px;
}

.ad-slot-vertical-desktop {
  margin: 24px auto;
}

@media (max-width: 768px) {
  .ad-slot-vertical-desktop {
    display: none;
  }
}

/* ============ SEO CONTENT ============ */
.seo-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 20px;
  color: #c4cae6;
}

.seo-content h2 {
  font-family: 'Orbitron', sans-serif;
  color: var(--neon-cyan);
  margin: 30px 0 12px;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  border-left: 4px solid var(--neon-pink);
  padding-left: 12px;
}

.seo-content p,
.seo-content li {
  font-size: 0.98rem;
  color: #b6bdda;
}

.seo-content ul {
  margin: 10px 0 10px 20px;
}

.seo-content code {
  background: rgba(0, 240, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: var(--neon-cyan);
}

/* ============ FAQ ============ */
.faq details {
  background: rgba(177, 74, 255, 0.06);
  border: 1px solid rgba(177, 74, 255, 0.25);
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 14px 18px;
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-color: var(--neon-cyan);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "▸ ";
  color: var(--neon-pink);
}

.faq details[open] summary::before {
  content: "▾ ";
  color: var(--neon-cyan);
}

.faq p {
  margin-top: 10px;
  color: #a9b0d1;
}

/* ============ FOOTER ============ */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: #555f80;
  border-top: 1px solid rgba(177, 74, 255, 0.15);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
  .site-header h1 { font-size: 1.2rem; }
  .glow-text { font-size: 1.6rem; }
  .hud { font-size: 1.8rem; }
}
