@import url('https://fonts.googleapis.com/css2?family=Inter:wght@600;800&display=swap');

/* === Reset básico === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: #f9fafb; 
  color: #374151;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* === Modo oscuro === */
body.dark {
  background-color: #111827;
  color: #f9fafb;
}

/* === Fondo animado con círculos === */
.bg-circles {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 120vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b80ffcc, #6c63ffcc);
  opacity: 0.2;
  filter: blur(60px);
  animation: pulse 6s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.circle1 {
  width: 400px;
  height: 400px;
  top: 20%;
  left: 70%;
  animation-delay: 0s;
}

.circle2 {
  width: 360px;
  height: 360px;
  top: 75%;
  left: 25%;
  animation-delay: 2s;
}

.circle3 {
  width: 500px;
  height: 500px;
  top: 50%;
  left: 50%;
  opacity: 0.1;
  animation-delay: 4s;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.1);
    opacity: 0.4;
  }
}

/* === Header === */
header.banner {
  position: sticky;
  top: 0;
  width: 100%;
  min-height: 90px;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 1000;
  transition: background-color 0.3s ease, color 0.3s ease;
}

header.banner span.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  position: relative;
}

/* === Superíndice del logo R² === */
.superscript {
  font-size: 0.6em;
  line-height: 0;
  color: #6c63ff;
  position: absolute;
  top: -0.6em;
  left: 0.4em;
  animation: bounce-in 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes bounce-in {
  0% {
    transform: translateY(100%) scale(0.8);
    opacity: 0;
  }
  50% {
    transform: translateY(-30%) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* === Navegación === */
nav.topnav {
  display: flex;
  gap: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  position: relative;
}

nav.topnav a,
nav.topnav button {
  text-decoration: none;
  color: #374151;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: 0.3s;
  cursor: pointer;
}

.dropdown-trigger:focus,
.dropdown-trigger:hover,
nav.topnav a:focus,
nav.topnav a:hover,
nav.topnav button:focus,
nav.topnav button:hover {
  background-color: #ede9fe;
  color: #6c63ff;
  box-shadow: 0 0 8px rgba(108, 99, 255, 0.3);
}

nav.topnav a.active {
  color: #6c63ff;
  font-weight: 700;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  background-color: transparent;
  border: none;
  outline: 0;
  cursor: pointer;
  transition: 0.3s;
}

.dropdown-trigger[aria-expanded="true"] {
  background-color: #ede9fe;
  color: #6c63ff;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 180px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: 0.3s;
  z-index: 999;
}

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  color: #374151;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.dropdown-menu a:focus,
.dropdown-menu a:hover {
  background-color: #f3f4f6;
}

nav.topnav .dropdown-trigger[aria-expanded="true"] + .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* === Contenido principal === */
main.container {
  max-width: 1200px;
  margin: 6rem auto 8rem;
  padding: 0 2rem;
  flex: 1;
  text-align: center;
  user-select: text;
}

main.container h1 {
  font-weight: 800;
  font-size: 3.5rem;
  color: #111827;
  margin-bottom: 1rem;
}

main.container p.subtitle {
  font-weight: 600;
  font-size: 1.25rem;
  color: #6b7280;
  max-width: 720px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* === Estilos de formulario genéricos === */
form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 480px;
  margin: 0 auto;
}

input[type="text"],
input[type="email"],
textarea,
select {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
  color: #111827;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* === Botones === */
.btn-glow {
  background-color: #111827;
  color: #fff;
  border: none;
  padding: 14px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 28px;
  cursor: pointer;
  box-shadow: 0 0 10px #111827bb, 0 4px 20px #111827bb;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-glow:focus,
.btn-glow:hover {
  outline: none;
  box-shadow: 0 0 20px #4338cadd, 0 6px 30px #4338cadd;
  transform: scale(1.05);
}

.btn-small {
  display: inline-block;
  margin-top: 1rem;
  color: #6c63ff;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #6c63ff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: 0.3s;
}

.btn-small:hover {
  background-color: #6c63ff;
  color: #fff;
}

/* === Mensajes de éxito/error === */
.message {
  min-height: 24px;
  font-weight: 600;
  transition: opacity 0.3s, color 0.3s;
  text-align: center;
  display: none;
}

.message.success {
  color: #4ade80;
}

.message.error {
  color: #ef4444;
}

/* === Botón modo oscuro === */
#darkModeToggle {
  margin-left: 1rem;
  background: 0 0;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* === Estilos en modo oscuro === */
body.dark header.banner {
  background-color: #1f2937;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

body.dark main.container h1,
body.dark .features h2,
body.dark .feature-card h3,
body.dark header.banner span.logo {
  color: #f9fafb;
}

body.dark nav.topnav a,
body.dark nav.topnav button {
  color: #d1d5db;
}

body.dark nav.topnav a:hover,
body.dark nav.topnav button:hover {
  background-color: #374151;
  color: #8b5cf6;
}

body.dark .dropdown-menu {
  background-color: #1f2937;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

body.dark .dropdown-menu a:hover {
  background-color: #374151;
}

body.dark input[type="text"],
body.dark input[type="email"],
body.dark textarea {
  background-color: #1f2937;
  color: #f9fafb;
  border-color: #374151;
}

body.dark .btn-glow {
  background-color: #1f2937;
  color: #f9fafb;
  box-shadow: 0 0 10px #374151, 0 4px 20px #374151;
}

body.dark .btn-glow:hover {
  box-shadow: 0 0 20px #4b5563, 0 6px 30px #4b5563;
}

body.dark .circle {
  background: linear-gradient(135deg, #6c63ffaa, #8b80ffaa);
}

body.dark .feature-card {
  background-color: #1f2937;
}

body.dark .btn-small {
  color: #8b5cf6;
  border-color: #8b5cf6;
}

body.dark .btn-small:hover {
  background-color: #8b5cf6;
  color: #f9fafb;
}

/* === Footer === */
.footer {
  padding: 2rem 1rem;
  background-color: #ffffff;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo .logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-text {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.footer-links {
  font-size: 0.875rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-link {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #6c63ff;
}

.footer-separator {
  color: #d1d5db;
}

/* === Modo oscuro - Footer === */
body.dark .footer {
  background-color: #1f2937;
  color: #9ca3af;
  border-color: #374151;
}

body.dark .footer-logo .logo {
  color: #f9fafb;
}

/* === Estilo del título con superíndice "²" === */
.title-r {
  position: relative;
  display: inline-block;
}

.title-superscript {
  font-size: 25px;
  line-height: 0;
  color: #6c63ff;
  position: absolute;
  top: 6px;
  left: 30px;
  animation: fall-bounce 2s ease-in-out forwards;
  pointer-events: none;
  transform-origin: center bottom;
}

@keyframes fall-bounce {
  0% {
    transform: translateY(-150%) scale(0.8);
    opacity: 0;
  }
  30% {
    transform: translateY(0) scale(1.2);
    opacity: 1;
  }
  50% {
    transform: translateY(-20%) scale(0.9);
  }
  70% {
    transform: translateY(0) scale(1.05);
  }
  85% {
    transform: translateY(-10%) scale(0.95);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* === Sección de herramientas destacadas === */
.features h2 {
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* === Tarjetas Holográficas (Glassmorphism) === */
.feature-card {
  position: relative;
  background: rgba(255, 255, 255, 0.4); /* Cristal semi-transparente */
  backdrop-filter: blur(12px); /* El efecto de desenfoque por detrás */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  transform-style: preserve-3d; /* Para el efecto 3D */
  transform: perspective(1000px);
}

/* Glow oculto que sigue al ratón */
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(108, 99, 255, 0.15), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: -1;
}

.feature-card:hover::before {
  opacity: 1; /* Se enciende la luz al pasar el ratón */
}

/* Modo oscuro de las tarjetas */
body.dark .feature-card {
  background: rgba(31, 41, 55, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Efecto al hacer hover en botones */
button:hover ~ .cursor-outline,
a:hover ~ .cursor-outline,
.feature-card:hover ~ .cursor-outline {
  width: 60px;
  height: 60px;
  background-color: rgba(108, 99, 255, 0.1);
  border-color: transparent;
}

.custom-cursor.expand {
  width: 40px;
  height: 40px;
  background-color: #FCD53F;
}

/* === Botón de inicio de sesión con Spotify === */
.login-spotify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; /* Espacio entre el logo y el texto */
  background-color: #1db954;
  color: #fff;
  border: none;
  text-decoration: none;
  padding: 14px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 28px;
  box-shadow: 0 0 10px rgba(29, 185, 84, 0.4), 0 4px 20px rgba(29, 185, 84, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.login-spotify:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(29, 185, 84, 0.5), 0 6px 30px rgba(29, 185, 84, 0.4);
}

/* ==========================================
   DISEÑO EXCLUSIVO DE LA PORTADA (index.html)
   ========================================== */
.centered-content {
  max-width: 1200px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.centered-content h1 {
  font-size: 4.5rem;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  user-select: none;
  display: inline-block;
}

.centered-content p.subtitle {
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeSlideUp 1s ease forwards;
  animation-delay: 0.5s;
}

#enterBtn {
  opacity: 0;
  animation: fadeSlideUp 1s ease forwards;
  animation-delay: 0.8s;
  padding: 18px 44px;
  font-size: 1.4rem;
}

.letter {
  display: inline-block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeSlideUpLetters 0.6s ease forwards;
}

.page-fade-out {
  animation: fadeOut 0.8s ease forwards;
  pointer-events: none;
}

@keyframes fadeSlideUpLetters {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: scale(0.98); }
}
 

/* === Etiquetas de estado del servidor (Badges) === */
.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.status-badge.online {
  background-color: rgba(74, 222, 128, 0.2);
  color: #16a34a;
  border: 1px solid #4ade80;
}

body.dark .status-badge.online {
  color: #4ade80;
}

.status-badge.maintenance {
  background-color: rgba(250, 204, 21, 0.2);
  color: #ca8a04;
  border: 1px solid #facc15;
}

body.dark .status-badge.maintenance {
  color: #facc15;
}

.rank-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #6c63ff;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.rank-highlight {
    border: 2px solid #6c63ff;
    transform: scale(1.05);
}

.btn-mini {
    background: transparent;
    border: 1px solid #6c63ff;
    color: #6c63ff;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
    margin: 0 5px;
}

.btn-mini:hover {
    background: #6c63ff;
    color: white;
}