html, body {
  margin: 0;
  padding: 0;
  background-color: #000;
  color: #aeaeae;
  font-family: 'VT323', monospace;
}

a {
  color: #aeaeae;
  text-decoration: none;
}
a:hover {
  color: #fff;
}

.title {
  margin: 0;
  padding: 10px 15px;
  font-size: 2em;
  background-color: rgba(15, 15, 15, .4);
  color: #aeaeae;
  text-shadow: -2px -2px 5px rgba(77, 58, 164, .77);
}

/* --- Front page --- */

.location {
  padding: 0 15px 25px;
}

.location-name {
  font-size: 1.6em;
  font-weight: normal;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 15px;
  margin-top: 12px;
}

.camera-tile {
  display: block;
  position: relative;
  background: #111;
  overflow: hidden;
}

.camera-tile img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.camera-tile-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}

.camera-tile-name {
  padding: 6px 10px;
  font-size: 1.2em;
  background-color: rgba(15, 15, 15, .6);
}

/* --- Camera detail page --- */

.camera-detail {
  padding: 15px;
}

.main-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

#main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.no-image {
  font-size: 1.4em;
  padding: 40px;
  text-align: center;
}

.timestamp-overlay {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2em;
  color: #aeaeae;
  text-shadow: -2px -2px 5px rgba(77, 58, 164, .77);
  background: rgba(0, 0, 0, .35);
  padding: 2px 12px;
  border-radius: 4px;
}

.timestamp-overlay.stale {
  color: red;
}

.thumbnail-strip {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
}

.thumbnail-strip .thumb {
  flex: 0 0 auto;
  width: 160px;
  height: 90px;
  object-fit: cover;
  cursor: pointer;
  scroll-snap-align: start;
  opacity: 0.85;
}

.thumbnail-strip .thumb:hover {
  opacity: 1;
}

.thumbnail-strip .thumb.stale {
  outline: 2px solid red;
}

.strip-loading {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 1.2em;
  color: #666;
}

.strip-loading[hidden] {
  display: none;
}
