/* Importar fuente moderna de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Definición de variables globales modernizadas con mejor legibilidad */
:root {
    /* Paleta de colores moderna y legible */
    --primary-color: #ff6b95; /* Rosa romántico */
    --secondary-color: #7e57c2; /* Púrpura elegante */
    --accent-color: #00bcd4; /* Cyan suave */
    --background-color: #1a1625; /* Fondo oscuro pero no tan intenso */
    --surface-color: rgba(255, 255, 255, 0.12); /* Glassmorphism más visible */
    --surface-hover: rgba(255, 255, 255, 0.18);
    --text-color: #ffffff; /* Texto completamente blanco para mejor contraste */
    --text-secondary: #e2e8f0; /* Texto secundario más claro */
    --gradient-primary: linear-gradient(135deg, #ff6b95, #7e57c2, #ff8a80);
    --gradient-secondary: linear-gradient(135deg, #00bcd4, #7e57c2, #ff6b95);
    --gradient-accent: radial-gradient(circle at 20% 80%, rgba(255, 107, 149, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(126, 87, 194, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 40% 40%, rgba(0, 188, 212, 0.15) 0%, transparent 50%);
    --shadow-glow: 0 0 40px rgba(255, 107, 149, 0.25);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --border-radius: 24px;
    --border-radius-lg: 32px;
    
    /* Variables heredadas para compatibilidad */
    --new-primary: var(--primary-color);
    --new-secondary: var(--secondary-color);
    --new-accent: var(--accent-color);
    --new-background: var(--background-color);
    --new-text: var(--text-color);
    --new-gradient: var(--gradient-primary);
    --new-shadow: var(--shadow-glow);
}

/* Estilos básicos modernizados */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background-color);
    background-image: var(--gradient-accent);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    overflow-x: hidden;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Efecto de glassmorphism mejorado para mejor legibilidad */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 107, 149, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(126, 87, 194, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 75% 25%, rgba(0, 188, 212, 0.08) 0%, transparent 25%);
    pointer-events: none;
    z-index: -2;
}

.flowers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.03;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><circle cx="20" cy="20" r="2" fill="%23f8fafc"/></svg>') repeat;
    background-size: 80px 80px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(360deg); }
}

/* Contenedor de partículas dinámicas mejorado */
.dynamic-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    color: var(--secondary-color);
    font-size: clamp(16px, 2vw, 24px);
    opacity: 0.4;
    pointer-events: none;
    filter: drop-shadow(0 0 10px currentColor);
}

.floating-star {
    position: absolute;
    color: var(--accent-color);
    font-size: clamp(10px, 1.5vw, 16px);
    opacity: 0.3;
    pointer-events: none;
    filter: drop-shadow(0 0 8px currentColor);
}

.mouse-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    filter: blur(0.5px);
}

/* Badge de versión modernizado con mejor contraste */
.version-badge {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.15); /* Mejor contraste */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde más visible */
    color: var(--text-color);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-card);
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100px);
    opacity: 0;
}

.version-badge:hover {
    background: var(--surface-hover);
    transform: translateX(0) scale(1.05);
}

/* Contador de tiempo modernizado con mejor contraste */
.counter-container {
    text-align: center;
    margin: 2rem 1rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.15); /* Más opaco para mejor legibilidad */
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    width: min(90%, 700px);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde más visible */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(50px);
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.counter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

.counter-container:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    background: var(--surface-hover);
}

.counter-container h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.counter {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    color: var(--text-color);
    margin: 1.5rem 0;
    line-height: 1.5;
    word-wrap: break-word;
    transition: all 0.3s ease;
    font-weight: 500;
    text-shadow: 0 0 20px rgba(248, 250, 252, 0.1);
}

/* Carrusel modernizado con mejor contraste */
.carousel-container {
    margin: 2rem auto;
    width: min(90%, 600px);
    background: rgba(255, 255, 255, 0.15); /* Más opaco */
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde más visible */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform: translateY(50px);
    opacity: 0;
    position: relative;
}

.carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-secondary);
    opacity: 0.6;
}

.carousel-container:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    background: var(--surface-hover);
}

.carousel {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-inner {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    touch-action: pan-y pinch-zoom;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9);
}

.carousel-item:hover img {
    transform: scale(1.05);
    filter: brightness(1);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    text-align: center;
    font-style: italic;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 400;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%);
    opacity: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-item:hover .carousel-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Controles del carrusel modernizados con mejor contraste */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15); /* Mejor contraste */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde más visible */
    width: clamp(48px, 8vw, 56px);
    height: clamp(48px, 8vw, 56px);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-color);
    opacity: 0.9; /* Más visible */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.carousel-control:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    background: var(--surface-hover);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* Botón de corazón modernizado */
.heart-container {
    margin: 3rem;
    text-align: center;
    transform: scale(0);
    opacity: 0;
}

