:root {
  --ink: #17111f;
  --cream: #fff6d8;
  --pink: #ff4fd8;
  --yellow: #ffe14d;
  --green: #50ff9c;
  --blue: #56d8ff;
  --purple: #7b4dff;
  --red: #ff3b3b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 225, 77, .9), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(255, 79, 216, .85), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(80, 255, 156, .75), transparent 28%),
    linear-gradient(135deg, #8df5ff, #f7b2ff 45%, #fff39b);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(23, 17, 31, .06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(23, 17, 31, .06) 25%, transparent 25%);
  background-size: 42px 42px;
  pointer-events: none;
}

.page {
  width: min(1050px, 94vw);
  margin: 0 auto;
  padding: 34px 0 60px;
  position: relative;
}

.hero { text-align: center; margin-bottom: 24px; }

.badge {
  display: inline-block;
  padding: 9px 16px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 900;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-2deg);
}

h1 {
  font-family: Bangers, Impact, sans-serif;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: .85;
  margin: 22px 0 12px;
  letter-spacing: 3px;
  text-shadow: 7px 7px 0 var(--pink), 13px 13px 0 var(--ink);
  color: var(--cream);
  -webkit-text-stroke: 3px var(--ink);
}

.subtitle {
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  font-weight: 800;
}

.scanner-card {
  background: rgba(255, 246, 216, .94);
  border: 6px solid var(--ink);
  border-radius: 34px;
  box-shadow: 14px 14px 0 var(--ink);
  padding: clamp(18px, 4vw, 34px);
  position: relative;
  overflow: hidden;
}

.scanner-card::after {
  content: "GM GM GM GM GM GM GM GM GM GM";
  position: absolute;
  top: 18px;
  right: -120px;
  transform: rotate(18deg);
  font-family: Bangers, sans-serif;
  font-size: 2.5rem;
  color: rgba(23,17,31,.07);
  white-space: nowrap;
}

.input-panel { position: relative; z-index: 1; }

.mascot {
  width: 116px;
  height: 116px;
  background: var(--green);
  border: 6px solid var(--ink);
  border-radius: 38% 62% 45% 55%;
  margin: 0 auto 18px;
  box-shadow: 8px 8px 0 var(--ink);
  animation: wobble 1.8s infinite ease-in-out;
  position: relative;
}

.eyes { display: flex; gap: 18px; justify-content: center; padding-top: 34px; }
.eyes span { width: 22px; height: 22px; background: var(--ink); border-radius: 50%; display: block; }
.mouth { width: 48px; height: 22px; border-bottom: 7px solid var(--ink); border-radius: 50%; margin: 10px auto; }

label { display: block; font-weight: 900; font-size: 1.25rem; margin-bottom: 10px; }

.input-row { display: flex; gap: 12px; }
input {
  flex: 1;
  min-width: 0;
  padding: 18px 20px;
  border: 5px solid var(--ink);
  border-radius: 18px;
  font-size: 1.25rem;
  font-weight: 900;
  background: white;
  box-shadow: 6px 6px 0 var(--ink);
}

button {
  border: 5px solid var(--ink);
  border-radius: 18px;
  padding: 15px 22px;
  background: var(--pink);
  color: white;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
button:hover { transform: translate(3px, 3px) rotate(-1deg); box-shadow: 3px 3px 0 var(--ink); }

.mini { font-weight: 800; opacity: .78; }
.hidden { display: none; }
.canvas-hidden { display:none; }

.scan-panel {
  margin-top: 24px;
  border: 5px dashed var(--ink);
  border-radius: 24px;
  padding: 18px;
  background: #101018;
  color: var(--green);
  font-family: monospace;
  font-weight: 800;
}
.scan-lines { min-height: 170px; line-height: 1.6; }
.progress-shell { height: 28px; border: 4px solid var(--cream); border-radius: 999px; overflow: hidden; background: #2c2c36; }
.progress-bar { width: 0%; height: 100%; background: repeating-linear-gradient(45deg, var(--green), var(--green) 12px, var(--yellow) 12px, var(--yellow) 24px); transition: width .25s; }

.result-panel { margin-top: 26px; position: relative; z-index: 1; }
.result-top { display:flex; justify-content:space-between; align-items:center; gap: 16px; }
.eyebrow { margin:0; font-weight:900; color: var(--purple); text-transform: uppercase; letter-spacing:1px; }
h2 { margin: 2px 0 0; font-family: Bangers, sans-serif; font-size: clamp(2.5rem, 7vw, 5rem); line-height: .9; }
.stamp { border: 6px solid var(--red); color: var(--red); transform: rotate(12deg); font-size: 2rem; font-weight: 900; padding: 8px 14px; border-radius: 12px; }

.meter-wrap { display:grid; place-items:center; margin: 22px 0; }
.meter {
  width: min(360px, 78vw);
  aspect-ratio: 1;
  border: 8px solid var(--ink);
  border-radius: 50%;
  background: conic-gradient(var(--red) var(--score, 0%), #ffffff var(--score, 0%));
  display:grid;
  place-items:center;
  box-shadow: 10px 10px 0 var(--ink);
  position: relative;
}
.meter::after { content:""; position:absolute; inset:28px; background: var(--cream); border: 6px solid var(--ink); border-radius:50%; }
.score, .meter-label { position:relative; z-index:1; text-align:center; }
.score { font-family:Bangers,sans-serif; font-size: 6rem; line-height:.8; }
.meter-label { font-weight: 900; margin-top: 96px; position:absolute; }

.description { font-size: 1.35rem; font-weight: 900; text-align:center; max-width: 760px; margin: 0 auto 22px; }
.stats-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat { background:white; border:4px solid var(--ink); border-radius:20px; padding:14px; box-shadow: 5px 5px 0 var(--ink); font-weight:900; }
.stat span { display:block; font-family:Bangers,sans-serif; font-size:2.2rem; color: var(--purple); }
.actions { display:flex; flex-wrap:wrap; gap: 12px; margin-top: 24px; justify-content:center; }
.secondary { background: var(--blue); color: var(--ink); }
.danger { background: var(--red); }

.blob { position: fixed; border: 6px solid var(--ink); border-radius: 48% 52% 41% 59%; opacity: .5; z-index: 0; }
.blob-one { width: 120px; height: 120px; left: 3vw; bottom: 8vh; background: var(--yellow); }
.blob-two { width: 90px; height: 90px; right: 5vw; top: 22vh; background: var(--green); }

@keyframes wobble {
  0%,100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-8px); }
}

@media (max-width: 680px) {
  .input-row { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  h1 { text-shadow: 5px 5px 0 var(--pink), 9px 9px 0 var(--ink); }
  .scanner-card { box-shadow: 8px 8px 0 var(--ink); }
}
