*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #e8a020;
  --green:  #2ecc71;
  --red:    #e83020;
  --bg:     #000000;
  --panel:  rgba(0,0,0,0.75);
  --dim:    #aaaaaa;
  --font:   'Segoe UI', system-ui, sans-serif;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: #fff;
  font-family: var(--font);
  overflow-x: hidden;
}

/* ── Page layout ── */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 28px 20px 20px;
  gap: 18px;
}

.page-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
}

/* ── Camera row ── */
.cameras-row {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 1400px;
  justify-content: center;
}

/* ── Player card ── */
.player-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-label {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

/* ── Player wrapper ── */
.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── No signal ── */
.no-signal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #444;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.no-signal svg { opacity: 0.25; }
.hidden { display: none !important; }

/* ── Player controls ── */
.controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  opacity: 0;
  transition: opacity 0.2s;
}
.player-wrap:hover .controls { opacity: 1; }

.ctrl-left, .ctrl-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: background 0.15s;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.15); }

.ctrl-live {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green);
  padding: 2px 8px;
  border: 1px solid var(--green);
  border-radius: 20px;
}
.ctrl-live.error { color: var(--red); border-color: var(--red); }
.ctrl-live.connecting { color: #555; border-color: #444; }

/* ── HUD overlay (gauge layout) ── */
.hud {
  position: absolute;
  bottom: 0; top: auto; left: 0; right: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0;
  padding: 0;
  background: linear-gradient(transparent 0%, rgba(0,0,0,0.55) 55%);
  pointer-events: none;
  user-select: none;
  z-index: 10;
  transition: opacity .3s;
}
.hud.hud-hidden { opacity: 0; }

/* ── Mobile ── */
@media (max-width: 700px) {
  .cameras-row { flex-direction: column; }
  .page-title  { font-size: 1.6rem; }
}
