:root {
  color-scheme: dark;
  --red: #e02620;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.player {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #000;
}

#video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player.is-live #video {
  display: block;
}

.offline {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #090909 url("assets/offline-poster.jpg") center / cover no-repeat;
  color: #fff;
}

.offline[hidden] {
  display: none;
}

.offline-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .88));
}

.offline-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  max-height: 100%;
  padding: clamp(14px, 3vw, 34px) 54px clamp(18px, 3.5vw, 40px);
  overflow: hidden;
  text-align: center;
  text-shadow: 0 2px 12px #000;
}

.offline-content img {
  width: clamp(58px, 9vw, 108px);
  height: auto;
  object-fit: contain;
}

.kicker {
  margin: 5px 0 5px;
  color: #ff8b87;
  font-size: clamp(9px, 1.4vw, 13px);
  font-weight: 900;
  letter-spacing: .16em;
}

.offline h1 {
  margin: 0 0 6px;
  font-size: clamp(18px, 3.5vw, 36px);
  line-height: 1.08;
}

.offline p:not(.kicker) {
  margin: 0;
  color: #ddd;
  font-size: clamp(11px, 1.8vw, 16px);
  line-height: 1.25;
}

#retry {
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  cursor: pointer;
}

.live-badge,
.sound,
.fullscreen {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  background: rgba(0, 0, 0, .76);
  color: #fff;
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.live-badge {
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  letter-spacing: .05em;
}

.live-badge span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(224, 38, 32, .2);
  animation: pulse 1.5s infinite;
}

.fullscreen {
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  cursor: pointer;
}

.fullscreen span {
  font-size: 19px;
  line-height: 1;
}

.fullscreen b {
  font-size: 11px;
  font-weight: 800;
}

.sound {
  right: 12px;
  bottom: 52px;
  padding: 9px 14px;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

@keyframes pulse {
  50% { opacity: .35; }
}

@media (max-width: 520px), (max-height: 260px) {
  .offline-content {
    padding: 7px 42px 13px;
  }

  .offline-content img {
    width: 43px;
  }

  .kicker {
    margin: 2px 0 3px;
    font-size: 8px;
  }

  .offline h1 {
    margin-bottom: 4px;
    font-size: clamp(16px, 5vw, 20px);
    line-height: 1.04;
  }

  .offline p:not(.kicker) {
    font-size: 11px;
    line-height: 1.15;
  }

  #retry {
    margin-top: 7px;
    padding: 5px 10px;
    font-size: 10px;
  }

  .live-badge {
    top: 7px;
    left: 7px;
    padding: 6px 9px;
  }

  .fullscreen {
    top: 6px;
    right: 6px;
    min-width: 34px;
    min-height: 34px;
    justify-content: center;
    padding: 5px 8px;
  }

  .fullscreen b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .sound {
    right: 8px;
    bottom: 42px;
  }
}

@media (max-height: 185px) {
  .offline-content img {
    display: none;
  }

  .offline-content {
    padding-top: 20px;
  }
}

.player:fullscreen,
.player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}
