/* RESET & BASE */
body {
  margin: 0;
  overflow-x: hidden;
}

/* CANVAS FONDO */
#wavesCanvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: -10; pointer-events: none;
  transition: opacity 0.5s ease;
}

/* En modo light, el canvas usa multiply para verse sobre blanco */
html:not(.dark) #wavesCanvas {
  mix-blend-mode: multiply;
  opacity: 0.6;
}

/* En modo dark, usa screen para brillar sobre negro */
html.dark #wavesCanvas {
  mix-blend-mode: screen;
  opacity: 1;
}

/* GLASS CARD GENÉRICA (Se ajusta con Tailwind en el HTML, aquí la base) */
.glass-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-style: preserve-3d;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px -12px rgba(0,0,0,0.15);
}

/* TILT CARDS 3D */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.1s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Brillo al pasar el ratón (Solo visible en Dark Mode para efecto Neon) */
.dark .tilt-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: inherit;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
  z-index: 3; opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.dark .tilt-card:hover::before { opacity: 1; }
.tilt-content { transform: translateZ(20px); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb { background: #334155; }
.dark ::-webkit-scrollbar-track { background: #020617; }

/* INPUTS THEME (Adaptables) */
.input-theme, input[type="text"], textarea, select {
  transition: all 0.3s;
  outline: none;
}

/* Estilos Light */
html:not(.dark) .input-theme {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}
html:not(.dark) .input-theme:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

/* Estilos Dark (Blindados) */
html.dark .input-theme, 
html.dark input[type="text"], 
html.dark textarea, 
html.dark select {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
}
html.dark .input-theme:focus {
  border-color: #3b82f6 !important;
  background-color: rgba(59, 130, 246, 0.1) !important;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Fix Autofill Chrome Dark Mode */
html.dark input:-webkit-autofill, 
html.dark input:-webkit-autofill:hover, 
html.dark input:-webkit-autofill:focus, 
html.dark input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* SELECT ICON FIX */
select.input-theme {
  appearance: none; -webkit-appearance: none;
  background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem;
}
html:not(.dark) select.input-theme {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}
html.dark select.input-theme {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}
html.dark select.input-theme option { background-color: #020617; color: white; }

/* ANIMACIONES */
.hacker-text { opacity: 0; }
.reveal-simple { opacity: 0; animation: fadeInUp 0.8s ease-out forwards; animation-delay: 0.2s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* NAV LINKS */
.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 0.2s;
}
html:not(.dark) .nav-link { color: #64748b; }
html:not(.dark) .nav-link:hover { color: #0f172a; background-color: rgba(0,0,0,0.05); }
html.dark .nav-link { color: #cbd5e1; }
html.dark .nav-link:hover { color: white; background-color: rgba(255,255,255,0.05); }