/* Variables CSS para colores reutilizables */
:root {
    --azul-principal: #0073e6;
    --azul-oscuro: #005bb5;
    --verde-correcto: #28a745;
    --gris-fondo: #f9f9f9;
    --gris-claro: #f0f0f0;
    --texto-oscuro: #333;
    --texto-gris: #666;
    --rojo: #ff0000;
    --sombra: rgba(0, 0, 0, 0.1);
}

/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--texto-oscuro);
    color: #fff;
    position: relative;
}

header .logo img {
    height: 50px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* Banner */
.banner {
    background: url('assets/banner.jpg') center/cover no-repeat;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
}

.banner h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Contenedor del juego */
.juego-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    text-align: center;
    background-color: var(--gris-fondo);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--sombra);
}

.juego-container h1 {
    font-size: 2.5rem;
    color: var(--texto-oscuro);
    margin-bottom: 20px;
}

.contador-preguntas {
    font-size: 1.2rem;
    color: var(--texto-gris);
    margin-bottom: 10px;
}

.temporizador {
    font-size: 1.2rem;
    color: var(--rojo);
    margin-bottom: 20px;
}

.pregunta {
    background-color: var(--gris-claro);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.pregunta p {
    font-size: 1.5rem;
    color: var(--texto-oscuro);
}

.opciones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.opcion {
    background-color: var(--azul-principal);
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.opcion:hover {
    background-color: var(--azul-oscuro);
    transform: scale(1.05);
}

.opcion[data-correcta="true"]:hover {
    background-color: var(--verde-correcto);
}

.feedback {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Tarjetas */
.tarjetas {
    display: flex;
    justify-content: center;
    padding: 20px;
    max-width: 76.5%;
    margin: 0 auto;
    gap: 20px;
}

.tarjeta {
    width: 25%;
    height: 300px;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    position: relative;
}

.tarjeta:hover {
    transform: scale(1.05);
}

.tarjeta img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tarjeta-texto {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(51, 51, 51, 0.65);
    color: #fff;
    padding: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    box-sizing: border-box;
}

/* Botón de Jugar */
.boton-jugar {
    background-color: var(--azul-principal);
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-bottom: 20px;
}

.boton-jugar:hover {
    background-color: var(--azul-oscuro);
    transform: scale(1.05);
}

.boton-jugar i {
    margin-right: 10px;
}

/* Responsividad */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        position: static;
        margin-top: 10px;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 5px 0;
    }

    .tarjetas {
        flex-direction: column;
        align-items: center;
    }

    .tarjeta {
        width: 80%;
        margin-bottom: 20px;
    }

    .opciones {
        grid-template-columns: 1fr;
    }
}