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

/* Body */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Header */
header {
    background-color: #ff0000;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-wrap: wrap;
}

header h1 {
    text-align: center;
    flex: 1 1 100%;
}

/* Menú normal */
.menu {
    position: absolute;
    right: 20px; 
    display: flex;
    gap: 20px;
}
.menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.menu a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Logo */
.logo {
    position: absolute;
    left: 10px;
    height: 50px;
}

/* Main */
h2 {
    margin-bottom: 10px;
}
main {
    max-width: 80%;
    margin: 40px auto;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: riseUp 0.9s ease-out forwards;
}
.enlace {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    padding: 0;
    display: inline-block;
    transition: color 0.3s ease;
}
.enlace:hover {
    color: rgb(255, 0, 0);
}

section {
    margin-bottom: 40px;
}
.seccion-final {
    margin-bottom: 0px;
}
ul, ol {
    margin-left: 30px;
}
.personajes article {
    margin-bottom: 30px;
}

/* Bloques flexibles */
.bloque-juegos, .bloque-musica {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Nota*/
.nota {
    flex: 1;
    background-color: #fff8a6;
    padding: 20px;
    border-left: 8px solid #f4d000;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: rotate(-2deg);
    min-width: 200px;
    margin-bottom: 20px;
}
.nota h3 {
    margin-bottom: 10px;
}

/* Definition List */
dl {
    margin-left: 30px;
}
dt {
    font-weight: bold;
    margin-top: 10px;
}
dd {
    margin-left: 20px;
    color: #555;
}

/* Tabla */
table {
    border-collapse: collapse;
    width: 100%;
    border: 2px solid black;
    table-layout: auto;
}
th, td {
    padding: 5px 10px;
    border: 1px solid black;
}

/* Galerías */
.galeria-juegos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    justify-items: center;
    margin-top: 20px;
    width: 100%;
}
.galeria-juegos img {
    height: 190px;
    width: auto;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.galeria-juegos img:hover {
    transform: scale(1.2);
}

/* Personajes */
.personajes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    justify-items: center;
}
.personaje {
    height: 200px;
    width: auto;
}

/* Multimedia */
audio {
    margin-top: 10px;
    border-radius: 10px;
    max-width: 100%;
}

/* Video */
video {
    margin-top: 10px;
    border-radius: 10px;
    max-width: 50%;
    height: auto;
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px;
    background-color: #ff0000;
    color: white;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .bloque-juegos, .bloque-musica {
        flex-direction: column;
        gap: 20px;
    }
    .nota {
        transform: rotate(0deg);
    }
    .galeria-juegos {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
    .galeria-juegos img {
        height: 130px;
    }
    .nota {
        margin-top: -35px;
        margin-bottom: 30px;
        transform: rotate(-2deg);
    }
}

@media (max-width: 768px) {
    header {
        padding: 40px;
    }
    header h1 {
        display: none;
    }
    main {
        max-width: 95%;
        padding: 20px 15px;
    }
    .menu {
        flex-direction: column;
        right: 10px;
        gap: 10px;
    }
    .galeria-juegos {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    video, .yt {
        max-width: 100%;
    }
    
    .nota {
        margin-top: -35px;
        margin-bottom: 30px;
        transform: rotate(-2deg);
    }
    
}

@media (min-width: 601px) {
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 600px) {
    header h1 {
        display: none;
    }
    .logo {
        position: absolute;
        left: 15px;
        height: 50px;
    }
    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        background-color: #ff0000;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px 10px;
        border-radius: 4px;
        z-index: 99;
    }
    .menu-links {
        position: absolute;
        top: 15px;
        right: 25px;
        width: 150px;
        display: none;
        flex-direction: column;
        background-color: #ff2121;
        border-radius: 6px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        z-index: 100;
    }
    .menu-links.show {
        display: flex;
    }
    .menu-links a {
        padding: 10px;
        color: white;
        text-decoration: none;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
    header {
        padding: 40px;
    }
    .nota {
        margin-top: -35px;
        margin-bottom: 30px;
        transform: rotate(-2deg);
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    .menu a {
        padding: 5px;
        font-size: 0.9rem;
    }
    .nota {
        margin-top: -35px;
        margin-bottom: 30px;
        transform: rotate(-2deg);
    }
    table {
        overflow-x: auto;
        display: block;
    }
}

/* Animación */
@keyframes riseUp {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
