*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #00ff88;
  --secondary: #ff00aa;
  --bg: #07070f;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.1);
  --font-display: "Bangers", Impact, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: var(--font-body);
  background: var(--bg);
  color: #fff;
  touch-action: manipulation;
}

/* ── Animated background ── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orbFloat 12s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: var(--accent);
  top: -10%;
  left: -5%;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: var(--secondary);
  bottom: 10%;
  right: -8%;
  animation-delay: -4s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: #7c3aed;
  top: 50%;
  left: 40%;
  animation-delay: -7s;
  opacity: 0.25;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent);
}

.floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floater {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.12;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.08; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ── Layout ── */
.page {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 48px;
  transition: transform 0.05s;
}

.page.shake {
  animation: shake 0.35s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px); }
  40% { transform: translate(6px, -2px); }
  60% { transform: translate(-4px, 1px); }
  80% { transform: translate(4px, -1px); }
}

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent);
}

.nav-symbol {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--secondary)) !important;
  color: #000 !important;
  padding: 8px 16px !important;
  border-radius: 999px;
  font-weight: 700 !important;
}

/* ── Marquee ── */
.marquee-wrap {
  overflow: hidden;
  margin: 8px -16px 24px;
  padding: 10px 0;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-block: 1px solid var(--border);
}

.marquee {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: marquee 22s linear infinite;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.marquee span:nth-child(odd) {
  color: var(--secondary);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 24px 0 32px;
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions { justify-content: center; }
  .nav-links a:not(.nav-cta) { display: none; }
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--secondary) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--secondary) 40%, transparent);
  color: var(--secondary);
  margin-bottom: 12px;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 70%, var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--accent) 30%, transparent));
}

.symbol-big {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent);
  margin: 4px 0;
}

.tagline {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-top: 8px;
}

.description {
  font-size: 0.95rem;
  opacity: 0.65;
  margin-top: 12px;
  max-width: 420px;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .description { margin-inline: auto; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #00cc6a);
  color: #000;
  box-shadow: 0 4px 24px color-mix(in srgb, var(--accent) 40%, transparent);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #cc0088);
  color: #fff;
  box-shadow: 0 4px 24px color-mix(in srgb, var(--secondary) 35%, transparent);
}

.btn-ghost {
  background: var(--card);
  border: 1px solid var(--border);
  color: #fff;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Hero coin */
.hero-coin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  max-width: 280px;
  margin-inline: auto;
}

.coin-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  animation: ringPulse 3s ease-in-out infinite;
}

.coin-ring-2 {
  inset: -16px;
  border-color: color-mix(in srgb, var(--secondary) 30%, transparent);
  animation-delay: -1.5s;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.06); opacity: 1; }
}

.hero-coin-img {
  width: 65%;
  height: 65%;
  object-fit: contain;
  filter: drop-shadow(0 0 30px color-mix(in srgb, var(--accent) 60%, transparent));
  animation: coinBounce 2.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes coinBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

/* ── Stats bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  margin-bottom: 4px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.stat-name {
  display: block;
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.65;
  margin-top: 2px;
  color: var(--secondary);
}

  color: var(--secondary);
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.stat-value.pulse {
  animation: scorePulse 0.2s ease-out;
}

@keyframes scorePulse {
  50% { transform: scale(1.15); color: var(--secondary); }
}

/* ── Hype flash ── */
.hype-flash {
  text-align: center;
  min-height: 2em;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.1em;
  color: var(--secondary);
  text-shadow: 0 0 20px var(--secondary);
  margin-bottom: 16px;
  opacity: 0;
  transform: scale(0.8);
}

.hype-flash.show {
  opacity: 1;
  transform: scale(1.1);
  animation: hypePop 0.6s ease-out;
}

@keyframes hypePop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Game section ── */
.game-section {
  margin-bottom: 48px;
}

.section-head {
  text-align: center;
  margin-bottom: 20px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 8px;
}

.section-head p {
  opacity: 0.6;
  font-size: 0.95rem;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 16px;
  box-shadow:
    0 0 40px color-mix(in srgb, var(--accent) 20%, transparent),
    0 8px 32px rgba(0,0,0,0.4),
    inset 0 0 60px color-mix(in srgb, var(--accent) 4%, transparent);
  overflow: hidden;
  background: #f7f7f7;
}

.canvas-label {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
}

#game {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.overlay,
.game-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(10, 10, 18, 0.6);
  backdrop-filter: blur(2px);
}

.overlay .prompt {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.4rem);
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 0 12px var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.game-over .rekt {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3rem);
  letter-spacing: 0.06em;
  color: var(--secondary);
  text-shadow: 0 0 24px var(--secondary);
  animation: rektBounce 0.5s ease-out;
}

.game-over .retry {
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.75;
}

@keyframes rektBounce {
  0% { transform: scale(2); opacity: 0; }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.game-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.control-hint {
  font-size: 0.8rem;
  opacity: 0.45;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.new-best {
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  animation: hypePop 0.8s ease-out infinite alternate;
}

/* ── About / features ── */
.about-section {
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.85rem;
  opacity: 0.6;
  line-height: 1.4;
}

/* ── CTA ── */
.cta-section {
  margin-bottom: 48px;
}

.cta-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 12%, transparent),
    color-mix(in srgb, var(--secondary) 12%, transparent));
  border: 1px solid var(--border);
}

.cta-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.cta-card p {
  opacity: 0.65;
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

.cta-card .hero-actions {
  justify-content: center;
}

/* ── Footer ── */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-copy {
  font-size: 0.75rem;
  opacity: 0.4;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--accent);
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}
