/* styles.css */
body {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    /*height: 100vh;*/
    margin: 0;
    font-family: Arial, sans-serif;
}

#semifinal-section, #final-section {
    height: 100vh;  /* Ocupa toda la altura de la ventana */
    opacity: 0;     /* Invisible */
    pointer-events: none;  /* No puede interactuar con el usuario */
}

#startOverlay.show-sections #semifinal-section,
#startOverlay.show-sections #final-section {
    opacity: 0;  /* Asegura que no se vean, incluso si se agregan clases dinámicamente */
    pointer-events: none;
}
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.button-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    margin-top:50px;
}

.help-button, .stats-button {
    font-size: 1.5rem;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin-bottom: 10px;
}

.counter {
    font-size: 2rem;
    width: 80px;
    text-align: center;
    background-color: #000;
    color: #fff;
    border-radius: 5px;
    padding: 5px;
}

.reset-button {
    font-size: 2rem;
    background-color: brown;
    border-radius: 5px;
    
    cursor: pointer;
}

.grid {
    display: grid;
    gap: 1px;
    background-color: #000;
}

.cell {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background-color: #ccc;
    font-size: 1rem;
    cursor: pointer;
}

.cell.revealed {
    background-color: #eee;
    cursor: default;
}

.cell.flag span {
    color: red;
}

#overlay2 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

#mensaje {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#helpOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#helpPopup {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.overlay-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    max-width: 80%;
    margin: auto;
    opacity: 1;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: red;
}

.overlay-content h2 {
    font-weight: bold;
}

.overlay-content p {
    text-align: left;
    font-weight: bold;
}

.overlay-content ul {
    text-align: left;
    list-style: none;
    padding: 0;
}

.overlay-content ul li {
    text-align: left;
    margin: 5px 0;
}

#statsOverlay {
    /* Asegúrate de que el overlay tiene estilo para estar siempre visible */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fondo semi-transparente */
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#statsContent {
    /* Contenido del overlay con fondo blanco para mayor legibilidad */
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.disabled {
    pointer-events: none; /* Desactiva los eventos del puntero */
     /* Opcional: cambia la opacidad para indicar visualmente que está desactivado */
}

.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#flag-mode-button.active {
    background-color: yellow;
    border: 2px solid red;
}

#resetOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1001; /* Asegúrate de que esté por encima de otros elementos */
}

#resetPopup {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    width: 300px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.reset-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.confirm-button {
    background-color: #abd4b5;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5rem;
}

.cancel-button {
    background-color: #7a252e;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5rem;
}

.confirm-button:hover, .cancel-button:hover {
    opacity: 0.8;
}

#leaderboardCloseButton {
    font-size: 24px;
    cursor: pointer;
    background: #ff0000;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    display: inline-block;

    /* Posicionar el botón en la esquina superior derecha */
    position: absolute;
    top: 10px;  /* Alinearlo 10px desde el borde superior */
    right: 10px; /* Alinearlo 10px desde el borde derecho */
}

/* Overlay oscuro que cubre toda la pantalla */
#leaderboardOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    z-index: 1000;
    justify-content: flex-start;
    align-items: flex-start;
    overflow: hidden;
}

/* Contenedor modal */
.modal {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    height: 100%;
    position: relative;
}

/* Botón de cierre en la parte superior derecha */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
}

/* Título centrado */
.modal h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* Contenedor de la tabla con scroll */
.table-container {
    max-height: 400px; /* Ajusta la altura máxima visible */
    overflow-y: auto; /* Habilita el scroll solo para la tabla */
}

/* Tabla y estilos */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #444;
}

th {
    background: #555;
}

tbody tr:nth-child(even) {
    background: #444;
}

/* Scrollbar personalizado para la tabla */
.table-container::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

#shareLink {
    background-color: #25D366; /* Color verde de WhatsApp */
    color: white;              /* Texto en blanco */
    padding: 10px 20px;        /* Espaciado dentro de la caja */
    text-decoration: none;     /* Eliminar subrayado del enlace */
    border-radius: 5px;        /* Bordes redondeados */
    font-size: 16px;           /* Tamaño del texto */
    display: inline-block;     /* Asegura que se comporte como un bloque */
}

#shareLink:hover {
    background-color: #20b355; /* Cambia el color al pasar el ratón */
}

