:root {
  --bg: #0f0d0c;
  --panel: #1b1715;
  --text: #f4ede6;
  --muted: #a8998c;
  --accent: #ff7a1a;
  --live: #ff3b30;
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 Inter, system-ui, sans-serif;
}
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Tickertape: twee identieke helften, -50% schuiven geeft een naadloze lus */
.ticker {
  background: var(--accent);
  color: var(--bg);
  overflow: hidden;
  white-space: nowrap;
  font-family: Anton, Impact, sans-serif;
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .45rem 0;
}
.ticker-track { display: inline-block; animation: ticker 75s linear infinite; }
.ticker-track span { padding-right: 2.5rem; }
@keyframes ticker { to { transform: translateX(-50%); } }

.masthead { text-align: center; padding: 2rem 1rem 1rem; }
h1 {
  font-family: Anton, Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 5rem);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}
h1 span { color: var(--accent); }
.slogan { margin: .5rem 0 0; color: var(--muted); font-size: 1.1rem; font-style: italic; }

main { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* Slideshow */
.slideshow {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slide figcaption {
  position: absolute; right: 0; bottom: 0;
  background: rgba(0,0,0,.65);
  color: #ddd;
  font-size: .75rem;
  padding: .25rem .6rem;
  border-top-left-radius: 6px;
}
.slide figcaption a { color: #fff; }
.nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff;
  font-size: 2rem; line-height: 1;
}
.nav:hover { background: var(--accent); }
.prev { left: .75rem; }
.next { right: .75rem; }

/* Player */
.player {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--panel);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.play {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  border: 0; background: var(--accent);
  display: grid; place-items: center;
}
.play .icon {
  width: 0; height: 0;
  border-left: 20px solid var(--bg);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 5px;
}
.play.playing .icon {
  width: 20px; height: 22px; margin: 0;
  border: 0;
  border-left: 7px solid var(--bg);
  border-right: 7px solid var(--bg);
}
.meta { flex: 1; min-width: 0; display: flex; align-items: center; gap: .75rem; }
.status { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live {
  display: none;
  font-family: Anton, Impact, sans-serif;
  letter-spacing: .08em;
  background: var(--live); color: #fff;
  padding: .1rem .55rem; border-radius: 4px;
  animation: pulse 1.4s ease-in-out infinite;
}
.player.playing .live { display: inline-block; }
@keyframes pulse { 50% { opacity: .45; } }
.volume input { width: 140px; accent-color: var(--accent); }
.error {
  flex-basis: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: #3a1612; color: #ffd9d3;
  border-radius: 8px; padding: .6rem .9rem;
}
.error[hidden] { display: none; }
.error button {
  border: 0; border-radius: 6px; padding: .4rem .9rem;
  background: var(--accent); color: var(--bg); font-weight: 600;
}

footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }
footer p { margin: .25rem 0; }

/* Mobiel: speler vast onderaan */
@media (max-width: 640px) {
  body { padding-bottom: 110px; }
  main { padding: 0; }
  .slideshow { border-radius: 0; aspect-ratio: 4 / 3; }
  .player {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    margin: 0; border-radius: 0;
    padding: .75rem 1rem; gap: .75rem;
  }
  .play { width: 52px; height: 52px; }
  .volume input { width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
  .live { animation: none; }
  .ticker-track { animation: none; }
}
