/* Raketlanceringen live — v1.5 */
:root {
  --bg: #060a14;
  --panel: rgba(14, 22, 40, .82);
  --panel2: rgba(20, 31, 56, .9);
  --line: rgba(90, 209, 255, .18);
  --text: #e6eefc;
  --muted: #8b9bb8;
  --cyan: #5ad1ff;
  --orange: #ff8a3d;
  --green: #3ddc84;
  --red: #ff5a6a;
  --amber: #ffc94a;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(ellipse at 20% -10%, #14234a 0%, transparent 55%),
              radial-gradient(ellipse at 90% 10%, #2a1630 0%, transparent 45%), var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--cyan); }
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 70%, #cfe 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 35%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 75% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 15%, #def 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 90%, #fff 50%, transparent 51%);
  background-size: 420px 420px;
}
header, main, footer { position: relative; z-index: 1; }

/* Kop */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  background: rgba(6, 10, 20, .7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 1000;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 30px; filter: drop-shadow(0 0 8px rgba(255, 138, 61, .6)); }
.brand h1 { margin: 0; font-size: 21px; letter-spacing: .5px; }
.brand p { margin: 0; color: var(--muted); font-size: 13px; }
.top-right { display: flex; align-items: center; gap: 14px; }
.clock { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.clock b { color: var(--cyan); font-weight: 600; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang button {
  background: transparent; color: var(--muted); border: 0; padding: 6px 12px; cursor: pointer;
  font-weight: 700; font-size: 13px;
}
.lang button.active { background: var(--cyan); color: #04121c; }
.ver { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }

main { max-width: 1500px; margin: 0 auto; padding: 20px 24px 10px; }

/* Hero */
.hero {
  position: relative; border-radius: 18px; overflow: hidden; min-height: 230px;
  border: 1px solid var(--line); background: var(--panel);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.hero-loading { padding: 80px 20px; text-align: center; color: var(--muted); }
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: .35; filter: saturate(1.1);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6, 10, 20, .95) 0%, rgba(6, 10, 20, .7) 55%, rgba(6, 10, 20, .4) 100%);
}
.hero-inner {
  position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  gap: 24px; padding: 26px 30px; flex-wrap: wrap;
}
.hero-info { flex: 1 1 380px; min-width: 0; }
.hero-label { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: var(--orange); font-weight: 700; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hero h2 { margin: 8px 0 6px; font-size: 30px; line-height: 1.15; }
.hero-meta { margin: 3px 0; color: #c9d6ee; }
.hero-btns { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cd { text-align: center; flex: 0 1 auto; }
.cd {
  display: flex; align-items: flex-start; justify-content: center; gap: 4px;
  font-family: var(--mono); font-size: 52px; font-weight: 700; line-height: 1;
  color: #fff; text-shadow: 0 0 18px rgba(90, 209, 255, .55); white-space: nowrap;
}
.cd .sign { color: var(--orange); margin-right: 8px; }
.cd .u { display: flex; flex-direction: column; align-items: center; min-width: 1.3em; }
.cd .u small { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; text-shadow: none; }
.cd i { font-style: normal; color: rgba(255, 255, 255, .45); }
.cd-note { margin-top: 8px; color: var(--amber); font-size: 13px; }

/* Knoppen en badges */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--cyan); }
.btn-live { background: linear-gradient(135deg, #ff4d5e, #ff8a3d); border-color: transparent; color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700;
  letter-spacing: .4px; text-transform: none; white-space: nowrap; border: 1px solid transparent;
}
.b-go { background: rgba(61, 220, 132, .15); color: var(--green); border-color: rgba(61, 220, 132, .4); }
.b-ok { background: rgba(61, 220, 132, .15); color: var(--green); border-color: rgba(61, 220, 132, .4); }
.b-tbd { background: rgba(255, 201, 74, .12); color: var(--amber); border-color: rgba(255, 201, 74, .35); }
.b-hold { background: rgba(255, 138, 61, .15); color: var(--orange); border-color: rgba(255, 138, 61, .4); }
.b-fail { background: rgba(255, 90, 106, .15); color: var(--red); border-color: rgba(255, 90, 106, .4); }
.b-flight { background: rgba(90, 209, 255, .18); color: var(--cyan); border-color: var(--cyan); animation: pulse 1.6s infinite; }
.b-live { background: #ff3b4e; color: #fff; animation: pulse 1.6s infinite; }
.b-crew { background: rgba(170, 130, 255, .18); color: #c9b3ff; border-color: rgba(170, 130, 255, .4); }
@keyframes pulse { 50% { opacity: .55; } }

/* Inhoud */
.content { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.content.nomap { grid-template-columns: 1fr; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; flex: 0 0 auto; }
.tab {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.tab.active { background: var(--cyan); color: #04121c; border-color: var(--cyan); }
.notice { background: rgba(255, 201, 74, .1); border: 1px solid rgba(255, 201, 74, .35); color: var(--amber); padding: 9px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 13px; }
.empty { color: var(--muted); padding: 30px; text-align: center; }

.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: 74px 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.row:hover { border-color: rgba(90, 209, 255, .5); }
.row.sel { border-color: var(--orange); background: var(--panel2); }
.row-time { display: flex; flex-direction: column; font-family: var(--mono); text-align: center; }
.rd { font-size: 13px; color: var(--muted); text-transform: uppercase; }
.rh { font-size: 18px; font-weight: 700; color: var(--cyan); }
.row-img { width: 64px; height: 64px; border-radius: 10px; background: #0d1528 center/cover no-repeat; }
.row-img.noimg { display: flex; align-items: center; justify-content: center; font-size: 26px; }
.row-main h3 { margin: 0 0 2px; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main p { margin: 0; font-size: 13px; color: #c9d6ee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main p.muted, .muted { color: var(--muted); }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.rel { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

.detail { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; cursor: default; }
.desc { margin: 0 0 10px; color: #d6e1f5; }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 10px; font-size: 14px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.detail-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Kaart */
.map-col { position: relative; }
.map-wrap {
  position: sticky; top: 84px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
}
.map-title { padding: 10px 14px; font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--cyan); border-bottom: 1px solid var(--line); }
#map { height: calc(100vh - 150px); min-height: 420px; background: #0a0f1c; }
/* OpenStreetMap donker maken */
.dark-tiles { filter: invert(1) hue-rotate(185deg) brightness(.85) contrast(.9) saturate(.6); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #101a30; color: var(--text); }
.leaflet-popup-content { margin: 10px 12px; }
.pop ul { margin: 6px 0 0; padding-left: 16px; }
.pop li { margin-bottom: 4px; }
.pop small { color: var(--muted); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-tooltip { background: #101a30; color: var(--text); border-color: var(--line); }

footer.foot {
  max-width: 1500px; margin: 10px auto 0; padding: 16px 24px 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: var(--muted); font-size: 12px;
}

/* Snelfilters */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  background: rgba(14, 22, 40, .7); border: 1px solid var(--line); color: #c9d6ee;
  padding: 5px 12px; border-radius: 20px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit;
}
.chip span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.chip:hover { border-color: var(--cyan); }
.chip.active { background: rgba(255, 138, 61, .18); border-color: var(--orange); color: #fff; }
.chip.active span { color: var(--orange); }

/* Herinnering (belletje) */
.row-badges { display: flex; align-items: center; gap: 6px; }
.bell {
  background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 4px 6px; color: var(--text); font-family: inherit; filter: grayscale(.6); opacity: .8;
}
.bell:hover { border-color: var(--amber); opacity: 1; filter: none; }
.bell.on { border-color: var(--amber); background: rgba(255, 201, 74, .15); filter: none; opacity: 1; }
.bell.btn { padding: 9px 14px; font-size: 14px; }
.bell.btn.btn-sm { padding: 6px 11px; font-size: 13px; }

/* Agenda-menu */
.calwrap { position: relative; display: inline-block; }
.calmenu {
  position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: #101a30; border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 2px;
}
.calmenu[hidden] { display: none; }
.calmenu button, .calmenu a {
  text-align: left; background: transparent; border: 0; color: var(--text); padding: 8px 10px; border-radius: 7px;
  font: 600 14px system-ui, sans-serif; cursor: pointer; text-decoration: none;
}
.calmenu button:hover, .calmenu a:hover { background: rgba(90, 209, 255, .12); }
.calmenu small { color: var(--muted); padding: 4px 10px 2px; font-size: 11px; }

/* Weetjes */
.hero-fact { margin: 6px 0 0; color: var(--amber); font-size: 14px; }
.facts { background: rgba(255, 201, 74, .06); border: 1px solid rgba(255, 201, 74, .2); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.facts h4 { margin: 0 0 6px; font-size: 14px; color: var(--amber); }
.facts ul { margin: 0; padding: 0; list-style: none; }
.facts li { padding: 3px 0; font-size: 14px; color: #d6e1f5; }

/* Meldingen */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 6000; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; background: #101a30; border: 1px solid var(--line);
  border-left: 4px solid var(--cyan); border-radius: 12px; padding: 12px 12px 12px 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55); animation: toastIn .25s ease-out; font-size: 14px;
}
.toast.big { border-left-color: var(--orange); font-size: 15px; }
.toast small { color: var(--muted); }
.toast-body { flex: 1; }
.toast-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.toast-x { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Brede weergave (In de ruimte / Nieuws) */
.content.wide { grid-template-columns: 1fr; }
.content.wide .map-col { display: none; }
.tab-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: rgba(255, 138, 61, .25); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.tab-n:empty { display: none; }
.tab.active .tab-n { background: rgba(4, 18, 28, .25); color: #04121c; }

/* In de ruimte */
.crew-head { font-size: 18px; font-weight: 700; margin: 4px 0 14px; }
.station { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.st-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.st-head h3 { margin: 0; font-size: 17px; }
.st-head small { color: var(--muted); }
.st-img { width: 64px; height: 44px; border-radius: 8px; background: #0d1528 center/cover no-repeat; flex: 0 0 auto; }
.st-img.noimg, .ph.noimg { display: flex; align-items: center; justify-content: center; font-size: 22px; }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.astro { display: flex; gap: 12px; align-items: center; background: rgba(20, 31, 56, .7); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.astro .ph { width: 64px; height: 64px; border-radius: 50%; background: #0d1528 center/cover no-repeat; flex: 0 0 auto; border: 2px solid rgba(90, 209, 255, .35); }
.astro-info { display: flex; flex-direction: column; min-width: 0; }
.astro-info b { font-size: 15px; }
.astro-info small { font-size: 12px; color: #c9d6ee; }
.astro-info .days { margin-top: 3px; font-family: var(--mono); font-size: 12px; color: var(--amber); }

/* Livestream ruimtestation */
.st-head > div:nth-child(2) { flex: 1; min-width: 0; }
.st-live { margin-left: auto; flex: 0 0 auto; }
.st-nolive { margin-left: auto; max-width: 340px; font-size: 12px; color: var(--muted); text-align: right; }
@media (max-width: 640px) { .st-head { flex-wrap: wrap; } .st-live, .st-nolive { margin-left: 0; width: 100%; text-align: left; max-width: none; } }

/* Nieuws */
.news-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.news {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s;
}
.news:hover { border-color: var(--cyan); transform: translateY(-2px); }
.nimg { height: 160px; background: #0d1528 center/cover no-repeat; }
.nimg.noimg { display: flex; align-items: center; justify-content: center; font-size: 40px; }
.nb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nb small { color: var(--muted); font-size: 12px; }
.nb h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.nb p { margin: 0; font-size: 13px; color: #c9d6ee; }
.nb .more { margin-top: auto; padding-top: 6px; color: var(--cyan); font-size: 13px; font-weight: 600; }

/* Nieuws bij een lancering */
.related { background: rgba(90, 209, 255, .06); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.related h4 { margin: 0 0 6px; font-size: 14px; color: var(--cyan); }
.related a { display: block; padding: 4px 0; color: var(--text); text-decoration: none; font-size: 14px; }
.related a:hover { color: var(--cyan); }
.related small { color: var(--muted); }

/* Installatieknop */
.install { background: linear-gradient(135deg, #2b7fff, #5ad1ff); color: #04121c; border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.install[hidden] { display: none; }

/* Video-popup */
body.noscroll { overflow: hidden; }
.vmodal {
  position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center;
  background: rgba(2, 5, 12, .85); backdrop-filter: blur(4px); padding: 20px;
}
.vmodal.open { display: flex; }
.vbox {
  width: min(1100px, 100%, calc((100vh - 150px) * 16 / 9)); background: #0b1324; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.vhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.vtitle { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vclose { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 34px; height: 34px; font-size: 16px; cursor: pointer; flex: 0 0 auto; }
.vclose:hover { border-color: var(--orange); color: var(--orange); }
.vframe { position: relative; aspect-ratio: 16 / 9; background: #000; }
.vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vfoot { padding: 9px 14px; font-size: 13px; color: var(--muted); }
button.btn { font-family: inherit; }
@media (max-width: 640px) { .vmodal { padding: 8px; } }

/* Mobiel */
@media (max-width: 1000px) {
  .content { grid-template-columns: 1fr; }
  .map-wrap { position: relative; top: 0; }
  #map { height: 380px; min-height: 0; }
  .cd { font-size: 40px; }
}
@media (max-width: 640px) {
  .top { padding: 10px 14px; }
  .clock { display: none; }
  main { padding: 14px 12px 6px; }
  .hero-inner { padding: 20px 18px; }
  .hero h2 { font-size: 23px; }
  .hero-cd { width: 100%; }
  .cd { font-size: 34px; }
  .row { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; padding: 9px 10px; }
  .row-img, .row-img.noimg { display: none; }
  .top { position: relative; }
  .rh { font-size: 15px; }
  .tab { padding: 8px 12px; font-size: 13px; }
  .news-grid, .crew-grid { grid-template-columns: 1fr; }
}
