/* css/main.css */

/* Reset básico y configuración global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body { /* Le añadimos la clase para ser más específicos */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #dee3e6; /* <-- CAMBIO DE COLOR */
    color: #343A40;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: #FFFFFF;
    padding: 30px 35px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 550px;
}

.main-content-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #3465a4; /* <-- CAMBIO DE COLOR */
    margin-bottom: 25px;
    font-size: 2.2em; /* <-- CAMBIO DE TAMAÑO */
    font-weight: 600;
}

/* Encabezado de la página de inicio */
.index-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 550px;
    margin: 0 auto 20px auto;
    padding-top: 15px;
}

.index-header-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.container p {
    text-align: center;
    margin-bottom: 25px;
    color: #6C757D;
    font-size: 1em;
}

.user-auth-status {
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-auth-status img.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #DEE2E6;
}

.user-auth-status a.login-icon,
.user-auth-status span.user-name {
    font-size: 0.9em;
    color: #495057;
    text-decoration: none;
}
.user-auth-status a.login-icon:hover {
    text-decoration: underline;
}

#auth-message-area {
    text-align: center;
    padding: 12px 15px;
    background-color: #E9F7FF;
    border: 1px solid #B3E0FF;
    color: #0056B3;
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 0.95em;
}
#auth-message-area a {
    color: #004085;
    font-weight: bold;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.95em;
}

select,
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #CED4DA;
    font-size: 1em;
    background-color: #FFFFFF;
    color: #495057;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #80BDFF;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

select:disabled {
    background-color: #E9ECEF;
    cursor: not-allowed;
    opacity: 0.7;
}

.mode-selection {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.mode-selection button {
    flex-grow: 1;
    padding: 10px 15px;
    font-size: 1em;
    border: 1px solid #CED4DA;
    background-color: #FFFFFF;
    color: #3465a4; /* <-- CAMBIO DE COLOR TEXTO */
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.mode-selection button:hover {
    background-color: #F8F9FA;
    border-color: #a5b8d4;
}

.mode-selection button.active {
    background-color: #3465a4; /* <-- CAMBIO DE COLOR FONDO */
    color: white;
    border-color: #3465a4; /* <-- CAMBIO DE COLOR BORDE */
    font-weight: bold;
}

#play-btn {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.2em; /* Un poco más grande */
    font-weight: bold;
    background-color: #3465a4; /* <-- CAMBIO DE COLOR */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    text-transform: uppercase; /* Para que ponga "JUGAR" */
}

#play-btn:hover:not(:disabled) {
    background-color: #2a5082; /* Tono más oscuro para hover */
}

#play-btn:disabled {
    background-color: #ADB5BD;
    border-color: #ADB5BD;
    cursor: not-allowed;
    opacity: 0.65;
}

.topic-club-accessible {
    color: green;
    font-weight: bold;
}
.topic-club-restricted {
    color: red;
}

.error-message {
    color: #721C24;
    background-color: #F8D7DA;
    border: 1px solid #F5C6CB;
    font-size: 0.9em;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    min-height: 1.5em;
    display: none;
}

#topic-skill-label-display-container {
    text-align: center;
    min-height: 45px;
    margin-top: 15px;
    margin-bottom: 15px;
}

#topic-skill-label-image {
    max-height: 40px;
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #DEE2E6;
    padding: 2px;
    background-color: #FFF;
}

/* --- ESTILOS PARA EL FOOTER (CORREGIDOS) --- */

/* Estilos para el pie de página (footer) - MODIFICADOS */
footer {
    text-align: center;
    padding-top: 25px; /* Solo padding superior para los iconos */
    font-size: 0.9em;
    color: #6C757D;
    margin-top: 40px;
    width: 100%; /* Ocupa todo el ancho */
    max-width: 900px; /* Coincide con el max-width de game-wrapper */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    /* Quitamos el borde superior y el fondo blanco que estaban antes */
}

/* Para asegurar que en index.php el footer también respete el max-width del container si es diferente */
body:not(.game-page) footer {
    max-width: 550px; /* Coincide con el max-width del .container de index.php */
}


footer a {
    color: #007BFF; /* Azul estándar para enlaces */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}


.social-icon {
    width: 22px;
    height: 22px;
    fill: #6C89A8;
    transition: fill 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.social-icon:hover {
    fill: #3C72B4;
    transform: scale(1.1);
}

.footer-band {
    background-color: #295ba4;
    color: #ffffff; /* Texto blanco para la banda */
    padding: 25px 20px;
    /* Para que ocupe todo el ancho de la pantalla, saliendo del contenedor principal */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.footer-columns {
    display: flex;
    justify-content: center;
    text-align: left;
    gap: 40px; /* Espacio entre las columnas */
    width: 100%;
    max-width: 550px; /* Ancho máximo del contenido dentro de la banda */
    margin: 0 auto; /* Centrar las columnas */
    flex-wrap: wrap; /* Para que se adapte en pantallas pequeñas */
}

.footer-column {
    flex: 1; /* Las columnas crecen por igual */
    min-width: 200px; /* Ancho mínimo antes de que se apilen */
}

.footer-column h4 {
    font-size: 1.1em;
    margin-bottom: 12px;
    font-weight: bold;
    color: #ffffff;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #ffffff; /* Enlaces blancos */
    text-decoration: none;
    padding-left: 15px; /* Indentación para los elementos de la lista */
    position: relative;
    display: inline-block;
}

.footer-column ul li a:hover {
    text-decoration: underline;
}
.home-arcade-image {
    text-align: center;
    margin-bottom: 30px;
}

.home-arcade-image img {
    max-width: 150px;
    height: auto;
}