
:root {
    --overlay-spacing: calc(var(--mainPadding) * 2);
    --overlay-window-width-large: min(1000px, calc(100vw - var(--overlay-spacing)));
    --overlay-window-height-large: min(550px, calc(100vh - var(--overlay-spacing)));
    --overlay-window-width-small: min(420px, calc(100vw - var(--overlay-spacing)));
}


overlay#overlay,
overlay[data-overlay-name] {
    --overlay-padding: var(--overlay-spacing, calc(var(--mainPadding) * 2));
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: var(--overlay-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 1000;
    transition-behavior: allow-discrete;

    &:not(.active) {
        opacity: 0;
        visibility: hidden;

        > .backdrop {
            background-color: rgba(0, 0, 0, 0);
        }
    }

    &.active {
        visibility: visible;
    }

    > .backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.3);
                z-index: -1;
        transition: background-color 0.6s ease;
        &.fadeIN {
            animation: fadeIN-background 2.25s cubic-bezier(0.1, 0, 0, 1);
        }

        &.fadeOUT {
            animation: fadeOUT-background 0.5s ease;
        }
    }

    window.window {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
                backdrop-filter: var(--blur-strong);
        border-radius: calc(var(--mainBorderRadius));
        overflow: hidden;

        display: flex;
        flex-direction: column;

        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: var(--overlay-window-width-large);
        max-height: var(--overlay-window-available-height, calc(100% - var(--overlay-padding)));

        transition: opacity 0.325s ease, filter 0.325s ease;
        transition-behavior: allow-discrete;

        --3d-max-rotation: 5deg;
        --3d-max-move-x: 2px;
        --3d-max-move-y: 2px;
        --3d-scale: 1;
        --3d-shadow-blur: 0;
        --3d-shadow-opacity: 0;
        --3d-perspective: 1000px;
        --3d-depth: 0.5;
        --3d-smoothness: 0;
        --3d-enter-duration: 1.2s;
        --3d-exit-duration: 1.2s;

        &:not(.small) {
            width: var(--overlay-window-width-large);
            max-width: var(--overlay-window-width-large);
            max-height: min(var(--overlay-window-height-large), var(--overlay-window-available-height, 100%));
        }

        &.small {
            width: var(--overlay-window-width-small);
            max-width: var(--overlay-window-width-small);
            max-height: min(var(--overlay-window-height-large), var(--overlay-window-available-height, 100%));
            min-height: auto;
        }

        &.floating {
            align-self: flex-start;
        }

        &:not(.active) {
            display: none !important;
        }

        &[data-overlay-window-interactive="false"] {
            filter: saturate(0.85) brightness(0.92);
        }

        > .window-interaction-guard {
            position: absolute;
            inset: 0;
            z-index: 10;
            background: rgba(0, 0, 0, 0);
            cursor: not-allowed;
            pointer-events: auto;
        }

        &.scaleIN {
            animation: scaleIN 0.4s cubic-bezier(0.35, 0.5, 0, 1.05);
        }

        &.scaleOUT {
            animation: scaleOUT 0.1s cubic-bezier(0.25, 0.5, 0, 1);
        }

        .heading {
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 6px;
            width: 100%;

            &.centered {
                text-align: center;
            }

            &:not(.centered) {
                display: flex;
                justify-content: space-between;
                align-items: center;
            }

            .title {
                font-size: 16px;
                font-weight: 600;
                color: var(--text-primary);
            }

            a {
                color: rgba(255, 255, 255, 0.5);
                text-decoration: none;
                font-size: 12px;
                cursor: pointer;
                
                display: flex;
                gap: 4px;
                
                transition: color 0.25s ease;
                
                &:hover {
                    color: var(--text-secondary);
                }

                &:active {
                    color: rgba(255, 255, 255, 0.5);
                    transition: color 0s ease;
                }
            }
        }

        --titlebar-height: 45px; 
        > .titlebar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            margin-bottom: calc(var(--titlebar-height) * -1);
            z-index: 2;
            
            &:not(.opaque) {
                height: calc(var(--titlebar-height) - 1px);
                background-color: rgba(255, 255, 255, 0.05);
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }
            
            &.opaque {
                height: var(--titlebar-height);

                &.scrolled {
                    background-color: rgba(255, 255, 255, 0.025);
                    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
                }
            }

            > .title-container {
                .title {
                    transition: all 0.25s ease;
                    
                    &:hover {
                        color: var(--text-tertiary);
                    }
                }
            }

            > .navigation {
                margin-left: auto;
                display: flex;
                align-items: center;
                gap: 12px;

                > .close-btn {
                    font-size: 14px;
                    color: var(--text-secondary);
                    cursor: pointer;
                    transition: all 0.25s ease;

                    &:hover {
                        color: var(--text-primary);
                        transition: all 0.25s ease;
                    }

                    &:active {
                        color: var(--text-secondary);
                        transition: all 0s ease;
                    }
                }
            }
        }

        > .content {
            flex: 1;
            padding: calc(16px + var(--titlebar-height)) 12px 16px 12px;

            &.notPadded {
                padding: var(--titlebar-height) 0 0 0;
            }
        }

        &[data-window-name="profile-picture-uploader"] {
            width: 420px;
            max-width: 100%;
            min-height: auto;

            > .content {
                display: flex;
                flex-direction: column;
                gap: 18px;
                padding: calc(var(--titlebar-height) + 12px) 20px 20px 20px;
            }

            .upload-window {
                display: flex;
                flex-direction: column;
                gap: 18px;
            }

            .upload-dropzone {
                position: relative;
                border: 1px dashed rgba(255, 255, 255, 0.35);
                border-radius: 12px;
                padding: 28px 20px;
                text-align: center;
                background: rgba(255, 255, 255, 0.05);
                transition: border-color 0.2s ease, background 0.2s ease;
                cursor: pointer;

                &.dragover {
                    border-color: rgba(255, 255, 255, 0.6);
                    background: rgba(255, 255, 255, 0.08);

                    
                                    }

                input[type="file"] {
                    position: absolute;
                    opacity: 0;
                    inset: 0;
                    cursor: pointer;
                    z-index: -1;
                    pointer-events: none;
                }

                .upload-dropzone__prompt {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 10px;
                    cursor: inherit;
                    user-select: none;
                    pointer-events: none;

                    i {
                        font-size: 28px;
                        color: rgba(255, 255, 255, 0.65);
                        transition: transform 0.2s ease;
                    }

                    p {
                        font-size: 16px;
                        color: var(--text-primary);
                        font-weight: 600;
                        transition: font-size 0s;
                    }

                    small {
                        font-size: 13px;
                        color: var(--text-secondary);
                    }
                }

                &.dragover .upload-dropzone__prompt i {
                    transform: translateY(-4px);
                }
            }

            .upload-preview {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 24px;
                margin-top: 24px;

                img {
                    width: 140px;
                    height: 140px;
                    border-radius: 50%;
                    object-fit: cover;
                    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
                }
            }

            .upload-feedback {
                font-size: 13px;
                text-align: center;

                &.error {
                    color: #ff7675;
                }

                &.success {
                    color: #55efc4;
                }
            }

            .form-actions {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 12px;
            }
        }

        &:has(.titlebar.opaque) {
            .titlebar p, .titlebar a {
                text-shadow: 0 0 15px rgba(0, 0, 0, 1);
            }

            &:has(.titlebar.opaque:not(.notMasked)) {
                > .content {
                                        mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 1) var(--titlebar-height), rgba(0, 0, 0, 1) 100%);   
                }
            }
        }

        &[data-content="profile"] {
            width: var(--overlay-window-width-large);
            max-width: var(--overlay-window-width-large);
            max-height: min(var(--overlay-window-height-large), var(--overlay-window-available-height, 100%));
            background-color: rgba(255, 255, 255, 0.075);

            > .content {
                overflow: auto;
                display: flex;
                gap: var(--mainPadding);
                padding: 0 !important;

                
                > .wrapper {
                    padding: var(--titlebar-height) 22px 24px 24px;
                    width: fit-content;
                    height: 100%;
                                        overflow-y: auto;
                    overflow-x: hidden;

                    position: sticky;
                    top: 0;

                    &::-webkit-scrollbar {
                        display: none !important;
                    }

                    .profile-card {
                        flex: 1;
                        width: 400px;
                        height: fit-content;
                        min-height: fit-content;
                        padding-bottom: 24px;
                                                background-color: rgba(0, 0, 0, 0.15);
                        border-top: 1px solid rgba(255, 255, 255, 0.1);
                        border-right: 1px solid rgba(255, 255, 255, 0.1);
                        border-left: 1px solid rgba(255, 255, 255, 0.1);
                        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                        box-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
                        border-radius: 12px;
                                                overflow: hidden;
                        display: flex;
                        flex-direction: column;
                        transform-style: preserve-3d;

                        outline: 2px solid rgba(255, 255, 255, 0);
                        outline-offset: 12px;

                        transition: 0.2s ease;

                        &:hover {
                            outline: 2px solid rgba(255, 255, 255, 0.075);
                            outline-offset: 4px;
                        }

                        
                        --padding-h: 24px;

                        --avatar-size: 90px;
                        
                        .profile-hero {
                            width: 100%;
                            
                            .person {
                                display: flex;
                                flex-direction: column;
                                gap: 0;
                                
                                .banner {
                                    aspect-ratio: 4 / 1;
                                    width: 100%;
                                    background-color: rgba(255, 255, 255, 0.225);
                                }

                                .person-display {
                                    padding: 0 var(--padding-h);
                                    margin-top: calc(var(--avatar-size) / -2);
                                    margin-bottom: 24px;
                                    display: flex;
                                    gap: 12px;

                                    .info {
                                        display: flex;
                                        flex-direction: column;
                                        gap: var(--info-gap);

                                        --info-gap: 6px;

                                        .upper-container {
                                            height: calc((var(--avatar-size) / 2) - calc(var(--info-gap) / 2));
                                            display: flex;
                                            flex-direction: column;
                                            justify-content: flex-end;
                                        }

                                        .lower-container {
                                            display: flex;
                                            flex-direction: column;
                                            gap: 12px;

                                            .self-actions {
                                                display: flex;
                                                align-items: center;
                                                gap: 8px;
                                                flex-wrap: wrap;

                                                .btn {
                                                    font-size: 14px;
                                                    padding: 6px 14px;
                                                }
                                            }
                                        }

                                        .name {
                                            font-size: 20px;
                                            font-weight: 600;
                                            color: var(--text-primary);
                                        }

                                        .username {
                                            font-size: 15px;
                                            color: var(--text-secondary);
                                        }
                                    }
                                }
                                .avatar-wrapper {
                                    width: var(--avatar-size);
                                    height: var(--avatar-size);
                                    position: relative;

                                    .avatar {
                                        width: var(--avatar-size);
                                        height: var(--avatar-size);
                                        border-radius: 50%;
                                        object-fit: cover;
                                    }

                                    .avatar-edit-trigger {
                                        position: absolute;
                                        bottom: 6px;
                                        right: 6px;
                                        width: 34px;
                                        height: 34px;
                                        border-radius: 50%;
                                        background: rgba(0, 0, 0, 0.7);
                                        border: 1px solid rgba(255, 255, 255, 0.2);
                                        color: #fff;
                                        display: flex;
                                        align-items: center;
                                        justify-content: center;
                                        font-size: 14px;
                                        cursor: pointer;
                                        opacity: 0;
                                        transform: translateY(6px);
                                        transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
                                        pointer-events: none;

                                        &:hover {
                                            background: rgba(0, 0, 0, 0.8);
                                        }

                                        &:focus-visible {
                                            outline: 2px solid var(--accent-color, #4a9eff);
                                            outline-offset: 2px;
                                        }
                                    }

                                    &:hover .avatar-edit-trigger,
                                    &:focus-within .avatar-edit-trigger,
                                    .avatar-edit-trigger:focus-visible {
                                        opacity: 1;
                                        transform: translateY(0);
                                        pointer-events: auto;
                                    }
                                }

                                > .content {
                                    padding: 0 var(--padding-h);
                                    display: flex;
                                    flex-direction: column;
                                    gap: 24px;

                                    > .info {
                                        display: flex;
                                        flex-direction: column;
                                        gap: 6px;

                                        .title {
                                            font-size: 16px;
                                            font-weight: 600;
                                            color: var(--text-primary);
                                            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                                            padding-bottom: 6px;
                                        }

                                        .context {
                                            font-size: 14px;
                                            color: var(--text-secondary);
                                            line-height: 1.4;
                                        }
                                    }

                                    > .info-cards {
                                        display: flex;
                                        flex-direction: column;
                                        gap: 12px;
                                        
                                        .heading {
                                            text-align: center;
                                            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                                            padding-bottom: 6px;

                                            .title {
                                                font-size: 16px;
                                                font-weight: 600;
                                                color: var(--text-primary);
                                            }
                                        }                                        
                                        
                                        .cards {
                                            display: grid;
                                            grid-template-columns: 1fr 1fr;
                                            gap: 12px;

                                            .card {
                                                background-color: rgba(255, 255, 255, 0.05);
                                                border: 1px solid rgba(255, 255, 255, 0.1);
                                                border-radius: 8px;
                                                padding: 12px 16px;
                                                display: flex;
                                                flex-direction: column;
                                                gap: 4px;

                                                --3d-max-rotation: 10deg;
                                                --3d-max-move-x: 2px;
                                                --3d-max-move-y: 2px;
                                                --3d-scale: 1;
                                                --3d-shadow-blur: 0px;
                                                --3d-shadow-opacity: 0;
                                                --3d-perspective: 1000px;
                                                --3d-depth: 1;
                                                --3d-smoothness: 0;
                                                --3d-enter-duration: 0.3s;
                                                --3d-exit-duration: 0.4s;
                                                --3d-easing: cubic-bezier(0.23, 1, 0.32, 1);
    
                                                .label {
                                                    font-size: 10px;
                                                    color: var(--text-secondary);
                                                    text-transform: uppercase;
                                                    letter-spacing: 0.5px;
                                                    margin-bottom: 3px;
    
                                                    i { margin-right: 5px; }
                                                }
    
                                                .value {
                                                    font-size: 14px;
                                                    color: var(--text-primary);
                                                    font-weight: 500;
    
                                                    i { margin-right: 7px; }
                                                }
    
                                                .context {
                                                    font-size: 12px;
                                                    color: var(--text-tertiary);
                                                }
    
                                                .actions {
                                                    margin-top: 8px;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                > .profile-content {
                    flex: 1;
                    min-width: 0;
                    height: fit-content;
                    min-height: 100%;
                    padding: var(--titlebar-height) calc(24px + var(--mainPadding)) 0 0;

                    display: flex;
                    flex-direction: column;
                    gap: 24px;

                    > .btn-switcher-container {
                        display: flex;
                        gap: var(--mainPadding);

                        position: sticky;
                        top: 12px;
                        z-index: 2;

                        &::-webkit-scrollbar {
                            display: none !important;
                        }
                        
                        > .btn-switcher {
                            background-color: rgba(38, 38, 38, 0.95);
                            box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.75);

                            &:first-child {
                                margin-left: -3px;
                            }
                        }
                    }

                    > .tab-panel {
                        padding: 0 10px 48px 10px;
                        display: flex;
                        flex-direction: column;
                        gap: 12px;

                        &:not(.active) {
                            display: none;
                        }

                        > .heading {
                            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                            padding-bottom: 8px;
                        }

                        > .container {
                            display: flex;
                            flex-direction: column;
                            gap: 12px;
                        }
                    }

                    .profile-edit-form {
                        display: flex;
                        flex-direction: column;
                        gap: 16px;

                        .form-feedback {
                            display: none;
                            border-radius: 8px;
                            padding: 10px 12px;
                            font-size: 13px;
                            line-height: 1.4;

                            &.visible {
                                display: block;
                            }

                            &.error {
                                background-color: rgba(255, 85, 85, 0.12);
                                color: rgba(255, 180, 180, 0.95);
                                border: 1px solid rgba(255, 120, 120, 0.25);
                            }
                        }

                        .form-grid {
                            display: grid;
                            gap: 16px;
                            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

                            .form-field {
                                display: flex;
                                flex-direction: column;
                                gap: 6px;

                                label {
                                    font-size: 14px;
                                    font-weight: 600;
                                    color: var(--text-primary);
                                }

                                input,
                                textarea {
                                                                        color: var(--text-primary);
                                    font-size: 14px;
                                }

                                textarea {
                                    min-height: 120px;
                                    resize: vertical;
                                }

                                small.input-help {
                                    font-size: 12px;
                                    color: var(--text-tertiary);
                                }

                                &.full-width {
                                    grid-column: 1 / -1;
                                }
                            }
                        }

                        .form-actions {
                            margin-top: 8px;
                            display: flex;
                            flex-wrap: wrap;
                            gap: 12px;

                            .btn[disabled],
                            .btn.disabled {
                                opacity: 0.6;
                                pointer-events: none;
                            }
                        }
                    }

                    .tab-panel .placeholder {
                        min-height: 120px;
                        justify-content: center;
                        align-items: center;

                        p {
                            text-align: center;
                        }
                    }

                    .friends-grid {
                        display: grid;
                        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
                        gap: 16px;
                        padding: 4px 0;
                    }

                    .friend-card {
                        background-color: rgba(255, 255, 255, 0.04);
                        border: 1px solid rgba(255, 255, 255, 0.08);
                        border-radius: 12px;
                        padding: 16px;
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        gap: 12px;
                        text-align: center;
                        transition: all 0.25s ease;
                        cursor: pointer;
                        position: relative;

                        &:hover {
                            background-color: rgba(255, 255, 255, 0.08);
                            border-color: rgba(255, 255, 255, 0.15);
                        }

                        .friend-avatar {
                            width: 80px;
                            height: 80px;
                            border-radius: 50%;
                            object-fit: cover;
                            border: 2px solid rgba(255, 255, 255, 0.1);
                            transition: border-color 0.25s ease;
                        }

                        &:hover .friend-avatar {
                            border-color: rgba(255, 255, 255, 0.25);
                        }

                        .friend-info {
                            display: flex;
                            flex-direction: column;
                            gap: 4px;
                            width: 100%;

                            .friend-name {
                                font-size: 15px;
                                font-weight: 600;
                                color: var(--text-primary);
                                white-space: nowrap;
                                overflow: hidden;
                                text-overflow: ellipsis;
                            }

                            .friend-username {
                                font-size: 13px;
                                color: var(--text-tertiary);
                                white-space: nowrap;
                                overflow: hidden;
                                text-overflow: ellipsis;
                            }

                            .friend-status {
                                font-size: 12px;
                                color: var(--text-secondary);
                                margin-top: 4px;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                gap: 6px;

                                i {
                                    font-size: 8px;
                                    color: #55efc4;
                                }

                                &.offline i {
                                    color: rgba(255, 255, 255, 0.3);
                                }
                            }
                        }

                        .friend-actions {
                            display: flex;
                            gap: 8px;
                            width: 100%;
                            margin-top: 4px;

                            .btn {
                                flex: 1;
                                font-size: 13px;
                                padding: 8px 12px;
                                justify-content: center;

                                i {
                                    font-size: 12px;
                                }
                            }
                        }
                    }

                    .empty-state {
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        justify-content: center;
                        min-height: 200px;
                        padding: 32px;

                        p {
                            font-size: 14px;
                            color: var(--text-tertiary);
                            text-align: center;
                        }
                    }
                }
            }
        }

        &[data-content="group"] {
            > .content {
                overflow: auto;
                display: flex;
                gap: var(--mainPadding);
                padding: var(--mainPadding) 0 !important;

                > .group-info {
                    width: 100%;
                    height: fit-content;
                    display: flex;

                    --avatar-size: 100px;
                    
                    > .left {
                        padding: 24px;
                        border-right: 1px solid rgba(255, 255, 255, 0.1);
                        height: 528px;

                        position: sticky;
                        top: 0;

                        > .avatar-wrapper {
                            width: var(--avatar-size);
                            height: var(--avatar-size);
                            margin-top: 38px;
                            position: relative;

                            .avatar {
                                width: var(--avatar-size);
                                height: var(--avatar-size);
                                border-radius: 50%;
                                object-fit: cover;
                            }

                            .avatar-edit-trigger {
                                position: absolute;
                                bottom: 6px;
                                right: 6px;
                                width: 34px;
                                height: 34px;
                                border-radius: 50%;
                                background: rgba(0, 0, 0, 0.7);
                                border: 1px solid rgba(255, 255, 255, 0.2);
                                color: #fff;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                font-size: 14px;
                                cursor: pointer;
                                opacity: 0;
                                transform: translateY(6px);
                                transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
                                pointer-events: none;

                                &:hover {
                                    background: rgba(0, 0, 0, 0.8);
                                }

                                &:focus-visible {
                                    outline: 2px solid var(--accent-color, #4a9eff);
                                    outline-offset: 2px;
                                }
                            }

                            &:hover .avatar-edit-trigger,
                            &:focus-within .avatar-edit-trigger,
                            .avatar-edit-trigger:focus-visible {
                                opacity: 1;
                                transform: translateY(0);
                                pointer-events: auto;
                            }
                        }
                    }

                    > .right {
                        flex: 1;
                        padding: 24px;
                        min-height: 528px;
                        height: fit-content;

                        > .btn-switcher-container {
                            display: flex;
                            gap: var(--mainPadding);

                            position: sticky;
                            top: 2px;
                            z-index: 2;

                            &::-webkit-scrollbar {
                                display: none !important;
                            }
                            
                            > .btn-switcher {
                                background-color: rgba(38, 38, 38, 0.95);
                                box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.75);

                                &:first-child {
                                    margin-left: -3px;
                                }
                            }
                        }

                        > .name-wrapper {
                            display: flex;
                            flex-direction: column;
                            gap: 6px;
                            margin-bottom: 8px;
                            padding-top: calc(var(--avatar-size) / 2 - 28px);
                            min-height: var(--avatar-size);

                            > .group-name {
                                font-size: 20px;
                                font-weight: 600;
                                color: var(--text-primary);
                            }

                            > .group-description {
                                font-size: 14px;
                                color: var(--text-secondary);
                            }
                        }

                        > .group-content {
                            display: flex;
                            flex-direction: column;
                            gap: 24px;
                            padding-bottom: 24px;

                            > .tab-panel {
                                display: flex;
                                flex-direction: column;
                                gap: 18px;

                                &:not(.active) {
                                    display: none;
                                }

                                > .container.placeholder {
                                    min-height: 120px;
                                    display: flex;
                                    justify-content: center;
                                    align-items: center;

                                    p {
                                        text-align: center;
                                    }
                                }

                                .info {
                                    display: flex;
                                    flex-direction: column;
                                    gap: 8px;

                                    .description {
                                        font-size: 14px;
                                        color: var(--text-secondary);
                                        line-height: 1.5;

                                        &.muted {
                                            color: var(--text-tertiary);
                                            font-style: italic;
                                        }
                                    }
                                }

                                .info-cards {
                                    display: flex;
                                    flex-direction: column;
                                    gap: 12px;
                                    
                                    .heading {
                                        text-align: center;
                                        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                                        padding-bottom: 6px;

                                        .title {
                                            font-size: 16px;
                                            font-weight: 600;
                                            color: var(--text-primary);
                                        }
                                    }                                        
                                    
                                    .cards {
                                        display: grid;
                                        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
                                        gap: 12px;

                                        .card {
                                            background-color: rgba(255, 255, 255, 0.05);
                                            border: 1px solid rgba(255, 255, 255, 0.1);
                                            border-radius: 8px;
                                            padding: 12px 16px;
                                            display: flex;
                                            flex-direction: column;
                                            gap: 4px;

                                            --3d-max-rotation: 10deg;
                                            --3d-max-move-x: 2px;
                                            --3d-max-move-y: 2px;
                                            --3d-scale: 1;
                                            --3d-shadow-blur: 0px;
                                            --3d-shadow-opacity: 0;
                                            --3d-perspective: 1000px;
                                            --3d-depth: 1;
                                            --3d-smoothness: 0;
                                            --3d-enter-duration: 0.3s;
                                            --3d-exit-duration: 0.4s;
                                            --3d-easing: cubic-bezier(0.23, 1, 0.32, 1);

                                            .label {
                                                font-size: 10px;
                                                color: var(--text-secondary);
                                                text-transform: uppercase;
                                                letter-spacing: 0.5px;
                                                margin-bottom: 3px;

                                                i { margin-right: 5px; }
                                            }

                                            .value {
                                                font-size: 14px;
                                                color: var(--text-primary);
                                                font-weight: 500;

                                                i { margin-right: 7px; }

                                                &.muted {
                                                    color: var(--text-tertiary);
                                                }
                                            }

                                            .context {
                                                font-size: 12px;
                                                color: var(--text-tertiary);

                                                &.muted {
                                                    opacity: 0.7;
                                                }
                                            }
                                        }
                                    }
                                }

                                .group-edit-form {
                                    display: flex;
                                    flex-direction: column;
                                    gap: 16px;

                                    .form-feedback {
                                        display: none;
                                        border-radius: 8px;
                                        padding: 10px 12px;
                                        font-size: 13px;
                                        line-height: 1.4;

                                        &:not([hidden]) {
                                            display: block;
                                        }

                                        &.error {
                                            background-color: rgba(255, 85, 85, 0.12);
                                            color: rgba(255, 180, 180, 0.95);
                                            border: 1px solid rgba(255, 120, 120, 0.25);
                                        }

                                        &.success {
                                            background-color: rgba(85, 239, 196, 0.12);
                                            color: rgba(180, 255, 225, 0.95);
                                            border: 1px solid rgba(120, 255, 200, 0.25);
                                            display: none;
                                        }

                                        &.info {
                                            background-color: rgba(74, 158, 255, 0.12);
                                            color: rgba(180, 215, 255, 0.95);
                                            border: 1px solid rgba(120, 180, 255, 0.25);
                                        }
                                    }

                                    .form-grid {
                                        display: grid;
                                        gap: 16px;
                                        grid-template-columns: 1fr;

                                        .form-field {
                                            display: flex;
                                            flex-direction: column;
                                            gap: 6px;

                                            label {
                                                font-size: 14px;
                                                font-weight: 600;
                                                color: var(--text-primary);
                                            }

                                            input,
                                            textarea {
                                                color: var(--text-primary);
                                                font-size: 14px;
                                            }

                                            textarea {
                                                min-height: 100px;
                                                resize: vertical;
                                            }

                                            .input-help {
                                                font-size: 12px;
                                                color: var(--text-tertiary);
                                            }

                                            &.full-width {
                                                grid-column: 1 / -1;
                                            }
                                        }
                                    }

                                    .form-actions {
                                        margin-top: 8px;
                                        display: flex;
                                        flex-wrap: wrap;
                                        gap: 12px;

                                        .btn[disabled],
                                        .btn.disabled {
                                            opacity: 0.6;
                                            pointer-events: none;
                                        }
                                    }

                                    &.read-only {
                                        pointer-events: none;
                                        opacity: 0.7;
                                    }
                                }
                            }

                            .members {
                                display: flex;
                                flex-direction: column;
                                gap: 12px;

                                .heading {
                                    display: flex;
                                    justify-content: space-between;
                                    align-items: center;
                                    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                                    padding-bottom: 6px;

                                    
                                    .title {
                                        font-size: 16px;
                                        font-weight: 600;
                                        color: var(--text-primary);
                                    }

                                    .btn-link {
                                        color: rgba(255, 255, 255, 0.5);
                                        text-decoration: none;
                                        font-size: 13px;
                                        cursor: pointer;
                                        display: flex;
                                        gap: 6px;
                                        align-items: center;
                                        transition: color 0.25s ease;

                                        i {
                                            font-size: 12px;
                                        }
                                        
                                        &:hover {
                                            color: var(--text-secondary);
                                        }

                                        &:active {
                                            color: rgba(255, 255, 255, 0.5);
                                            transition: color 0s ease;
                                        }
                                    }
                                }

                                .member-list {
                                    display: flex;
                                    flex-direction: column;
                                    gap: 8px;

                                    .member-item {
                                        background-color: rgba(255, 255, 255, 0.05);
                                        border: 1px solid rgba(255, 255, 255, 0.1);
                                        border-radius: 8px;
                                        padding: 10px 12px;
                                        
                                        display: flex;
                                        justify-content: space-between;
                                        align-items: center;
                                        gap: 12px;

                                        .member-item__info {
                                            display: flex;
                                            align-items: center;
                                            gap: 12px;
                                            flex: 1;

                                            .member-item__avatar {
                                                width: 42px;
                                                height: 42px;
                                                border-radius: 50%;
                                                object-fit: cover;
                                            }

                                            > div {
                                                display: flex;
                                                flex-direction: column;
                                                gap: 2px;

                                                .member-item__name {
                                                    font-size: 14px;
                                                    font-weight: 500;
                                                    color: var(--text-primary);
                                                }

                                                .member-item__meta {
                                                    font-size: 12px;
                                                    color: var(--text-tertiary);
                                                }
                                            }
                                        }

                                        .member-item__actions {
                                            display: flex;
                                            gap: 6px;

                                            .btn {
                                                font-size: 13px;
                                                padding: 6px 12px;

                                                &.danger {
                                                    color: rgba(255, 120, 120, 0.9);

                                                    &:hover {
                                                        background-color: rgba(255, 85, 85, 0.15);
                                                        color: rgba(255, 140, 140, 1);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }

                                .empty-state {
                                    text-align: center;
                                    padding: 24px 12px;
                                    font-size: 13px;
                                    color: var(--text-tertiary);
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    > .window-stack {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 24px;
        width: 100%;
        max-width: min(1240px, calc(100vw - (var(--mainPadding) * 2)));
        pointer-events: none;

        > .window {
            pointer-events: auto;
            
            &:not(:last-child) {
                opacity: 0.75;
                filter: blur(1px);
            }
        }
    }

    &[data-window-count="1"] > .window-stack {
        justify-content: center;
    }
}


@keyframes fadeIN {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOUT {
    from { opacity: 1; }
    to { opacity: 0; }
}

overlay[data-profile-state="blocked-by-them"] .profile-card,
overlay.profile-state-blocked .profile-card {
    filter: grayscale(0.85);
    opacity: 0.85;
}

window[data-window-name="group-member-selector"],
window[data-overlay-window-name="group-member-selector"] {
    width: 480px;
    max-width: calc(100vw - var(--mainPadding));

    > .content {
        padding: calc(var(--titlebar-height) + 12px) 20px 20px 20px;
    }
}

.member-selector-window {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.member-selector-window .search-input-wrapper {
        width: 100%;
    }

.member-selector-window [data-selector-tags] {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    height: fit-content;
    min-height: 25.59px;
    width: 100%;

    &:empty {
        display: none;
    }
}


.member-selector-window .selected-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 4px 10px;
    font-size: 13px;
    line-height: 1.2;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.member-selector-window .selected-tag.highlight {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.16);
}

.member-selector-window .selected-tag button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.2s ease;
}

.member-selector-window .selected-tag button:hover,
.member-selector-window .selected-tag button:focus-visible {
    color: rgba(255, 255, 255, 1);
}

.member-selector-window .results-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-selector-window .empty-state {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
}

.member-selector-window .results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
    padding: 8px 4px 8px 0;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 1) 8px, rgba(0, 0, 0, 1) calc(100% - 8px), rgba(0, 0, 0, 0) 100%);
}

.member-selector-window .selector-result {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.member-selector-window .selector-result:hover,
.member-selector-window .selector-result:focus-visible {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.08);
}

.member-selector-window[data-selector-state="loading"] {
    cursor: progress;
}

.member-selector-window[data-selector-state="loading"] .results-container,
.member-selector-window[data-selector-state="loading"] .selected-tags {
    opacity: 0.9;
}

.member-selector-window .selector-result.placeholder {
    border-color: rgba(255, 255, 255, 0.06);
    background-color: rgba(255, 255, 255, 0.04);
    color: transparent;
    pointer-events: none;
    cursor: default;
}

.member-selector-window .selector-result.placeholder .selector-result__info {
    gap: 6px;
}

.member-selector-window .selector-result.placeholder .skeleton-block,
.member-selector-window .selector-result.placeholder .skeleton-line {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: selectorSkeletonShimmer 1.25s ease-in-out infinite;
}

.member-selector-window .selector-result.placeholder .selector-result__avatar.skeleton-block {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}

.member-selector-window .selector-result.placeholder .selector-result__action.skeleton-block {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.member-selector-window .selector-result.placeholder .skeleton-line {
    height: 10px;
    border-radius: 999px;
    width: 100%;
}

.member-selector-window .selector-result.placeholder .skeleton-line.short {
    width: 60%;
}

.member-selector-window .selector-result__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.member-selector-window .selector-result__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.member-selector-window .selector-result__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.member-selector-window .selector-result__meta {
    font-size: 12px;
    color: var(--text-tertiary);
}

.member-selector-window .selector-result__action {
    font-size: 12px;
    color: var(--text-secondary);
}

@keyframes selectorSkeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.member-selector-window .selector-result[data-selected="true"] {
    opacity: 0.6;
    pointer-events: none;
}

.member-selector-window .feedback {
    font-size: 13px;
    line-height: 1.4;
}

.member-selector-window .feedback.error {
    color: #ff7675;
}

.member-selector-window .feedback.success {
    color: #55efc4;
}

.member-selector-window .actions-container {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

window[data-content="group"][data-loading="true"] .group-content {
    opacity: 0.6;
    pointer-events: none;
}

window[data-content="group"] .member-item.skeleton,
window[data-content="group"] .card.skeleton {
    pointer-events: none;
    user-select: none;
}

window[data-content="group"] .skeleton-block,
window[data-content="group"] .skeleton-line {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: groupSkeletonShimmer 1.25s ease-in-out infinite;
    border-radius: 4px;
}

window[data-content="group"] .skeleton-line {
    height: 14px;
    width: 100%;
}

window[data-content="group"] .skeleton-line.short {
    width: 60%;
}

window[data-content="group"] .skeleton-line.xshort {
    width: 40%;
}

window[data-content="group"] .skeleton-block {
    min-height: 20px;
}

window[data-content="group"] .member-item.skeleton .member-item__avatar {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: groupSkeletonShimmer 1.25s ease-in-out infinite;
}

@keyframes groupSkeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

overlay[data-profile-state="blocked-by-them"] .user-actions .btn,
overlay.profile-state-blocked .user-actions .btn {
    pointer-events: none;
}

@keyframes fadeIN-background {
    from { background-color: rgba(0, 0, 0, 0); }
    to   { background-color: rgba(0, 0, 0, 0.3); }
}

@keyframes fadeOUT-background {
    from { background-color: rgba(0, 0, 0, 0.3); }
    to   { background-color: rgba(0, 0, 0, 0); }
}

@keyframes scaleIN {
    0% {
        transform: translate(-50%, -50%) scale(0.75);
        opacity: 0;
        animation-timing-function: cubic-bezier(0.35, 0.5, 0, 1.1);
    }
    80% {
        opacity: 1;
        animation-timing-function: cubic-bezier(1, 0, 0, 1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes scaleOUT {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        animation-timing-function: ease-in;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.75);
        opacity: 0;
        animation-timing-function: cubic-bezier(0.75, 0.5, 0, 1);
    }
}

overlay[data-overlay-name="profile"]:not([data-profile-owner="true"]) .avatar-edit-trigger {
    display: none !important;
}

.group-actions.dangerous {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.group-actions.dangerous .btn.danger {
    background: rgba(220, 38, 38, 0.1);
    color: #ef4444;
    border: 1px solid rgba(220, 38, 38, 0.3);
    transition: all 0.2s ease;
}

.group-actions.dangerous .btn.danger:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-1px);
}

.group-actions.dangerous .btn.danger:active:not(:disabled) {
    transform: translateY(0);
}

.group-actions.dangerous .btn.danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
    overlay#overlay,
    overlay[data-overlay-name] {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .fadeIN,
    .fadeOUT,
    .scaleIN,
    .scaleOUT,
    .window.fadeIN,
    .window.fadeOUT,
    .window.scaleIN,
    .window.scaleOUT {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    window.window {
        transition-duration: 0.01ms !important;
    }
}