html {
  height: 100%;
}

body {
  min-height: 100%;
  padding: 25px;
  margin: auto;
  text-align: center;
  font-family: 'Roboto', sans-serif; 
  /* Animated background gradient */
  background: linear-gradient(135deg, #222433, #3a3d52, #222433); /* Extended gradient */
  background-size: 200% 200%; /* Make it larger than viewport */
  animation: background-pan 15s infinite alternate ease-in-out, body-glow 4s infinite alternate; /* Combine animations */
  position: relative; /* Establish stacking context for z-index */
  border-radius: 8px; 
  z-index: 1; /* Ensure body content is above the particle background */
  overflow: hidden; /* Hide potential overflow from subtle animations */
}

/* --- FIX: Subtle Particle Background using multiple background-image layers --- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2; /* Behind everything else */
  /* Create a starfield effect with multiple background layers */
  background-image: 
    radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px), /* Smallest dots */
    radial-gradient(circle, rgba(255,255,255,0.08) 1.5px, transparent 1.5px), /* Medium dots */
    radial-gradient(circle, rgba(255,255,255,0.05) 2px, transparent 2px); /* Largest dots */
  background-size: 50px 50px, 100px 100px, 150px 150px; /* Different spacing for layers */
  background-position: 0 0, 0 0, 0 0; /* Initial position */
  animation: star-move-small 60s linear infinite, 
             star-move-medium 90s linear infinite, 
             star-move-large 120s linear infinite; /* Different speeds for layers */
}

/* Keyframes for subtle particle movement for each layer */
@keyframes star-move-small {
  from { background-position: 0 0; }
  to { background-position: 500px 500px; } /* Move further */
}
@keyframes star-move-medium {
  from { background-position: 0 0; }
  to { background-position: -700px -700px; } /* Move in opposite direction */
}
@keyframes star-move-large {
  from { background-position: 0 0; }
  to { background-position: 900px 900px; } /* Move even further */
}
/* --- END FIX --- */

/* Subtle Scanline Overlay using a pseudo-element (ensure it's on top) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, 0.05) 1px, /* Very subtle dark line */
    rgba(0, 0, 0, 0.05) 2px
  );
  pointer-events: none; /* Allows interaction with elements beneath */
  z-index: 100; /* Ensure it's on top of everything else */
  opacity: 0.2; /* Very subtle */
}

/* Keyframes for the subtle background panning animation */
@keyframes background-pan {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Keyframes for the body glow animation */
@keyframes body-glow {
  0% { box-shadow: 0 0 15px rgba(92, 106, 196, 0.4); } 
  100% { box-shadow: 0 0 30px rgba(92, 106, 196, 0.8), 0 0 5px rgba(255, 255, 255, 0.2); } 
}

.title {
  padding: 20px;
  margin: 0;
  font-family: 'Orbitron', sans-serif; 
  font-size: 50px;
  color: #5C6AC4;
  border: 0px solid white;
  overflow: hidden;
  /* Animated text shadow and color for the title, plus a subtle wobble and glitch */
  animation: title-glow 5s infinite alternate, title-wobble 8s infinite ease-in-out, title-glitch 4s infinite linear; 
}

/* Keyframes for the title glow animation */
@keyframes title-glow {
  0% { 
    color: #5C6AC4; 
    text-shadow: 0 0 5px rgba(92, 106, 196, 0.5), 0 0 10px rgba(92, 106, 196, 0.3); 
  }
  100% { 
    color: #87C45C; 
    text-shadow: 0 0 10px rgba(135, 196, 92, 0.7), 0 0 20px rgba(135, 196, 92, 0.5); 
  }
}

/* Keyframes for a subtle digital wobble effect on the title */
@keyframes title-wobble {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(1px) translateY(-0.5px); }
  50% { transform: translateX(-1px) translateY(0.5px); }
  75% { transform: translateX(0.5px) translateY(-1px); }
}

/* Keyframes for a subtle, periodic glitch effect on the title */
@keyframes title-glitch {
  0%, 90%, 92%, 94%, 96%, 98%, 100% { /* Most of the time, no glitch */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    transform: translateX(0px);
    filter: hue-rotate(0deg);
  }
  91% { /* Short glitch burst */
    text-shadow: -2px -2px 0px #87C45C, 2px 2px 0px #5C6AC4;
    transform: translateX(-2px);
    filter: hue-rotate(100deg);
  }
  93% {
    text-shadow: 2px 2px 0px #87C45C, -2px -2px 0px #5C6AC4;
    transform: translateX(2px);
    filter: hue-rotate(200deg);
  }
  95% {
    text-shadow: -1px 1px 0px #5C6AC4, 1px -1px 0px #87C45C;
    transform: translateX(1px);
    filter: hue-rotate(300deg);
  }
  97% {
    text-shadow: 1px -1px 0px #5C6AC4, -1px 1px 0px #87C45C;
    transform: translateX(-1px);
    filter: hue-rotate(50deg);
  }
}

