/* --- Settings & Modal --- */
.settings-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.modal-overlay {
    display: none;
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 2000; /* Higher than nav (1000) */
    overflow-y: auto; /* Enable scrolling */
    padding: 1rem;
    align-items: flex-start; /* Start from top */
    justify-content: center;
}

.modal-overlay.active {
    display: flex; /* Keep flex but align top */
}

.modal-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    margin: 4rem auto 2rem auto; /* Clear the top nav */
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.slider {
    width: 100%;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.btn-secondary {
    background: #334155;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid #334155;
    padding: 0.8rem;
    border-radius: 8px;
    width: 100%;
}
