/* Animación de entrada global */
.pagina {
    animation: entradaPagina 2s ease forwards;
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
}

/* Fondo dinámico */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: linear-gradient(to right, #ff9ff3, #feca57);
    color: #333;
}

/* Cabecera sticky */
#cabecera {
    background-color: #1dd1a1;
    color: white;
    text-align: center;
    padding: 30px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Efecto máquina de escribir */
#escritura {
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid white;
    width: 0;
    animation: escribir 4s steps(40, end) forwards, parpadeo 1s infinite;
}

/* Menú fijo */
.menu {
    display: flex;
    justify-content: center;
    background-color: #f7d794;
    position: fixed;
    width: 100%;
    top: 80px;
    z-index: 9;
}

.enlace {
    margin: 15px;
    text-decoration: none;
    color: #2d98da;
    font-weight: bold;
    font-size: 18px;
    transition: color 0.5s, transform 0.3s;
}

.enlace:hover {
    color: #f53b57;
    transform: scale(1.2);
}

/* Subtítulo con pseudoelemento */
.subtitulo::after {
    content: " 🎮";
}

section {
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    margin: 20px;
    border-radius: 20px;
    animation: fadeIn 1.5s ease-in-out;
}

.lista li {
    margin: 15px 0;
    font-size: 18px;
    animation: slideIn 1.2s ease-in-out;
}

.galeria-contenedor {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.imagen {
    position: relative;
    left: 20px;
    border-radius: 10px;
    transition: transform 0.5s, box-shadow 0.5s;
}

.animar-imagen:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 15px #2d98da;
}

.btn {
    background-color: #38ada9;
    border: none;
    padding: 12px 25px;
    color: white;
    cursor: pointer;
    font-size: 18px;
    border-radius: 10px;
    transition: transform 0.4s, background-color 0.4s;
}

.btn:hover {
    transform: scale(1.2) rotate(-3deg);
    background-color: #079992;
}

/* Curiosidades animadas */
.curiosidades-contenedor {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.curiosidad {
    background-color: #f8a5c2;
    padding: 15px;
    border-radius: 15px;
    font-size: 18px;
    animation: curiosidadAnimada 3s infinite alternate;
    transition: transform 0.4s;
}

.curiosidad:hover {
    transform: scale(1.1) rotate(-2deg);
    background-color: #f53b57;
    color: white;
}

/* Keyframes */
@keyframes entradaPagina {
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes escribir {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes parpadeo {
    50% { border-color: transparent; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes curiosidadAnimada {
    from { transform: translateX(0); }
    to { transform: translateX(20px); }
}
