/* intelligentblondje.nl — pixel-cute huisstijl */

:root {
  --bg: #3B2E52;
  --ink: #2A2136;
  --purple: #8B72D8;
  --purple-deep: #5F4BA8;
  --lilac: #C7B6F2;
  --cream: #FDF3DE;
  --cream-soft: #F8E8CB;
  --yellow: #F6D98F;
  --pink: #F2B2C4;
  --mint: #A8D8B9;
  --muted: #6b5a4a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, .pixel {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
}

a { color: var(--purple-deep); text-decoration: none; }
a:hover { color: var(--purple); }

.page {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ------- zwevende pixel-wolkjes / plusjes op de achtergrond ------- */

.sprite {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.sprite.cloud {
  clip-path: polygon(14.3% 0%, 42.9% 0%, 42.9% 16.7%, 57.1% 16.7%, 57.1% 0%, 85.7% 0%, 85.7% 16.7%, 100% 16.7%, 100% 50%, 85.7% 50%, 85.7% 66.7%, 71.4% 66.7%, 71.4% 83.3%, 57.1% 83.3%, 57.1% 100%, 42.9% 100%, 42.9% 83.3%, 28.6% 83.3%, 28.6% 66.7%, 14.3% 66.7%, 14.3% 50%, 0% 50%, 0% 16.7%, 14.3% 16.7%);
  animation: float 3.8s ease-in-out infinite;
}
.sprite.plus {
  clip-path: polygon(33% 0%, 66% 0%, 66% 33%, 100% 33%, 100% 66%, 66% 66%, 66% 100%, 33% 100%, 33% 66%, 0% 66%, 0% 33%, 33% 33%);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

@media (prefers-reduced-motion: reduce) {
  .sprite, .hero-logo { animation: none !important; }
  * { transition: none !important; }
}

/* --------------------------------- kaarten -------------------------------- */

.card {
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 24px;
  position: relative;
  z-index: 1;
}

.section {
  width: 100%;
  position: relative;
  z-index: 1;
  padding: 26px 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  color: var(--yellow);
  text-shadow: 4px 4px 0 var(--ink);
}
.section-head img { width: 44px; height: 44px; image-rendering: pixelated; }
.section-head .side-link { font-size: 15px; font-weight: 600; color: var(--lilac); }
.section-head .side-link:hover { color: var(--yellow); }

/* --------------------------------- knoppen --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #FDF3DE;
  background: var(--purple);
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 11px 26px;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.btn:hover {
  background: var(--purple-deep);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
  color: #FDF3DE;
}
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: 5px 5px 0 var(--ink); }
.btn.big { font-size: 23px; padding: 14px 32px; }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.btn.yellow:hover { background: #eec96a; }
.btn.pink { background: var(--pink); color: var(--ink); }
.btn.pink:hover { background: #e898b0; }
.btn.ghost { background: var(--cream); color: var(--purple-deep); }
.btn.ghost:hover { background: var(--cream-soft); }
.btn.small { font-size: 15px; padding: 6px 14px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink); border-radius: 9px; }
.btn.small:hover { box-shadow: 2px 2px 0 var(--ink); }

/* -------------------------------- formulieren ------------------------------ */

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--purple-deep);
}
input[type="text"], input[type="password"], input[type="url"] {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 9px;
  padding: 10px 13px;
  width: 100%;
}
input:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
.hp { position: absolute; left: -9999px; opacity: 0; }

/* --------------------------------- badges --------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 4px 16px;
}
.pill::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.pill.open { background: var(--mint); color: #1e4230; }
.pill.closed { background: var(--pink); color: #5c1f31; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(120px);
  background: var(--ink);
  color: var(--cream);
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 17px;
  border: 3px solid var(--cream);
  border-radius: 12px;
  padding: 12px 24px;
  z-index: 100;
  transition: transform 0.25s ease;
  max-width: min(90vw, 480px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: #7c2b40; }

/* -------------------------------- navigatie -------------------------------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--cream);
  border-bottom: 4px solid var(--ink);
  padding: 10px 22px;
  box-sizing: border-box;
}
.topnav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--purple-deep);
}
.topnav .brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--cream);
}
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.nav-links a {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--purple-deep);
  padding: 6px 14px;
  border-radius: 9px;
  border: 3px solid transparent;
}
.nav-links a:hover { background: var(--cream-soft); border-color: var(--ink); }
.nav-links a.active { background: var(--yellow); border-color: var(--ink); color: var(--ink); }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #e04b5a;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  animation: pulse 1.6s ease-in-out infinite;
}
.live-badge:hover { color: #fff; background: #c93a49; }
.live-badge[hidden] { display: none; }

/* ------------------------------ feature-cards ------------------------------- */

.feature-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  position: relative;
  z-index: 1;
  padding: 10px 0 6px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 20px 22px;
  color: var(--ink);
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.feature-card:hover {
  background: var(--yellow);
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
}
.feature-card .f-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--purple-deep);
}
.feature-card .f-head img { width: 34px; height: 34px; image-rendering: pixelated; }
.feature-card p { margin: 0; font-size: 15px; color: var(--muted); }
.feature-card .pill { align-self: flex-start; font-size: 13px; }

/* --------------------------------- battle ----------------------------------- */

.battle-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
}
.battle-song {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 12px;
  padding: 18px;
}
.battle-song.winner { background: var(--yellow); }
.battle-song .b-title {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--purple-deep);
}
.battle-song .b-artist { font-size: 15px; color: var(--muted); }
.battle-song iframe { border: 0; border-radius: 12px; width: 100%; height: 152px; }
.battle-vs {
  align-self: center;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--ink);
  animation: pulse 2s ease-in-out infinite;
}
.vote-bar {
  height: 26px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cream-soft);
  overflow: hidden;
  position: relative;
}
.vote-bar .fill {
  height: 100%;
  background: var(--purple);
  transition: width 0.5s ease;
}
.vote-bar .label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.battle-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.battle-history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 15px;
}
.battle-history .score { color: var(--muted); white-space: nowrap; }

@media (max-width: 760px) {
  .battle-arena { grid-template-columns: 1fr; }
  .battle-vs { justify-self: center; }
}

/* ---------------------------------- footer --------------------------------- */

.footer {
  position: relative;
  z-index: 1;
  padding: 26px 0 12px;
  font-size: 15px;
  color: var(--lilac);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer img { width: 26px; height: 26px; image-rendering: pixelated; }
.footer a { color: var(--lilac); text-decoration: underline; }
.footer a:hover { color: var(--yellow); }
