* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top, rgba(88,101,242,0.25), transparent 45%), radial-gradient(circle at bottom, rgba(24,198,132,0.2), transparent 40%), #0f1117;
    color: #dcddde;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-frame {
    flex: 1;
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.mode-panel {
    width: 280px;
    background: rgba(13, 14, 20, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-height: 100vh;
}

.mode-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mode-header h1 {
    font-size: 22px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mode-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #a7a9b4;
    letter-spacing: 0.5px;
}

.mode-settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.mode-settings-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.mode-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hub-segment {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    justify-content: center;
    padding: 18px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hub-segment strong {
    font-size: 16px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.hub-segment span {
    font-size: 13px;
    color: #a9abb3;
}

.hub-segment.hub-active {
    background: rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.6);
    transform: translateX(4px);
}

.app-shell {
    flex: 1;
    background: rgba(32, 33, 38, 0.95);
    display: flex;
    overflow: hidden;
    min-height: 100vh;
}

.channels-workspace,
.friends-main-view,
.calls-view {
    height: 100%;
}

/* Server List Styles */
.server-list {
    display: none;
}

.server-icon {
    width: 48px;
    height: 48px;
    background-color: #36393f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #dcddde;
    position: relative;
}

.server-icon:hover {
    border-radius: 16px;
    background-color: #5865f2;
    color: white;
}

.server-icon.home {
    background-color: #5865f2;
    color: white;
}

.server-separator {
    width: 32px;
    height: 2px;
    background-color: #36393f;
    border-radius: 1px;
}

/* Channel List Styles */
.channel-category {
    margin-bottom: 16px;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 8px 8px 4px 8px;
    cursor: pointer;
    user-select: none;
}

.category-header svg {
    margin-right: 4px;
    color: #8e9297;
}

.category-header span {
    font-size: 12px;
    font-weight: 600;
    color: #8e9297;
    letter-spacing: 0.5px;
}

.channel {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s;
    color: #96989d;
}

.channel:hover {
    background-color: #3c3f45;
    color: #dcddde;
}

.channel.active {
    background-color: #404249;
    color: #ffffff;
}

.channel svg {
    margin-right: 8px;
    flex-shrink: 0;
}

.channel span {
    font-size: 16px;
    font-weight: 500;
}

/* User Panel Styles */
/* User Panel Styles */
.user-panel,
.user-info,
.user-details,
.username,
.user-status {
    display: none;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #2b2f38 0%, #1f2229 100%);
    position: relative;
    padding: 32px;
    min-height: 100vh;
    overflow: auto;
}

.app-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.toolbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.toolbar-btn:not(.disabled):hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.toolbar-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.toolbar-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 14px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toolbar-search input {
    flex: 1;
    border: none;
    background: transparent;
    color: #f5f5f5;
    font-size: 14px;
    padding: 10px 0;
    outline: none;
}

.toolbar-search svg {
    color: #9ca3af;
}

.server-name {
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.server-context {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #b9bbbe;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.friends-welcome-view {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #72767d;
}

.friends-welcome-content h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #fff;
}

.friends-welcome-content p {
    font-size: 16px;
    line-height: 1.6;
}

.chat-header {
    height: 48px;
    border-bottom: 1px solid #202225;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

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

.channel-info svg {
    color: #8e9297;
}

.channel-info span {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.chat-controls {
    display: flex;
    gap: 16px;
}

.icon-btn {
    background: none;
    border: none;
    color: #b9bbbe;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.icon-btn:hover {
    color: #dcddde;
}

/* Messages Styles */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.message-group {
    margin-bottom: 16px;
    display: flex;
    padding: 4px 16px;
    transition: background-color 0.1s;
}

.message-group:hover {
    background-color: #32353b;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    margin-right: 16px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 4px;
}

.message-author {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-right: 8px;
}

.message-timestamp {
    font-size: 12px;
    color: #72767d;
}

.message-text {
    font-size: 16px;
    line-height: 1.375;
    color: #dcddde;
    word-wrap: break-word;
}

/* Message Input Styles */
.message-input-container {
    padding: 16px;
}

.message-input-wrapper {
    background-color: #40444b;
    border-radius: 8px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-input-wrapper.locked {
    opacity: 0.5;
}

.attach-btn {
    background: none;
    border: none;
    color: #b9bbbe;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    transition: color 0.15s;
}

.attach-btn:hover {
    color: #dcddde;
}

#messageInput {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #dcddde;
    font-size: 16px;
    padding: 11px 0;
}

#messageInput::placeholder {
    color: #72767d;
}

.channel-lock-hint {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #a9acb8;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 10px;
}

/* Call Interface Styles */
.call-interface {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 90vw;
    min-width: 400px;
    background-color: #2f3136;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    animation: callSlideIn 0.3s ease;
    resize: both;
    overflow: auto;
}

.call-interface.fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: none;
}

@keyframes callSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.call-interface.hidden {
    display: none;
}

.call-header {
    height: 56px;
    background: linear-gradient(180deg, #2b2d31 0%, #202225 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    cursor: move;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: 1px solid #1e1f23;
}

.call-channel-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.close-call-btn {
    width: 36px;
    height: 36px;
    background: rgba(237, 66, 69, 0.1);
    border: none;
    color: #ed4245;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-call-btn:hover {
    background-color: #ed4245;
    color: white;
    transform: scale(1.05);
}

.call-participants {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    padding: 16px;
    gap: 12px;
    overflow-y: auto;
    max-height: 600px;
    min-height: 280px;
}

.participant {
    position: relative;
    width: 100%;
    min-width: 150px;
    min-height: 100px;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #202225 0%, #2f3136 100%);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    resize: both;
    transition: opacity 0.3s ease;
}

.participant:hover .resize-handle {
    opacity: 1;
}

.resize-handle {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.participant[data-resizable="true"] {
    cursor: default;
}

.participant.screen-share {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
}

.participant video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

.participant.minimized {
    width: 120px;
    height: 90px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    cursor: pointer;
}

.participant.maximized {
    width: 90vw !important;
    height: 90vh !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
}

.participant-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.participant-controls {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
}

.call-controls-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(32, 34, 37, 0) 0%, #202225 100%);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.call-control-btn {
    width: 48px;
    height: 48px;
    background-color: #40444b;
    border: none;
    border-radius: 50%;
    color: #b9bbbe;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.call-control-btn:hover {
    background-color: #464a52;
    color: #ffffff;
    transform: scale(1.1);
}

.call-control-btn.active {
    background-color: #ed4245;
    color: white;
}

.call-control-btn.active:hover {
    background-color: #c03537;
}

.call-control-btn svg {
    width: 24px;
    height: 24px;
}

.call-control-btn.screen-active {
    background: linear-gradient(135deg, #3ba55d 0%, #43b581 100%);
    color: white;
}

.call-control-btn.screen-active:hover {
    background: linear-gradient(135deg, #2d8f4e 0%, #35a069 100%);
}

/* Video Size Controls */
.video-size-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.participant:hover .video-size-controls {
    opacity: 1;
}

.size-control-btn {
    width: 28px;
    height: 28px;
    background: rgba(32, 34, 37, 0.8);
    border: none;
    border-radius: 4px;
    color: #b9bbbe;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.size-control-btn:hover {
    background: rgba(88, 101, 242, 0.8);
    color: white;
}

/* Double click to fullscreen hint */
.participant::after {
    content: 'Double-click to fullscreen';
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.participant:hover::after {
    opacity: 1;
}

/* Incoming Call Interface */
.incoming-call {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-width: 90vw;
    background: linear-gradient(135deg, #2f3136 0%, #202225 100%);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.7);
    z-index: 2000;
    animation: incomingCallPulse 0.4s ease;
}

@keyframes incomingCallPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.incoming-call.hidden {
    display: none;
}

.incoming-call-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.caller-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.caller-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5865f2 0%, #7289da 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
    animation: callerAvatarPulse 2s infinite;
}

@keyframes callerAvatarPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(88, 101, 242, 0.6);
    }
}

.caller-name {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.incoming-call-content p {
    font-size: 16px;
    color: #b9bbbe;
    margin-bottom: 24px;
}

.incoming-call-actions {
    display: flex;
    gap: 16px;
}

.call-action-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.call-action-btn.accept {
    background: linear-gradient(135deg, #3ba55d 0%, #43b581 100%);
    color: white;
}

.call-action-btn.accept:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 165, 93, 0.4);
}

.call-action-btn.reject {
    background: linear-gradient(135deg, #ed4245 0%, #f04747 100%);
    color: white;
}

.call-action-btn.reject:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(237, 66, 69, 0.4);
}

/* Call Interface Overlay Background */
.call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.call-overlay.hidden {
    display: none;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #2e3338;
}

::-webkit-scrollbar-thumb {
    background: #202225;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a1c1f;
}

/* Voice Channel Indicator */
.voice-channel.in-call {
    background-color: #3ba55d;
    color: white;
}

.voice-channel.in-call:hover {
    background-color: #2d7d46;
}

/* Friends Interface */
.dm-panel {
    width: 260px;
    flex-shrink: 0;
    padding: 16px;
    background: rgba(32, 34, 40, 0.95);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dm-search-bar input {
    width: 100%;
    background-color: #202225;
    border: none;
    border-radius: 8px;
    padding: 10px;
    color: #dcddde;
    font-size: 14px;
}

.dm-list-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: #8e9297;
    letter-spacing: 0.5px;
}

.dm-list {
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 8px;
}

.dm-list .channel {
    padding: 8px;
    border-radius: 8px;
    color: #cfd2da;
}

.dm-list .channel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.friends-main-view {
    display: flex;
    gap: 24px;
    height: 100%;
    border-radius: 24px;
    background-color: rgba(32, 34, 40, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    padding: 16px;
}

.channel-directory {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    border-radius: 24px;
    background-color: rgba(32, 34, 40, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    height: 100%;
}

.channel-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.channel-board-header h2 {
    margin: 0;
    font-size: 24px;
}

.channel-board-header p {
    margin: 4px 0 0;
    color: #a8adb7;
    font-size: 14px;
}

.channel-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 280px;
}

.channel-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: #f5f5f5;
    font-size: 14px;
    padding: 10px 0;
    outline: none;
}

.channel-board-body {
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
}

.channel-clusters {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
}

.channel-cluster {
    background: rgba(24, 25, 31, 0.9);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.channel-cluster h3 {
    margin: 0;
    font-size: 16px;
}

.channel-cluster p {
    margin: 4px 0 12px;
    color: #9fa4b3;
    font-size: 13px;
}

.cluster-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.channel-card span {
    font-size: 12px;
    color: #8f96a7;
}

.channel-card strong {
    font-size: 15px;
}

.channel-card:hover,
.channel-card.active {
    border-color: rgba(88, 101, 242, 0.45);
    transform: translateX(4px);
}

.channel-info-pane {
    width: 320px;
    background: rgba(24, 25, 31, 0.9);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.channel-info-pane h3 {
    margin: 0;
}

.channel-info-pane p {
    color: #c0c3cf;
    line-height: 1.4;
}

.channel-info-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #9ea2b1;
}

.channel-info-actions {
    display: flex;
    gap: 10px;
}

.channel-join-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    background: #5865f2;
    color: #fff;
    font-weight: 600;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.channel-join-btn[disabled] {
    opacity: 0.5;
    cursor: default;
}

.channel-join-btn:not([disabled]):hover {
    background: #4752c4;
}

.channel-empty-state {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #b5b9c6;
}

.channel-empty-state span {
    font-size: 13px;
    color: #8f96a7;
}

.friends-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(24, 25, 31, 0.9);
    border-radius: 20px;
    overflow: hidden;
}

.friends-header {
    height: 48px;
    border-bottom: 1px solid #202225;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.friends-tabs {
    display: flex;
    gap: 8px;
}

.friends-tab {
    background: none;
    border: none;
    color: #96989d;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.friends-tab:hover {
    background-color: #3c3f45;
    color: #dcddde;
}

.friends-tab.active {
    background-color: #404249;
    color: #ffffff;
}

.friends-content-wrapper {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.friends-list {
    display: none;
    padding: 16px;
}

.friends-list.active-tab {
    display: block;
}

.calls-view {
    display: flex;
    height: 100%;
    padding: 24px;
    border-radius: 24px;
    background-color: rgba(32, 34, 40, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.calls-panel {
    flex: 1;
    background: rgba(32, 34, 40, 0.9);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.settings-panel {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 24px;
}

.settings-panel.hidden {
    display: none;
}

.settings-card {
    width: min(420px, 100%);
    background: #1f2229;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-header h2 {
    margin: 0;
    font-size: 22px;
    color: #fff;
}

.settings-header p {
    margin: 4px 0 0;
    color: #b9bbbe;
    font-size: 14px;
}

.settings-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.settings-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-section label {
    font-size: 12px;
    letter-spacing: 1px;
    color: #8e9297;
}

.settings-identity {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.settings-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    font-size: 18px;
}

.settings-username {
    font-weight: 600;
    color: #fff;
}

.settings-email {
    font-size: 13px;
    color: #b9bbbe;
}

.avatar-actions {
    margin-top: 10px;
}

.settings-button {
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
}

.friend-avatar,
.user-avatar,
.message-avatar,
.call-target-avatar,
.caller-avatar,
.settings-avatar,
.dm-panel .user-avatar {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    text-transform: uppercase;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 12px;
    color: #dcddde;
}

.toggle-switch {
    position: relative;
    width: 42px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3c3f45;
    transition: 0.2s;
    border-radius: 22px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: #5865f2;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(20px);
}

.settings-danger-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: #ed4245;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-danger-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(237, 66, 69, 0.4);
}

.calls-header h2 {
    margin: 0;
    font-size: 24px;
    color: #ffffff;
}

.calls-header p {
    margin: 4px 0 0;
    color: #b9bbbe;
    font-size: 14px;
}

.calls-section h3 {
    font-size: 14px;
    letter-spacing: 1px;
    color: #8e9297;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.call-roster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.call-target {
    background: #2f3136;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.call-target:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 101, 242, 0.4);
}

.call-type-popover {
    position: absolute;
    z-index: 2000;
    background: #1f2026;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.call-type-popover.visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
}

.popover-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #a3a7b1;
}

.call-type-option {
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(88, 101, 242, 0.15);
    color: #dee0ff;
    transition: background 0.2s ease, transform 0.2s ease;
}

.call-type-option.primary {
    background: #5865f2;
    color: #fff;
}

.call-type-option:hover {
    background: rgba(88, 101, 242, 0.35);
    transform: translateY(-1px);
}

.call-type-option.primary:hover {
    background: #4752c4;
}

.call-target-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.call-target-labels {
    display: flex;
    flex-direction: column;
}

.call-target-name {
    font-weight: 600;
    color: #ffffff;
}

.call-target-status {
    font-size: 12px;
    color: #b9bbbe;
}

.call-target-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.mini-call-btn {
    border: none;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    background: rgba(88, 101, 242, 0.15);
    color: #d8dcff;
    transition: background 0.2s ease;
}

.mini-call-btn.primary {
    background: #5865f2;
    color: #fff;
}

.mini-call-btn:hover {
    background: rgba(88, 101, 242, 0.4);
}

.voice-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.voice-card {
    flex: 1 1 220px;
    min-width: 200px;
    background: #1f2227;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.voice-card:hover {
    border-color: rgba(24, 198, 132, 0.6);
    transform: translateY(-2px);
}

.voice-card span {
    font-size: 14px;
    color: #b9bbbe;
}

.friends-empty {
    text-align: center;
    color: #72767d;
    padding: 40px 20px;
    font-size: 14px;
}

.channels-workspace {
    display: flex;
    gap: 24px;
    height: 100%;
    border-radius: 24px;
    background-color: rgba(32, 34, 40, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    padding: 16px;
}

.channels-panel {
    width: 260px;
    background: rgba(24, 25, 31, 0.9);
    border-radius: 20px;
    padding: 16px;
    overflow-y: auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.chat-surface {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: rgba(24, 25, 31, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: #2f3136;
    transition: background-color 0.2s;
}

.friend-item:hover {
    background-color: #36393f;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.friend-status {
    font-size: 12px;
    color: #3ba55d;
}

.friend-status.offline {
    color: #747f8d;
}

.friend-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.friend-action-btn {
    min-width: 82px;
    height: 34px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #d4d7e2;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.friend-action-btn:hover {
    background-color: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.45);
    color: #ffffff;
}

.friend-action-btn.accept {
    background-color: #3ba55d;
    color: white;
    border: none;
}

.friend-action-btn.accept:hover {
    background-color: #2d7d46;
}

.friend-action-btn.reject {
    background-color: #ed4245;
    color: white;
    border: none;
}

.friend-action-btn.reject:hover {
    background-color: #c03537;
}

/* Add Friend Form */
.add-friend-form {
    padding: 20px;
}

.add-friend-form h3 {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 600;
}

.add-friend-form p {
    font-size: 14px;
    color: #b9bbbe;
    margin-bottom: 16px;
}

.add-friend-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.add-friend-input-wrapper input {
    flex: 1;
    background-color: #202225;
    border: 1px solid #202225;
    border-radius: 4px;
    color: #dcddde;
    padding: 12px;
    font-size: 14px;
}

.add-friend-input-wrapper input:focus {
    outline: none;
    border-color: #5865f2;
}

.add-friend-input-wrapper button {
    background-color: #5865f2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-friend-input-wrapper button:hover {
    background-color: #4752c4;
}

#searchResults {
    margin-top: 16px;
}

.user-search-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: #2f3136;
}

.user-search-item .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    margin-right: 12px;
}

.user-search-item .user-info {
    flex: 1;
}

.user-search-item .user-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.user-search-item .add-friend-btn {
    background-color: #3ba55d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-search-item .add-friend-btn:hover {
    background-color: #2d7d46;
}

.user-search-item .add-friend-btn:disabled {
    background-color: #747f8d;
    cursor: not-allowed;
}

/* File Attachments */
.file-attachment {
    display: flex;
    align-items: center;
    background-color: #2f3136;
    border-radius: 4px;
    padding: 12px;
    margin-top: 8px;
    gap: 12px;
}

.file-icon {
    font-size: 24px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 14px;
    color: #dcddde;
    font-weight: 500;
}

.file-size {
    font-size: 12px;
    color: #72767d;
    margin-top: 2px;
}

.file-download {
    background-color: #5865f2;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.file-download:hover {
    background-color: #4752c4;
}

/* Speaking Indicator */
.participant.speaking {
    border: 3px solid #3ba55d;
    box-shadow: 0 0 20px rgba(59, 165, 93, 0.5);
}

.participant.speaking .participant-name {
    background-color: rgba(59, 165, 93, 0.9);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-group {
    animation: fadeIn 0.2s ease;
}
