@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700;900&display=swap');

:root {
    --color-background: #1a1a1a; /* Negro oscuro */
    --color-primary: #e81e28;    /* Rojo Baloncesto Intenso */
    --color-text-light: #f0f0f0; /* Blanco suave para el texto */
    --color-text-dark: #333333;  /* Gris oscuro */
}

body {
    background-color: var(--color-background);
    color: var(--color-text-light);
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; 
    min-height: 100vh;
    margin: 0;
    text-align: center;
    padding: 20px;

    /* --- Imagen de fondo --- */
    background-image: url('imgs/jugador_fondo.png'); 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed; 
    position: relative; 
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.475);  
    backdrop-filter: blur(2px); 
    z-index: 0; 
}

/* --- ESTILOS PARA EL LOGO --- */

.logo-container {
    text-align: center; 
    position: relative;
    z-index: 10; 
}

.logo {
    max-width: 150px; 
    height: auto;
}

.container {
    max-width: 800px;
    padding: 20px 40px;
    background: rgb(0 0 0 / 62%);
    border-radius: 15px;
    border: 3px solid var(--color-primary); 
    box-shadow: 0 0 30px rgba(232, 30, 40, 0.7); 
    position: relative; 
    z-index: 1; 
    animation: fadeInScale 1s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.title {
    font-size: 1.8em;
    color: var(--color-primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 900;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    animation: bounceIn 1.2s ease-out forwards;
    -webkit-animation: bounceIn 1.2s ease-out forwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    60% {
        opacity: 1;
        transform: translateY(10px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.subtitle {
    font-size: 1.3em;
    margin-bottom: 30px;
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 0.5s; 
    opacity: 0; 
}

.subtitle span {
   color: var(--color-primary);
   font-weight: bold;
}

/* --- Contador --- */
.countdown-container {
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 20px 0;
    border-top: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    position: relative; 
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 1s; 
    opacity: 0;
}

.countdown-container::before,
.countdown-container::after {
    content: '';
    position: absolute;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-primary), transparent);
    animation: drawLine 2s ease-out forwards;
    animation-delay: 1.2s; 
    opacity: 0;
}

.countdown-container::before {
    top: 0;
}

.countdown-container::after {
    bottom: 0;
}

@keyframes drawLine {
    from {
        width: 0%;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}


.countdown-title {
    font-size: 1.6em;
    color: var(--color-text-light);
    margin-bottom: 15px;
    margin-top: 0px;
    font-weight: 700;
    text-transform: uppercase;
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 1.5s;
    opacity: 0;
}

.countdown-timer {
    display: flex;
    justify-content: space-around;
    gap: 15px; 
}

.time-unit {
    background-color: var(--color-text-dark); 
    color: var(--color-primary); 
    padding: 15px 20px;
    border-radius: 8px;
    min-width: 90px; 
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(232, 30, 40, 0.3);
    border: 1px solid var(--color-primary);
    position: relative;
    overflow: hidden; 

    animation: flipInX 0.8s ease-out forwards;
    opacity: 0;
}

.time-unit:nth-child(1) { animation-delay: 1.8s; } 
.time-unit:nth-child(2) { animation-delay: 2s; }   
.time-unit:nth-child(3) { animation-delay: 2.2s; } 
.time-unit:nth-child(4) { animation-delay: 2.4s; } 

/* Efecto de brillo al pasar el ratón */
.time-unit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: skewX(-30deg);
    transition: all 0.3s ease;
}

.time-unit:hover::after {
    left: 100%;
}

@keyframes flipInX {
    from {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

.time-unit span {
    display: block;
    font-size: 4em; 
    font-weight: 900;
    line-height: 1;
}

.time-unit label {
    display: block;
    font-size: 0.9em;
    margin-top: 5px;
    color: var(--color-text-light); 
    text-transform: uppercase;
    font-weight: 700;
}

.contact {
    margin-top: 30px;
    font-style: italic;
    color: rgba(240, 240, 240, 0.8);
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 2.5s;
    opacity: 0;
}

/* Animación de opacidad general */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animación sutil de pulso para el borde del contenedor */
@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 30px rgba(232, 30, 40, 0.7);
    }
    50% {
        box-shadow: 0 0 45px rgba(232, 30, 40, 1);
    }
    100% {
        box-shadow: 0 0 30px rgba(232, 30, 40, 0.7);
    }
}
.container {
    animation: fadeInScale 1s ease-out forwards, pulseBorder 3s infinite alternate ease-in-out;
}

/* --- ESTILOS PARA ICONOS DE REDES SOCIALES --- */
.social-links {
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center; 
    gap: 20px; 
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 3s; 
    opacity: 0; 
}
.social-icon {
    display: inline-block;
    font-size: 1em; 
    color: var(--color-text-light); 
    transition: color 0.3s ease, transform 0.3s ease;
    text-decoration: none; 
}
.social-icon:hover {
    color: var(--color-primary); 
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px var(--color-primary));
}
.social-icon i {
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 50%; 
}
.social-icon:hover i {
    border: 2px solid var(--color-primary); 
    background-color: rgba(232, 30, 40, 0.1); 
}

/* Responsividad */
@media (max-width: 768px) {
    .title {
        font-size: 1em;
        letter-spacing: 3px;
    }
    .subtitle {
        font-size: 0.8em;
    }
    .countdown-title {
        font-size: 1.3em;
    }
    .time-unit span {
        font-size: 3em;
    }
    .time-unit {
        min-width: 70px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .title {
        letter-spacing: 2px;
    }
    .countdown-timer {
        flex-direction: row; 
        gap: 10px;
    }
    .time-unit {
        width: 80%; 
        margin: 0 auto;
        min-width: unset;
    }
    .time-unit span {
        font-size: 2em;
    }
    .time-unit label {
        font-size: 0.6em;
    }
    .container {
        padding: 20px;
    }
    body {
        background-size: inherit;
    }
}

@keyframes backgroundPan {
    from {
        background-position: 40% 40%;
    }
    to {
        background-position: 60% 60%;
    }
}
body {
    background-image: url('imgs/jugador_fondo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: backgroundPan 15s linear infinite alternate;
    -webkit-animation: backgroundPan 15s linear infinite alternate;
}