/* Paleta de Colores:
   - Fondo Principal (Deep Night Blue): #0A0A1A
   - Fondo Secundario/Claro (Dark Slate): #1C243B
   - Azul Principal (Accent - "Electric Blue"): #00BFFF
   - Azul Secundario/Claro: #66CCFF
   - Texto Principal: #E0E0E0
   - Texto Secundario: #AAAAAA
*/

/* --- Estilos Generales y Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0A0A1A; /* Negro azulado muy oscuro */
    color: #E0E0E0; /* Blanco roto */
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3, h4 {
    color: #00BFFF; /* Azul Principal */
    font-weight: 700;
}

a {
    color: #00BFFF; /* Azul Principal */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #66CCFF; /* Azul Secundario/Claro */
}

/* --- Animación de Fondo (Rayas sutiles en tonos de azul y negro) --- */
.animated-stripes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        #0A0A1A,
        #0A0A1A 10px,
        #1C243B 10px, /* Dark Slate */
        #1C243B 20px
    );
    opacity: 0.15;
    z-index: -1;
    animation: moveStripes 60s linear infinite;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 1000px; }
}


/* --- Navegación (Header) --- */
header {
    background-color: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 2px solid #1C243B;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.4em;
    font-weight: 700;
    letter-spacing: 1px;
}

.menu-nav {
    list-style: none;
    display: flex;
}

.menu-nav li {
    margin-left: 40px;
}

.menu-nav a {
    font-weight: 600;
    padding: 5px 10px;
    color: #E0E0E0;
    position: relative;
    text-transform: uppercase;
}

.menu-nav a.active {
    color: #00BFFF;
}

.menu-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00BFFF;
    transition: width 0.3s ease-out;
}

.menu-nav a.active::after,
.menu-nav a:hover::after {
    width: 100%;
}

/* --- Toggle Button (Hamburguesa) --- */
.menu-toggle {
    display: none; /* Oculto por defecto, se muestra en móvil */
    background: none;
    border: none;
    color: #00BFFF;
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px;
    z-index: 1010;
}

/* --- Menú Lateral (Sidebar) --- */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -280px; /* Oculto fuera de la pantalla */
    width: 280px;
    height: 100%;
    background-color: #101525; 
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1005;
    transition: right 0.4s ease-out;
    padding-top: 80px; 
    border-left: 3px solid #00BFFF;
}

.sidebar-menu.open {
    right: 0; /* Muestra el menú */
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #1C243B;
}

.sidebar-nav a {
    display: block;
    padding: 15px 25px;
    color: #E0E0E0;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #00BFFF;
    color: #0A0A1A;
}


/* --- SECCIÓN HERO --- */
.hero-section {
    text-align: center;
    padding: 150px 0 120px;
    border-bottom: 1px solid #1C243B;
}

.logo-hero {
    max-width: 220px;
    height: auto;
    margin-bottom: 30px;
    border-radius: 10px;
}

.main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.explanation {
    max-width: 750px;
    margin: 0 auto 50px auto;
    font-size: 1.1em;
    color: #CFCFCF;
}

.challenge-date-box {
    background-color: #1C243B;
    padding: 20px 40px;
    border-radius: 8px;
    
    display: block; 
    width: fit-content; 
    margin: 0 auto 20px auto; 
    
    border-left: 5px solid #00BFFF;
}

.info-label {
    font-weight: 600;
    color: #66CCFF;
    font-size: 0.9em;
    display: block;
}

.info-data {
    font-size: 1.5em;
    margin-top: 5px;
    color: #E0E0E0;
}

.not-found-image-container {
    width: 100%;
    max-width: 450px; /* Tamaño máximo para la imagen */
    margin: 40px auto;
    padding: 10px;
    background-color: #1C243B; /* Fondo de tarjeta */
    border-radius: 12px;
    border: 3px solid #00BFFF; /* Borde neón */
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.4);
    overflow: hidden;
}

.image-404 {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px; /* Bordes redondeados dentro del contenedor */
    object-fit: cover;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .not-found-image-container {
        max-width: 300px;
        margin: 30px auto;
    }
}

