:root{
  /* weidezaun.info corporate colors (from the live site) */
  --brand:#217cb6;        /* primary blue – header, nav, logo, buttons */
  --brand-dark:#186ba1;   /* hover */
  --accent:#e46828;       /* orange accent, used sparingly */
  --ink:#424242;          /* body text grey */
  --muted:#757575;
  --bg:#f5f5f5;
  --card:#ffffff;
  --line:#e2e6ea;
  --live:#2a815e;         /* brand green for "live" */
  --off:#b20000;          /* brand red for "offline" */
  --radius:12px;
  --shadow:0 10px 30px rgba(33,124,182,.10);
  --font:'Manrope',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0}
body{
  font-family:var(--font);
  color:var(--ink);
  background:
    radial-gradient(1200px 400px at 50% -120px, #fff6ea 0, rgba(255,246,234,0) 60%),
    var(--bg);
  min-height:100vh;
  display:flex;flex-direction:column;
  letter-spacing:.005em;
}

/* --- Header --- */
.site-header{
  display:flex;align-items:center;gap:22px;
  padding:18px 28px;
  background:var(--card);
  border-bottom:3px solid var(--brand);
  box-shadow:0 2px 10px rgba(31,42,51,.05);
}
.brand{display:flex;align-items:center;text-decoration:none}
.brand-logo{height:40px;width:auto;display:block}
.header-title{display:flex;flex-direction:column;line-height:1.1}
.header-title .eyebrow{
  color:var(--accent);font-weight:800;font-size:11px;letter-spacing:.16em;
}
.header-title h1{
  margin:2px 0 0;font-size:20px;font-weight:800;letter-spacing:-.02em;color:var(--ink);
}

/* --- Stage / grid --- */
.stage{flex:1;width:100%;max-width:1920px;margin:0 auto;padding:28px 24px 36px}

.empty-state{
  margin:60px auto;max-width:420px;text-align:center;
  color:var(--muted);font-size:15px;font-weight:600;
}

/* Cards size themselves via minmax: fewer live cams = bigger tiles,
   more live cams = the grid wraps into additional rows/columns. */
.stream-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(520px,1fr));gap:24px;
}
.stream-card{
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;
}
.stream-card[hidden]{display:none}
.stream-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 18px;border-bottom:1px solid var(--line);
}
.cam-name{margin:0;font-size:15px;font-weight:700;color:var(--ink)}

.stream-head-right{display:flex;align-items:center;gap:12px}

.expand-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;padding:0;border:1px solid var(--line);border-radius:8px;
  background:var(--card);color:var(--muted);cursor:pointer;transition:color .15s,border-color .15s,background .15s;
}
.expand-btn:hover{color:var(--brand);border-color:var(--brand);background:#f3f9fd}

.status{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--muted)}
.status-dot{width:9px;height:9px;border-radius:50%;background:var(--muted);box-shadow:0 0 0 3px rgba(107,122,134,.15)}
.status.is-live .status-dot{background:var(--live);box-shadow:0 0 0 3px rgba(43,182,115,.18);animation:pulse 2s infinite}
.status.is-live{color:var(--live)}
.status.is-off .status-dot{background:var(--off);box-shadow:0 0 0 3px rgba(192,57,43,.15)}
.status.is-off{color:var(--off)}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(43,182,115,.4)}70%{box-shadow:0 0 0 6px rgba(43,182,115,0)}100%{box-shadow:0 0 0 0 rgba(43,182,115,0)}}

/* --- Video --- */
.video-wrap{position:relative;aspect-ratio:16/9;background:#0d141a}
.video-wrap video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#0d141a;display:block}

/* --- Lightbox (klick auf eine Kachel vergroessert sie, ohne eine zweite
   Video-/hls.js-Instanz zu starten: app.js verschiebt das echte <video>
   per DOM-Move hier rein und wieder zurueck) --- */
.lightbox{
  position:fixed;inset:0;z-index:1000;
  display:flex;align-items:center;justify-content:center;padding:24px;
}
.lightbox[hidden]{display:none}
.lightbox-backdrop{
  position:absolute;inset:0;margin:0;padding:0;border:none;
  background:rgba(13,20,26,.78);cursor:pointer;
  opacity:0;transition:opacity .22s ease;
}
.lightbox-panel{
  position:relative;z-index:1;width:min(1100px,100%);
  background:var(--card);border-radius:var(--radius);overflow:hidden;
  box-shadow:0 30px 80px rgba(0,0,0,.45);
  opacity:0;transform:scale(.94);transition:opacity .22s ease,transform .22s ease;
}
.lightbox.is-open .lightbox-backdrop{opacity:1}
.lightbox.is-open .lightbox-panel{opacity:1;transform:scale(1)}
.lightbox-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 18px;border-bottom:1px solid var(--line);
}
.lightbox-head h2{margin:0;font-size:15px;font-weight:700;color:var(--ink)}
.lightbox-close{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;border:1px solid var(--line);border-radius:8px;
  background:var(--card);color:var(--muted);cursor:pointer;font-size:15px;line-height:1;
}
.lightbox-close:hover{color:var(--off);border-color:var(--off)}
.lightbox-body .video-wrap{aspect-ratio:16/9}

@media(max-width:820px){
  .lightbox{padding:0}
  .lightbox-panel{width:100%;height:100%;border-radius:0;display:flex;flex-direction:column}
  .lightbox-body{flex:1;display:flex}
  .lightbox-body .video-wrap{flex:1;aspect-ratio:auto}
}

/* --- Footer --- */
.site-footer{
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:16px 28px;border-top:1px solid var(--line);background:var(--card);
  color:var(--muted);font-size:12px;
}
.site-footer a{color:var(--brand);text-decoration:none;font-weight:600}
.site-footer a:hover{color:var(--brand-dark);text-decoration:underline}

/* --- Responsive --- */
@media(max-width:1100px){
  .stream-grid{grid-template-columns:repeat(auto-fit,minmax(380px,1fr))}
}
@media(max-width:820px){
  .stream-grid{grid-template-columns:1fr;gap:16px}
  .site-header{padding:14px 18px;gap:14px}
  .brand-logo{height:34px}
  .header-title h1{font-size:17px}
  .stage{padding:18px 14px 26px}
}
