/* Fichero: css/style.css */
body {
    font-family: Arial, sans-serif;
    background-color: #dee3e6; /* <-- CAMBIO */
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.home-wrapper {
    padding: 2rem 1rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 500px; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    background-color: #fff;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 2rem;
    width: 100%;
    max-width: 500px;
}
header h1 {
    color: #3465a4;
}
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.play-button {
    background-color: #3465a4; /* <-- CAMBIO */
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}
.play-button:hover {
    background-color: #285189; /* <-- Un tono más oscuro para el hover */
}

.scores-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: #007bff;
    text-decoration: none;
}
.scores-link:hover {
    text-decoration: underline;
}

/* Estilos para la tabla de puntuaciones */
.scores-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    font-size: 1.1em;
}

.scores-table th, .scores-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.scores-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.scores-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.scores-table tbody tr:hover {
    background-color: #f1f1f1;
}

.scores-table td:first-child, .scores-table th:first-child {
    width: 50px;
    text-align: center;
}


/* Coloreado dinámico para las opciones del selector de temas */
#theme-select option.theme-accessible {
    color: #28a745; /* Un verde para indicar que el acceso está permitido */
    font-weight: 500;
}

#theme-select option.theme-restricted {
    color: #dc3545; /* Un rojo para indicar que el acceso está restringido */
    background-color: #f8d7da; /* Un fondo rosado muy sutil para que destaque más */
}

/* --- INICIO: ESTILOS PARA POPUP DE ACCESO RESTRINGIDO (INDEX) --- */

.popup-overlay-index {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Estará oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Nos aseguramos que esté por encima de todo */
}

.popup-content-index {
    background-color: #fff;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.popup-content-index h2 {
    color: #d9534f;
    margin-top: 0;
    margin-bottom: 1rem;
}

.popup-content-index p {
    margin-bottom: 2rem;
    line-height: 1.5;
    color: #333;
}

.popup-actions-index {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.popup-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.popup-button:hover {
    transform: translateY(-2px);
}

.popup-button.primary {
    background-color: #5cb85c;
    color: white;
}
.popup-button.primary:hover {
    background-color: #4cae4c;
}

.popup-button.secondary {
    background-color: #6c757d;
    color: white;
}
.popup-button.secondary:hover {
    background-color: #5a6268;
}

/* --- FIN: ESTILOS PARA POPUP DE ACCESO RESTRINGIDO (INDEX) --- */

.main-content {
    text-align: center;
}

/* Estilo para la imagen del logo */
.header-logo {
    display: block;
    max-width: 180px; /* Esta línea controla el ancho máximo del logo */
    height: auto;     /* Esto hace que el alto se ajuste automáticamente para mantener la proporción */
    margin-bottom: 1.5rem; /* Espacio entre el logo y el título */
}

/* Estilo para la imagen promocional de la home */
.game-promo-image {
    display: block;
    max-width: 300px; 
    width: 90%;
    height: auto;
    margin: 1.5rem auto; 
}

/* Alinea el logo a la izquierda dentro del contenedor principal de la home */
.home-wrapper .logo-link-home {
    align-self: flex-start;
}