/* ---------------------------
   ROOT VARIABLES
----------------------------*/
:root {
  --purple: #8b4bff;
  --purple-light: #a374ff;
  --purple-dark: #6025cc;

  --text-dark: #1e1e1e;
  --text-light: #ffffff;
  --bg-dark: #0d0d0f;
  --bg-light: #f8f8fa;

  --transition: 0.3s ease-in-out;
}

/* Theme System */
body[data-theme="light"] {
  --text-color: var(--text-dark);
  --bg-color: var(--bg-light);
}

body[data-theme="dark"] {
  --text-color: var(--text-light);
  --bg-color: var(--bg-dark);
}

/* ---------------------------
   GENERAL PAGE
----------------------------*/
html, body {
  width: 90vw;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden !important; /* Lock X and Y scrolling */
  position: fixed;             /* Prevent layout shift from animations */
  top: 0;
  left: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  height: 100vh;
  margin: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px; /* Helps on small screens */
  transition: var(--transition);
}

.container {
  text-align: center;
  animation: fadeIn 1.3s ease forwards;
  max-width: 90%;
}

.error-code {
  font-size: clamp(3.5rem, 15vw, 8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-light), var(--purple-dark));
  -webkit-background-clip: text;
  color: transparent;
  margin: 0;
}

.error-text {
  margin-top: -5px;
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  opacity: 0.8;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  background: var(--purple);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 20px;
  font-weight: 600;
  font-size: clamp(0.9rem, 3vw, 1rem);
  transition: 0.2s;
}

.btn:hover {
  background: var(--purple-dark);
  transform: scale(1.05);
}

/* ---------------------------
   FLOATING ANIMATIONS
----------------------------*/
.floating-element {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  opacity: 0.15;
  animation: floatUp 8s infinite linear;
  filter: blur(3px);
}

/* Desktop sizes */
.e1 { width: 180px; height: 180px; left: 5%; top: 70%; animation-duration: 11s; }
.e2 { width: 130px; height: 130px; left: 70%; top: 80%; animation-duration: 9s; }
.e3 { width: 200px; height: 200px; left: 85%; top: 20%; animation-duration: 13s; }
.e4 { width: 120px; height: 120px; left: 15%; top: 10%; animation-duration: 7s; }


.music-particle {
  position: absolute;
  font-size: 40px;
  opacity: 0.18;
  animation: floatMusic 10s infinite linear;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0px 0px 4px var(--purple));
}

/* Individual positions + timings */
.mp1 { left: 10%; top: 65%; animation-duration: 12s; font-size: 42px; }
.mp2 { left: 80%; top: 50%; animation-duration: 9s; font-size: 36px; }
.mp3 { left: 25%; top: 20%; animation-duration: 11s; font-size: 48px; }
.mp4 { left: 60%; top: 10%; animation-duration: 14s; font-size: 45px; }
.mp5 { left: 40%; top: 85%; animation-duration: 10s; font-size: 38px; }
.mp6 { left: 75%; top: 75%; animation-duration: 8s; font-size: 33px; }
.mp7 { left: 5%;  top: 10%; animation-duration: 13s; font-size: 40px; }

/* Mobile adjustments */
@media (max-width: 600px) {
  .music-particle {
    font-size: 28px;
    opacity: 0.14;
  }
}

/* ANIMATION */
@keyframes floatMusic {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-180px) rotate(360deg); }
}


/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
  .floating-element {
    opacity: 0.12;
  }

  .e1 { width: 120px; height: 120px; left: 0%; top: 75%; }
  .e2 { width: 90px; height: 90px; left: 65%; top: 82%; }
  .e3 { width: 140px; height: 140px; left: 75%; top: 10%; }
  .e4 { width: 80px; height: 80px; left: 10%; top: 5%; }
}

@media (max-width: 480px) {
  .floating-element {
    opacity: 0.10;
  }

  .e1 { width: 90px; height: 90px; left: 5%; top: 78%; }
  .e2 { width: 70px; height: 70px; left: 70%; top: 85%; }
  .e3 { width: 110px; height: 110px; left: 78%; top: 5%; }
  .e4 { width: 60px; height: 60px; left: 10%; top: 3%; }
}

/* ---------------------------
   ANIMATIONS
----------------------------*/
@keyframes floatUp {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-200px) rotate(360deg); }
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
