* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('images/fondo.gif') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0 20px;
    animation: slideIn 1s ease-out forwards;
}

@keyframes slideIn {
    0% {
        transform: translateX(-100%); /* Empuja todo a la izquierda fuera de la vista */
        opacity: 0;
    }
    100% {
        transform: translateX(0); /* Vuelve a la posición original */
        opacity: 1;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    animation: slideUp 1s ease-out forwards;
}

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

header {
    text-align: center;
    padding: 40px;
    margin-bottom: 40px;
    background: linear-gradient(to right, #3498db, #9b59b6);
    color: white;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    animation: slideUp 1s ease-out forwards;
}

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

p {
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.exercises {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    animation: slideUp 1s ease-out forwards;
}

.exercise {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.exercise:nth-child(1) {
    animation-delay: 0.2s;
}

.exercise:nth-child(2) {
    animation-delay: 0.4s;
}

.exercise:nth-child(3) {
    animation-delay: 0.6s;
}

.exercise:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.exercise h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.exercise button {
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    letter-spacing: 1px;
}

.exercise button:hover {
    background-color: #2980b9;
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 1rem;
    color: #7f8c8d;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 1s;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    header {
        padding: 20px;
    }

    .exercises {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }
}