/* Estilos para el botón de Twitch (AZUL) */
.twitch-button {
    display: inline-flex; 
    align-items: center;
    margin-top: 0; 
    padding: 12px 25px;
    background-color: #00BFFF; /* Fondo Azul Principal */
    color: #0A0A1A; /* Texto/Icono Oscuro */
    border-radius: 8px;
    font-weight: 700; 
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.4); 
}

.twitch-button i {
    margin-right: 10px;
    font-size: 1.3em;
    color: #0A0A1A; 
}

.twitch-button:hover {
    background-color: #66CCFF; /* Azul claro en hover */
    transform: translateY(-2px); 
    color: #0A0A1A; 
    box-shadow: 0 8px 20px rgba(102, 204, 255, 0.6);
}

/* --- SECCIÓN CREADOR (Doble Tarjeta) --- */
.creator-section {
    padding: 100px 0;
    background-color: #0A0A1A;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
}

.creator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.creator-card {
    background-color: #1C243B;
    padding: 30px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid #283049;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease-out;
    text-align: center;
}

.creator-card:hover {
    border-color: #00BFFF;
    box-shadow: 0 15px 35px rgba(0, 191, 255, 0.2);
    transform: translateY(-5px);
}

.creator-info {
    order: 1;
    margin-bottom: 20px;
    /* Corrección de texto largo para info de creador */
    overflow: hidden;
    word-wrap: break-word;
}

.creator-info h4 {
    font-size: 1.4em;
    margin-bottom: 5px;
}

.creator-info p {
    color: #AAAAAA;
    margin-bottom: 5px;
}

.creator-avatar-container {
    order: 0;
    margin-bottom: 15px;
}

.creator-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #00BFFF;
    transition: border-color 0.3s ease;
}

.social-links {
    margin-top: 10px;
}

.social-links a {
    font-size: 1.8em;
    margin-right: 15px;
    color: #00BFFF; 
}

/* Estilos específicos de redes sociales */
.social-links a .fa-youtube {
    color: #FF0000; 
}
.social-links a .fa-youtube:hover {
    color: #FF6666; 
}
.social-links a .fa-twitch {
    color: #6441A4; 
}
.social-links a .fa-twitch:hover {
    color: #A990D3; 
}
.social-links a:hover {
    color: #E0E0E0; 
    transform: scale(1.1);
}


/* --- SECCIÓN PARTICIPANTES --- */
.participants-section {
    padding: 100px 40px;
    background-color: #0A0A1A; 
    text-align: center;
}

.participants-header {
    margin-bottom: 40px;
    padding: 0;
}

