:root{
  --bg:#0b0f17;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.08);
  --border:rgba(255,255,255,.10);
  --text:#e8eefc;
  --muted:rgba(232,238,252,.7);
  --accent:#ee20a7;
  --shadow:0 10px 40px rgba(0,0,0,.35);
  --radius:18px;
  --radius2:26px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{box-sizing:border-box}
body{
  margin:0;
  background: radial-gradient(1200px 800px at 20% 0%, rgba(238,32,167,.20), transparent 60%),
              radial-gradient(900px 600px at 80% 10%, rgba(70,120,255,.15), transparent 55%),
              var(--bg);
  color:var(--text);
  padding-bottom:110px;
}

.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background:rgba(10,14,22,.65);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--border);
}
.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:42px; height:42px; border-radius:14px;
  background: linear-gradient(135deg, rgba(238,32,167,.95), rgba(238,32,167,.15));
  box-shadow: 0 0 0 1px rgba(255,255,255,.10) inset;
}
.brand-title{font-weight:800; letter-spacing:.5px}
.brand-sub{color:var(--muted); font-size:12px; margin-top:2px}

.adminlink{
  color:var(--text);
  text-decoration:none;
  padding:10px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
}

.wrap{max-width:1100px; margin:18px auto; padding:0 14px}
.panel{
  background: var(--panel);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius2);
  padding:16px;
  margin-bottom:16px;
  backdrop-filter: blur(10px);
}
.row{display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end}
.field{min-width:210px}
.field.grow{flex:1}
label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}
input, select{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
}
.hint{font-size:11px; color:var(--muted); margin-top:6px}

.daytitle{font-weight:800; margin-bottom:10px}
.slotlist{display:flex; flex-direction:column; gap:12px}
.card{
  display:flex; gap:12px;
  padding:12px;
  border-radius:18px;
  background: var(--panel2);
  border:1px solid var(--border);
  align-items:center;
}
.card .cardmeta{min-width:0}

.thumb{
  width:64px; height:64px; border-radius:16px;
  background: rgba(255,255,255,.07);
  overflow:hidden; flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(255,255,255,.10);
}
.thumb img{width:100%; height:100%; object-fit:cover}
.cardmeta{flex:1}
.t{font-weight:800}
.s{color:var(--muted); font-size:12px; margin-top:4px}
.play{
  align-self:center;
  border:none;
  background: linear-gradient(135deg, var(--accent), rgba(238,32,167,.55));
  color:white;
  border-radius:16px;
  padding:10px 12px;
  cursor:pointer;
}

.empty{color:var(--muted); padding:18px}

.playerbar{
  position:fixed; left:0; right:0; bottom:0;
  padding:12px 14px;
  background: rgba(10,14,22,.75);
  backdrop-filter: blur(12px);
  border-top:1px solid var(--border);
  display:flex; gap:12px; align-items:center;
}
.player-meta{min-width:240px}
.player-title{font-weight:800}
.player-sub{color:var(--muted); font-size:12px; margin-top:4px}
audio{width:100%}
.player-actions{display:flex; gap:8px; flex-wrap:wrap}
.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
}
.btn.primary{
  border-color: rgba(238,32,167,.55);
  background: rgba(238,32,167,.18);
}


/* Theme */
body.light{
  --bg:#f6f7fb;
  --panel:rgba(0,0,0,.04);
  --panel2:rgba(0,0,0,.06);
  --border:rgba(0,0,0,.10);
  --text:#0b1220;
  --muted:rgba(11,18,32,.65);
  --shadow:0 10px 40px rgba(0,0,0,.12);
}

.top-actions{display:flex; gap:10px; align-items:center}
.iconbtn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
}
body:not(.light) .icon-sun{display:none}
body.light .icon-moon{display:none}

.input-icon{position:relative}
.input-icon .calicon{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  width:16px;height:16px;
  fill:currentColor;
  color:var(--text);
  opacity:.9;
  pointer-events:none;
}
.input-icon input{padding-left:40px}

/* Slot typography */
.t{font-weight:800}
.p{margin-top:6px; font-size:14px}
.s{color:var(--muted); font-size:12px; margin-top:4px}

/* Player layout + mobile bottom sheet */
.playerbar{gap:10px}
.player-left,.player-right{display:flex; gap:8px; align-items:center; flex:0 0 auto}
.player-center{display:flex; flex-direction:column; gap:10px; flex:1; min-width:0}
.player-center audio{width:100%}
.sheet-handle{display:none}

