/* ===== 16:9 Fullscreen layout with fluid scale ===== */

:root{
  --u: min(1vw, 1vh);

  --bg: #0e1116;
  --bg-soft: #141923;
  --card: #2a2f39;
  --ink: #f7f8fa;
  --ink-dim: #cbd2dc;
  --accent: #a7c4ff;
  --shadow: 0 0.9rem 2rem rgba(0,0,0,.35);

  --radius-xl: 1.2rem;
  --radius-md: .8rem;

  --gap-xl: clamp(1.2rem, 3.4*var(--u), 3rem);
  --gap-lg: clamp(.9rem, 2.4*var(--u), 2rem);
  --gap-md: clamp(.6rem, 1.8*var(--u), 1.2rem);
  --gap-sm: clamp(.4rem, 1.2*var(--u), .8rem);

  --container-pad-x: clamp(1rem, 2.6*var(--u), 2rem);
}

/* reset */
*{ box-sizing: border-box; margin: 0; padding: 0; }
html, body{ height: 100%; }

/* Fullscreen background */
body.screen{
  height: 100vh;
  width: 100vw;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 800px at 20% -10%, #1a2440 0%, transparent 60%),
    radial-gradient(1200px 800px at 120% 20%, #152330 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
}

/* 16:9 stage */
.stage{
  aspect-ratio: 16 / 9;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--gap-lg);
  padding: var(--container-pad-x);
}

/* Header */
.topbar{ text-align: center; }
.title{
  font-size: clamp(1.6rem, 4.6*var(--u), 3rem);
  font-weight: 800;
  letter-spacing: .3px;
  text-shadow: 0 .4rem 1.4rem #0008;
}

/* Content */
.wrap{
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: var(--gap-lg);
}

.grid{
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--gap-xl);
  align-items: stretch;
  min-height: 0;
}

@media (max-aspect-ratio: 16/9){
  .grid{ grid-template-columns: 1.2fr 1fr; }
}

.card{
  background: linear-gradient(180deg, #2a2f39 0%, #262b34 100%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid #ffffff12;
  min-height: 0;
}

/* Info card */
.info-card{
  padding: clamp(.8rem, 2.2*var(--u), 1.6rem);
  display: flex;
  flex-direction: column;
  gap: .2rem;
  overflow: auto;
}

.row{
  display: grid;
  grid-template-columns: clamp(8rem, 18*var(--u), 14rem) 1fr;
  gap: var(--gap-md);
  align-items: start;
  padding: .5rem 0;
  border-bottom: 1px dashed #ffffff1a;
  line-height: 1.25;
}
.row:last-child{ border-bottom: none; }

.label{
  color: var(--ink-dim);
  font-weight: 600;
  font-size: clamp(1.3rem, 3.2*var(--u), 1.7rem);
}

.value{
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(1.5rem, 4*var(--u), 2.2rem);
  word-break: break-word;
  display: flex;
  align-items: center;
}
.value > #starttijd{ flex: 0 0 auto; }

.value:has(#alt-starts){
  justify-content: space-between;
}

.row-block .value{ white-space: normal; }

/* Image card */
.image-card{
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(.5rem, 1.4*var(--u), 1rem);
  min-height: 0;
  background: #0b0d12;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid #ffffff10;
}
.image-card img{
  position: absolute;
  inset: clamp(.5rem, 1.4*var(--u), 1rem);
  width: calc(100% - 2 * clamp(.5rem, 1.4*var(--u), 1rem));
  height: calc(100% - 2 * clamp(.5rem, 1.4*var(--u), 1rem));
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: var(--radius-md);
}

/* Codes bar */
.codesbar{}
.codesbar-inner{
  display: flex; gap: var(--gap-md);
  align-items: center; justify-content: center;
  padding: clamp(.6rem, 1.6*var(--u), 1rem) clamp(.8rem, 2*var(--u), 1.2rem);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #1f2330 0%, #1a1e29 100%);
  box-shadow: var(--shadow);
  border: 1px solid #ffffff12;
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(2rem, 4.8*var(--u), 2.6rem);
}
.code-item{ display:inline-flex; gap:.5rem; align-items: baseline; }
.code-sep{ opacity:.35; }

/* Footer */
.bottombar{
  width: 100%;
  text-align: center;
  color: #aab3c4;
  opacity: .8;
  font-size: clamp(.8rem, 1.8*var(--u), 1rem);
}

/* Debug timestamp */
.debug-ts{
  position: absolute;
  right: .6rem; bottom: .6rem;
  font-size: clamp(.7rem, 1.6*var(--u), .9rem);
  line-height: 1.2;
  opacity: 0.7;
  background: rgba(0,0,0,0.35);
  color: #fff;
  padding: .3rem .5rem;
  border-radius: .4rem;
  user-select: none;
  z-index: 9999;
}

/* Utilities */
.hide{ display:none !important; }

#tijdschaal{
  list-style-type: disc;
  padding-left: 1.2em;
  margin: 0;
}
#tijdschaal li{ margin: .2em 0; }

