/* 1. CONFIGURACIÓN GENERAL Y FONDO */
body {
    font-family: 'Varela Round', sans-serif; /* Tu nueva tipografía */
    margin: 0;
    padding: 0;
    background-image: url('img/fondo.png'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ESTILO DEL TÍTULO */
h1 {
    color: #2c3e50; /* Aquí puse el ROJO (el mismo del botón) */
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2.5rem; /* Tamaño de la letra */
}

.contenedor-principal {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    max-width: 900px;
    width: 95%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-align: center;
}

/* 2. MARCADOR CON ESTILO "CÁPSULA" */
.marcador {
    display: flex;
    justify-content: center;
    gap: 15px; /* Separación entre cajas */
    margin-bottom: 20px;
    flex-wrap: wrap; /* Evita que se rompa en pantallas muy muy pequeñas */
}

.marcador p {
    background-color: #fff;
    padding: 8px 15px;
    border-radius: 50px; /* Bordes redondos */
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
    margin: 0;
    color: #555;
    font-size: 1rem;
    border: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.marcador span {
    color: #e74c3c; /* Rojo para el número */
    font-weight: bold;
    font-size: 1.2rem;
}

/* 3. EL TABLERO (¡ESTO ES LO QUE ARREGLA LA COLUMNA!) */
.tablero {
    display: flex;        /* Obliga a las cartas a ponerse en fila */
    flex-wrap: wrap;      /* Si no caben, bajan a la siguiente línea */
    justify-content: center;
    gap: 8px;
}

/* 4. DISEÑO DE LAS CARTAS (Móvil 7x10) */
.carta {
    width: 63px;   
    height: 90px;  
    
    background-image: url('img/reverso.png');
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    border: 2px solid #fff;
}

.carta img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: none;
}

/* Efecto al voltear */
.carta.volteada {
    transform: scale(1.05);
    background-image: none;
    background-color: white;
}

.carta.volteada img {
    display: block;
}

/* 5. BOTÓN REINICIAR */
.btn-reiniciar {
    margin-top: 25px;
    padding: 12px 30px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Varela Round', sans-serif;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: background 0.3s;
}

.btn-reiniciar:hover {
    background-color: #c0392b;
}

/* 6. MEDIA QUERIES (PC y Tablets) */
@media (min-width: 600px) {
    .carta {
        width: 105px;
        height: 150px;
        border-radius: 10px;
        border: 3px solid #fff;
    }
    
    .contenedor-principal {
        padding: 40px;
        width: 80%;
    }

    .tablero {
        gap: 15px;
    }
    
    .marcador p {
        font-size: 1.2rem;
        padding: 10px 25px;
    }
}

/* --- ESTILOS PARA REGLAS Y DRIVE (TEXTO CENTRADO) --- */

.seccion-info {
    margin-top: 30px;
    width: 100%;
    max-width: 500px;
    text-align: center; /* Todo el texto centrado */
    /* Esto asegura que la cajita también esté centrada */
    margin-left: auto; 
    margin-right: auto;
}

.seccion-info h3 {
    color: #555;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.lista-reglas {
    background-color: #fff;
    padding: 20px; /* Padding parejo en todos lados */
    border-radius: 15px;
    border: 2px solid #eee;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    
    /* TRUCOS PARA CENTRAR LISTAS */
    list-style-position: inside; /* Hace que el puntito se mueva al centro junto con el texto */
    text-align: center;
}

.lista-reglas li {
    margin-bottom: 5px;
}

/* El botón del Drive */
.btn-drive {
    display: inline-block; /* Mejor comportamiento al estar centrado */
    text-decoration: none;
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.2s, background 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-drive:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}