body {
  font-family: "Manrope", sans-serif;
  background: white;
  color: #111;
  overflow-x: hidden;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
body::-webkit-scrollbar {
  display: none;
}
.serif {
  font-family: "Instrument Serif", serif;
}

/* Grain Texture Overlay */
@keyframes noise {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -25%); }
  40% { transform: translate(-5%, 25%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0%); }
  70% { transform: translate(0%, 15%); }
  80% { transform: translate(3%, 35%); }
  90% { transform: translate(-10%, 10%); }
}

body::before {
  content: "";
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.65;
  pointer-events: none;
  z-index: -999;
  animation: noise 0.5s steps(2) infinite;
}

/* Floating Atmosphere Orbs */
.orb {
  position: fixed;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  animation: float 60s infinite alternate ease-in-out;
}
.orb1 {
  background: rgba(130, 170, 255, 0.18);
  top: 10%;
  left: 60%;
}
.orb2 {
  background: rgba(180, 200, 255, 0.15);
  bottom: 10%;
  left: 20%;
  animation-delay: 8s;
}
@keyframes float {
  from {
    transform: translateY(-40px);
  }
  to {
    transform: translateY(40px);
  }
}

/* Breathing Glow for Dark Cards */
.glow-pulse {
  transition: all 0.8s ease-in-out;
  box-shadow: 0 0 0px rgba(130, 170, 255, 0);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.glow-pulse:hover {
  box-shadow: 0 0 40px rgba(130, 170, 255, 0.2);
  border-color: rgba(130, 170, 255, 0.3);
}

/* Interactive Enhancements */
.cursor-hover {
  transform: translate(-50%, -50%) scale(1.5);
  background-color: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  mix-blend-mode: normal;
}

/* Cursor Light */
.cursor {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(130, 170, 255, 0.22),
    transparent 60%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

/* Fade scroll animations */
.fade {
  opacity: 0;
  transform: translateY(80px);
  transition: all 1.4s ease;
}
.fade.show {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll progress indicator */
.progress {
  position: fixed;
  top: 0;
  right: 20px;
  width: 2px;
  height: 100%;
  background: #eee;
  z-index: 1001;
}
.progress-bar {
  width: 100%;
  height: 0%;
  background: #111;
}

/* 128 BPM Wave Animation */
.wave span {
  display: inline-block;
  width: 2px;
  height: 10px;
  margin: 0 2px;
  animation: wave 0.9s infinite ease-in-out;
  border-radius: 2px;
}
@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.4);
    opacity: 0.3;
  }
  50% {
    transform: scaleY(1.2);
    opacity: 1;
  }
}

/* FIXED STATUS BAR */
.status-bar {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 10px 28px;
  border-radius: 100px;
  z-index: 1000;
  display: flex;
  gap: 30px;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Ensure the carousel container allows items to define their own width */
#wallpaper-carousel {
  display: flex;
  align-items: center;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* Prevent images from being squashed */

/* Add a nice glow to the active wallpaper card on hover */
#wallpaper-carousel a:hover {
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

/* ==========================================
   ADVANCED INTERACTIVE FEATURES
   ========================================== */

/* 1. Page Transition Overlay */
#page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0a0a0a;
  z-index: 999999;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}
#page-transition.active {
  transform: translateY(0%);
}
#page-transition .loader {
  color: white;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease 0.3s;
}
#page-transition.active .loader {
  opacity: 1;
}

/* 2. Scroll-Driven Parallax Element Base */
.parallax-item {
  will-change: transform;
}

/* 3. Global Dark Mode Overrides */
body.dark-mode {
  background: #0a0a0a;
  color: #f3f4f6;
}
body.dark-mode .bg-white {
  background-color: #1a1a1a !important;
  border-color: #333 !important;
}
body.dark-mode .text-gray-900,
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-700 {
  color: #f3f4f6 !important;
}
body.dark-mode .text-gray-500 {
  color: #9ca3af !important;
}
body.dark-mode .bg-gray-50 {
  background-color: #111111 !important;
}
body.dark-mode .border-gray-50 {
  border-color: #1a1a1a !important;
}
body.dark-mode .border-gray-200, 
body.dark-mode .bg-gray-200 {
  background-color: #333 !important;
  border-color: #333 !important;
}
body.dark-mode nav.bg-white\/60 {
  background-color: rgba(10, 10, 10, 0.6) !important;
  border-color: rgba(255,255,255,0.05) !important;
}
body.dark-mode nav.hover\:bg-white\/80:hover {
  background-color: rgba(10, 10, 10, 0.9) !important;
}
body.dark-mode .bg-white\/70 {
  background-color: rgba(10,10,10,0.7) !important;
}
body.dark-mode .status-bar {
  background: rgba(10, 10, 10, 0.7) !important;
  border-color: rgba(255,255,255,0.05) !important;
}
body.dark-mode a.hover\:text-gray-900:hover {
  color: #fff !important;
}
body.dark-mode span.bg-gray-900 {
  background-color: #fff !important;
}
body.dark-mode .bg-\[\#0c0c0c\] {
  background-color: #050505 !important;
}
