#settings_overlay {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.55);

    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);

    z-index: 999;

    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}


#settings_modal {
    width: 420px;
    max-width: 92vw;

    border-radius: 28px;

    background: rgba(20,20,20,0.55);
    border: 1px solid rgba(255,255,255,0.12);

    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);

    box-shadow:
        0 30px 100px rgba(0,0,0,0.65),
        inset 0 1px 0 rgba(255,255,255,0.08);

    padding: 18px;

    color:white;

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    display:flex;
    flex-direction:column;

    max-height:80vh;
    overflow:hidden;

    transform:scale(0.92);
    opacity:0;

    transition:
        transform 0.3s ease-in-out,
        opacity 0.3s ease-in-out;
}

#settings_overlay.show {
    opacity:1;
}

#settings_overlay.show #settings_modal {
    transform:scale(1);
    opacity:1;
}

#settings_header {
    margin-bottom:8px;
}

#settings_title {
    font-size:22px;
    font-weight:900;
}

#settings_list {
    flex:1;

    overflow-y:auto;

    display:flex;
    flex-direction:column;

    gap:10px;

    padding-right:6px;

    margin-top:8px;
    margin-bottom:8px;
}


#settings_list::-webkit-scrollbar {
    width:0;
}

.settings_section_title {
    text-align:center;

    font-size:11px;

    opacity:0.5;

    letter-spacing:1.5px;

    margin-top:6px;
    margin-bottom:4px;

    font-weight:800;

    text-transform:uppercase;
}

.setting_item {
    display:flex;

    align-items:center;
    justify-content:space-between;

    padding:12px 14px;

    border-radius:18px;

    background:rgba(255,255,255,0.05);

    border:1px solid rgba(255,255,255,0.08);

    transition:0.2s;
}


.setting_item:hover {
    background:rgba(255,255,255,0.08);
}

.setting_name {
    font-size:13px;

    font-weight:600;
}

.toggle {
    display:flex;

    align-items:center;

    gap:8px;

    padding:6px 10px;

    border-radius:999px;

    background:rgba(255,255,255,0.08);

    border:1px solid rgba(255,255,255,0.12);

    cursor:pointer;

    transition:0.2s;
}


.toggle:hover {
    background:rgba(255,255,255,0.12);
}


.toggle_dot {
    width:10px;
    height:10px;

    border-radius:50%;

    background:rgba(255,255,255,0.4);

    transition:0.2s;
}


.toggle_label {
    font-size:12px;

    font-weight:800;
}

.toggle.active {
    background:rgba(0,255,120,0.18);

    border:1px solid rgba(0,255,120,0.35);
}


.toggle.active .toggle_dot {
    background:#2dff8f;

    box-shadow:0 0 10px #2dff8f;
}


.toggle.active .toggle_label {
    color:#2dff8f;
}


#settings_footer {
    display:flex;

    justify-content:flex-end;

    padding-top:6px;
}


#settings_ok {
    padding:10px 14px;

    border-radius:14px;

    background:rgba(0,255,120,0.18);

    border:1px solid rgba(0,255,120,0.35);

    color:#2dff8f;

    font-weight:800;

    cursor:pointer;

    transition:0.2s;
}


#settings_ok:hover {
    transform:scale(1.05);

    background:rgba(0,255,120,0.25);
}