/* =============================================
   ANKIE OP KAMP — Spelers CSS
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width:100%; height:100%; overflow:hidden; font-family:'Nunito',sans-serif; background:#1a1a2e; color:#fff; touch-action:manipulation; }

/* ── Start scherm ─────────────────────────── */
#start-screen { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#0f2027,#203a43,#2c5364); z-index:9999; }
.start-inner  { text-align:center; padding:2rem; max-width:420px; }
.start-logo   { font-size:5rem; margin-bottom:1rem; }
.start-inner h1 { font-size:2.2rem; font-weight:900; color:#fbbf24; margin-bottom:0.4rem; }
.start-inner p  { color:#94a3b8; font-size:1.1rem; margin-bottom:2rem; }
.btn-start {
  background:#fbbf24; color:#1a1a2e; border:none; border-radius:50px;
  font-family:'Nunito',sans-serif; font-weight:900; font-size:1.4rem;
  padding:1rem 3rem; cursor:pointer;
  box-shadow:0 6px 30px rgba(251,191,36,0.4); transition:transform 0.15s;
}
.btn-start:active { transform:scale(0.96); }
.start-hint { color:#64748b; font-size:0.85rem; margin-top:1rem; }

/* ── App & Kaart ──────────────────────────── */
#app { position:fixed; inset:0; }
#map { position:absolute; inset:0; }

/* ── Navigatie banner ────────────────────── */
#nav-banner { position:absolute; top:0; left:0; right:0; background:rgba(15,32,39,0.97); color:#fff; z-index:250; display:none; flex-direction:column; }
#nav-banner.actief { display:flex; }
#nav-stap { display:flex; align-items:center; gap:0.9rem; padding:0.75rem 1rem; border-bottom:1px solid rgba(255,255,255,0.1); }
#nav-pijl  { font-size:2.2rem; min-width:2.5rem; text-align:center; }
#nav-tekst { flex:1; font-size:1.1rem; font-weight:700; line-height:1.3; }
#nav-afstand { font-size:1rem; font-weight:900; color:#fbbf24; white-space:nowrap; }
#nav-totaal { padding:0.35rem 1rem; font-size:0.82rem; color:#94a3b8; display:flex; gap:1.2rem; }

/* ── Route alert ─────────────────────────── */
.route-alert {
  position:absolute; top:1rem; left:50%; transform:translateX(-50%);
  background:rgba(239,68,68,0.95); color:#fff; border-radius:16px;
  padding:0.9rem 1.8rem; text-align:center;
  box-shadow:0 4px 24px rgba(0,0,0,0.35); z-index:200; min-width:280px;
  animation:slideDown 0.4s ease;
}
.route-alert .alert-icon { font-size:1.8rem; display:block; margin-bottom:0.2rem; }
.route-alert .alert-text { font-size:1.2rem; font-weight:900; display:block; }
.route-alert .alert-sub  { font-size:0.9rem; opacity:0.88; display:block; }
@keyframes slideDown { from{transform:translateX(-50%) translateY(-40px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }

/* ── Bericht overlay ─────────────────────── */
.bericht-overlay {
  position:absolute; inset:0;
  background:rgba(0,0,0,0.75); z-index:350;
  display:flex; align-items:center; justify-content:center; padding:1.5rem;
  animation:fadeIn 0.3s ease;
}
.bericht-card {
  background:#1e3a5f; color:#fff; border-radius:24px; padding:2rem;
  max-width:480px; width:100%; box-shadow:0 16px 60px rgba(0,0,0,0.6);
  border:2px solid rgba(59,130,246,0.4);
}
.bericht-header { display:flex; align-items:center; gap:0.75rem; margin-bottom:1.2rem; }
.bericht-icon   { font-size:2rem; }
.bericht-card h2 { font-size:1.5rem; font-weight:900; color:#93c5fd; }
.bericht-card p  { font-size:1.15rem; line-height:1.65; margin-bottom:1.5rem; color:#e2e8f0; }

/* ── Opdracht overlay ────────────────────── */
.opdracht-overlay {
  position:absolute; inset:0; background:rgba(0,0,0,0.72); z-index:300;
  display:flex; align-items:center; justify-content:center; padding:1.5rem;
  animation:fadeIn 0.3s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.opdracht-card { background:#fff; color:#1e293b; border-radius:24px; padding:2rem; max-width:560px; width:100%; box-shadow:0 16px 60px rgba(0,0,0,0.5); max-height:90vh; overflow-y:auto; }
.opdracht-header { display:flex; align-items:center; gap:0.75rem; margin-bottom:1.2rem; }
.opdracht-icon   { font-size:2rem; }
.opdracht-card h2 { font-size:1.6rem; font-weight:900; color:#1e3a5f; }
#opdracht-afbeelding-wrap { margin-bottom:1rem; }
#opdracht-afbeelding { width:100%; border-radius:12px; max-height:220px; object-fit:cover; }
#opdracht-tekst { font-size:1.1rem; line-height:1.6; color:#374151; margin-bottom:1rem; }

/* ── Timer ───────────────────────────────── */
.opdracht-timer { display:flex; align-items:center; gap:0.5rem; margin-bottom:1rem; background:#fef3c7; border-radius:12px; padding:0.6rem 1rem; }
.timer-label    { font-weight:700; color:#92400e; font-size:0.95rem; }
.timer-value    { font-size:2rem; font-weight:900; font-variant-numeric:tabular-nums; color:#1e3a5f; margin-left:auto; }

/* ── Beloning / straf badges ─────────────── */
.beloning-badge { border-radius:10px; padding:0.5rem 0.9rem; font-weight:700; font-size:0.95rem; margin-bottom:0.5rem; }
.beloning-badge.beloning { background:#dcfce7; color:#166534; border:1.5px solid #86efac; }
.beloning-badge.straf    { background:#fee2e2; color:#991b1b; border:1.5px solid #fca5a5; }

/* ── Voltooien knop ──────────────────────── */
.btn-klaar {
  width:100%; background:#16a34a; color:#fff; border:none; border-radius:50px;
  font-family:'Nunito',sans-serif; font-weight:900; font-size:1.3rem;
  padding:1rem; cursor:pointer; box-shadow:0 4px 16px rgba(22,163,74,0.35);
  transition:transform 0.15s; margin-top:0.5rem;
}
.btn-klaar:active { transform:scale(0.97); }

/* ── Resultaat overlay ───────────────────── */
.resultaat-overlay {
  position:absolute; inset:0; background:rgba(0,0,0,0.82); z-index:400;
  display:flex; align-items:center; justify-content:center; padding:2rem;
  animation:fadeIn 0.35s ease;
}
.resultaat-card { background:#fff; color:#1e293b; border-radius:24px; padding:2.5rem 2rem; max-width:420px; width:100%; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,0.6); }
.resultaat-emoji { font-size:4rem; margin-bottom:0.8rem; }
.resultaat-card h2 { font-size:1.8rem; font-weight:900; color:#1e3a5f; margin-bottom:0.6rem; }
.resultaat-card p  { font-size:1.1rem; color:#374151; line-height:1.5; margin-bottom:1.5rem; }

/* ── Opdrachten knop ─────────────────────── */
#btn-geschiedenis {
  position:absolute; bottom:3.2rem; left:1rem; z-index:150;
  background:rgba(15,32,39,0.92); border:2px solid rgba(255,255,255,0.2);
  color:#fff; border-radius:50px; padding:0.55rem 1.1rem;
  font-family:'Nunito',sans-serif; font-size:0.9rem; font-weight:700;
  cursor:pointer; display:flex; align-items:center; gap:0.4rem;
}
#btn-geschiedenis:active { background:rgba(59,130,246,0.5); }
#geschiedenis-badge { background:#3b82f6; color:#fff; border-radius:50px; padding:0.1rem 0.45rem; font-size:0.75rem; font-weight:900; min-width:1.2rem; text-align:center; }

/* ── Geschiedenis panel ──────────────────── */
#geschiedenis-panel {
  position:absolute; bottom:0; left:0; right:0; max-height:70vh;
  background:rgba(15,32,39,0.98); border-top:2px solid rgba(255,255,255,0.15);
  border-radius:20px 20px 0 0; z-index:400;
  display:flex; flex-direction:column;
  transform:translateY(100%); transition:transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
#geschiedenis-panel.open { transform:translateY(0); }
.panel-handle { display:flex; align-items:center; justify-content:space-between; padding:1rem 1.2rem 0.6rem; border-bottom:1px solid rgba(255,255,255,0.1); }
.panel-handle h3 { font-size:1.1rem; font-weight:900; }
.panel-close { background:rgba(255,255,255,0.1); border:none; color:#fff; border-radius:50%; width:2rem; height:2rem; font-size:1rem; cursor:pointer; display:flex; align-items:center; justify-content:center; }
#geschiedenis-lijst { overflow-y:auto; padding:0.8rem 1rem 1.5rem; display:flex; flex-direction:column; gap:0.75rem; }
.gesch-item { background:rgba(255,255,255,0.06); border-left:4px solid #3b82f6; border-radius:10px; padding:0.75rem 1rem; }
.gesch-item.voltooid { border-left-color:#22c55e; }
.gesch-item.gefaald  { border-left-color:#ef4444; }
.gesch-titel  { font-weight:900; font-size:1rem; margin-bottom:0.25rem; }
.gesch-tekst  { font-size:0.88rem; color:#94a3b8; line-height:1.4; }
.gesch-status { font-size:0.75rem; margin-top:0.3rem; font-weight:700; }
.gesch-status.ontvangen { color:#60a5fa; }
.gesch-status.voltooid  { color:#4ade80; }
.gesch-status.gefaald   { color:#f87171; }
.geen-opdrachten { text-align:center; color:#64748b; padding:2rem; font-size:0.95rem; }

/* ── Status bar ──────────────────────────── */
#status-bar { position:absolute; bottom:0; left:0; right:0; background:rgba(0,0,0,0.55); padding:0.4rem 1rem; display:flex; align-items:center; gap:0.6rem; font-size:0.85rem; z-index:100; }
.gps-dot { width:10px; height:10px; border-radius:50%; display:inline-block; flex-shrink:0; }
.gps-searching { background:#f59e0b; animation:blink 1s ease-in-out infinite; }
.gps-good  { background:#22c55e; }
.gps-ok    { background:#86efac; }
.gps-weak  { background:#f97316; }
.gps-error { background:#ef4444; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.status-sep { opacity:0.4; }

/* ── Utility ─────────────────────────────── */
.hidden { display:none !important; }
.maplibregl-ctrl-bottom-right { bottom:2rem; }
.maplibregl-ctrl-attrib { font-size:0.7rem; }
