@font-face { font-family: "Lobster Two"; font-weight: 700; src: url(assets/lobster-two-700.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Montserrat"; font-weight: 600; src: url(assets/montserrat-600.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Montserrat"; font-weight: 800; src: url(assets/montserrat-800.woff2) format("woff2"); font-display: swap; }

:root {
  --navy: #0d2040;
  --navy-deep: #081530;
  --gold: #f6c453;
  --gold-light: #ffe28a;
  --gold-dark: #c98a1e;
  --red: #d42a30;
  --red-dark: #8e1119;
  --cream: #fff6e2;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 30%, #163063 0%, var(--navy) 55%, var(--navy-deep) 100%) fixed;
  color: var(--cream);
  font-family: "Montserrat", system-ui, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Twinkelende sterretjes en confetti op de achtergrond */
#sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
#sky .star { position: absolute; color: var(--gold); animation: twinkle 3s ease-in-out infinite; }
#sky .confetti { position: absolute; width: 8px; height: 4px; border-radius: 2px; opacity: .55; transform: rotate(var(--r)); }
@keyframes twinkle { 0%,100% { opacity: .15; transform: scale(.7); } 50% { opacity: .9; transform: scale(1.1); } }

.screen {
  position: fixed; inset: 0; z-index: 1;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 20px) 24px calc(env(safe-area-inset-bottom) + 24px);
  text-align: center;
}
.screen.active { display: flex; animation: fadeIn .45s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

.logo { width: min(92vw, 520px); filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); animation: bob 4s ease-in-out infinite; }
.logo.small { width: min(62vw, 300px); animation: none; margin-bottom: 14px; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }

.subtitle {
  font-family: "Lobster Two", cursive; font-weight: 700;
  font-size: clamp(26px, 7.5vw, 40px); margin: 4px 0 42px;
  color: var(--gold-light);
  text-shadow: 0 3px 0 var(--red-dark), 0 6px 18px rgba(0,0,0,.5);
}

/* Knop in stickerstijl: rood met gouden band en witte rand, zoals het logo */
.btn-sticker {
  font-family: "Lobster Two", cursive; font-weight: 700;
  font-size: 34px; color: #fff;
  padding: 14px 64px 18px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #ef4b45 0%, var(--red) 55%, var(--red-dark) 100%);
  box-shadow:
    0 0 0 4px var(--gold), 0 0 0 7px var(--gold-dark), 0 0 0 11px #fff,
    0 12px 26px rgba(0,0,0,.55), inset 0 3px 0 rgba(255,255,255,.35);
  text-shadow: 0 2px 0 var(--red-dark);
  transition: transform .12s ease;
  animation: pulse 2.2s ease-in-out infinite;
}
.btn-sticker:active { transform: scale(.94); }
.btn-sticker.small { font-size: 23px; padding: 10px 24px 13px; animation: none;
  box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px var(--gold-dark), 0 0 0 8px #fff, 0 8px 18px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.35); }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.btn-ghost {
  font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 16px;
  color: var(--gold-light); background: rgba(255,255,255,.06);
  border: 2px solid rgba(246,196,83,.55); border-radius: 999px; padding: 12px 18px; cursor: pointer;
}
.btn-link { background: none; border: 0; color: var(--gold); font: 600 15px "Montserrat", sans-serif;
  text-decoration: underline; text-underline-offset: 4px; margin-top: 18px; cursor: pointer; }

/* Scanner */
.viewfinder {
  position: relative; width: min(78vw, 340px); aspect-ratio: 1; border-radius: 26px; overflow: hidden;
  background: #050c1d; box-shadow: 0 0 0 3px var(--gold-dark), 0 14px 40px rgba(0,0,0,.6);
}
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.corner { position: absolute; width: 46px; height: 46px; border: 6px solid var(--gold); }
.corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scanline { position: absolute; left: 10%; right: 10%; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--red), var(--gold), var(--red), transparent);
  box-shadow: 0 0 14px var(--gold); animation: sweep 2.4s ease-in-out infinite; }
@keyframes sweep { 0%,100% { top: 14%; } 50% { top: 84%; } }
.cam-msg { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center;
  padding: 28px; font-weight: 600; font-size: 15px; line-height: 1.45; background: rgba(5,12,29,.9); }
