* {
  box-sizing: border-box;
}

:root {
  --bg: #070707;
  --panel: #181818;
  --panel-2: #222;
  --screen: #111713;
  --screen-text: #d7f7d7;
  --muted: #8aa78a;
  --accent: #b8ffb8;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 50% 35%, #1b1b1b 0%, #0c0c0c 36%, #050505 76%);
  color: #fff;
  font-family: "Courier New", Courier, monospace;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  padding: 32px 18px;
}

.tv {
  width: min(780px, 94vw);
  filter: drop-shadow(0 28px 45px rgba(0, 0, 0, 0.65));
}

.tv-shell {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 16px;
  padding: 24px;
  border: 4px solid #2e2e2e;
  border-radius: 34px;
  background:
    linear-gradient(145deg, #2a2a2a, #111 55%, #282828);
  box-shadow:
    inset 0 0 0 2px #050505,
    inset 0 0 30px rgba(255, 255, 255, 0.04);
}

.screen-frame {
  padding: 12px;
  border-radius: 24px;
  background: #050505;
  box-shadow:
    inset 0 0 0 3px #313131,
    inset 0 0 26px #000;
}

.screen {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: grid;
  place-items: center;
  border-radius: 18px / 28px;
  background:
    radial-gradient(ellipse at center, rgba(57, 93, 57, 0.20), transparent 62%),
    #0d130f;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(151, 255, 151, 0.08);
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.015),
    rgba(0, 255, 0, 0.015),
    rgba(0, 0, 255, 0.015)
  );
  mix-blend-mode: screen;
}

.static {
  position: absolute;
  inset: -50%;
  opacity: 0.16;
  background-image:
    repeating-radial-gradient(
      circle at 30% 40%,
      rgba(255,255,255,0.6) 0 1px,
      rgba(0,0,0,0.7) 1px 2px
    );
  background-size: 4px 4px;
  animation: staticMove 0.16s steps(2) infinite;
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.36;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    rgba(0, 0, 0, 0.24) 2px,
    rgba(0, 0, 0, 0.24) 4px
  );
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  box-shadow:
    inset 0 0 75px rgba(0, 0, 0, 0.95),
    inset 0 0 18px rgba(168, 255, 168, 0.12);
}

.screen-content {
  position: relative;
  z-index: 2;
  width: min(88%, 560px);
  text-align: center;
  padding: 28px 16px;
  text-shadow:
    0 0 7px rgba(176, 255, 176, 0.55),
    1px 0 rgba(255,255,255,0.09),
    -1px 0 rgba(0,0,0,0.4);
  animation: microFlicker 4s infinite;
}

.signal {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.status-icon {
  display: flex;
  justify-content: center;
  gap: 9px;
  height: 28px;
  margin-bottom: 10px;
}

.status-icon span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(184, 255, 184, 0.7);
  animation: bounce 1.1s ease-in-out infinite;
}

.status-icon span:nth-child(2) {
  animation-delay: 0.15s;
}

.status-icon span:nth-child(3) {
  animation-delay: 0.3s;
}

h1 {
  margin: 0;
  color: var(--screen-text);
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  letter-spacing: 0.06em;
  line-height: 1;
}

.subtitle {
  margin: 18px auto 22px;
  max-width: 510px;
  color: #bdd1bd;
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  line-height: 1.7;
}

.progress-wrap {
  width: min(390px, 82%);
  height: 10px;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 1px solid rgba(192, 255, 192, 0.42);
  background: rgba(0,0,0,0.45);
}

.progress-bar {
  width: 34%;
  height: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(205,255,205,0.9) 0 12px,
      rgba(120,180,120,0.55) 12px 18px
    );
  box-shadow: 0 0 12px rgba(180, 255, 180, 0.45);
  animation: loadingBar 2.8s ease-in-out infinite alternate;
}

.loading {
  margin: 0;
  color: var(--screen-text);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.hint {
  margin: 22px 0 0;
  color: #6f866f;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  transition: opacity 0.4s ease;
}

.hint.hidden {
  opacity: 0;
}

.glitch-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  background: rgba(205, 255, 205, 0.36);
  box-shadow: 0 0 12px rgba(170, 255, 170, 0.42);
  z-index: 5;
}

.glitch-line-one {
  top: 29%;
  animation: glitchSweep 5.8s infinite;
}

.glitch-line-two {
  top: 68%;
  animation: glitchSweep 7.3s 2s infinite;
}

.tv-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
  color: #777;
}

.brand {
  margin-bottom: 28px;
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.speaker {
  width: 78px;
  display: grid;
  grid-template-columns: repeat(5, 7px);
  gap: 7px;
  justify-content: center;
  margin-bottom: 30px;
}

.speaker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #090909;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.knobs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.knob {
  width: 56px;
  height: 56px;
  border: 3px solid #060606;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #444, #161616 58%, #080808);
  box-shadow:
    inset 0 0 0 2px #333,
    0 5px 10px rgba(0,0,0,0.6);
}

.knob::after {
  content: "";
  display: block;
  width: 3px;
  height: 16px;
  margin: 5px auto 0;
  background: #888;
}

.knob.small {
  width: 38px;
  height: 38px;
}

.knob.small::after {
  height: 10px;
}

.tv-legs {
  display: flex;
  justify-content: space-between;
  padding: 0 90px;
}

.tv-legs span {
  width: 85px;
  height: 16px;
  background: #141414;
  transform: skewX(-16deg);
  border-radius: 0 0 8px 8px;
}

footer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6f6f6f;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.footer-dot {
  opacity: 0.4;
}

@keyframes staticMove {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(5%, -4%); }
  50%  { transform: translate(-3%, 6%); }
  75%  { transform: translate(4%, 2%); }
  100% { transform: translate(-5%, -3%); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(8px); opacity: 0.45; }
  50% { transform: translateY(0); opacity: 1; }
}

@keyframes loadingBar {
  0% { width: 18%; }
  50% { width: 62%; }
  100% { width: 88%; }
}

@keyframes microFlicker {
  0%, 18%, 22%, 62%, 65%, 100% { opacity: 1; }
  20% { opacity: 0.94; }
  63% { opacity: 0.97; }
}

@keyframes glitchSweep {
  0%, 92%, 100% { opacity: 0; transform: translateX(0); }
  93% { opacity: 0.7; transform: translateX(-2%); }
  94% { opacity: 0.15; transform: translateX(2%); }
  95% { opacity: 0.55; transform: translateX(-1%); }
  96% { opacity: 0; }
}

@media (max-width: 720px) {
  .tv-shell {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .tv-controls {
    display: none;
  }

  .screen {
    min-height: 390px;
  }

  .tv-legs {
    padding: 0 55px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
