:root{
  --text: #ffffff;
  --muted: rgba(255,255,255,0.82);

  /* “glass” look */
  --glass: rgba(0,0,0,0.38);
  --glass2: rgba(0,0,0,0.28);
  --border: rgba(255,255,255,0.14);

  --accent: #ffd34d;
  --danger: #ff6b6b;
  --ok: #6dff88;

  --radius: 18px;

  /* Smartboard friendly sizes, but not “lomp” */
  --h1: clamp(26px, 3vw, 44px);
  --h2: clamp(18px, 2vw, 26px);
  --p:  clamp(16px, 1.6vw, 22px);
  --btn: clamp(18px, 2.0vw, 28px);
  --input: clamp(16px, 1.8vw, 24px);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);

  /* Fallback als achtergrond niet laadt */
  background-color: #000;

  /* Achtergrond */
  background-image: url("achtergrond.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.overlay{
  min-height: 100%;
  padding: 22px;
  /* subtiele vignette zodat tekst altijd leesbaar blijft */
  background: radial-gradient(circle at top, rgba(0,0,0,0.15), rgba(0,0,0,0.55));
  display: grid;
  place-items: center;
}

.container{
  width: min(1050px, 96vw);
  padding: 10px;
  position: relative;
}

/* Kleinere panelen zodat achtergrond zichtbaar blijft */
.panel{
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(14px, 2vw, 22px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  backdrop-filter: blur(6px);
}

.panel + .panel{ margin-top: 12px; }

.title{
  display: grid;
  gap: 6px;
}

h1{
  font-size: var(--h1);
  margin: 0;
  letter-spacing: 0.3px;
}
h2{
  font-size: var(--h2);
  margin: 0;
  opacity: 0.92;
}
p{
  font-size: var(--p);
  line-height: 1.35;
  margin: 10px 0;
  color: var(--muted);
}

.btn{
  font-size: var(--btn);
  padding: 12px 16px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  background: var(--accent);
  color: #111;
  font-weight: 850;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
  touch-action: manipulation;
}
.btn:active{ transform: translateY(1px); }

.btn.secondary{
  background: rgba(255,255,255,0.10);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: none;
  font-weight: 750;
}

.btn.danger{
  background: var(--danger);
  color: #111;
}

.big-submit{
  width: 100%;
  padding: 16px 18px;
  font-size: clamp(22px, 2.6vw, 36px);
  border-radius: 18px;
}

label{
  display: block;
  font-size: var(--p);
  margin-bottom: 6px;
  color: rgba(255,255,255,0.92);
  font-weight: 700;
}

input, select, textarea{
  width: 100%;
  font-size: var(--input);
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline: none;
}
input::placeholder, textarea::placeholder{ color: rgba(255,255,255,0.55); }

textarea{
  min-height: 110px;
  resize: vertical;
}

.helper{
  font-size: calc(var(--p) * 0.92);
  opacity: 0.78;
  margin-top: 6px;
}

.notice{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.22);
  color: var(--muted);
}
.notice.ok{ border-color: rgba(109,255,136,0.35); }
.notice.bad{ border-color: rgba(255,107,107,0.45); }

.row{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px){
  .row.cols-2{ grid-template-columns: 1fr 1fr; }
  .row.cols-3{ grid-template-columns: 1.2fr 1fr 1fr; }
}

.footer-actions{
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Onopvallende fullscreen knop linksboven */
.fs-btn{
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0.75;
}
.fs-btn:hover{ opacity: 0.95; }
.fs-btn:active{ transform: translateY(1px); }

/* Matrix layout (pagina 3) */
.matrix{
  margin-top: 10px;
  background: var(--glass2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  overflow-x: auto;
}

.matrix-grid{
  display: grid;
  gap: 10px;
  align-items: center;
  /* kolommen zetten we dynamisch via JS */
}

.matrix-head{
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  text-align: center;
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.10);
}

.matrix-label{
  font-weight: 850;
  color: rgba(255,255,255,0.92);
  padding: 6px 6px;
  white-space: nowrap;
}

canvas#confettiCanvas{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  display: none;
}
/* Titel + subtiele animatie */
.hero-title{
  display: grid;
  gap: 6px;
  text-align: center;
  padding: 6px 6px 2px;
}
.hero-title h1{
  margin: 0;
}
.hero-title .subtitle{
  font-size: clamp(16px, 1.7vw, 22px);
  color: rgba(255,255,255,0.86);
  margin: 0;
}

@keyframes titleBreathe {
  0%   { transform: translateY(0) scale(1);   filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
  50%  { transform: translateY(-2px) scale(1.01); filter: drop-shadow(0 10px 18px rgba(0,0,0,0.20)); }
  100% { transform: translateY(0) scale(1);   filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
}
.title-animate{
  animation: titleBreathe 2.6s ease-in-out;
}

/* Pagina 3: matrix iets lager (voor kleinere leerlingen) */
.lower-on-board{
  margin-top: 18px;
}
@media (min-height: 800px){
  .lower-on-board{
    margin-top: 38px;
  }
}
@media (min-height: 950px){
  .lower-on-board{
    margin-top: 56px;
  }
}

/* Onder de knoppen: melding + tipknop */
.under-actions{
  margin-top: 10px;
  display: grid;
  gap: 10px;
}