.hint { font-family: "Lobster Two", cursive; font-weight: 700; font-size: 26px; color: var(--gold-light); margin: 26px 0 0; }
.manual { display: flex; gap: 14px; align-items: center; margin-top: 18px; }
.manual input { width: 96px; font: 800 24px "Montserrat", sans-serif; text-align: center; padding: 10px;
  border-radius: 14px; border: 3px solid var(--gold); background: var(--cream); color: var(--navy); }

/* Afspeelscherm */
.stage { position: relative; width: min(78vw, 330px); aspect-ratio: 1; }
.ring { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 653.5; stroke-dashoffset: 653.5; filter: drop-shadow(0 0 6px rgba(246,196,83,.8)); transition: stroke-dashoffset .25s linear; }

.record {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(0,0,0,.0) 31%),
    repeating-radial-gradient(circle, #1a1206 0 2px, #2a1d08 2px 4px),
    #1a1206;
  box-shadow: 0 0 0 6px var(--gold-dark), 0 0 0 9px #fff, 0 20px 50px rgba(0,0,0,.6);
  animation: spin 2.4s linear infinite; animation-play-state: paused;
}
.record::before { /* gouden glans */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 8%, rgba(255,214,110,.55) 12%, transparent 18% 50%, rgba(255,214,110,.45) 62%, transparent 68%);
}
.record .label {
  position: absolute; inset: 31%; border-radius: 50%; overflow: hidden;
  background: var(--navy); box-shadow: 0 0 0 5px var(--gold), 0 0 0 8px var(--red);
  display: flex; align-items: center; justify-content: center;
}
.record .label img { width: 92%; }
.record .label::after { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px var(--gold); }
.playing .record { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }

.eq { display: flex; align-items: flex-end; gap: 6px; height: 54px; margin: 40px 0 6px; }
.eq i { display: block; width: 10px; height: 12%; border-radius: 6px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); box-shadow: 0 0 8px rgba(246,196,83,.4); }
.eq i:nth-child(even) { background: linear-gradient(180deg, #ff6b62, var(--red)); }
.playing .eq i { animation: bar 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(1){animation-delay:-.1s}.eq i:nth-child(2){animation-delay:-.5s}.eq i:nth-child(3){animation-delay:-.3s}
.eq i:nth-child(4){animation-delay:-.7s}.eq i:nth-child(5){animation-delay:-.2s}.eq i:nth-child(6){animation-delay:-.6s}
.eq i:nth-child(7){animation-delay:-.4s}.eq i:nth-child(8){animation-delay:-.8s}.eq i:nth-child(9){animation-delay:-.15s}
.eq i:nth-child(10){animation-delay:-.55s}.eq i:nth-child(11){animation-delay:-.35s}.eq i:nth-child(12){animation-delay:-.75s}
.eq i:nth-child(13){animation-delay:-.25s}
@keyframes bar { 0% { height: 12%; } 50% { height: 90%; } 100% { height: 35%; } }

.play-msg { font-family: "Lobster Two", cursive; font-weight: 700; font-size: clamp(26px, 7vw, 34px);
  color: var(--gold-light); min-height: 1.4em; margin: 14px 0 26px; text-shadow: 0 3px 0 var(--red-dark);
  transition: opacity .35s; }
.controls { display: flex; gap: 14px; align-items: center; }
.controls button { white-space: nowrap; }

/* Vliegende noten en pepernoten */
.floaty { position: fixed; bottom: -40px; z-index: 0; pointer-events: none; animation: rise linear forwards; }
.floaty.note { color: var(--gold); text-shadow: 0 0 10px rgba(246,196,83,.6); }
.floaty.pepernoot { width: 18px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b07a45, #7a4a22 70%); box-shadow: inset -2px -2px 0 rgba(0,0,0,.25); }
@keyframes rise { to { transform: translate(var(--dx), -115vh) rotate(var(--rot)); opacity: 0; } }

.tap-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(8,21,48,.78); backdrop-filter: blur(3px); }
.hidden { display: none !important; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 28px); transform: translateX(-50%);
  z-index: 10; background: var(--cream); color: var(--navy); font-weight: 800; font-size: 15px;
  padding: 12px 20px; border-radius: 14px; box-shadow: 0 0 0 3px var(--gold), 0 10px 30px rgba(0,0,0,.5);
  max-width: 88vw; text-align: center; }