/* ===== Alternatieve starttijd-knoppen ===== */
.alt-buttons{
  display:inline-flex;
  gap: .35rem;
  margin-left: .6rem;
}
.alt-btn{
  font-size: clamp(1rem, 2.6*var(--u), 1.4rem);
  line-height: 1;
  padding: .25em .5em;
  border: 1px solid #ffffff28;
  background: #1b2130;
  color: var(--ink);
  border-radius: .5rem;
  cursor: pointer;
  user-select: none;
}
.alt-btn:hover{ filter: brightness(1.08); }
.alt-btn:active{ transform: translateY(1px); }
.alt-btn.is-active{ border-color: #ffffff66; background: #26304a; }

/* ===== Dashboard / Zaalplan extra styles ===== */
.container{
  max-width: 900px; margin: 48px auto; padding: 0 16px; color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}
.container h1{ text-align:center; margin-bottom: 12px; }
.container footer{ text-align:center; color:#aab3c4; opacity:.85; margin-top:16px; }

.dash-wrap{ max-width: 1400px; margin: 32px auto; padding: 0 16px; }
.dash-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 18px;
}
.dash-card{
  background: linear-gradient(180deg, #2a2f39 0%, #262b34 100%);
  border: 1px solid #ffffff12; border-radius: 16px; box-shadow: var(--shadow);
  padding: 16px;
}
.dash-card h3{ margin: 0 0 8px; font-weight:800; font-size: 20px; }
.meta{ display:flex; gap:14px; flex-wrap:wrap; color: var(--ink-dim); }
.meta b{ color:var(--ink); }
.meter{
  width:100%; height: 14px; background:#1b2130; border-radius: 999px;
  border:1px solid #ffffff18; overflow:hidden; margin: 8px 0 4px;
}
.meter > span{
  display:block; height:100%; width:0%;
  background: linear-gradient(90deg, #74c0fc, #b197fc);
}
.meta-row{ display:flex; justify-content:space-between; color: var(--ink-dim); font-size: 14px; }

.tabbar{
  display:flex; gap:10px; justify-content:center; margin: 10px 0 16px;
}
.tabbar a{
  text-decoration:none; color:#fff; background:#111827; border:1px solid #ffffff18;
  padding:10px 14px; border-radius:10px;
}
.venue-tabs{ display:flex; gap:10px; margin-bottom: 12px; }
.venue-tabs button{
  background:#1b2130; color:#fff; border:1px solid #ffffff22; padding:8px 12px; border-radius:10px; cursor:pointer;
}
.venue-tabs button.is-active{ background:#26304a; border-color:#ffffff55; }

.plan-wrap{
  display:grid; grid-template-columns: 1.1fr 1fr; gap:18px; align-items: stretch;
}
.plan-card{
  background: linear-gradient(180deg, #2a2f39 0%, #262b34 100%);
  border: 1px solid #ffffff12; border-radius: 16px; box-shadow: var(--shadow);
  padding: 12px; position: relative; overflow:hidden;
}
.plan-card h3{ margin: 4px 0 8px; font-weight:800; }
.plan-image{
  position:absolute; inset: 12px; display:grid; place-items:center; background:#0b0d12; border-radius:10px; border:1px solid #ffffff12;
}
.plan-image img{ max-width:100%; max-height:100%; object-fit:contain; display:block; }
