#list {
    display: flex;
    flex-direction: column;
    backdrop-filter: var(--blur-strong);
    transform-origin: bottom center;

    > .profile {
        display: flex;

    [data-group-overlay-trigger],
    [data-profile-overlay-trigger] {
        cursor: pointer;
    }
        flex-direction: column;
        gap: 12px;

        padding: 18px 16px;
        background-color: rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        
        .badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            padding: 2px 6px;
            font-size: 12px;
            font-weight: 600;
            border-radius: 999px;
            background: #ff4757;
            color: #ffffff;
            opacity: 0;
            transform: scale(0.8);
            transition: transform 0.2s ease, opacity 0.2s ease;
        }

        .time {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: var(--text-muted);
            margin-left: 6px;
        }

        .time .receipt {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            color: inherit;
        }

        .time .receipt.receipt-seen {
            color: #2ecc71;
        }

        .time .receipt .receipt-label {
            font-size: 11px;
            font-weight: 600;
        }

        .badge.visible {
            opacity: 1;
            transform: scale(1);
        }
        
        --avatar-size: 60px;

        .info {
            display: flex;
            align-items: center;
            gap: 12px;

            [data-user-avatar], [data-profile-avatar] {
                width: var(--avatar-size);
                height: var(--avatar-size);
                border-radius: 50%;
                object-fit: cover;
                
                                --3d-max-rotation: 30deg;
                --3d-max-move-x: 2px;
                --3d-max-move-y: 2px;
                --3d-smoothness: 0.15;
                --3d-scale: 1.05;
                --3d-shadow-blur: 20px;
                --3d-shadow-opacity: 0.3;
                --3d-depth: 1.2;
                --3d-enter-duration: 0.4s;
                --3d-exit-duration: 0.5s;
            }


            .avatar-wrapper {
                position: relative;
                width: 50px;
                height: 50px;
                flex-shrink: 0;
            }
            
            [data-user-name], [data-profile-name] {
                font-size: 16px;
                font-weight: 600;
                color: var(--text-primary);
                cursor: pointer;

                transition: color 0.5s ease;
                
                &:hover {
                    color: rgba(255, 255, 255, 0.75);
                    transition: color 0.15s ease;
                }

                &:active {
                    color: rgba(255, 255, 255, 0.6);
                    transition: 0s;
                }
            }
                        .is-updating {

                    .presence-dot {
                        position: absolute;
                        bottom: 2px;
                        right: 2px;
                        width: 12px;
                        height: 12px;
                        border-radius: 50%;
                        border: 2px solid rgba(20, 20, 32, 0.95);
                        background-color: rgba(125, 125, 140, 0.8);
                        box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
                    }

                    .presence-dot.online {
                        background-color: #2ecc71;
                    }

                    .presence-dot.away {
                        background-color: #f1c40f;
                    }

                    .presence-dot.busy {
                        background-color: #e74c3c;
                    }

                    .presence-dot.offline {
                        background-color: #7f8c8d;
                    }
                cursor: wait !important;
                transition: filter 0.2s ease, opacity 0.2s ease;
            }

            .is-updating > *:not(.interaction-overlay) {
                pointer-events: none !important;
                user-select: none !important;
                filter: saturate(0.85);
            }

            .interaction-overlay {
                        .split-row {
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                            gap: 8px;
                            width: 100%;
                        }

                        .meta {
                            display: flex;
                            align-items: center;
                            gap: 8px;
                        }

                position: absolute;
                inset: 0;
                z-index: 10;
                background: rgba(15, 19, 28, 0.18);
                backdrop-filter: blur(2px);
                border-radius: inherit;
                pointer-events: all;
                cursor: inherit;
                transition: opacity 0.2s ease;
            }

            .interaction-overlay::after {
                content: '';
                position: absolute;
                inset: 0;
                border-radius: inherit;
                box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
                pointer-events: none;
            }

            p {
                font-size: 14px;
                color: var(--text-secondary);
            }
        }
    }

    > div:not(.profile) {
        padding: 0 16px;
        
        > div {
            padding: 12px 0;
        }
    }

    > .main-list {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        
        /* scroll-snap-type: y mandatory; */
        scroll-behavior: smooth;

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

            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;

            p.title {
                font-size: 18px;
                font-weight: 700;
                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;
                transition: color 0.25s ease;

                &:hover {
                    color: var(--text-secondary);
                }

                &:active {
                    color: rgba(255, 255, 255, 0.5);
                    transition: color 0s ease;
                }
            }
        }
        
        > .sections {
            display: flex;
            flex-direction: column;
            gap: 12px;
            /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */

            scroll-snap-align: start;
            scroll-margin-top: var(--mainPadding);
            
            .section-btn {
                position: relative;
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 12px 18px;
                border-bottom: 1px solid var(--border-color);
                background-color: rgba(255, 255, 255, 0.1);
                border-radius: 8px;
                overflow: hidden;

                transition: 0.15s cubic-bezier(0.2, 0, 0.2, 1);
    
                &:hover {
                    background-color: rgba(255, 255, 255, 0.15);
                }

                &:active {
                    background-color: rgba(255, 255, 255, 0.2);
                    transition: 0s;
                }

                &::before {
                    content: '';
                    position: absolute;
                    left: 0;
                    top: 0;
                    width: 100%;
                    height: 100%;
                    transform: translateX(-100%);
                    opacity: 0;
                    /* background-color: rgba(255, 255, 255, 0.6); */
                    /* background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.15) 40%, rgba(255, 255, 255, 0) 100%); */
                    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.15) 85px, rgba(255, 255, 255, 0) 150px);
                    transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.15s ease 0.25s;
                }
                
                &.active {
                    background-color: rgba(255, 255, 255, 0.2);
                    color: white;
                    
                    &::before {
                        /* width: 85px; */
                        /* width: 150px; */
                        width: 100%;
                        transform: translateX(0);
                        opacity: 1;
                        border-top-right-radius: 2px;
                        border-bottom-right-radius: 2px;
                        transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.1s ease;
                    }

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

                    &:active {
                        background-color: rgba(255, 255, 255, 0.1);
                    }
                }

                .icon {
                    width: 20px;
                    display: flex;
                    justify-content: center;
                }
            }
        }

        .chats {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-left: -16px;
            width: calc(100% + 32px);

            .chat {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 24px;
                
                padding: 4px 16px;
                /* padding: 0 16px; */
                border-right: 3px solid transparent;
                
                transition: 0.3s cubic-bezier(0.2, 0, 0.2, 1);
                
                scroll-snap-align: start;
                scroll-margin-top: 6px;
                
                /* &.active, &:hover {
                    padding: 6px 16px;
                } */
                
                &:hover {
                    background: rgba(255, 255, 255, 0.1);
                }

                &:active {
                    background: rgba(255, 255, 255, 0.2);
                    transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1), background-color 0s;
                }

                &.active {
                    background: rgba(255, 255, 255, 0.2);
                    padding: 4px 12px 4px 16px;
                    margin-right: 4px;
                    border-right: 3px solid #ffffff;
                    border-top-right-radius: 2px !important;
                    border-bottom-right-radius: 2px !important;

                    &:hover {
                        background: rgba(255, 255, 255, 0.15);
                    }

                    &:active {
                        background: rgba(255, 255, 255, 0.1);
                    }
                }

                &.has-new-messages {
                    position: relative;
                    
                    &::before {
                        content: '';
                        position: absolute;
                        top: 8px;
                        right: 8px;
                        width: 8px;
                        height: 8px;
                        background: #4CAF50;
                        border-radius: 50%;
                        border: 2px solid rgba(255, 255, 255, 0.9);
                        z-index: 10;
                        animation: newMessagePulse 2s ease-in-out infinite;
                    }

                    .person .info .message {
                        font-weight: 600;
                        color: var(--text-primary);
                    }

                    &.active::before {
                        display: none;                     }
                }
                
                > .person {
                    display: flex;
                    align-items: center;
                    gap: 12px;
                    width: 100%;

                    .avatar-wrapper {
                        position: relative;
                        height: 50px;

                        .avatar {
                            width: 50px;
                            height: 50px;
                            border-radius: 50%;
                            object-fit: cover;
                        }
    
                        .badge:not(:empty) {
                            position: absolute;
                            top: -2px;
                            right: -2px;
                            min-width: 18px;
                            padding: 2px 6px;
                            font-size: 11px;
                            font-weight: 600;
                            border-radius: 999px;
                            background: rgba(155, 155, 255, 0.8);
                            color: #ffffff;
                            opacity: 0.9;
                            transition: transform 0.2s ease, opacity 0.2s ease;
                        }
                    }

                    .info {
                        flex: 1;
                        position: relative;
                        display: flex;
                        flex-direction: column;
                        justify-content: center;
                        align-items: flex-start;
                        gap: 2px;
                        max-width: calc(100% - 50px - 12px);

                        p {
                            white-space: nowrap;
                        }


                        .split-row *:last-child {
                            font-size: 12px;
                            color: var(--text-muted);
                        }

                        .title {
                            font-size: 16px;
                            font-weight: 600;
                            color: var(--text-primary);
                            overflow: hidden;
                            text-overflow: ellipsis;
                            white-space: nowrap;
                        }
                        
                        .message, .context {
                            font-size: 14px;
                            color: var(--text-secondary);
                            overflow: hidden;
                            text-overflow: ellipsis;
                            white-space: nowrap;
                            max-width: 100%;
                        }
                    }

                }
                
                > .info {
                    p {
                        &:first-child {
                            font-size: 12px;
                            color: var(--text-muted);
                        }

                        &:nth-child(2), &:nth-child(3) {
                            font-size: 10px;
                            color: var(--text-muted);
                        }
                    }
                }
            }
        }
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    z-index: 11000;
    isolation: isolate;

    &.visable {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        .overlay-panel {
            transform: translateY(0) scale(1);
            opacity: 1;
        }
    }

    &.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        .overlay-panel {
            transform: translateY(-6px) scale(0.96);
            opacity: 0;
        }

        .backdrop {
            opacity: 0;
        }
    }

    .backdrop {
        position: absolute;
        inset: 0;
        background:
        radial-gradient(circle at 20% 20%, rgba(93, 107, 255, 0.22), transparent 55%),
        radial-gradient(circle at 80% 40%, rgba(255, 84, 158, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(14, 16, 32, 0.92) 0%, rgba(20, 23, 42, 0.88) 100%);
        backdrop-filter: blur(12px);
        transition: opacity 0.6s ease;
        opacity: 1;
    }

    .overlay-panel {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: clamp(32px, 6vw, 56px);
                opacity: 0;
        transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.6s ease;
        text-align: center;
    }
    
    .logo {
        width: clamp(80px, 10vw, 120px);
        height: auto;
        filter: drop-shadow(0 18px 50px rgba(8, 12, 24, 0.45));
        image-rendering: crisp-edges;
        animation: loading-logo 1.925s cubic-bezier(0.55, 0, 0, 0.45) infinite;
        transition: transform 0.6s ease;
    }

    .text {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: center;
        max-width: clamp(220px, 60vw, 420px);

        .title {
            margin: 0;
            font-size: clamp(22px, 3vw, 34px);
            font-weight: 700;
            color: var(--text-primary, #ffffff);
        }

        .subtitle {
            margin: 0;
            font-size: clamp(15px, 2.2vw, 18px);
            color: var(--text-secondary, rgba(255, 255, 255, 0.78));
            line-height: 1.4;
        }
    }

    &[data-variant="initial"] {
        .overlay-panel {
            background: transparent;
            border: none;
            box-shadow: none;
            padding: clamp(24px, 6vw, 48px);
        }

        .logo {
            width: clamp(160px, 26vw, 280px);
                                }

        .text {
            display: none;
        }
    }

    &[data-variant="status"] {
        .overlay-panel {
                                    gap: 10px;
        }

        .logo {
            width: clamp(60px, 8vw, 90px);
        }

        .text {
            gap: 4px;
        }
    }
}

@keyframes loading-logo {
    0%, 100% {
        scale: default;
        opacity: 0.85;
        filter: drop-shadow(0 0 0 rgba(8, 12, 24, 0));
    }
    50% {
        scale: 1.05;
        opacity: default;
        filter: drop-shadow(0 4px 15px rgba(255, 255, 255, 0.325));
    }
}

#mainContent {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    position: relative;

    --titlebar-height: 103px;

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

    > .titlebar {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 2;
        backdrop-filter: var(--blur-strong);

        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 8px;

        .column {
            width: 100%;
            
            .search-container {
                display: flex;
                align-items: center;
                gap: 8px;

                .btn {
                    background: rgba(255, 255, 255, 0.025);
                    outline: 1px solid rgba(255, 255, 255, 0.075);
                    outline-offset: -1px;
                            min-width: fit-content;
                        }

                        .meta .time {
                            font-size: 12px;
                            color: var(--text-muted);
                    min-width: 34px;
                    min-height: 34px;
                    border-radius: 50%;
                    display: flex;
                    justify-content: center;
                    align-items: center;

                    transition: 0.15s ease;

                    i {
                        color: var(--text-secondary);
                    }

                    &:hover {
                        background: rgba(255, 255, 255, 0.15);
                        outline: 1px solid rgba(255, 255, 255, 0.4);

                        i {
                            color: var(--text-primary);
                        }
                    }

                    &:active {
                        background: rgba(255, 255, 255, 0.2);
                        outline: 1px solid rgba(255, 255, 255, 0.4);
                        transition: 0s;
                    }
                }
            }

            .tabs {
                display: flex;
                align-items: center;
                gap: 12px;

                overflow: auto;
                margin: 0 -8px 0 -8px;
                padding: 0 8px 0 8px;
                mask-image: linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 8px, rgba(255, 255, 255, 1) calc(100% - 8px), rgba(255, 255, 255, 0) 100%);

                &::-webkit-scrollbar {
                    display: none !important;
                }
            }
            
            .tab {
                font-size: 14px;
                color: var(--text-secondary);
                padding: 6px 12px;
                border-radius: 6px;
                outline: 1px solid rgba(255, 255, 255, 0);
                outline-offset: -1px;
                
                display: flex;
                align-items: center;
                gap: 8px;

                transition: 0.15s ease;

                &:hover {
                    color: var(--text-primary);
                    background-color: rgba(255, 255, 255, 0.1);
                    outline: 1px solid rgba(255, 255, 255, 0.1);
                }

                &:active {
                    background-color: rgba(255, 255, 255, 0.15);
                    outline: 1px solid rgba(255, 255, 255, 0.15);
                    transition: 0s;
                }

                &.active {
                    color: var(--text-primary);
                    background-color: rgba(255, 255, 255, 0.15);
                    outline: 1px solid rgba(255, 255, 255, 0.15);

                    &:hover {
                        background-color: rgba(255, 255, 255, 0.2);
                        outline: 1px solid rgba(255, 255, 255, 0.2);
                    }
                }
            }
        }

        .person {
            display: flex;
            align-items: center;
            gap: 12px;

            .avatar-wrapper {
                width: 50px;
                height: 50px;
            }

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


            .info {
                display: flex;
                flex-direction: column;

                .title {
                    font-size: 18px;
                    font-weight: 600;
                    color: var(--text-primary);
                    cursor: pointer;
                    transition: color 0.5s ease;
                    
                    &:hover {
                        color: rgba(255, 255, 255, 0.75);
                        transition: color 0.15s ease;
                    }

                    &:active {
                        color: rgba(255, 255, 255, 0.6);
                        transition: 0s;
                    }
                }
                
                .context {
                    font-size: 14px;
                    color: var(--text-secondary);
                }
            }
        }

        .actions {
            display: flex;
            align-items: center;
            gap: 12px;

            > div {
                display: flex;
                align-items: center;
                gap: 12px;

                &:not(:first-child) {
                    padding-left: 12px;
                    border-left: 1px solid rgba(165, 165, 215, 0.5);
                }
            }

            .action {
                display: flex;
                align-items: center;
                justify-content: center;

                &.opaque {
                    font-size: 18px;
                    color: rgba(205, 205, 255, 1);
                    transition: color 0.15s ease;

                    &:hover {
                        color: rgba(255, 255, 255, 0.9);
                    }
                }
                
                &:not(.opaque) {
                    width: 36px;
                    height: 36px;
                    border-radius: 50%;
                    background-color: rgba(255, 255, 255, 0.2);
                    transition: background-color 0.3s ease;
                    
                    &:hover {
                        background-color: rgba(255, 255, 255, 0.3);
                    }
                    
                    &:active {
                        background-color: rgba(165, 165, 215, 0.25);
                        transition: background-color 0s;
                    }
                }
            }
        }
    }

    &[data-content="friends"] {
        --titlebar-height: 103px;

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

            display: flex;
            flex-direction: column;
            gap: 8px;
            overflow-y: auto;

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

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

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

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

                    p {
                        font-size: 12px;
                        color: var(--text-secondary);
                    }
                }

                .row {
                    display: flex;
                    gap: 12px;
                    flex-wrap: wrap;
                                        padding: 1px;
                    margin-bottom: 12px;

                    &.people {
                        display: grid;
                        grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
                    }
                }
            }

            .person {
                background: rgba(255, 255, 255, 0.075);

                max-height: 227px;
                                border-radius: 12px;
                word-wrap: break-word;
                background-color: rgba(255, 255, 255, 0.1);
                backdrop-filter: blur(10px);
                box-shadow: 0 3px 15px -5px rgba(64, 64, 64, 0.4);
                outline: 1px solid rgba(255, 255, 255, 0.05);
                border: 1px solid rgba(225, 225, 225, 0.125);
                outline-offset: 0px;

                display: flex;
                flex-direction: column;
                overflow: hidden;

                transition: 0.15s ease, opacity 0.3s ease, transform 0s !important;

                                --3d-max-rotation: 35deg;
                --3d-max-move-x: 4px;
                --3d-max-move-y: 4px;
                --3d-scale: 1;
                --3d-shadow-blur: 10px;
                --3d-shadow-opacity: 0.3;
                --3d-perspective: 800px;
                --3d-depth: 0.5;
                --3d-smoothness: 0;
                --3d-enter-duration: 0.35s;
                --3d-exit-duration: 0.45s;

                &:hover {
                    background-color: rgba(255, 255, 255, 0.15);
                    outline: 2px solid rgba(255, 255, 255, 0.15);
                    outline-offset: 3px;

                    .image-container {
                                                
                        img {
                            scale: 2;
                                                        border-radius: 0 !important;
                            border-top-left-radius: 8px !important;
                            border-top-right-radius: 8px !important;
                            animation: blurINOUT 0.2s cubic-bezier(0.5, 0, 0, 1);
                        }
                    }

                    .actions {
                        opacity: 1 !important;
                    }

                    .info {
                        background-color: rgba(255, 255, 255, 0.1);
                        outline: 1px solid rgba(255, 255, 255, 0.125);
                    }
                }

                &:active {
                    background-color: rgba(255, 255, 255, 0.2) !important;
                    border: 1px solid rgba(255, 255, 255, 0) !important;
                    outline: 2px solid rgba(255, 255, 255, 0.3) !important;
                    outline-offset: -1px !important;
                    transition: 0.05s, outline-offset 0.15s ease;
                }

                &.offline {
                    &:not(:hover):not(:active) {
                        opacity: 0.75;
                    }

                    .status {
                        color: var(--text-muted) !important;
                    }
                }

                .image-container {
                    position: relative;
                    flex: 1;
                    padding: 35px;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    mask-image: linear-gradient(to top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 12px);

                    img {
                        width: 100px;
                        height: 100px;
                        border-radius: 50%;
                        object-fit: cover;

                        transition: all 0.3s cubic-bezier(0.5, 0, 0, 1);
                    }

                    > .icons {
                        position: absolute;
                        top: 8px;
                        left: 8px;
                        display: flex;
                        flex-direction: row;
                        gap: 8px;

                        i {
                            font-size: 16px;
                            color: rgba(255, 255, 255, 0.6);
                            filter: drop-shadow(0 0 3px rgba(0, 0, 0, 1));
                            transition: all 0.15s ease, color 0.5s ease;

                            &:hover {
                                color: rgba(255, 255, 255, 0.9);
                            }
                        }
                    }

                    > .actions {
                        bottom: 12px;
                        right: 6px;
                        position: absolute;
                        opacity: 0;
                        
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        flex-direction: row;
                        gap: 8px;

                        transition: opacity 0.25s ease;

                        .action {
                            width: 30px;
                            height: 30px;
                            font-size: 16px;
                            background: rgba(128, 128, 128, 0.6);
                            color: rgba(205, 205, 255, 1);
                            outline: 1px solid rgba(255, 255, 255, 0.05);
                            outline-offset: -1px;
                            box-shadow: 0 0 6px rgba(64, 64, 64, 0.6);
                            border-radius: 50%;
                            z-index: 1;

                            backdrop-filter: blur(10px);
                            
                            display: flex;
                            align-items: center;
                            justify-content: center;

                            transition: all 0.15s ease, color 0.5s ease;

                            &:hover {
                                color: rgba(255, 255, 255, 0.9);
                                background: rgba(128, 128, 128, 0.35);
                                outline: 1px solid rgba(255, 255, 255, 0.3);
                            }

                            span.context {
                                font-size: 12px;
                                margin-top: 1px;
                            }
                        }
                    }
                }

                .info {
                    background-color: rgba(255, 255, 255, 0.05);
                    padding: 9px 8px 6px 8px;
                    margin: 0 4px 4px 4px;
                    border-radius: 6px;
                    border-bottom-left-radius: 8px;
                    border-bottom-right-radius: 8px;
                    outline: 1px solid rgba(255, 255, 255, 0.05);
                    outline-offset: -1px;

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

    &[data-content="chat"] {
                border-radius: 8px;

        --titlebar-height: 74px;
                --message-area-height: 54px;

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

            display: flex;
            flex-direction: column;
                        gap: calc(8px + 16px);
            overflow-y: auto;

            width: 100%;
            min-width: 0;             max-width: calc(1540px + 16px * 2);
                        margin: 0 auto;

            
            scrollbar-width: none !important;

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

            .message-container {
                width: 100%;
                min-width: 0;                 display: flex;
                flex-direction: column;
                gap: 8px;
                position: relative;

                --avatar-width: 40px;

                > .group {
                    display: flex;
                    flex-direction: column;
                    gap: 8px;
                    min-width: 0;                     max-width: min(600px, calc(100% - 100px));
                    
                    .message {
                        width: fit-content;
                        scroll-snap-align: end;
                                                scroll-margin-bottom: calc(var(--message-area-height) + 12px + var(--mobile-bottom-space));
                    }
                }

                &:has(.avatar) {
                    padding-left: calc(var(--avatar-width) + var(--mainPadding));
                }

                &.sent {
                    align-items: flex-end;

                    .group {
                        align-items: flex-end;
                    }

                    .message {
                        
                        &.animate {
                            transform-origin: bottom right;
                        }
                        
                        &:last-child {
                            border-bottom-right-radius: 4px;
                        }
                                                }
                    }
                    
                &.received {
                    align-items: flex-start;
                    
                    .message {
                        
                        &.animate {
                            transform-origin: bottom left;
                        }

                        &:last-child {
                            border-bottom-left-radius: 4px;
                        }
                        
                        .time {
                            align-self: flex-end;
                        }
                    }
                }

                &.timestamp, &.info {
                    align-items: center;
                    text-align: center;
                    padding: 16px 32px;

                    scroll-snap-align: start;
                    scroll-margin-top: calc(var(--titlebar-height) + 8px);
                    
                    &.info {
                        margin: -20px 0;
                    }
                    
                    &.timestamp {
                        margin: 0 0 -8px 0;
                                            }
                    
                    .context, .time {
                        font-size: 14px;
                        
                        &.context {
                            padding: 8px 12px;
                            border-radius: 12px;
                            max-width: minmax(400px, 60%);
                            word-wrap: break-word;
                            background-color: rgba(205, 205, 255, 0.1);
                            color: var(--text-tertiary);
                            backdrop-filter: blur(10px);
                        }

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

                .header {
                    padding: 0 15px;

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

                .message {
                    padding: 11px 15px;
                    border-radius: 12px;
                    max-width: 100%;
                    min-width: 0;                     word-wrap: break-word;
                    overflow-wrap: break-word;                     background-color: rgba(255, 255, 255, 0.1);
                                        box-shadow: 0 3px 15px -5px rgba(64, 64, 64, 0.4);
                    outline: 1px solid rgba(255, 255, 255, 0.05);
                    border: 1px solid rgba(225, 225, 225, 0.125);
                    outline-offset: 0px;

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

                    &.animate {
                        animation: messagePopIn 0.3s cubic-bezier(0.35, 0, 0, 1.2);
                    }

                    p {
                        line-height: 1.25;

                        &.text {
                            line-height: 1.4;
                            user-select: text;
                            -moz-user-select: text;
                            -webkit-user-select: text;
                            -ms-user-select: text;
                            cursor: text;
                            white-space: pre-wrap;
                            word-wrap: break-word;
                            overflow-wrap: break-word;
                        }
                    }
                    
                    &:has(.image-container) {
                        padding: 12px 12px;
                        
                        p {
                            padding: 0 4px;
                        }
                    }

                    .image-container {
                        max-height: 400px;
                        overflow: hidden;
                        
                        .image {
                            width: 350px;
                            height: auto;
                            max-height: 400px;
                            object-fit: cover;
                            border-radius: 8px;
                        }
                    }

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

                        display: flex;
                                                align-items: center;
                        gap: 8px;
                    }
                }

                .receipt {
                    display: flex;
                    align-items: center;
                    gap: 4px;
                }

                > .avatar {
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: var(--avatar-width);
                    height: var(--avatar-height);
                    object-fit: cover;
                    border-radius: 50%;
                                    }
            }
        }

        > .message-area {
            position: absolute;
            bottom: var(--mobile-bottom-space);
            left: 0;
            width: 100%;
            z-index: 2;
            backdrop-filter: var(--blur-strong);

            padding: 12px 6px;
            background-color: rgba(255, 255, 255, 0.05);
            border-radius: 8px;

            display: flex;
            align-items: flex-end;
            transition: height 0.2s ease, padding 0.2s ease;

            > div {
                padding: 4px 14px;

                display: flex;
                align-items: center;
                gap: 8px;

                &:not(:last-child, .messagebar-container) {
                    padding-right: 14px;
                                    }
                
                &:not(.messagebar-container) {
                    height: 30px;
                }
                
                &.messagebar-container {
                    border-right: 1px solid rgba(165, 165, 215, 0.5);
                    border-left: 1px solid rgba(165, 165, 215, 0.5);
                }

                &:first-child {
                    padding-left: 8px;
                }

                &:last-child {
                    padding-right: 8px;
                }
            }

            > .messagebar-container {
                flex: 1;
                position: relative;
                min-height: fit-content;
                padding: 0 10px;

                transition: all 0.2s cubic-bezier(0.1, 0, 0, 1);
                
                &:has(textarea#messagebar:focus) {
                    background: rgba(255, 255, 255, 0.05);
                    border-radius: 4px;
                    padding: 4px 10px;
                    margin: -4px 0;
                    border-right: 1px solid rgba(165, 165, 215, 0);
                    border-left: 1px solid rgba(165, 165, 215, 0);
                }

                &:has(.character-counter.active, .character-counter.warning, .character-counter.danger) {
                    padding-right: calc(26.7px + 4px + 4px) !important;
                }

                textarea#messagebar {
                    font-family: var(--font-family-primary);
                    font-size: 16px;
                    width: 100%;
                    padding: 4px;
                    min-height: 30px;
                    max-height: 140px;
                    border: none;
                    outline: none;
                    background: transparent;
                    color: var(--text-primary);
                    resize: none;
                    overflow-y: hidden;
                    line-height: 1.4;
                    transition: height 0.2s ease;

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

                .character-counter {
                    position: absolute;
                    right: var(--mainPadding);
                    bottom: 50%;
                    transform: translateY(50%);
                    font-size: 12px;
                    color: var(--text-tertiary);
                    transition: color 0.2s ease;

                    &:not(.active) {
                        color: rgba(255, 255, 255, 0);
                    }

                    &.warning {
                        color: #f39c12 !important;
                    }

                    &.danger {
                        color: #e74c3c !important;
                        font-weight: bold;
                    }
                }
            }

            > .actions {
                gap: 14px;

                > .action, > div > .action {
                    font-size: 18px;
                    color: rgba(205, 205, 255, 1);
                    transition: color 0.15s ease;

                    display: flex;
                    align-items: center;
                    gap: 8px;

                    &:hover {
                        color: rgba(255, 255, 255, 0.9);
                    }

                    span.context {
                        font-size: 12px;
                        margin-top: 1px;
                    }
                }
            }
        }
    }

    &:not([data-content="chat"]) {
        > .titlebar {
            .heading-container {
                display: flex;
                flex-direction: row;
                gap: 12px;
            }
        }
    }
}

.welcome-hero .hero-greeting .wave {
    display: inline-flex;
    animation: hero-wave 2.4s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes hero-wave {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(18deg); }
    40% { transform: rotate(-8deg); }
    60% { transform: rotate(12deg); }
    80% { transform: rotate(-4deg); }
}

.section-content {
    padding: 24px;
    height: 100%;
    overflow-y: auto;

    .section-header {
        margin-bottom: 32px;
        text-align: center;

        h2 {
            font-size: 24px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;

            i {
                margin-right: 12px;
                color: var(--accent-primary);
            }
        }

        p {
            font-size: 16px;
            color: var(--text-secondary);
        }
    }

    .content-placeholder {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        height: 50%;
        min-height: 200px;

        i {
            font-size: 48px;
            color: var(--accent-primary);
            margin-bottom: 16px;
            opacity: 0.7;
        }

        h3 {
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        p {
            font-size: 14px;
            color: var(--text-secondary);
        }
    }

    .settings-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 24px;

        .setting-group {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            padding: 20px;

            h3 {
                font-size: 18px;
                font-weight: 600;
                color: var(--text-primary);
                margin-bottom: 16px;
                padding-bottom: 8px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }

            .setting-item {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 12px 0;
                border-bottom: 1px solid rgba(255, 255, 255, 0.05);

                &:last-child {
                    border-bottom: none;
                }

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

                input, select {
                    background: rgba(255, 255, 255, 0.1);
                    border: 1px solid rgba(255, 255, 255, 0.2);
                    border-radius: 6px;
                    padding: 8px 12px;
                    color: var(--text-primary);
                    font-size: 14px;
                    min-width: 120px;

                    &:focus {
                        outline: none;
                        border-color: var(--accent-primary);
                        box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.2);
                    }
                }

                input[type="checkbox"] {
                    min-width: auto;
                    width: 18px;
                    height: 18px;
                    cursor: pointer;
                }
            }
        }
    }
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.empty-state button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(100, 100, 200, 0.8);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.empty-state button:hover {
    background: rgba(120, 120, 220, 0.9);
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.loading-state p {
    margin: 0;
    font-size: 1rem;
}

.status-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
}

.person .actions .action.accept {
    background: #28a745;
    color: white;
}

.person .actions .action.decline {
    background: #dc3545;
    color: white;
}

.person .actions .action.accept:hover {
    background: #218838;
}

.person .actions .action.decline:hover {
    background: #c82333;
}

.search-section {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.empty-chats {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-chats a {
    color: rgba(100, 100, 200, 1);
    text-decoration: none;
}

.empty-chats a:hover {
    text-decoration: underline;
}

.person .actions .action.revoke {
    background: #dc3545;
    color: white;
}

.person .actions .action.revoke:hover {
    background: #c82333;
}

.person .actions .action.remove-friend {
    background: #dc3545;
    color: white;
}

.person .actions .action.remove-friend:hover {
    background: #c82333;
}

.person .icons .fa-clock {
    color: #ffc107;
}

.person .icons .fa-user-plus {
    color: #28a745;
}

.person .actions .action.success {
    background: #28a745 !important;
    color: white !important;
}

.person .actions .action.error {
    background: #dc3545 !important;
    color: white !important;
}

.person .actions .action.pending {
    background: #ffc107 !important;
    color: #212529 !important;
}

.person .actions .action.success,
.person .actions .action.error,
.person .actions .action.pending {
    transition: all 0.3s ease;
}

.person .actions .request-sent-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
}

.person.updating {
    opacity: 0.7;
    transform: scale(0.98);
}

.loading-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.loading-action i {
    color: var(--text-secondary);
    font-size: 1rem;
}

.status-text.success {
    color: #28a745;
    font-weight: 600;
}

.friends .list {
    transition: all 0.3s ease;
}

.search-container input {
    transition: opacity 0.2s ease;
}

.search-container .btn i {
    transition: all 0.2s ease;
}

.person .actions .action.loading {
    background: rgba(108, 117, 125, 0.3) !important;
    color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.8;
}

.person .actions .action.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.person .actions .action {
    transition: all 0.2s ease-in-out;
}

.person .actions .request-sent-label {
    animation: slideInFromLeft 0.3s ease-out;
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


.person.removing {
    transition: all 0.3s ease;
    transform: scale(0.8) translateX(20px);
    opacity: 0;
}

@media screen and (min-width: 769px) {
    .back-btn {
        display: none !important;
    }
}

@keyframes shimmer {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.person.loading {
    animation: shimmer 1.5s ease-in-out infinite;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateX(350px);
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
}

.toast-success .toast-content {
    background: rgba(40, 167, 69, 0.9);
    color: white;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.toast-error .toast-content {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.toast-info .toast-content {
    background: rgba(100, 100, 200, 0.9);
    color: white;
    border: 1px solid rgba(100, 100, 200, 0.3);
}

.toast i {
    font-size: 18px;
    opacity: 0.9;
}

.toast span {
    font-size: 14px;
    font-weight: 500;
}

.empty-state, .loading-state, .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state p, .loading-state p, .error-state p {
    margin: 0 0 8px 0;
    font-weight: 500;
}

.empty-state small, .loading-state small {
    font-size: 0.85em;
    opacity: 0.7;
    margin: 0;
}

.error-state button {
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-state button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat.friend-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat.friend-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

@keyframes newMessagePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes messagePopIn {
    0% {
        opacity: 0;
        filter: blur(4px);
        transform: scale(0.4);
    }
    80% {
        filter: default;
    }
    100% {
        opacity: 1;
        filter: default;
        transform: scale(1);
    }
}

@media screen and (max-width: 768px) {
    :root {
        --mainPadding: 8px;

                --windowTransitionIN: 0.6s cubic-bezier(0.15, 0.6, 0, 1);
        --windowTransitionOUT: 0.3s cubic-bezier(0.25, 0.3, 0, 1);
        
                --opacityTransitionIN: 0.2s ease-out;
        --opacityTransitionOUT: 0.3s ease-in-out 0.1s;
    }

    body {
        overflow: hidden !important;
        
                &.mobile-nav-active {
            user-select: none;
        }
    }

    #mainContainer {
        overflow: hidden;
        position: relative;


        > * {
            border-radius: 0 !important;
        }
        
        #list {
            min-width: 100%;
            background-image: none;
            z-index: 1;
                        will-change: transform, opacity;
            transform: translate3d(0, 0, 0);             contain: layout style paint;             isolation: isolate;             transition: transform var(--windowTransitionOUT), 
                       opacity var(--opacityTransitionOUT);

            .profile {
                background: rgba(255, 255, 255, 0.125);
                border-bottom: none;
                border-radius: var(--mainBorderRadius);
            }

            .main-list {
                padding: 0 var(--mainBorderRadius);
            }
        }
        
        #mainContent {
            top: 0;
            right: 0;
            position: absolute;
            width: 100%;
            height: 100%;
            z-index: 2;
                        will-change: transform;
            transform: translate3d(0, 0, 0);             backface-visibility: hidden;             contain: layout style paint;             isolation: isolate;             transition: transform var(--windowTransitionIN);
            
            > .titlebar {
                padding: 12px;
            }
            
            &:not(.active) {
                                transform: translate3d(0, 100%, 0);
                pointer-events: none;
                transition: transform var(--windowTransitionOUT);
            }

            
            &[data-content="chat"] {
                > .chat {
                    padding: calc(12px + var(--titlebar-height)) calc(var(--mainBorderRadius) / 1) calc(12px + var(--message-area-height)) calc(var(--mainBorderRadius) / 1);

                    .message-container {
                        --avatar-width: 32px;
                    }
                }
            }
        }

        &:has(#mainContent.active) {
            #list {
                                transform: translate3d(0, 0, 0) scale(0.93);
                opacity: 0;
                pointer-events: none;
                transition: transform var(--windowTransitionIN), 
                           opacity var(--opacityTransitionIN);
            }
        }

    }
    
    .back-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.2s ease;
        
        &:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }
        
        &:active {
            transform: scale(0.95);
        }
    }
    
        .desktop-only {
        display: none !important;
    }
    
        .main-list, .friends, .chat {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

@media screen and (max-width: 550px) {
    :root {
        --mobile-bottom-space: 36px !important;
    }

    #main {
        padding-bottom: 0;
    }

    #mainContent {
        &[data-content="chat"] {
            > .titlebar .person .info {
                .title {
                    font-size: 15px;
                }
                .context {
                    font-size: 14px;
        
                    *:not(.status) {
                        display: none;
                    }
                }
            }
            
            > .chat {
                padding: calc(12px + var(--titlebar-height)) calc(var(--mainBorderRadius) / 2) calc(12px + var(--message-area-height) + var(--mobile-bottom-space)) calc(var(--mainBorderRadius) / 2) !important;

                .message-container {
                    .message {
                        padding: 7px 11px !important;
                        gap: 5px !important;
                        border-radius: 9px !important;
                    }
                }
            }
        }
    }
}