/* ===== Base Styles ===== */
body {
  font-family: 'Courier New', monospace;
  margin: 0;
  padding: 0;
  color: #e0e0e0;
  line-height: 1.6;
  background: 
  radial-gradient(ellipse at center, 
    rgba(0,0,0,0) 0%, 
    rgba(0,0,0,0.9) 80%,
    rgba(0,0,0,1) 100%),
  radial-gradient(ellipse at 30% 20%, 
    rgba(255, 0, 255, 0.15) 0%, 
    rgba(255, 255, 0, 0.1) 30%,
    rgba(0,0,0,0) 70%),
  url('../images/GIF-by-Omer-Studios.gif');
background-size: cover;
background-attachment: fixed;
  background-repeat: 
    no-repeat, /* Vignette */
    no-repeat, /* Spotlight */
    no-repeat; /* GIF */
  background-position: 
    center,    /* Vignette */
    center,    /* Spotlight */
    center;    /* GIF */
  background-blend-mode: 
    normal,    /* Vignette */
    normal,    /* Spotlight */
    hard-light;   /* GIF */
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  box-shadow: 
    inset 0 0 50px rgba(255, 0, 255, 0.3),
    inset 0 0 40px rgba(0, 0, 0, 0.9);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/checkerbg.jpg');
  background-size: auto; 
  background-repeat: repeat;
  opacity: 0.2; 
  z-index: -2; 
  pointer-events: none;
}

/* === Header === */
.full-width-header {
    width: 100%;
    background: #000;
    border-bottom: 2px solid #ff00ff;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    padding: 5px 0;
    position: relative;
}

.phoneholm-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    position: relative;
    padding: 5px 0;
}

.phoneholm-header:before,
.phoneholm-header:after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #ff00ff, #ffff00);
}

.phoneholm-header h1 {
    background: #000;
    padding: 0 20px;
    font-size: 22px;
    margin: 0;
    background: linear-gradient(to right, #ff00ff, #ffff00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* Sparkles */
.sparkle {
    position: absolute;
    font-size: 10px;
    color: #ffff00;
    animation: sparkle 2s infinite;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
}

/* Sparkle positions */
.sparkle-1 { top: -10px; left: 10%; animation-delay: 0.1s; }
.sparkle-2 { top: 3px; left: 15%; animation-delay: 0.3s; }
.sparkle-3 { top: 15px; left: 8%; animation-delay: 0.5s; }
.sparkle-4 { top: -8px; right: 12%; animation-delay: 0.2s; }
.sparkle-5 { top: 7px; right: 18%; animation-delay: 0.4s; }
.sparkle-6 { top: 20px; right: 10%; animation-delay: 0.6s; }
.sparkle-7 { top: -3px; left: 50%; transform: translateX(-50%); animation-delay: 0.7s; }
.sparkle-8 { bottom: -10px; left: 20%; animation-delay: 0.8s; }
.sparkle-9 { bottom: -8px; right: 25%; animation-delay: 0.9s; }

@keyframes sparkle {
    0% { opacity: 0; transform: scale(0.3) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(20deg); }
    100% { opacity: 0; transform: scale(0.3) rotate(40deg); }
}

/* ===== Navigation ===== */
.nav {
  text-align: center;
  margin: 25px 0;
  width: 100%;
}

.nav a {
  display: inline-block;
  padding: 5px 15px;
  background: #000;
  border: 2px solid #ffff00;
  color: #ffff00;
  text-decoration: none;
  transition: all 0.3s;
}

.nav a:hover {
  background: #ffff00;
  color: #000;
}

/* ===== Page Title ===== */
.page-title {
  text-align: center;
  margin: 0 0 20px 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 900px;
}

.page-title:before,
.page-title:after {
  content: "";
  flex: 1;
  height: 3px;
  background: linear-gradient(to right, #ff00ff, #ffff00);
}

.page-title h1 {
  background: #000;
  padding: 0 25px;
  font-size: 32px;
  margin: 0;
  color: #ffff00;
  text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
  position: relative;
  letter-spacing: 1px;
}

/* ===== Description Box ===== */
.description-box {
  background: #111;
  border: 2px solid #ff00ff;
  border-radius: 5px;
  padding: 15px 20px;
  margin-bottom: 25px;
  position: relative;
  max-width: 800px;
  width: 90%;
  text-align: center;
  color: #e0e0e0;
  font-size: 1.2em;
  line-height: 1.3;
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.description-box p {
  margin: 8px 0;
}

.description-box strong {
  color: #ffff00;
  text-shadow: 0 0 5px rgba(255, 255, 0, 0.3);
}

.blink {
  animation: blink-animation 1s steps(5, start) infinite;
}

@keyframes blink-animation {
  to {
    visibility: hidden;
  }
}

/* ===== Main Content ===== */
.main-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 30px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.switchboard {
  background: #111;
  border: 3px solid #ff00ff;
  padding: 30px;
  width: 100%;
  max-width: 700px;
  margin: 20px 0;
  position: relative;
}

.switchboard:before {
  content: "✧･ﾟ:* MYSTERIOUS SIGNALS *:･ﾟ✧";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffff00;
  font-size: 14px;
  background: #000;
  padding: 0 10px;
  white-space: nowrap;
}

.directory {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px; /* Reduced from 15px */
}

/* ===== Compact Extensions ===== */
.extension {
  background: #222;
  border: 1px solid #ffff00;
  padding: 12px 15px; /* Reduced from 20px */
  transition: all 0.2s;
  position: relative;
  overflow: visible; /* Allow sparkles to escape */
  text-align: center;
  border-top: 1px solid rgba(255, 255, 0, 0.3); /* Bevel effect */
  box-shadow: 
    0 2px 0 rgba(0,0,0,0.3), /* Bottom shadow */
    inset 0 1px 1px rgba(255,255,255,0.1); /* Inner glow */
}

.extension:hover {
  background: #333;
  border-color: #ff00ff;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
  animation: glitch 0.5s linear infinite;
}

/* Glowing cable effect */
.extension::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff00ff, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.extension:hover::before {
  opacity: 0.7;
}

.extension a {
  color: #fff;
  text-decoration: none;
  display: block;
  position: relative;
  z-index: 2;
}

.extension-number {
  color: #ff00ff;
  font-weight: bold;
  display: block;
  font-size: 1.2em; /* Reduced from 1.4em */
  margin-bottom: 5px; /* Reduced from 10px */
  text-shadow: 0 0 5px rgba(255, 0, 255, 0.3);
}

.extension-name {
  font-size: 1.4em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  font-size: 1.3em; /* Reduced from 1.5em */
  margin: 8px 0; /* Reduced from 12px */
  color: #ffff00;
  text-shadow: 0 0 5px rgba(255, 255, 0, 0.3);
}

.extension-desc {
  color: #aaa;
  font-size: 0.9em; /* Reduced from 1em */
  display: block;
  margin-top: 8px; /* Reduced from 10px */
}

/* ===== VHS Effects ===== */
.vhs-scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 3px;
  z-index: 10;
  pointer-events: none;
  opacity: 0.5;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0.1) 1px,
    rgba(0, 0, 0, 0.1) 2px
  );
  pointer-events: none;
  z-index: 9;
  animation: scan 8s linear infinite;
}

.vhs-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 11;
  mix-blend-mode: hard-light;
  opacity: 0.05;
  animation: vhs-flicker 8s infinite;
}

