:root {
  color-scheme: dark;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: #07131d;
  color: #edf5f7;
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(180deg, rgba(12, 106, 132, .18), transparent 280px), #07131d;
  margin: 0;
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(7, 19, 29, .94);
  border-bottom: 1px solid rgba(136, 192, 205, .17);
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px max(20px, calc((100vw - 1800px) / 2));
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  height: 34px;
  object-fit: contain;
  width: 34px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 13px;
  letter-spacing: .08em;
}

.brand small {
  color: #8eabb3;
  font-size: 11px;
  margin-top: 2px;
}

.header-status {
  align-items: center;
  color: #a9c1c8;
  display: flex;
  font-size: 12px;
  gap: 8px;
}

.header-status time {
  border-left: 1px solid rgba(169, 193, 200, .28);
  color: #d3e0e3;
  margin-left: 3px;
  padding-left: 11px;
}

.pulse,
.live-label i {
  background: #29d9a7;
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  width: 7px;
}

.pulse {
  box-shadow: 0 0 0 0 rgba(41, 217, 167, .45);
  animation: pulse 2s infinite;
}

.page {
  margin: 0 auto;
  max-width: 1800px;
  padding: 20px 20px 32px;
}

.camera-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.camera-card {
  background: #0b1d28;
  border: 1px solid rgba(136, 192, 205, .2);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}

.camera-card:hover {
  border-color: rgba(78, 214, 208, .48);
  transform: translateY(-2px);
}

.player-frame {
  aspect-ratio: 16 / 9;
  background: #02070a;
  position: relative;
}

.player-frame iframe,
.player-frame video {
  background: #02070a;
  border: 0;
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.fullscreen-button {
  align-items: center;
  background: rgba(2, 11, 16, .78);
  border: 1px solid rgba(237, 245, 247, .34);
  border-radius: 5px;
  color: #f4fbfb;
  cursor: pointer;
  display: inline-flex;
  font-size: 19px;
  height: 34px;
  justify-content: center;
  opacity: .85;
  position: absolute;
  right: 11px;
  top: 11px;
  width: 34px;
}

.fullscreen-button:hover,
.fullscreen-button:focus-visible {
  background: #12b8b0;
  border-color: #12b8b0;
  color: #032e35;
  opacity: 1;
}

.player-status {
  align-items: center;
  background: rgba(2, 7, 10, .74);
  color: #b9d0d5;
  display: flex;
  font-size: 13px;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.player-status[hidden] {
  display: none;
}

.camera-meta {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  min-height: 78px;
  padding: 12px 14px 13px;
}

.live-label {
  align-items: center;
  color: #58d6ce;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  gap: 6px;
  letter-spacing: .09em;
  margin-bottom: 8px;
}

.camera-meta h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.camera-meta p,
.source {
  color: #8eabb3;
  font-size: 12px;
  margin: 5px 0 0;
}

.source {
  white-space: nowrap;
}

footer {
  border-top: 1px solid rgba(136, 192, 205, .15);
  color: #76949c;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  letter-spacing: .02em;
  margin: 0 auto;
  max-width: 1800px;
  padding: 15px 20px 20px;
}

footer span:first-child {
  color: #9dbdc3;
  font-weight: 700;
}

.developer-credit {
  color: #9dbdc3;
}

@media (min-width: 1100px) {
  .camera-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@keyframes pulse {
  60% {
    box-shadow: 0 0 0 7px rgba(41, 217, 167, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(41, 217, 167, 0);
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 56px;
    padding: 10px 16px;
  }

  .header-status span:not(.pulse),
  .header-status time {
    display: none;
  }

  .page {
    padding: 22px 16px 28px;
  }

  .camera-grid {
    grid-template-columns: 1fr;
  }

  .camera-meta {
    min-height: 88px;
  }

  footer {
    flex-direction: column;
    gap: 7px;
    margin: 0;
    padding: 15px 16px 20px;
  }
}
