/* =================================================================
   SPELLCODE MASTER STYLESHEET 
   ================================================================= */

/* --- 1. CONFIGURACIONES BASE --- */
:root {
  --spell-purple: #8b5cf6;
  --spell-blue: #3b82f6;
  --spell-dark-bg: #050505;
}

html {
  scroll-behavior: smooth;
}

body {
  cursor: none;
  background-color: var(--spell-dark-bg);
  overflow-x: hidden;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--spell-dark-bg);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--spell-purple);
}

/* --- 2. EFECTOS VISUALES & UTILIDADES --- */

.grid-bg {
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(
    circle at center,
    black 40%,
    transparent 100%
  );
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.2);
}

.nav-scrolled {
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* --- 3. ANIMACIONES (MARQUEE CORREGIDO) --- */

@keyframes gradient-x {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
.animate-gradient-x {
  background-size: 200% 200%;
  animation: gradient-x 4s ease infinite;
}

@keyframes loading {
  0% {
    width: 0%;
    transform: translateX(-100%);
  }
  50% {
    width: 50%;
  }
  100% {
    width: 100%;
    transform: translateX(100%);
  }
}

/* MARQUEE CORREGIDO */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-container::before,
.marquee-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
}
.marquee-container::before {
  left: 0;
  background: linear-gradient(to right, var(--spell-dark-bg), transparent);
}
.marquee-container::after {
  right: 0;
  background: linear-gradient(to left, var(--spell-dark-bg), transparent);
}

/* AQUÍ ESTABA EL ERROR: Cambiado de inline-block a flex */
.marquee-content {
  display: flex; /* Restaura el comportamiento Flexbox */
  width: max-content; /* Asegura que ocupe todo el ancho necesario */
  animation: marquee 30s linear infinite;
}
.marquee-content:hover {
  animation-play-state: paused;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- 4. COMPONENTES INTERACTIVOS --- */

.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: white;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease-out, width 0.2s, height 0.2s,
    background-color 0.2s;
}

body.hovering .cursor-outline {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: transparent;
  backdrop-filter: blur(2px);
}

#menu-btn {
  position: relative;
  z-index: 10001 !important;
  color: white !important;
}
#menu-btn i {
  font-size: 1.8rem;
}

/* --- 5. ESTRUCTURA Y CAPAS --- */

#mobile-menu {
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  background-color: rgba(5, 5, 5, 0.98);
  backdrop-filter: blur(10px);
}

#navbar {
  z-index: 9999;
  position: fixed;
  width: 100%;
}

/* --- 6. FIX MÓVILES --- */

@media (max-width: 1024px) {
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }

  .glass-card:hover {
    transform: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  }

  .marquee-content {
    animation: marquee 20s linear infinite;
  }
}