.vhs-effect:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    transparent 0%,
    rgba(255, 0, 255, 0.2) 10%, 
    transparent 15%,
    rgba(0, 255, 255, 0.2) 20%,
    transparent 25%,
    rgba(255, 255, 0, 0.2) 30%,
    transparent 35%,
    rgba(255, 0, 255, 0.1) 40%,
    transparent 45%,
    rgba(0, 255, 255, 0.1) 50%,
    transparent 55%,
    rgba(255, 255, 0, 0.1) 60%,
    transparent 65%,
    rgba(255, 0, 255, 0.1) 70%,
    transparent 75%,
    rgba(0, 255, 255, 0.1) 80%,
    transparent 85%,
    rgba(255, 255, 0, 0.1) 90%,
    transparent 95%
  );
  opacity: 0.1;
  animation: vhs-track 10s linear infinite;
}

/* ===== Animations ===== */
@keyframes scan {
  0% { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

@keyframes vhs-track {
  0% { transform: translateY(-100px); }
  100% { transform: translateY(100vh); }
}

@keyframes vhs-flicker {
  0%, 100% { opacity: 0.05; }
  42% { opacity: 0.05; }
  43% { opacity: 0.1; }
  44% { opacity: 0.05; }
  46% { opacity: 0.05; }
  47% { opacity: 0.1; }
  48%, 49% { opacity: 0.05; }
  50% { opacity: 0.1; }
  51%, 90% { opacity: 0.05; }
  91% { opacity: 0.1; }
  92%, 99% { opacity: 0.05; }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}

/* ===== Footer Terminal ===== */
footer {
  text-align: center;
  margin-top: 40px;
  color: #ff00ff;
  font-size: 0.9em;
  border-top: 1px dotted #ff00ff;
  padding: 20px 0 10px;
  position: relative;
  z-index: 10;
  min-height: 20px;
  font-family: 'Courier New', monospace;
  width: 100%;
  background: #000 !important; /* Solid black */
  position: relative; /* stays above other elements */
  z-index: 10; 
  box-shadow: 0 0 20px #000; /* soft edge to blend */
}

#terminal-text {
  display: inline-block;
  min-width: 10px;
  position: relative;
}

#terminal-text::after {
  content: '█';
  display: inline-block;
  position: relative;
  animation: cursor-blink 1s infinite;
  color: #ff00ff;
}

@keyframes cursor-blink {
  0%, 40% { opacity: 1; }
  50%, 90% { opacity: 0; }
  100% { opacity: 1; }
}

