/* General Styles */
body {
  margin: 0;
  padding: 0;
  background-color: black;
  font-family: "Courier New", monospace;
  overflow: hidden;
  height: 100vh;
  position: relative;
}

/* Glitch Flicker */
body.glitch-flicker {
  animation: flicker 0.2s 1 ease-in-out;
}

@keyframes flicker {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* Words Container */
.words-container {
  position: absolute;
  width: 100%;
  height: 100%;
  will-change: transform; /* Optimize for animations */
}

.flying-word {
  position: absolute;
  font-size: 2rem;
  color: lime;
  font-weight: bold;
  text-shadow: 2px 2px magenta, -2px -2px cyan;
  transition: transform 0.8s ease, color 0.3s ease;
  will-change: transform; /* Optimize for animations */
}

.flying-word:hover {
  color: magenta;
  transform: scale(1.2) rotate(15deg);
}

/* Ripple Effect */
.ripple {
  position: absolute;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
  animation: ripple-animation 1s ease-out;
  will-change: transform, opacity; /* Optimize for animations */
}

@keyframes ripple-animation {
  from {
    transform: scale(0);
    opacity: 0.8;
  }
  to {
    transform: scale(3); /* Limit ripple size */
    opacity: 0;
  }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  color: #00ff00;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.loading-bar {
  width: 200px;
  height: 10px;
  background: #333;
  margin-top: 10px;
  overflow: hidden;
}

.loading-bar div {
  width: 0;
  height: 100%;
  background: #00ff00;
  animation: load 3s linear forwards;
}

@keyframes load {
  0% { width: 0; }
  100% { width: 100%; }
}

/* Home Loading Screen */
.home-loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  color: #00ff00;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.home-loading-text {
  font-size: 24px;
  margin-bottom: 20px;
}

.home-loading-bar {
  width: 200px;
  height: 10px;
  background: #333;
  overflow: hidden;
}

.home-bar-fill {
  width: 0;
  height: 100%;
  background: #00ff00;
}

.home-bar-fill.animate {
  animation: load 5s linear forwards;
}