.section-title {
    font-size: 3em;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-description {
    font-size: 1.1em;
    color: #66CCFF;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 40px;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;

    background-color: #1C243B; 
    border-radius: 15px;
    padding: 40px 30px;
    border: 2px solid #00BFFF;
    box-shadow: 0 0 40px rgba(0, 191, 255, 0.2); 
}

.participant-card {
    background-color: #101525;
    border-radius: 10px;
    padding: 35px 25px;
    text-align: center;
    border: 1px solid #283049;
    transition: all 0.3s ease-out;
    opacity: 0; 
    transform: translateY(40px);
}

.participant-card:hover {
    background-color: #283049;
    border-color: #00BFFF;
    box-shadow: 0 10px 20px rgba(0, 191, 255, 0.3);
    transform: translateY(-5px); 
}

.card-header {
    border-bottom: 1px solid #283049;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.participant-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #00BFFF;
}

.participant-name {
    font-size: 1.3em;
    color: #E0E0E0;
    /* Corrección de texto largo para nombre de participante */
    overflow: hidden;
    word-wrap: break-word; 
}

.participant-tag {
    font-size: 0.8em;
    color: #AAAAAA;
    margin-bottom: 10px;
}

.participant-link {
    display: block;
    padding: 8px;
    border: 1px solid #00BFFF;
    border-radius: 5px;
    font-weight: 600;
}

.participant-link:hover {
    background-color: #00BFFF;
    color: #0A0A1A;
}

/* --- SECCIÓN EQUIPO (NUEVOS ESTILOS) --- */
.team-section {
    padding: 100px 40px;
    background-color: #0A0A1A;
    text-align: center;
}

.team-section .section-title {
    margin-bottom: 10px;
}
.team-section .section-description {
    color: #AAAAAA;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

/* Panel de Control (Botón y Audio) */
.controls-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.blue-button {
    padding: 12px 30px;
    background-color: #00BFFF;
    color: #0A0A1A;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.4); 
}

.blue-button:hover {
    background-color: #66CCFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 204, 255, 0.6);
}

/* Control de Audio */
.audio-control {
    display: flex;
    align-items: center;
    background-color: #1C243B;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #00BFFF;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.2);
}

.audio-label {
    font-size: 0.9em;
    color: #66CCFF;
    margin-right: 15px;
    font-weight: 600;
}

.audio-button {
    background: none;
    border: 2px solid #00BFFF;
    color: #00BFFF;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.audio-button:hover {
    background-color: #00BFFF;
    color: #1C243B;
}

/* Grid de Tarjetas */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

/* Flip Card - Contenedor 3D */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 300px; 
    perspective: 1000px; 
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.5s ease-out;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

/* Estado de volteo */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Caras de la tarjeta */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flip-card-front {
    background-color: #1C243B; 
    color: #E0E0E0;
    border: 3px solid #00BFFF;
}

.flip-card-front:hover {
    border-color: #66CCFF;
}

.card-title {
    font-size: 1.8em;
    color: #00BFFF;
}

.card-action {
    font-size: 1em;
    color: #AAAAAA;
    margin-top: 10px;
}

.flip-card-back {
    background-color: #101525; 
    color: #E0E0E0;
    transform: rotateY(180deg);
    border: 3px solid #66CCFF;
    justify-content: flex-start;
    padding: 10px;
}

.card-image {
    width: 100%;
    max-height: 150px; 
    object-fit: contain; 
    object-position: center; 
    border-radius: 8px;
    margin-bottom: 10px;
    border: 2px solid #00BFFF;
    padding: 5px; 
    background-color: #0A0A1A; /* Fondo para el padding */
}

.card-name {
    font-size: 1.5em;
    color: #00BFFF;
    margin-bottom: 5px;
    /* Corrección de texto largo para nombre de equipo */
    overflow: hidden;
    word-wrap: break-word; 
}

.card-desc {
    font-size: 0.9em;
    color: #AAAAAA;
    padding: 0 10px;
    /* Corrección de texto largo para descripción de equipo */
    overflow: hidden;
    word-wrap: break-word; 
}


/* --- FOOTER --- */
footer {
    background-color: #000010;
    padding: 20px 0;
    text-align: center;
    color: #666;
    font-size: 0.85em;
    border-top: 2px solid #00BFFF;
}

/* --- Animaciones y Media Queries --- */

/* Definición de Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Clases de Target (para JS) */
.section-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.element-fade-in { animation: fadeIn 1s ease-out forwards; opacity: 0; }
.element-slide-up { animation: slideUp 1s ease-out 0.3s forwards; opacity: 0; }


/* Media Query para móvil y tablet */
@media (max-width: 1024px) {
    
    /* En tablets, cambiamos a 2 columnas */
    .participants-grid {
        grid-template-columns: repeat(2, 1fr); 
        padding: 30px;
    }
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .flip-card {
        height: 250px;
    }
    .twitch-button {
        font-size: 1em;
        padding: 10px 20px;
    }
}

@media (max-width: 768px) {
    .participants-section {
        padding: 60px 20px;
    }

    /* Mostrar el botón de hamburguesa y ocultar el menú de desktop */
    .menu-toggle {
        display: block; 
    }

    .menu-nav {
        display: none; 
    }

    .participants-grid {
        /* En móviles pequeños, cambiamos a 1 columna */
        grid-template-columns: 1fr;
        padding: 20px;
        box-shadow: 0 0 20px rgba(0, 191, 255, 0.15);
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    .flip-card {
        /* Altura aumentada para asegurar que el texto largo quepa */
        height: 320px; 
    }

    .section-title {
        font-size: 2em;
    }

    .creator-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .twitch-button {
        font-size: 0.9em;
        padding: 8px 15px;
    }
    
    .challenge-date-box {
        padding: 15px 30px;
    }
}
