/* PixelBeats app — gedeelde stijl, gebaseerd op de merkrichtlijnen */
:root {
  --pixel-pink: #EF1474;
  --pixel-black: #000000;
  --pixel-cream: #F5EBDD;
  --deep-berry: #71103B;
  --deep-teal: #164D5C;
  --retro-gold: #F2A900;
  --soft-pink: #F4A7B9;
  --charcoal: #242124;
  --bg: #0a0a0d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--pixel-cream);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 15% 10%, rgba(239,20,116,0.25), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(242,169,0,0.18), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(22,77,92,0.3), transparent 50%),
    var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em 0;
}

a { color: inherit; }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.logo {
  width: 96px;
  height: auto;
  margin: 0 auto 8px;
  display: block;
}

.badge {
  display: inline-block;
  background: rgba(242,169,0,0.15);
  border: 1px solid var(--retro-gold);
  color: var(--retro-gold);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 auto 14px;
  text-align: center;
  width: fit-content;
}

.title {
  text-align: center;
  font-size: 1.9rem;
  color: var(--pixel-cream);
}

.subtitle {
  text-align: center;
  color: var(--soft-pink);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.card {
  background: rgba(245,235,221,0.05);
  border: 1px solid rgba(245,235,221,0.12);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
}

.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 15px 18px;
  border-radius: 999px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 12px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--pixel-pink);
  color: white;
  box-shadow: 0 8px 24px rgba(239,20,116,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--pixel-cream);
  border: 1.5px solid rgba(245,235,221,0.4);
}
.btn-gold {
  background: var(--retro-gold);
  color: var(--pixel-black);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.nav {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
}
.nav a {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(245,235,221,0.6);
  text-decoration: none;
  border: 1px solid transparent;
}
.nav a.active {
  color: var(--pixel-cream);
  background: rgba(245,235,221,0.08);
  border-color: rgba(245,235,221,0.15);
}

.status {
  font-size: 0.85rem;
  text-align: center;
  color: var(--soft-pink);
  margin-bottom: 14px;
  min-height: 1.2em;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 14px;
}
.now-playing img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--charcoal);
}
.now-playing .meta { flex: 1; min-width: 0; }
.now-playing .track { font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing .artist { color: var(--soft-pink); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.scan-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--charcoal);
  margin-bottom: 14px;
}
#video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#canvas-preview { display: none; }
.scan-window {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Donkere rand rondom met een uitgesneden vierkant in het midden — geeft het gevoel van een
   klein scanvenster, ook al kijkt de camera intern nog naar het hele beeld. */
.scan-window::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 15%;
  right: 15%;
  bottom: 15%;
  border: 3px solid var(--pixel-pink);
  border-radius: 20px;
  box-shadow: 0 0 0 999px rgba(0,0,0,0.55);
}

.mystery-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0 10px;
}
.mystery-mascot {
  width: 120px;
  height: auto;
  animation: pb-bounce 1.6s ease-in-out infinite;
}
.mystery-text {
  margin-top: 14px;
  color: var(--soft-pink);
  font-weight: 600;
}
@keyframes pb-bounce {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.rules h2 {
  color: var(--pixel-pink);
  font-size: 1.2rem;
  margin-top: 26px;
}
.rules ul { padding-left: 20px; margin: 8px 0; }
.rules li { margin-bottom: 6px; line-height: 1.4; }
.rules p { line-height: 1.5; color: rgba(245,235,221,0.9); }

.points-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.9rem;
}
.points-table td {
  padding: 8px 4px;
  border-bottom: 1px solid rgba(245,235,221,0.12);
}
.points-table td:last-child { text-align: right; font-weight: 700; color: var(--retro-gold); }

.footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(245,235,221,0.4);
  margin-top: 24px;
}
