/* Importar fuente mejorada */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,900&display=swap');

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

/* Variables CSS para consistencia */
:root {
    --primary-color: #39d6b4;
    --primary-dark: #0a2be9;
    --secondary-color: #50c878;
    --accent-color: rgb(50, 194, 151);
    --text-light: #ffffff;
    --text-dark: #111111;
    --background: #000000;
    --background-gradient: linear-gradient(135deg, #000000 0%, #1a1a2e 50%, #16213e 100%);
    --shadow-glow: 0 0 20px var(--primary-color);
    --border-radius: 50px;
    --transition: all 0.3s ease;
    
    /* Variables nuevas para sombras y transiciones */
    --shadow-button: 0 4px 15px rgba(10, 43, 233, 0.3);
    --shadow-button-hover: 0 8px 25px rgba(10, 43, 233, 0.4);
    --transition-fast: all 0.2s ease;
    
    --font-family: 'Poppins', sans-serif;
}

/* Configuración global */
* {
    font-family: var(--font-family);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-light);
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background-gradient);
    overflow-x: hidden;
    position: relative;
    animation: pageLoad 0.8s ease both;
}

/* Efecto de partículas en el fondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(57, 198, 214, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(80, 200, 120, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 40% 40%, rgba(10, 43, 233, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Botones mejorados */
.botones {
    padding: 12px;
    border-radius: var(--border-radius);
    background: transparent;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.botones::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.botones:hover::before {
    left: 100%;
}

.botones a {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 1rem;
    display: inline-block;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-button);
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}

.botones a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--border-radius);
    z-index: 0;
}

.botones a:hover,
.botones a:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.botones a:hover::before,
.botones a:focus-visible::before {
    opacity: 1;
}

/* Focus mejorado para accesibilidad */
.botones a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.botones a span {
    position: relative;
    z-index: 2;
}

/* Título principal mejorado */
.greetings {
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    line-height: 1.1;
}

.greetings > span {
    display: inline-block;
    animation: enhancedGlow 3s ease-in-out infinite;
    transition: var(--transition);
    position: relative;
}

.greetings > span:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}

/* Animación de brillo mejorada */
@keyframes enhancedGlow {
    0%, 100% {
        color: var(--text-light);
        text-shadow: 
            0 0 5px var(--primary-color),
            0 0 10px var(--primary-color),
            0 0 20px var(--primary-color),
            0 0 40px var(--primary-color);
        transform: translateY(0px);
    }
    15%, 85% {
        color: var(--primary-color);
        text-shadow: 
            0 0 2px var(--primary-color),
            0 0 8px var(--primary-color),
            0 0 15px var(--primary-color),
            0 0 30px var(--primary-color);
        transform: translateY(-2px);
    }
    50% {
        color: var(--text-dark);
        text-shadow: none;
        transform: translateY(0px);
    }
}

/* Delays para cada letra - más suave */
.greetings > span:nth-child(1) { animation-delay: 0s; }
.greetings > span:nth-child(2) { animation-delay: 0.15s; }
.greetings > span:nth-child(3) { animation-delay: 0.3s; }
.greetings > span:nth-child(4) { animation-delay: 0.45s; }
.greetings > span:nth-child(5) { animation-delay: 0.6s; }
.greetings > span:nth-child(6) { animation-delay: 0.75s; }
.greetings > span:nth-child(7) { animation-delay: 0.9s; }
.greetings > span:nth-child(8) { animation-delay: 1.05s; }
.greetings > span:nth-child(9) { animation-delay: 1.2s; }
.greetings > span:nth-child(10) { animation-delay: 1.35s; }
.greetings > span:nth-child(11) { animation-delay: 1.5s; }

/* Descripción mejorada */
.description {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 2.5rem;
    text-align: center;
    font-weight: 300;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 600px;
    animation: fadeInUp 1s ease 0.5s both;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* mejora legibilidad */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

/* Contenedor de botones */
.button {
    animation: fadeInUp 1s ease 1s both;
}

.button a {
    text-decoration: none;
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Efectos de hover adicionales */
.greetings::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        width: 100px;
        opacity: 0.7;
    }
    50% {
        width: 150px;
        opacity: 1;
    }
}

/* Responsive mejorado */
@media screen and (max-width: 768px) {
    .greetings {
        font-size: clamp(2.5rem, 10vw, 4rem);
        font-weight: 800;
        margin-bottom: 1.5rem;
    }
    
    .description {
        font-size: clamp(1rem, 4vw, 1.4rem);
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .botones a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .button a {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .greetings {
        font-size: clamp(2rem, 12vw, 3rem);
        line-height: 1.2;
    }
    
    .description {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .botones {
        padding: 8px;
    }
    
    .botones a {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Animación de entrada para toda la página */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estados de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hover states adicionales */
@media (hover: hover) {
    .greetings > span:hover {
        color: var(--primary-color);
        text-shadow: 0 0 20px var(--primary-color);
    }
}
