body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212; /* Fondo oscuro principal */
    color: #E0E0E0; /* Texto claro */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden; /* Evita scroll horizontal */
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1a1a2e 0%, #121212 100%);
}

header {
    text-align: center;
    margin-top: 40px;
    z-index: 1;
}

.main-title {
    font-size: 5.5em;
    margin: 10px 0;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3); /* Brillo neón */
    font-weight: 800;
}

.subtitle {
    font-size: 3.2em;
    margin: 0;
    color: #00E5FF; /* Acento Cian */
    font-weight: 300;
}

.horizontal-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    max-width: 100%;
    z-index: 1;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 60px;
}

.section {
    flex: 1 1 300px;
    max-width: 300px;
    margin: 20px;
    background-color: #1E1E1E; /* Fondo tarjeta oscuro */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid #333; /* Borde sutil */
    cursor: pointer;
    transition: transform 0.3s, width 0.3s, height 0.3s, border-color 0.3s;
    white-space: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.section img {
    width: 100%;
    height: 200px;
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    opacity: 0.9;
}

.section:hover {
    transform: scale(1.05);
    border-color: #00E5FF; /* Borde neón al hacer hover */
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.15);
}

.section h2 {
    margin: 20px;
    text-align: center;
    font-size: 1.5em;
    color: #fff;
}

.section.expanded {
    transform: scale(1.2);
    z-index: 10;
    background-color: #252525; /* Ligeramente más claro al expandir */
    border-color: #7B61FF; /* Borde violeta */
}

.section.expanded img {
    height: 250px;
}

/* Contenedor de la galería */
.gallery-container {
    position: relative;
    padding: 20px;
    padding-bottom: 100px;
    text-align: center;
    margin-bottom: 60px;
    width: 100%;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Contenedor para videos de YouTube */
.video-wrapper {
    width: 100%;
    max-width: 560px;
    margin: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #333;
    background: #000;
}

.video-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(123, 97, 255, 0.2);
    border-color: #7B61FF;
}

.video-wrapper iframe {
    width: 100%;
    height: 315px;
    border: none;
    display: block;
}

.galeria-img {
    width: 100%;
    max-width: 250px;
    height: 250px;
    margin: 20px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s, z-index 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.galeria-thumb {
    width: 100%;
    max-width: 450px;
    height: 250px;
    margin: 20px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.3s, z-index 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.galeria-thumb:hover {
    transform: scale(1.05);
    border-color: #00E5FF;
    z-index: 5;
}

.galeria-img:hover {
    transform: scale(1.05);
    border-color: #00E5FF;
    z-index: 5;
}

/* Lightbox Styles */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95); /* Fondo casi negro */
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
}

#lightbox-video {
    max-width: 90%;
    max-height: 60%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.1);
}

/* Media Queries */
@media (max-width: 1024px) {
    .section {
        flex: 1 1 45%;
        max-width: 45%;
    }

    .section img {
        height: 180px;
    }

    .video-wrapper {
        max-width: 100%;
    }

    .video-wrapper iframe {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .section {
        flex: 1 1 100%;
        max-width: 100%;
        margin-right: 0;
    }

    .section img {
        height: 150px;
    }

    .section h2 {
        font-size: 1.2em;
    }

    .video-wrapper {
        max-width: 100%;
        margin: 10px;
    }

    .video-wrapper iframe {
        height: 250px;
    }

    .main-title {
        font-size: 3.5em;
    }
}

@media (max-width: 480px) {
    .section {
        flex: 1 1 100%;
        max-width: 100%;
        margin-right: 0;
    }

    .section img {
        height: 120px;
    }

    .section h2 {
        font-size: 1em;
    }

    .video-wrapper iframe {
        height: 200px;
    }

    .main-title {
        font-size: 2.5em;
    }
}

.fredoka-<uniquifier> {
    font-family: "Fredoka", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 75;
}

/* Botón de regreso estilo Neón/Gaming */
.back-button {
    position: fixed; /* Cambiado a fixed para mejor UX */
    bottom: 30px;
    left: 30px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00E5FF 0%, #7B61FF 100%); /* Gradiente */
    color: #000; /* Texto negro para contraste */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 30px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4);
    z-index: 50;
    transition: transform 0.2s, box-shadow 0.3s;
}

.back-button:hover {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 6px 25px rgba(123, 97, 255, 0.6);
    background: linear-gradient(135deg, #7B61FF 0%, #00E5FF 100%); /* Invertir gradiente */
}

.back-button:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .back-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
        bottom: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .back-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        left: 15px;
    }
}

.back-button span {
    font-size: inherit;
}

footer {
    background-color: #0D0D0D; /* Fondo más oscuro */
    color: #888; /* Texto gris suave */
    text-align: center;
    padding: 15px 0;
    position: relative;
    width: 100%;
    bottom: 0;
    border-top: 1px solid #222;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    margin-top: auto;
}

.galeria-video {
    width: 100%;
    max-width: 25%;
    height: auto;
    margin: 20px;
    border: 1px solid #444; /* Borde visible */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    background-color: #000;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.galeria-video:hover {
    transform: scale(1.05);
    border-color: #7B61FF;
}

@media (max-width: 1024px) {
    .galeria-video {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .galeria-video {
        max-width: 70%;
    }
}