:root {
  --bg-prim: #021719;
  --bg-sec: #09272a;
  --bg-grey: #1f2627;
  --bg-gryl: #1f2627;
  --text-prim: #24484b;
  --box-color: #14393c;
  --glow: #00ff9d;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
}

* {
  box-sizing: border-box;
  color: var(--text-prim);
}

body {
  font-family: monospace;
  background-color: var(--bg-prim);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* ========================= */

.main-stuff {
  flex: 1;
  width: 60%;
  margin-top: 5vh;
  background-color: var(--bg-grey);
  border: 0.0625rem solid var(--box-color);
  box-shadow: 0 0 15vh var(--box-color);
  border-radius: 5vh;
  padding: 2vh;
  display: flex;
  flex-direction: column;
}

.content-frame {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 5vh;
  background-color: var(--bg-grey);
  border: 0.0625rem solid var(--box-color);
  box-shadow: 0 0 15vh var(--box-color);
  animation: shadow-orbit 8s linear infinite;
}

.content-frame iframe {
  position: absolute;
  background-color: var(--bg-prim);
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 5vh;
}

/* ========================= */

.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0,255,102,0.05) 0vh,
      rgba(0,255,102,0.05) 0.2vh,
      transparent 0.6vh,
      transparent 1.8vh
    ),
    linear-gradient(#000, #020b05);
  animation: fall 15s linear infinite;
  mix-blend-mode: screen;
  opacity: 0.05;
  border-radius: 5vh;
}

/* ========================= */

.button-container {
  background-color: var(--bg-gryl);
  top: 1vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 1vw;
  gap: 0.2vw;
}

.nav-buttons {
  display: flex;
  gap: 0.5vw;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

button {
  background-color: var(--bg-gryl);
  color: var(--text-prim);
  border: 0.125rem solid rgba(36,72,75,0.6);
  padding: 0.2vh 1vw;
  margin: 0 0.2vh;
  cursor: pointer;
  border-radius: 1vh;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;

  font-weight: bold;
  font-size: 1.1rem;

  box-shadow:
    inset 0 0.0625rem 0.125rem rgba(255,255,255,0.06),
    inset 0 -0.0625rem 0.125rem rgba(0,0,0,0.5);
}

button:hover {
  background-color: var(--bg-gryl);
  color: var(--text-prim);
  transform: translateY(0.0625rem);
  filter: brightness(0.92);
  box-shadow:
    inset 0 0.1875rem 0.375rem rgba(0,0,0,0.7),
    inset 0 -0.125rem 0.1875rem rgba(255,255,255,0.04);
}

button:active {
  transform: translateY(0.125rem);
  filter: brightness(0.88);
  box-shadow:
    inset 0 0.3125rem 0.625rem rgba(0,0,0,0.8);
}

/* ========================= */

marquee {
  background-color: var(--bg-prim);
  margin-bottom: 1vh;
}

/* ========================= */

.commercial-overlay {
  background-color: var(--bg-prim);
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.commercial-video {
  width: 80%;
  max-width: 50rem;
  aspect-ratio: 16 / 9;
}

/* ========================= */

.speaker {
  width: 8.5vw;
  max-width: 8.5vw;
  min-width: 1.5rem;

  height: 5.5vh;
  min-height: 1.75rem;

  background-color: #1b2123;
  border-radius: 0.6vh;
  
  margin-top: 11vh;

  background-image:
    radial-gradient(circle, rgba(0,0,0,0.8) 0.0625rem, transparent 0.09375rem);
  background-size: 0.375rem 0.375rem;

  box-shadow:
    inset 0 0.125rem 0.25rem rgba(0,0,0,0.8),
    inset 0 -0.0625rem 0.125rem rgba(255,255,255,0.04),
    0 0.0625rem 0.0625rem rgba(0,0,0,0.4);

  opacity: 0.75;
}

.speaker::after {
  content: "";
  position: absolute;
  inset: 0.1875rem;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0.0625rem rgba(0,0,0,0.6);
  pointer-events: none;
}

p {
  pointer-events: none;
}

/* ========================= */
#channelOSD {
  position: absolute;
  top: 2.5vh;
  left: 3.0vh;
  z-index: 10;

  width: 6vh;
  height: 6vh;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 0.6vh;

  font-family: monospace;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.08em;

  color: rgba(235, 245, 245, 0.95);

  background:
    linear-gradient(
      180deg,
      rgba(20, 57, 60, 0.35),
      rgba(9, 39, 42, 0.35)
    );

  border: 0.0625rem solid rgba(36, 72, 75, 0.35);

  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

#channelOSD.show {
  opacity: 1;
  transform: scale(1);
}

#channelOSD::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0.025) 0,
    rgba(255,255,255,0.025) 0.15vh,
    transparent 0.5vh,
    transparent 1.4vh
  );
  border-radius: inherit;
  pointer-events: none;
}


/* ========================= */

@keyframes fall {
  from { background-position: 0 0; }
  to { background-position: 0 100vh; }
}

@keyframes shadow-orbit {
  0% {
    box-shadow: 0 -0.5rem 0.75rem rgba(20,57,60,0.2);
  }
  50% {
    box-shadow: 0 0.375rem 0.75rem 3vh rgba(20,57,60,0.2);
  }
  100% {
    box-shadow: 0 -0.5rem 0.75rem rgba(20,57,60,0.2);
  }
}

@media (max-width: 1200px) {
  .nav-buttons {
    gap: 0.4vw;
  }

  button {
    font-size: 1.0rem;
    padding: 0.2vh 0.8vw;
    margin: 0.15vh;
    border-radius: 0.9vh;
  }
}

@media (max-width: 900px) {
  .button-container {
    gap: 0.15vw;
  }

  .nav-buttons {
    gap: 0.35vw;
  }

  button {
    font-size: 0.9rem;
    padding: 0.15vh 0.7vw;
    margin: 0.12vh;
    border-radius: 0.75vh;
  }
}

@media (max-width: 700px) {
  .nav-buttons {
    gap: 0.25vw;
  }

  button {
    font-size: 0.8rem;
    padding: 0.12vh 0.6vw;
    margin: 0.1vh;
    border-radius: 0.6vh;
  }
}

@media (max-width: 500px) {
  .nav-buttons {
    gap: 0.2vw;
  }

  button {
    font-size: 0.7rem;
    padding: 0.1vh 0.5vw;
    margin: 0.08vh;
    border-radius: 0.5vh;
  }
}