/* New: Container Border Glow for .time and .server */
.time, .server {
  padding: 10px; /* Add padding for content inside */
  margin: 10px auto; /* Adjust margin for the glow */
  border: 1px solid transparent; /* Initial transparent border */
  border-radius: 5px; /* Slightly rounded corners */
  animation: container-border-glow 3s infinite alternate ease-in-out;
  position: relative; /* Needed for z-index and absolute children */
  z-index: 2; /* Ensure these containers are above body's pseudo-elements */
}

@keyframes container-border-glow {
  0% { border-color: rgba(92, 106, 196, 0.2); box-shadow: 0 0 5px rgba(92, 106, 196, 0.3); }
  100% { border-color: rgba(92, 106, 196, 0.6); box-shadow: 0 0 15px rgba(92, 106, 196, 0.6); }
}

/* New: Time/Date Hover Effect */
.time span { /* Target the span inside .time */
  display: inline-block; /* Needed for transform/shadow */
  transition: all 0.3s ease;
  cursor: default;
  font-size: 20px; /* Keep original font size */
  color: #5C6AC4; /* Keep original color */
}

.time span:hover {
  color: #87C45C; /* Change color on hover */
  text-shadow: 0 0 10px #87C45C, 0 0 20px rgba(135, 196, 92, 0.5); /* Add glow */
  transform: scale(1.05); /* Slightly enlarge on hover */
}

.server p {
  padding: 0; /* Remove padding from p, it's on the container now */
  margin: 0;
  font-size: 18px; 
  color: #5C6AC4;
  cursor: pointer; 
  transition: all 0.3s ease; 
  display: inline-block; /* Allows transform to work better */
}

.server p:hover {
  color: #87C45C; 
  transform: scale(1.05); 
  text-shadow: 0 0 8px rgba(135, 196, 92, 0.6); 
}

/* Style for the "Copied!" feedback */
.copy-feedback {
  position: absolute;
  top: -30px; /* Position above the text */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(135, 196, 92, 0.9); /* Greenish background */
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  opacity: 0; /* Initially hidden */
  transition: opacity 0.3s ease, top 0.3s ease;
  pointer-events: none; /* Allows clicks to pass through */
  white-space: nowrap; /* Prevents text wrapping */
  z-index: 10; /* Ensure it's above other content */
}

.copy-feedback.show {
  opacity: 1;
  top: -40px; /* Moves up slightly when shown */
}

.watermark {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.08); 
  pointer-events: none;
  z-index: -1; /* Ensures it's behind everything but above particles */
  text-transform: uppercase;
  font-weight: bold;
}

h2 {
  padding: 0;
  margin: 0;
  font-size: 20px;
  color: white;
  transition: all 0.3s ease; /* Smooth transition for hover */
  cursor: default; /* Not clickable, but shows interaction */
  position: relative; /* Needed for z-index */
  z-index: 2; /* Ensure it's above body's pseudo-elements */
}

h2:hover {
  color: #87C45C; /* Change color on hover */
  text-shadow: 0 0 8px rgba(135, 196, 92, 0.6); /* Add a glow on hover */
}

h3 {
  padding: 10px;
  margin: 0;
  font-size: 20px;
  color: #87C45C;
  animation: pulse 1.5s infinite alternate; 
  display: flex; 
  justify-content: center;
  align-items: center;
  position: relative; /* Needed for z-index */
  z-index: 2; /* Ensure it's above body's pseudo-elements */
}

@keyframes pulse {
  0% { opacity: 1; }
  100% { opacity: 0.7; }
}

.online-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: #87C45C; 
  border-radius: 50%; 
  margin-right: 8px; 
  box-shadow: 0 0 8px #87C45C; 
}

/* Glowing HR styles */
.glowing-hr {
  border: none; /* Remove default border */
  height: 2px; /* Slightly thicker line */
  background: linear-gradient(to right, transparent, #5C6AC4, transparent); /* Gradient for the line */
  margin: 20px auto; /* Spacing */
  width: 80%; /* Width of the line */
  box-shadow: 0 0 10px #5C6AC4; /* Initial glow */
  animation: hr-glow 3s infinite alternate; /* Animation for the glow */
  position: relative; /* Needed for z-index */
  z-index: 2; /* Ensure it's above body's pseudo-elements */
}

@keyframes hr-glow {
  0% { box-shadow: 0 0 5px rgba(92, 106, 196, 0.5); }
  100% { box-shadow: 0 0 15px rgba(92, 106, 196, 0.8), 0 0 5px rgba(255, 255, 255, 0.2); }
}
