/* modal.css - Asegurando transiciones y prioridad */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* Cambiará a flex solo cuando sea active */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    visibility: hidden; /* Evita clics accidentales mientras está oculto */
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #161b22;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #30363d;
    text-align: center;
    color: #c9d1d9;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.btn-modal {
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    background: #2563eb;
    color: white;
}

.btn-modal:hover { filter: brightness(1.2); transform: translateY(-2px); }

.btn-cerrar {
    background: transparent;
    color: #666;
    border: none;
    margin-top: 20px;
    text-decoration: underline;
    cursor: pointer;
}
.modal-final-custom {
    display: none; /* Asegura que no se vea hasta que el juego termine */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
}
/* modales.css - Estilo para botones de acción de ranking */
.ranking-cta-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding: 10px;
}

.btn-ranking-completo {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px; /* Estilo píldora */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-ranking-completo:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: #ffffff;
}