:root {
  color-scheme: dark;
  --bg: #111111;
  --ink: #f8f3e8;
  --muted: #c7c0b1;
  --line: rgba(255, 255, 255, 0.16);
  --hot: #ff3f2f;
  --gold: #f7c948;
  --mint: #3ddc97;
  --blue: #2f80ed;
  --panel: rgba(20, 20, 20, 0.76);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 63, 47, 0.16), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(61, 220, 151, 0.13), transparent 30%),
    linear-gradient(135deg, #111111 0%, #1b1714 48%, #111111 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.shell {
  position: relative;
  min-height: 100%;
}

.hidden {
  display: none !important;
}

.hero,
.result {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
  align-items: center;
  gap: clamp(22px, 5vw, 72px);
  padding: clamp(18px, 5vw, 72px);
}

.hero-copy,
.result {
  position: relative;
  z-index: 3;
}

.kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 0.9;
  letter-spacing: 0;
}

h1 {
  max-width: 8ch;
  font-size: clamp(58px, 12vw, 158px);
  text-shadow: 6px 6px 0 #000, 10px 10px 0 var(--hot);
}

h2 {
  font-size: clamp(38px, 7vw, 86px);
}

.lead,
.result-copy,
.modal-panel p {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary,
.ghost,
.mini-button {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.primary {
  padding: 0 22px;
  background: var(--gold);
  color: #111;
  box-shadow: 6px 6px 0 #000;
}

.ghost,
.mini-button {
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.primary:hover,
.ghost:hover,
.mini-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 #000;
}

.poster {
  position: relative;
  min-height: 72vh;
  display: grid;
  place-items: center;
}

.poster-main {
  width: min(78vw, 620px);
  max-height: 86vh;
  object-fit: contain;
  filter: drop-shadow(0 32px 24px rgba(0, 0, 0, 0.55));
  animation: floatBoss 3.2s ease-in-out infinite;
}

.poster-float {
  position: absolute;
  width: clamp(120px, 18vw, 230px);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.5));
}

.poster-float.helmet {
  left: 2%;
  bottom: 6%;
  transform: rotate(-8deg);
}

.poster-float.karate {
  right: 0;
  top: 10%;
  transform: rotate(12deg);
}

.game {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr)) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--line);
}

.hud > div,
.mini-button {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
}

.hud-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1;
}

.arena {
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(140deg, #171717 0%, #251f18 52%, #101010 100%);
  background-size: 52px 52px, 52px 52px, auto;
}

.arena::before {
  content: "DANTERS.CZ";
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  color: rgba(255, 255, 255, 0.055);
  font-size: clamp(54px, 16vw, 210px);
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
}

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
}

.notice {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 5;
  max-width: min(720px, calc(100vw - 28px));
  translate: -50% 0;
  border: 2px solid #000;
  border-radius: 8px;
  background: var(--gold);
  color: #111;
  padding: 10px 14px;
  font-weight: 900;
  text-align: center;
  box-shadow: 5px 5px 0 #000;
}

.dan {
  position: absolute;
  z-index: 4;
  width: var(--size);
  height: var(--size);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--rot));
  transition: filter 80ms ease;
  animation: wobble var(--wobble) ease-in-out infinite;
}

.dan img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 15px 10px rgba(0, 0, 0, 0.55));
}

.dan:hover {
  filter: brightness(1.15);
}

.dan.hit {
  pointer-events: none;
  animation: pop 280ms ease forwards;
}

.points {
  position: absolute;
  z-index: 10;
  color: var(--mint);
  font-size: 24px;
  font-weight: 900;
  text-shadow: 3px 3px 0 #000;
  pointer-events: none;
  animation: rise 650ms ease forwards;
}

.bait {
  position: absolute;
  z-index: 6;
  max-width: min(330px, 86vw);
  border: 2px solid #000;
  border-radius: 8px;
  background: #f8f3e8;
  color: #111;
  padding: 12px;
  box-shadow: 7px 7px 0 #000;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.12;
  cursor: pointer;
  animation: baitIn 180ms ease both;
}

.bait span {
  display: block;
  margin-top: 6px;
  color: var(--hot);
  font-size: 12px;
}

.toast-area {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 28px));
}

.toast {
  border-left: 7px solid var(--mint);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 800;
}

.result {
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: start;
}

.result-score {
  margin: 20px 0 4px;
  color: var(--gold);
  font-size: clamp(32px, 8vw, 84px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 4px 4px 0 #000;
}

.certificate {
  width: min(680px, 100%);
  min-height: 112px;
  margin-top: 18px;
  border: 2px dashed var(--gold);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-size: clamp(18px, 2.3vw, 26px);
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
}

.modal-panel {
  position: relative;
  width: min(640px, 100%);
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #151515;
  padding: 28px;
  box-shadow: 10px 10px 0 #000;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

@keyframes floatBoss {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-16px) rotate(1.5deg);
  }
}

@keyframes wobble {
  0%,
  100% {
    rotate: -3deg;
  }
  50% {
    rotate: 4deg;
  }
}

@keyframes pop {
  to {
    opacity: 0;
    scale: 1.5;
    rotate: 18deg;
  }
}

@keyframes rise {
  to {
    opacity: 0;
    transform: translateY(-52px) scale(1.1);
  }
}

@keyframes baitIn {
  from {
    opacity: 0;
    transform: scale(0.88) rotate(-2deg);
  }
}

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

  .hero,
  .result {
    min-height: 100svh;
    grid-template-columns: 1fr;
    align-content: start;
    padding: 18px;
  }

  .poster {
    min-height: 44vh;
  }

  .poster-main {
    width: min(86vw, 390px);
    max-height: 48vh;
  }

  .poster-float {
    width: 112px;
  }

  .hud {
    grid-template-columns: repeat(3, 1fr);
  }

  .mini-button {
    grid-column: 1 / -1;
    min-height: 42px;
  }

  .notice {
    top: 10px;
    font-size: 13px;
  }
}
