/* ==========================================================================
   VARIABLES DE TEMA (CLARO Y OSCURO)
   ========================================================================== */
:root {
    /* MODO CLARO (Por defecto, aunque iniciamos en dark) */
    --bg-color: #FAFAFA;
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --color-pink: #FF6B9E;
    --color-pink-hover: #ff4a85;
    --color-goldenrose: #B76E79;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Configuración base */
    --font-main: 'Poppins', sans-serif;
    --transition-speed: 0.4s;
    --circle-radius: 50%;
}

/* MODO OSCURO */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --color-pink: #FF9CBD;
    --color-pink-hover: #FF6B9E;
    --color-goldenrose: #D4AF37; /* Más dorado para resaltar en oscuro */
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   RESETEOS GLOBALES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden; /* Evitamos scroll en la portada */
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* ==========================================================================
   SWITCH DE TEMA (BOTÓN)
   ========================================================================== */
.theme-switch-wrapper {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 100;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.slider .icon-sun, .slider .icon-moon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    transition: color 0.4s ease;
}

.slider .icon-sun {
    color: #1a1a1a; /* Negro/Oscuro para el Sol (lado izquierdo/claro) */
}

.slider .icon-moon {
    color: #ffffff; /* Blanco para la Luna (lado derecho/oscuro) */
}

.slider .svg-icon {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    z-index: 2;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-pink);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* ==========================================================================
   PORTADA INMERSIVA
   ========================================================================== */
.hero-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: opacity 0.8s ease, transform 0.8s ease; /* Transición para cuando le demos a Explorar */
}

/* Efecto de salida cuando hace clic en "Explorar" */
.hero-container.fade-out {
    opacity: 0;
    transform: scale(1.05);
}

.hero-content {
    text-align: center;
    z-index: 10;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    padding: 2rem 0;
    box-shadow: none;
    max-width: 1200px;
    width: 90%;
    height: 90vh; /* Ocupar pantalla */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   TOP SECTION: ROLES Y NOMBRE
   ========================================================================== */
.hero-top {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero-top .center-item {
    text-align: center;
}
.hero-top .right-item {
    text-align: right;
}

/* ==========================================================================
   MIDDLE SECTION: TITLE Y AVATAR BANNER
   ========================================================================== */
.hero-middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}
.title-container {
    position: relative;
    text-align: center;
    margin-bottom: -40px; /* Para que el banner se superponga ligeramente al título */
    z-index: 1;
}
.year-badge {
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-secondary);
}
.main-title {
    font-size: clamp(4rem, 10vw, 9rem); /* Texto responsivo */
    font-weight: 700;
    letter-spacing: -2px;
    background: linear-gradient(to right, var(--color-pink), var(--color-goldenrose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
}

.avatar-banner-container {
    width: 90%;
    max-width: 900px;
    height: 250px; /* forma de píldora/banner */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.character-banner {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-pink), var(--color-goldenrose));
    border-radius: 9999px; /* Asegura bordes redondos de cápsula en cualquier escala */
    border: 4px solid var(--bg-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    overflow: hidden; /* Cortar la imagen al fondo redondeado */
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Alinear imagen a la parte inferior */
    transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

/* Fondo rosa degradado más claro en modo claro */
[data-theme="light"] .character-banner {
    background: linear-gradient(135deg, #FFE3EC, #F2D2DC);
}

.blinking-img-banner {
    height: 110%; /* Sobresale un poco para efecto 3D/Pop */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transform: translateY(10px); /* Ajuste sutil */
}

.welcome-text {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-pink);
}

/* ==========================================================================
   BOTTOM SECTION: CONTACT INFO Y BOTÓN
   ========================================================================== */
.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    font-weight: 300;
    font-size: 1rem;
}
.hero-bottom a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
.hero-bottom a:hover {
    color: var(--color-pink);
}
.hero-bottom .right-item {
    text-align: right;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.action-container {
    display: flex;
    justify-content: center;
}

.btn-primary {
    background-color: var(--color-pink);
    color: white;
    font-family: var(--font-main);
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px; /* Completamente redondeado */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(255, 107, 158, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-pink-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(255, 107, 158, 0.4);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

/* ==========================================================================
   DECORACIONES (CÍRCULOS DE FONDO)
   ========================================================================== */
.decoration {
    position: absolute;
    border-radius: var(--circle-radius);
    filter: blur(80px);
    z-index: 1;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background-color: var(--color-pink);
    top: -10%;
    left: -10%;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background-color: var(--color-goldenrose);
    bottom: -5%;
    right: -5%;
    animation-delay: 2s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    background-color: #ffffff;
    top: 40%;
    left: 60%;
    animation-delay: 5s;
    opacity: 0.2;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .name-title { font-size: 2rem; }
    .roles-subtitle { font-size: 0.9rem; flex-direction: column; gap: 0.3rem;}
    .divider { display: none; }
    .hero-content { padding: 1rem 0; width: 95%; gap: 1.5rem; }

    /* Contenedor del Personaje en modo móvil: proporción 2:1 de la imagen, abarca 60% de pantalla */
    .character-container {
        width: 60vw;
        height: 30vw; /* Relación 2:1 exacta para coincidir con la imagen de 1500x750px */
        max-width: none;
        max-height: none;
        min-width: unset;
        min-height: unset;
    }

    .character-head {
        border-radius: 9999px; /* Mantiene la forma de cápsula/píldora original */
    }

    .blinking-img {
        height: 90%; /* Hace la imagen un poco más pequeña para dar espacio al brillo */
        max-width: 100%;
        object-fit: contain;
        object-position: bottom; /* Mantiene el perrito alineado al fondo */
        transform: translateY(2px); /* Ajuste para evitar líneas blancas en la base */
    }

    /* Reducir la intensidad de los degradados del fondo en móviles */
    .decoration {
        opacity: 0.2;
        filter: blur(60px);
    }
    .circle-1 {
        width: 250px;
        height: 250px;
    }
    .circle-2 {
        width: 200px;
        height: 200px;
    }
    .circle-3 {
        width: 150px;
        height: 150px;
    }

    /* Ocultar el brillo del ratón en móviles para ahorrar rendimiento y evitar destellos indeseados */
    .mouse-glow {
        display: none !important;
    }
}

/* ==========================================================================
   EFECTO DE BRILLO DE RATÓN DE FONDO (GLOW EFFECT)
   ========================================================================== */
.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(255, 107, 158, 0.12) 0%, rgba(214, 175, 55, 0.04) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2; /* Entre decoraciones (1) y el contenido principal (10) */
    opacity: 0;
    transition: opacity 0.5s ease;
    transform: translate3d(-50%, -50%, 0);
    will-change: transform;
}

.mouse-glow.active {
    opacity: 1;
}

/* Ajuste sutil para modo claro (más brillante a petición del usuario) */
[data-theme="light"] .mouse-glow {
    background: radial-gradient(circle, rgba(255, 107, 158, 0.25) 0%, rgba(183, 110, 121, 0.08) 40%, transparent 70%);
}

/* ==========================================================================
   EFECTO SPOTLIGHT GLOW EN LA TARJETA PRINCIPAL (HERO CONTENT)
   ========================================================================== */

