:root {
  color-scheme: dark;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --dim: rgba(255, 255, 255, 0.58);
  --panel: rgba(12, 15, 17, 0.76);
  --panel-line: rgba(255, 255, 255, 0.18);
  --shade: rgba(0, 0, 0, 0.62);
  --ticker-height: 6.6vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100vw;
  height: 100vh;
}

body {
  margin: 0;
  overflow: hidden;
  background: #050607;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.broadcast {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0b1119;
  isolation: isolate;
}

.video-bg,
.video-shade {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

.video-bg {
  z-index: -3;
  object-fit: cover;
  background: #0b1119;
}

.video-shade {
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, transparent 30%, rgba(0, 0, 0, 0.26) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24) 0%, transparent 34%, rgba(0, 0, 0, 0.3) 100%);
}

.brand {
  position: absolute;
  top: 1.6vh;
  left: 1.4vw;
  z-index: 2;
  width: min(15vw, 24vh);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 18vh;
  object-fit: contain;
  filter: drop-shadow(0 0.3vh 0.8vh rgba(0, 0, 0, 0.46));
}

.info-panel {
  position: absolute;
  top: 1.35vh;
  right: 1.05vw;
  z-index: 2;
  width: min(22vw, 42vh);
  max-height: calc(100vh - var(--ticker-height) - 2.7vh);
  padding: 1.4vh 1.25vw;
  display: grid;
  align-content: start;
  gap: 1.7vh;
  overflow: hidden;
  background: var(--panel);
  border: 0.08vw solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  backdrop-filter: blur(0.24vw);
}

.date-value {
  display: block;
  color: var(--muted);
  font-size: min(1.08vw, 1.95vh);
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.time-value {
  margin-top: -0.8vh;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  font-size: min(3.05vw, 5.3vh);
  line-height: 0.95;
  color: #ffffff;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sensor-block,
.radio-block {
  display: grid;
  min-width: 0;
}

.sensor-block {
  gap: 0.7vh;
}

.radio-block {
  gap: 1vh;
  min-height: 0;
  overflow: hidden;
}

.panel-label,
.track-label {
  color: var(--muted);
  font-size: min(1.02vw, 1.8vh);
  line-height: 1.15;
  font-weight: 700;
}

.panel-label {
  text-transform: uppercase;
}

.sensor-row {
  display: flex;
  align-items: baseline;
  gap: 0.55vw;
  min-width: 0;
  font-size: min(1.58vw, 2.75vh);
  line-height: 1.1;
  white-space: nowrap;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.divider {
  color: var(--dim);
}

.weather-status {
  min-height: 1.4vh;
  color: var(--dim);
  font-size: min(0.82vw, 1.45vh);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cover-art {
  width: min(100%, 16vw, 28vh);
  aspect-ratio: 1;
  justify-self: center;
  display: block;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.5);
  border: 0.08vw solid var(--panel-line);
}

.cover-art[src=""] {
  visibility: hidden;
}

.track-label {
  margin-top: 0.4vh;
  font-size: min(0.92vw, 1.62vh);
  text-transform: uppercase;
}

.artist-name,
.track-title {
  min-width: 0;
  color: #ffffff;
  line-height: 1.16;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.artist-name {
  font-size: min(1.38vw, 2.45vh);
  font-weight: 500;
  -webkit-line-clamp: 2;
}

.track-title {
  font-size: min(1.22vw, 2.15vh);
  -webkit-line-clamp: 2;
}

.lower-third {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: var(--ticker-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--shade);
  color: #ffffff;
  font-size: min(2.15vw, 3.8vh);
  line-height: 1;
  font-weight: 500;
  text-shadow: 0 0.18vh 0.5vh rgba(0, 0, 0, 0.82);
}

.ticker {
  width: 100vw;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  --ticker-duration: 34s;
  display: flex;
  width: max-content;
  will-change: transform;
  animation: ticker-scroll var(--ticker-duration) linear infinite;
}

.ticker-item {
  flex: 0 0 auto;
  padding-right: 8vw;
}

.ticker-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.start-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: min(16vw, 26vh);
  min-width: 13vh;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0.08vw solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 1.2vh 4.5vh rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(0.45vw);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 1.1vw;
  border-top: min(3vw, 4.9vh) solid transparent;
  border-bottom: min(3vw, 4.9vh) solid transparent;
  border-left: min(4.8vw, 8vh) solid #ffffff;
  filter: drop-shadow(0 0.2vh 0.4vh rgba(0, 0, 0, 0.42));
}

.start-button-text {
  position: absolute;
  top: calc(100% + 1.6vh);
  left: 50%;
  width: 24vw;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: min(1.4vw, 2.5vh);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0.2vh 0.5vh rgba(0, 0, 0, 0.85);
}

.start-button:hover {
  background: rgba(0, 0, 0, 0.76);
  border-color: rgba(255, 255, 255, 0.72);
  transform: translate(-50%, -50%) scale(1.04);
}

.start-button:active {
  transform: translate(-50%, -50%) scale(0.98);
}

.system-status {
  position: absolute;
  left: 1.5vw;
  bottom: calc(var(--ticker-height) + 1.4vh);
  z-index: 4;
  max-width: 42vw;
  color: rgba(255, 255, 255, 0.76);
  font-size: min(1vw, 1.8vh);
  line-height: 1.35;
  text-shadow: 0 0.15vh 0.45vh rgba(0, 0, 0, 0.78);
}

.hidden,
audio {
  display: none !important;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-aspect-ratio: 4 / 3) {
  :root {
    --ticker-height: 6.2vh;
  }

  .brand {
    width: 24vw;
  }

  .info-panel {
    top: 9vh;
    right: 1.6vw;
    width: 36vw;
    max-height: calc(100vh - var(--ticker-height) - 10.6vh);
    padding: 1.2vh 1.6vw;
    gap: 1.35vh;
  }

  .date-value {
    font-size: min(2vw, 1.8vh);
  }

  .time-value {
    font-size: min(5vw, 4.8vh);
  }

  .panel-label,
  .track-label {
    font-size: min(1.85vw, 1.65vh);
  }

  .sensor-row {
    font-size: min(2.8vw, 2.5vh);
  }

  .weather-status {
    font-size: min(1.55vw, 1.35vh);
  }

  .cover-art {
    width: min(100%, 25vw, 24vh);
  }

  .artist-name {
    font-size: min(2.5vw, 2.2vh);
  }

  .track-title {
    font-size: min(2.2vw, 1.95vh);
  }

  .lower-third {
    font-size: min(3.7vw, 3.2vh);
  }
}

@media (max-height: 54vw) {
  .info-panel {
    gap: 1.2vh;
  }

  .cover-art {
    width: min(100%, 14.2vw, 26vh);
  }

  .track-title {
    -webkit-line-clamp: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
    transform: none;
  }
}