.heart-btn {
    background: rgba(255, 255, 255, 0.15); /* Mejor contraste */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde más visible */
    cursor: pointer;
    font-size: clamp(3rem, 7vw, 5rem);
    color: var(--secondary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    border-radius: 50%;
    touch-action: manipulation;
    filter: drop-shadow(0 0 20px rgba(255, 107, 149, 0.4));
    position: relative;
    width: clamp(120px, 15vw, 160px);
    height: clamp(120px, 15vw, 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
}

.heart-btn:hover {
    transform: scale(1.1);
    background: var(--surface-hover);
    filter: drop-shadow(0 0 30px rgba(236, 72, 153, 0.5));
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.heart-btn.pulse {
    animation: modern-pulse 2s infinite;
}

.heart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse-ring-modern 3s infinite;
}

@keyframes modern-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(236, 72, 153, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 40px rgba(236, 72, 153, 0.6));
    }
}

@keyframes pulse-ring-modern {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

/* Sección de próximas características modernizada con mejor contraste */
.coming-soon {
    margin: 2rem auto;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.15); /* Más opaco */
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    width: min(90%, 700px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde más visible */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(50px);
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.coming-soon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-secondary);
    opacity: 0.6;
}

.coming-soon:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    background: var(--surface-hover);
}

.coming-soon h3 {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

.coming-soon p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.preview-image {
    width: 100%;
    height: 200px;
    background: rgba(255, 255, 255, 0.1); /* Más sutil para mejor contraste con corazones */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.preview-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(6, 182, 212, 0.1), transparent);
    animation: rotate 4s linear infinite;
}

.preview-image:hover {
    background: var(--surface-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.preview-image i {
    font-size: 4rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 15px currentColor);
}

.preview-image:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px currentColor);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pie de página modernizado con mejor contraste */
.footer {
    margin-top: 3rem;
    padding: 2rem;
    text-align: center;
    width: 100%;
    font-size: 1rem;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.15); /* Mejor contraste */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde más visible */
    border-radius: var(--border-radius);
    transform: translateY(30px);
    opacity: 0;
    font-weight: 400;
}

.footer p {
    margin: 0.5rem 0;
}

.footer-date {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer i {
    color: var(--secondary-color);
    animation: heartbeat-modern 2s infinite;
    filter: drop-shadow(0 0 10px currentColor);
}

@keyframes heartbeat-modern {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px currentColor);
    }
    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 20px currentColor);
    }
}

/* Stardust animation mejorada */
.stardust-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.stardust-heart {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 8px currentColor);
}

.stardust-particle {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.3);
    }
}

/* Efectos de hover mejorados con glassmorphism */
.counter-container,
.carousel-container,
.coming-soon {
    position: relative;
    overflow: hidden;
}

.counter-container::after,
.carousel-container::after,
.coming-soon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.counter-container:hover::after,
.carousel-container:hover::after,
.coming-soon:hover::after {
    left: 100%;
}

/* Media queries mejoradas */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    .counter-container,
    .carousel-container,
    .coming-soon {
        margin: 1.5rem 0.5rem;
        padding: 2rem;
    }
    
    .carousel {
        height: 320px;
    }
    
    .version-badge {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 280px;
    }

    .carousel-caption {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .counter-container,
    .carousel-container,
    .coming-soon {
        padding: 1.5rem;
    }
    
    .heart-btn {
        padding: 1rem;
    }
}

/* Efectos adicionales para animaciones GSAP */
.gsap-fade-up {
    transform: translateY(50px);
    opacity: 0;
}

.gsap-fade-left {
    transform: translateX(-50px);
    opacity: 0;
}

.gsap-fade-right {
    transform: translateX(50px);
    opacity: 0;
}

.gsap-scale-up {
    transform: scale(0);
    opacity: 0;
}

/* Efectos de partículas modernizados */
.particle-trail {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    filter: blur(0.5px);
}

/* Brillo dinámico mejorado */
.dynamic-glow {
    position: relative;
}

.dynamic-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 30px var(--primary-color);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.dynamic-glow:hover::after {
    opacity: 0.4;
}

/* Efectos de scroll mejorados */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Variables de tema claro (opcional) */
@media (prefers-color-scheme: light) {
    :root {
        --background-color: #f8fafc;
        --surface-color: rgba(255, 255, 255, 0.7);
        --surface-hover: rgba(255, 255, 255, 0.9);
        --text-color: #1e293b;
        --text-secondary: #64748b;
        --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    }
    
    body::before {
        background: 
            radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.05) 0%, transparent 25%),
            radial-gradient(circle at 75% 75%, rgba(236, 72, 153, 0.05) 0%, transparent 25%),
            radial-gradient(circle at 75% 25%, rgba(6, 182, 212, 0.05) 0%, transparent 25%);
    }
}