/* Mobile: make player a bottom sheet that can slide up */
@media (max-width: 760px){
  body{padding-bottom:170px}
  .playerbar{
    padding:10px 12px 14px;
    flex-wrap:wrap;
    align-items:stretch;
    border-top-left-radius:24px;
    border-top-right-radius:24px;
  }
  .sheet-handle{
    display:block;
    width:44px;
    height:5px;
    border-radius:999px;
    background:rgba(255,255,255,.25);
    margin:0 auto 6px;
  }
  body.light .sheet-handle{background:rgba(0,0,0,.18)}
  .player-left,.player-right{
    width:100%;
    justify-content:space-between;
  }
  .player-center{width:100%}
  .player-meta{margin-bottom:2px}
  .playerbar{
    transform: translateY(0);
    transition: transform .25s ease;
  }
  .playerbar.expanded{
    transform: translateY(-45vh);
  }
}


/* === Overrides v3 (fix layout) === */
.slotlist{display:flex !important; flex-direction:column !important; gap:12px !important}
.card{width:100%}

/* Player centered */
.playerbar{justify-content:center !important}
.playerwrap{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:14px;
  align-items:center;
}
.player-center{gap:12px}
.player-meta{margin-bottom:6px}

/* More breathing room between meta and audio */
.player-sub{margin-top:6px}

/* Bottom sheet: start collapsed, expand upward */
@media (max-width: 760px){
  .playerwrap{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .player-left{order:2}
  .player-center{order:1}
  .player-right{order:3}
  .player-right{
    flex-direction:column;
    align-items:stretch;
  }
  .player-right .btn{width:100%}
  .player-left{
    justify-content:space-between;
  }
  /* Put +30s under next hour? Actually +30 above or below: set order */
  #nextHour{order:1}
  #fwd30{order:2}
  /* Sheet animation */
  .playerbar{transform:translateY(0)}
  .playerbar.expanded{transform:translateY(-45vh)}
}

/* Light background override so it looks light */
body.light{
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(238,32,167,.12), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(70,120,255,.10), transparent 55%),
    var(--bg);
}

.player-sub{white-space:pre-line}


/* Header: geen grijze waas, altijd goed leesbaar */
.topbar{
  background: rgba(10,14,22,.92) !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid rgba(255,255,255,.10);
  color: #fff !important;
}
.topbar *{ color:#fff !important; }

/* Center header content */
.brand.center{
  margin: 0 auto;
  display:flex;
  align-items:center;
  gap:12px;
}
.rtv4mark{
  height:28px;
  width:auto;
  display:block;
}
.brandtext .brand-title{ font-weight:800; letter-spacing:.3px; }
.brandtext .brand-sub{ opacity:.75; }
.top-actions{ position:absolute; right:14px; }

/* Playerbar: altijd wit, ook in light mode */
.playerbar{
  background: rgba(10,14,22,.92) !important;
  color:#fff !important;
}
.playerbar *{ color:#fff; }

/* Player layout: rechts prev/next onder elkaar */
.player-right{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* Mobile fullscreen sheet */
@media (max-width: 760px){
  .playerbar{
    top:auto;
    bottom:0;
    left:0;
    right:0;
    border-radius:22px 22px 0 0;
  }

  .playerbar.expanded{
    top:0;
    bottom:0;
    height:100vh;
    border-radius:0;
  }

  .playerwrap{
    height:100%;
    flex-direction:column;
    align-items:stretch;
  }

  .player-left{
    display:flex;
    justify-content:space-between;
    gap:10px;
  }
  .player-left .btn{ width:50%; }

  .player-right .btn{
    width:100%;
  }
}

.input-icon .calicon{
  width:16px;
  height:16px;
  color: currentColor;
  opacity:.9;
}

/* === Play icon button (round, centered, like example) === */
.play{
  width:44px;
  height:44px;
  padding:0 !important;
  border-radius:999px !important;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  box-shadow: 0 10px 30px rgba(238,32,167,.18);
}

.play svg{
  display:block;
  width:18px;
  height:18px;
}

/* Subtle interaction */
.play:hover{
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.play:active{
  transform: translateY(0);
  filter: brightness(.98);
}

/* Better fallback logo fit inside thumb */
.thumb img{
  width:100%;
  height:100%;
  object-fit:contain;   /* was cover, logo’s worden nu niet afgesneden */
  padding:8px;          /* geeft ‘lucht’ rondom logo’s */
}

/* Make sure the program title line (.p) looks like subtitle */
.p{
  font-size:14px;
  margin-top:6px;
  color: var(--text);
}

@media (max-width: 760px){
  .play{ width:42px; height:42px; }
}
