:root {
  --bg: #07101a;
  --panel: rgba(15, 24, 37, 0.88);
  --panel-soft: rgba(28, 43, 62, 0.82);
  --text: #eef8ff;
  --muted: #b8cee8;
  --blue: #67d1ff;
  --green: #5fe3ad;
  --orange: #ffbb66;
  --red: #ff6a7a;
  --shadow: rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Inter, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  position: relative;
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
}

#background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.camera-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(360px, 28vw);
  min-width: 260px;
  padding: 12px 12px 14px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px var(--shadow);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.camera-header h2 {
  margin: 2px 0 0;
  font-size: 1.7rem;
}

.primary-btn,
.secondary-btn {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 0.15s ease;
}

.primary-btn {
  background: var(--blue);
  color: #07121a;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.video-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #020a11;
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 4 / 3;
}

#video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #01070d;
}

#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill.open {
  background: rgba(95, 227, 173, 0.18);
  color: var(--green);
}

.status-pill.closed {
  background: rgba(255, 187, 102, 0.18);
  color: var(--orange);
}

.status-pill.neutral {
  background: rgba(103, 209, 255, 0.12);
  color: var(--blue);
}

.timer-value {
  font-size: 1.3rem;
  font-weight: 800;
}

.metrics-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 10px;
  display: grid;
  gap: 8px;
}

.metrics-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.metrics-list strong {
  color: var(--text);
}

.alert-box {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
}

.alert-box.neutral {
  background: rgba(103, 209, 255, 0.12);
  color: var(--blue);
}

.alert-box.warning {
  background: rgba(255, 187, 102, 0.14);
  color: var(--orange);
}

.alert-box.danger {
  background: rgba(255, 106, 122, 0.14);
  color: #ffd1d7;
}

.full-width {
  width: 100%;
}

@media (max-width: 900px) {
  .camera-panel {
    width: min(320px, calc(100vw - 24px));
    right: 12px;
    bottom: 12px;
  }
}
