
/* CONFIGURACIÓN GENERAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.game-container {
    width: 100%;
    min-height: 100vh;
}


/* PORTADA */

#home-screen {
    width: 100%;
    min-height: 100vh;

    background-image: url("fondo.png");
    background-size: cover;
    background-position: center;
    background-color: #2484a9 ;

    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;
}

.game-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.game-logo img {
    width: 150px;
    height: auto;
    object-fit: contain;
}

.game-logo h1 {
    display: block;
    width: 100%;
    margin: 0;

    font-size: clamp(1rem, 5vw, 4.5rem);
    color: white;
    text-shadow: 3px 4px 5px #172033;

    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}


/* CAPA OSCURA DEL FONDO */

.background-overlay {
    position: absolute;
    inset: 0;

    background: rgba(10, 20, 40, 0.35);
}


/* CONTENIDO CENTRAL */

.home-content {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
    gap: 45px;

    padding: 25px;
    width: 100%;
    box-sizing: border-box;
}

.home-content h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(1rem, 5vw, 4.5rem);
    color: white;

    text-shadow: 3px 4px 5px #172033;

    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    text-align: center;
}


/* MENÚ PRINCIPAL */

.main-menu {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 20px;
    width: 100%;
}

.main-button {
    width: 260px;
    padding: 17px;

    border: 3px solid  #051626;
    border-radius: 15px;

    background: #d5f9e8 ;
    color: #051626;

    font-size: 1rem;
    font-weight: bold;

    box-shadow: 0 5px 0 #244a78;
}

.main-button:hover {
    background: #6298df;
    transform: translateY(-3px);
}


/* VENTANAS FLOTANTES */

.modal-overlay {
    position: fixed;
    inset: 0;

    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.65);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* VENTANA ABIERTA */

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* CONTENIDO DE LA VENTANA */

.modal {
    position: relative;

    width: 100%;
    max-width: 700px;
    max-height: 85vh;

    overflow-y: auto;

    background: #29384e;
    color: #f4f0e6;

    border: 5px solid #f4f0e6;
    border-radius: 25px;

    padding: 40px;

    text-align: center;

    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2);

    opacity: 0;
    transform: translateY(25px) scale(0.94);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}


/* ANIMACIÓN DE APARICIÓN */

.modal-overlay.is-open .modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.modal > p {
    margin-bottom: 25px;
}


/* BOTÓN DE CERRAR */

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;

    width: 35px;
    height: 35px;

    border: none;
    border-radius: 50%;

    background: #dce8f5;
    color: #29384e;

    font-size: 1.7rem;
    line-height: 1;
}

.close-button:hover {
    background: #c5dbf2;
    transform: scale(1.1);
}


/* INFORMACIÓN DEL EQUIPO */

.team-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 15px;
    margin: 25px 0;
}

.team-member {
    padding: 20px 10px;

    background: #dce8f5;
    border-radius: 15px;
    color:#29384e;
}

.team-member h3 {
    margin-bottom: 8px;
    color:#29384e;
}

.project-info {
    background: #e8e3d7;

    border-radius: 15px;
    padding: 20px;

    margin-top: 20px;
    color:#29384e;
}

.project-info h3 {
    margin-bottom: 10px;
    color:#29384e;
}
.foto-equipo {
    display: flex;
    justify-content: center;
    margin: 20px auto;
}

.foto-equipo img {
    width: 300px;
    max-width: 90%;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid #e8e3d8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* SELECCIÓN DE ROLES */

.role-modal {
    max-width: 750px;
}

.role-container {
    display: flex;
    justify-content: center;
    align-items: stretch;

    gap: 25px;
    flex-wrap: wrap;
}

.role-card {
    background: #dce8f5;
    color: #29384e;

    border: 3px solid #9fbee0;
    border-radius: 20px;

    width: 230px;
    padding: 25px 15px;
}

.role-card:hover {
    background: #9fbee0;
    transform: translateY(-5px);
}

.role-icon {
    display: block;
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.role-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}


/* RESPONSIVE */

@media (max-width: 600px) {

    .home-content {
        gap: 30px;
    }

    .modal {
        padding: 45px 20px 25px;
    }

    .team-info {
        grid-template-columns: 1fr;
    }

    .role-container {
        gap: 15px;
    }

    .role-card {
        width: 100%;
    }

}

/* Evitar barras de desplazamiento en las ventanas flotantes */
.modal-overlay {
    overflow: hidden;
}

.modal {
    max-height: 90vh;
    overflow: hidden;
    box-sizing: border-box;
}

/* Evitar que los elementos internos generen desbordamiento */
.modal * {
    box-sizing: border-box;
}
.modal-contenido {
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 25px;
    box-sizing: border-box;
}

/* Diseño de la barra de scroll */
.modal-contenido::-webkit-scrollbar {
    width: 10px;
}

.modal-contenido::-webkit-scrollbar-track {
    background: #1d2b40;
    border-radius: 10px;
}

.modal-contenido::-webkit-scrollbar-thumb {
    background: #dce7f5;
    border-radius: 10px;
}

.modal-contenido::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
}
.modal {
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 35px 30px;

    scrollbar-width: thin;
    scrollbar-color: #dce8f5 #29384e;
}

/* Scroll para Chrome y Edge */
.modal::-webkit-scrollbar {
    width: 9px;
}

.modal::-webkit-scrollbar-track {
    background: #29384e;
    border-radius: 10px;
}

.modal::-webkit-scrollbar-thumb {
    background: #dce8f5;
    border-radius: 10px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: #9fbee0;
}
@media (max-width: 700px) {

    .modal {
        width: 92%;
        max-height: 85vh;
        padding: 35px 15px;
    }

    .team-info {
        grid-template-columns: 1fr;
    }

    .foto-equipo img {
        width: 100%;
        max-width: 280px;
    }

    .modal h2 {
        font-size: 1.5rem;
    }
}