:root {
  color-scheme: dark;
  --bg: #05070a;
  --panel: rgba(10, 19, 28, 0.72);
  --text: #f4fbff;
  --muted: #a9bac7;
  --cyan: #42f5d7;
  --green: #b8ff7a;
  --line: rgba(66, 245, 215, 0.22);
  --shadow: rgba(66, 245, 215, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior: contain;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(66, 245, 215, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 72%, rgba(184, 255, 122, 0.12), transparent 26rem),
    linear-gradient(135deg, #030508 0%, #07111b 48%, #030508 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overscroll-behavior: contain;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 76%, transparent);
  opacity: 0.38;
  transform: perspective(800px) rotateX(58deg) translateY(18%);
  transform-origin: center bottom;
}

body::after {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 50%, transparent 50%),
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.56) 88%);
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
  opacity: 0.45;
}

main {
  width: min(100% - 2rem, 920px);
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 7vw, 5rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    var(--panel);
  box-shadow: 0 0 60px var(--shadow), inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

main::before {
  position: absolute;
  inset: 1rem;
  content: "";
  border: 1px solid var(--line);
  pointer-events: none;
}

.content {
  position: relative;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.75rem, 9vw, 6.8rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 0 28px rgba(66, 245, 215, 0.32);
}

.brand-logo {
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.easter-egg-trigger {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  margin: -0.08em -0.08em 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  font-family: inherit;
  font-size: 1em;
  font-style: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-shadow: 0 0 34px rgba(184, 255, 122, 0.48);
  vertical-align: middle;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-text-size-adjust: 100%;
  animation: y-hint 12s ease-in-out infinite;
}

.easter-egg-trigger:is(:hover, :focus-visible, :active) {
  background: rgba(66, 245, 215, 0.08);
  color: var(--cyan);
  outline: none;
  filter: drop-shadow(0 0 18px rgba(66, 245, 215, 0.72));
}

@keyframes y-hint {
  0%,
  82%,
  100% {
    background: transparent;
    filter: none;
  }

  86%,
  92% {
    background: rgba(184, 255, 122, 0.08);
    filter: drop-shadow(0 0 18px rgba(184, 255, 122, 0.6));
  }
}

.tagline {
  color: var(--green);
  font-size: clamp(1.15rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary {
  max-width: 660px;
  margin-inline: auto;
  color: var(--muted);
  font-size: clamp(1rem, 2.3vw, 1.35rem);
}

.status {
  display: inline-grid;
  width: fit-content;
  min-width: 12rem;
  margin-inline: auto;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(66, 245, 215, 0.48);
  background: rgba(66, 245, 215, 0.08);
  color: var(--cyan);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 0 28px rgba(66, 245, 215, 0.14);
}

@media (max-width: 560px) {
  body {
    overflow: auto;
  }

  main {
    width: min(100% - 1rem, 920px);
    padding: 2rem 1.25rem;
  }

  main::before {
    inset: 0.6rem;
  }

  .tagline,
  .status {
    overflow-wrap: anywhere;
  }
}

.contact {
    margin-top: 3rem;
    font-size: 0.5rem;
    opacity: 0.2;
}

.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 28% 18%, rgba(66, 245, 215, 0.22), transparent 22rem),
    radial-gradient(circle at 82% 78%, rgba(184, 255, 122, 0.16), transparent 20rem),
    rgba(3, 5, 8, 0.92);
  backdrop-filter: blur(14px);
  overscroll-behavior: contain;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-overlay[hidden] {
  display: none;
}

body.game-active {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
}

.game-shell {
  width: min(100vw - 24px, 720px);
  max-height: min(calc(var(--app-height, 100vh) - 24px), 760px);
  display: grid;
  gap: 1rem;
  padding: clamp(0.9rem, 2.4vw, 1.4rem);
  border: 1px solid rgba(66, 245, 215, 0.34);
  background: rgba(5, 10, 15, 0.9);
  box-shadow: 0 0 54px rgba(66, 245, 215, 0.2), inset 0 1px rgba(255, 255, 255, 0.1);
  overscroll-behavior: contain;
  touch-action: none;
}

.game-topbar,
.game-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.game-label {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-topbar h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1;
  text-shadow: 0 0 22px rgba(66, 245, 215, 0.3);
}

.game-close,
.game-restart,
.jump-button,
.game-start-button {
  min-height: 3rem;
  border: 1px solid rgba(66, 245, 215, 0.5);
  background: rgba(66, 245, 215, 0.12);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.game-close {
  padding: 0.7rem 1rem;
}

.game-restart,
.jump-button,
.game-start-button {
  min-width: 8.75rem;
  padding: 0.8rem 1.2rem;
}

.game-close:is(:hover, :focus-visible),
.game-restart:is(:hover, :focus-visible),
.jump-button:is(:hover, :focus-visible),
.game-start-button:is(:hover, :focus-visible) {
  outline: none;
  border-color: var(--green);
  background: rgba(184, 255, 122, 0.16);
}

.game-stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 15 / 7;
  min-height: 240px;
  max-height: min(58vh, calc(var(--app-height, 100vh) - 190px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(7, 17, 27, 0.96), rgba(3, 5, 8, 0.96));
  overscroll-behavior: contain;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#beni-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.game-start,
.game-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.7rem;
  padding: 1rem;
  background: rgba(3, 5, 8, 0.74);
  text-align: center;
}

.game-start[hidden],
.game-message[hidden] {
  display: none;
}

.game-start-button {
  min-height: 4rem;
  min-width: min(78vw, 18rem);
  color: var(--cyan);
  font-size: clamp(1.1rem, 4vw, 1.45rem);
  text-transform: uppercase;
  box-shadow: 0 0 30px rgba(66, 245, 215, 0.2);
}

.game-message strong {
  color: var(--green);
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(184, 255, 122, 0.36);
}

.game-message span,
.game-controls p {
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 800;
}

#beni-score {
  color: var(--cyan);
}

@media (max-width: 680px) {
  .game-overlay {
    align-items: stretch;
    padding: 0.5rem;
  }

  .game-shell {
    max-height: none;
    min-height: calc(var(--app-height, 100dvh) - 1rem);
    align-content: center;
  }

  .game-topbar {
    align-items: flex-start;
  }

  .game-stage-wrap {
    aspect-ratio: 4 / 3;
    min-height: min(260px, calc(var(--app-height, 100dvh) - 230px));
    max-height: calc(var(--app-height, 100dvh) - 205px);
  }

  .game-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .jump-button {
    width: 100%;
    min-height: 3.75rem;
    font-size: 1.1rem;
  }
}
.easter-egg-trigger {
  pointer-events: none;
}