/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --font-mono: "Roboto Mono", monospace;
  --blend-color-dodge: color-dodge;
  --shadow-inset: inset 2px 2px 4px rgba(0, 0, 0, 0.5), inset -2px -2px 4px rgba(255, 255, 255, 0.1);
  --glow-green: 0 0 5px #00ff00;
  --glow-green-hover: 0 0 8px #00ff00;
}

/* ===== RESET & BASE STYLES ===== */
body {
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
#main-title,
#subtitle,
#navbar,
#footer {
  font-family: var(--font-mono);
}

#main-title {
  font-weight: 400;
  font-size: calc((250vw - 60px) / 30);
  mix-blend-mode: var(--blend-color-dodge);
}

#subtitle {
  font-size: calc((100vw) / 30);
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
  flex: 1;
  mix-blend-mode: var(--blend-color-dodge);
}

#navbar {
  text-align: center;
  margin-top: -5%;
  font-size: 3.5vw;
  mix-blend-mode: var(--blend-color-dodge);
}

#navbar a {
  position: relative;
  z-index: 1;
  color: white;
  text-decoration: none;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
  transition: color 0.4s ease-in-out;
}

#navbar a::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: inset 0 0 0 0 white;
  transition: box-shadow 0.4s ease-in-out;
}

#navbar a:hover {
  color: black;
}

#navbar a:hover::after {
  box-shadow: inset 100rem 0 0 0 white;
}

#navbar .prefix {
  color: white;
}

#navbar a:hover .prefix {
  color: white;
}


#footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: white;
  font-size: clamp(10px, 1.2vw, 16px);
  text-align: center;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 5px;
}

/* ===== LAYOUT CONTAINERS ===== */
.title-container {
  display: flex;
  align-items: center;
  width: 90%; 
  padding-left: 9%;
  padding-right: 1%;
  mix-blend-mode: var(--blend-color-dodge);
}

.screen-cover-box {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 4;
  pointer-events: none;
  /* From https://css.glass */
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.border-container {
  background-image: url('pixles.png');
  background-color: black;
  background-size: 100%; 
  color: white;
  position: relative;
  z-index: 1;
  height: 100vh;
  filter: saturate(2);
}

.border-container.tv-static-mode {
  background-image: none;
  background-color: transparent;
}

/* ===== BACKGROUND EFFECTS ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('Box.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 7;
}

/* ===== CRT SCAN LINE EFFECT ===== */
.crt-scan-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 13px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.8) 50%,
    transparent 100%
  );
  z-index: 4;
  pointer-events: none;
  animation: scanLine 12s linear infinite;
  animation-delay: 3s;
  mix-blend-mode: var(--blend-color-dodge);
}

@keyframes scanLine {
  0% {
    transform: translateY(-6px);
  }
  20% {
    transform: translateY(100vh);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* ===== STICKY NOTES ===== */
.sticky-notes {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 15;
  pointer-events: none;
}

.sticky-left,
.sticky-right {
  position: absolute;
  width: 200px;
}

.sticky-left {
  left: 0;
  top: 20vh;
}

.sticky-right {
  right: 0;
  top: 60vh;
  width: 250px;
}

/* ===== IMAGES ===== */
img {
  max-width: 80%;
  display: block;
  margin: 0 auto;
  max-height: 60vh;
  object-fit: contain;
  mix-blend-mode: var(--blend-color-dodge);
  position: relative;
  top: 30%;
  transform: translateY(-50%);
}

/* ===== CHANNEL BUTTON ===== */
.channel-button {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 25;
  background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
  color: #00ff00;
  border: 3px solid #444;
  border-radius: 8px;
  padding: 1.5vw 1vw;
  font-family: var(--font-mono);
  font-size: 1.2vw;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-inset), 0 4px 8px rgba(0, 0, 0, 0.3);
  text-shadow: var(--glow-green);
  overflow: hidden;
  min-width: 80px;
  max-width: 300px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-button:hover {
  background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
  box-shadow: var(--shadow-inset), 0 6px 12px rgba(0, 0, 0, 0.4);
  text-shadow: var(--glow-green-hover);
}

/* ===== TV STATIC VIDEO ===== */
.tv-static-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
  display: none;
}

/* ===== VOLUME CONTROL ===== */
.volume-container {
  position: fixed;
  bottom: 0;
  right: 20px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.volume-line,
.volume-control::before {
  width: 2px;
  height: 10px;
  background-color: white;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

.volume-line {
  margin-bottom: -10px;
}

.volume-control {
  width: 8vw;
  max-width: 120px;
  min-width: 60px;
  transform: rotate(-156deg);
  transition: transform 1s ease-in-out;
  position: relative;
}

.volume-control::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 769px) {
  #navbar a:not(:first-child)::before {
    content: " | ";
  }
  
  #navbar a:hover::before {
    color: white;
  }

  #navbar a:first-child::before {
    content: none;
  }

  #navbar a:not(:first-child)::after {
    left: 2ch;
  }
}

@media (max-width: 768px) {
  .channel-button {
    padding: 1.2vw 0.8vw;
    font-size: 1.5vw;
  }
  
  .border-container {
    background-size: 150%;
  }
  
  .sticky-left {
    display: none;
  }
  
  .sticky-right {
    display: none;
  }
  
  #navbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
  }
  
  #navbar a {
    margin: 0;
    padding: 5px 10px;
    font-size: 8vh;
  }

  .title-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0%;
    margin-left: 0%;
    margin-right: 0%;
    padding: 0px;
    width: 100%;
    align-items: center;
    justify-content: center;
  }

  #main-title {
    padding: 0px;
    margin: 0px;
    margin-top: 5%;
    font-size: 15vw;
  }

  #subtitle {
    padding: 0px;
    margin: 0px;
    font-size: 7vw;
  }

  img[src="Test_card.png"] {
    display: none;
  }
}