:root {
    --header-primary: #f2f3f5;
    --header-secondary: #b9bbbe;
    --text-normal: #dcddde;
    --text-muted: #72767d;
    --background-primary: #36393f;
    --background-secondary: #2f3136;
    --background-secondary-alt: #292b2f;
    --background-tertiary: #202225;
    --background-accent: #4f545c;
    --background-floating: #18191c;
    --brand-experiment: #5865f2;
    --brand-experiment-hover: #4752c4;
    --interactive-normal: #b9bbbe;
    --interactive-hover: #dcddde;
    --interactive-active: #fff;
    --interactive-muted: #4f545c;
    --green-360: #3ba55c;
    --red-400: #ed4245;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    user-select: none;
}

body {
    background-color: var(--background-primary);
    color: var(--text-normal);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Lock Screen */
#lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lock-container {
    background-color: var(--background-primary);
    padding: 40px;
    border-radius: 5px;
    text-align: center;
    width: 480px;
    box-shadow: 0 2px 10px 0 rgba(0,0,0,0.2);
}

.lock-icon {
    font-size: 50px;
    color: var(--brand-experiment);
    margin-bottom: 20px;
}

.lock-container h2 {
    color: var(--header-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.lock-container p {
    color: var(--header-secondary);
    margin-bottom: 20px;
}

.lock-container input {
    width: 100%;
    padding: 10px;
    background-color: var(--background-tertiary);
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 3px;
    color: var(--text-normal);
    font-size: 16px;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.2s;
}

.lock-container input:focus {
    border-color: var(--brand-experiment);
}

.lock-container button {
    width: 100%;
    padding: 10px;
    background-color: var(--brand-experiment);
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lock-container button:hover {
    background-color: var(--brand-experiment-hover);
}

#error-msg {
    color: #ed4245;
    display: none;
    margin-top: 10px;
    font-size: 12px;
}

/* App Content */
#app-content {
    display: flex; /* Always flex, managed by script.js/index.html */
    width: 100%;
    height: 100%;
}

/* Servers Sidebar */
.servers-sidebar {
    width: 72px;
    background-color: var(--background-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    overflow-y: auto;
}

.servers-sidebar::-webkit-scrollbar {
    display: none;
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--background-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-normal);
    position: relative;
}

.server-icon:hover, .server-icon.active {
    border-radius: 16px;
    background-color: var(--brand-experiment);
    color: white;
}

.notification-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: var(--red-400);
    color: white;
    font-size: 10px;
    font-weight: bold;
    height: 16px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--background-tertiary);
}

.server-icon.home-icon {
    background-color: var(--background-primary);
    color: var(--text-normal);
}

.server-icon.home-icon:hover, .server-icon.home-icon.active {
    background-color: var(--brand-experiment);
    color: white;
}

.server-icon.add-server, .server-icon.explore {
    background-color: var(--background-primary);
    color: #3ba55c;
}

.server-icon.add-server:hover, .server-icon.explore:hover {
    background-color: #3ba55c;
    color: white;
}

.separator {
    width: 32px;
    height: 2px;
    background-color: var(--background-secondary);
    margin-bottom: 8px;
}

/* Channels Sidebar */
.channels-sidebar {
    width: 240px;
    background-color: var(--background-secondary);
    display: flex;
    flex-direction: column;
}

.server-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(4,4,5,0.2), 0 1.5px 0 rgba(6,6,7,0.05), 0 2px 0 rgba(4,4,5,0.05);
    cursor: pointer;
    color: var(--header-primary);
    font-weight: 600;
}

.server-header:hover {
    background-color: rgba(79, 84, 92, 0.16);
}

.channels-list {
    flex: 1;
    padding: 16px 8px;
    overflow-y: auto;
}

.category {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    padding-left: 8px;
    cursor: pointer;
}

.category:hover {
    color: var(--text-normal);
}

.category i {
    font-size: 10px;
    margin-right: 2px;
}

.channel {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
    color: var(--text-muted);
    cursor: pointer;
}

.channel:hover {
    background-color: rgba(79, 84, 92, 0.16);
    color: var(--text-normal);
}

.channel.active {
    background-color: rgba(79, 84, 92, 0.32);
    color: white;
}

.channel i {
    margin-right: 6px;
    font-size: 20px;
    color: #72767d;
}

.channel.active i {
    color: white;
}

.channel span {
    font-weight: 500;
}

.notification-badge-small {
    background-color: var(--red-400);
    color: white;
    font-size: 10px;
    font-weight: bold;
    height: 16px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.notification-badge-inline {
    background-color: var(--red-400);
    color: white;
    font-size: 10px;
    font-weight: bold;
    height: 16px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
}

.user-area {
    height: 52px;
    background-color: var(--background-secondary-alt);
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.user-avatar {
    position: relative;
    margin-right: 8px;
    cursor: pointer;
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--brand-experiment);
    background-size: cover;
    background-position: center;
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--green-360);
    border: 3px solid var(--background-secondary-alt);
}
.status-indicator.online { background-color: var(--green-360); }
.status-indicator.dnd { background-color: var(--red-400); }
.status-indicator.idle { background-color: #faa61a; }
.status-indicator.offline { background-color: #747f8d; }

.user-info {
    flex: 1;
    cursor: pointer;
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: var(--header-primary);
}

.discriminator {
    font-size: 12px;
    color: var(--text-muted);
}

.user-controls {
    display: flex;
}

.user-controls i {
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-normal);
    position: relative; /* For slash overlay */
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-controls i:hover {
    background-color: rgba(79, 84, 92, 0.32);
}

/* Main Chat */
.main-chat {
    flex: 1;
    background-color: var(--background-primary);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 rgba(4,4,5,0.2), 0 1.5px 0 rgba(6,6,7,0.05), 0 2px 0 rgba(4,4,5,0.05);
    flex-shrink: 0; /* Prevent header shrinking */
}

.header-hashtag, .header-icon {
    color: var(--text-muted);
    font-size: 24px;
    margin-right: 8px;
    flex-shrink: 0;
}

.header-title {
    color: var(--header-primary);
    font-weight: 700;
    margin-right: 16px; /* More space */
    flex-shrink: 0;
}

.friends-toolbar {
    display: flex;
    align-items: center;
    margin-left: 0; /* Changed from 16px to 0 as we use margin on title */
    flex: 1; /* Take available space */
    overflow-x: auto; /* Scroll if too small */
    scrollbar-width: none;
}
.friends-toolbar::-webkit-scrollbar { display: none; }

.header-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--background-accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-toolbar {
    margin-left: auto;
    display: flex;
    align-items: center;
    color: var(--interactive-normal);
    flex-shrink: 0;
}

.header-toolbar i {
    margin: 0 8px;
    cursor: pointer;
    font-size: 20px;
}

.header-toolbar i:hover {
    color: var(--interactive-hover);
}

.search-bar {
    background-color: var(--background-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    margin: 0 8px;
    height: 24px;
    width: 144px;
    transition: width 0.2s;
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-normal);
    width: 100%;
    outline: none;
    font-size: 14px;
}

.search-bar i {
    font-size: 14px;
    margin: 0;
}

/* Chat Content Wrapper (Chat + Members) */
.chat-content-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
    background-color: var(--background-secondary);
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--background-tertiary);
    border-radius: 4px;
}

.message-group {
    display: flex;
    margin-bottom: 16px;
}

.message-group:hover {
    background-color: rgba(4, 4, 5, 0.07);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
    cursor: pointer;
    margin-top: 2px;
}

.message-avatar:hover {
    opacity: 0.8;
}

.message-header {
    margin-bottom: 4px;
}

.message-username {
    font-weight: 500;
    color: var(--header-primary);
    cursor: pointer;
}

.message-username:hover {
    text-decoration: underline;
}

.message-timestamp {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.message-text {
    color: var(--text-normal);
    font-size: 16px;
    line-height: 1.375rem;
}

.chat-input-area {
    padding: 0 16px 24px;
}

.chat-input-wrapper {
    background-color: var(--background-secondary-alt);
    border-radius: 8px;
    padding: 11px;
    display: flex;
    align-items: center;
}

.input-icons-left {
    color: var(--interactive-normal);
    margin-right: 16px;
    cursor: pointer;
    font-size: 20px;
}

.chat-input-wrapper input {
    background: none;
    border: none;
    color: var(--text-normal);
    flex: 1;
    outline: none;
    font-size: 16px;
}

.input-icons-right {
    display: flex;
    align-items: center;
    color: var(--interactive-normal);
}

.input-icons-right i {
    margin-left: 12px;
    cursor: pointer;
    font-size: 20px;
}

.input-icons-right i:hover {
    color: var(--interactive-hover);
}

/* Members Sidebar */
.members-sidebar {
    width: 240px;
    background-color: var(--background-secondary);
    padding: 24px 8px 0;
    overflow-y: auto;
}

.members-category {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    padding: 0 8px;
}

.member {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 2px;
}

.member:hover {
    background-color: rgba(79, 84, 92, 0.16);
}

.member-avatar {
    position: relative;
    margin-right: 12px;
}

.member-avatar .avatar-img {
    width: 32px;
    height: 32px;
}

.member-avatar .status-indicator {
    right: -2px;
    bottom: -2px;
}

.member-info {
    overflow: hidden;
}

.member-name {
    font-weight: 500;
    color: var(--header-primary);
}

.member-status {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Friends View specific */
.search-bar-container {
    padding: 10px;
    box-shadow: 0 1px 0 rgba(4,4,5,0.2);
}

.search-btn {
    width: 100%;
    background-color: var(--background-tertiary);
    color: var(--text-muted);
    border: none;
    padding: 6px;
    border-radius: 4px;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
}

.friends-toolbar {
    /* Removed redundant definition */
}

.friend-tab {
    color: var(--text-muted);
    padding: 2px 8px;
    margin: 0 8px;
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
}

.friend-tab:hover {
    background-color: rgba(79, 84, 92, 0.16);
    color: var(--text-normal);
}

.friend-tab.active {
    color: var(--header-primary);
    background-color: rgba(79, 84, 92, 0.32);
}

.friend-tab.add-friend {
    background-color: var(--green-360);
    color: white;
}

.friend-tab.add-friend:hover {
    background-color: #3ba55c;
    opacity: 0.8;
}

.friends-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-img {
    width: 250px;
    height: 200px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%2336393f" width="100" height="100"/></svg>'); /* Placeholder */
    margin-bottom: 20px;
}

.friends-list {
    flex: 1;
}

.friends-category {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--background-accent);
    margin-bottom: 8px;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid var(--background-accent);
    cursor: pointer;
}

.friend-item:hover {
    background-color: rgba(79, 84, 92, 0.16);
    border-radius: 8px;
    border-top: 1px solid transparent;
}

.friend-avatar {
    position: relative;
    margin-right: 12px;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    color: var(--header-primary);
}

.friend-status {
    font-size: 12px;
    color: var(--text-muted);
}

.friend-actions {
    display: flex;
}

/* Action Buttons */
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
    color: var(--interactive-normal);
}

.action-btn:hover {
    color: var(--interactive-hover);
    background-color: var(--background-tertiary);
}

.accept-btn:hover {
    color: var(--green-360);
}

.decline-btn:hover {
    color: var(--red-400);
}

/* Chat UI */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    background-color: var(--background-primary);
}

.chat-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--background-tertiary);
    background-color: var(--background-primary);
    box-shadow: 0 1px 0 rgba(4,4,5,0.2),0 1.5px 0 rgba(6,6,7,0.05),0 2px 0 rgba(4,4,5,0.05);
}

.chat-title {
    color: var(--header-primary);
    font-weight: 600;
    margin-left: 8px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.message {
    display: flex;
    margin-bottom: 16px;
    padding: 2px 0;
}

.message:hover {
    background-color: rgba(4,4,5,0.07);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
    cursor: pointer;
}

.message-content {
    flex: 1;
}

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

.message-username {
    color: var(--header-primary);
    font-weight: 500;
    margin-right: 8px;
    cursor: pointer;
}

.message-timestamp {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.message-text {
    color: var(--text-normal);
    font-size: 1rem;
    line-height: 1.375rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-input-area {
    padding: 0 16px 24px;
    background-color: var(--background-primary);
}

.chat-input-wrapper {
    background-color: var(--channeltextarea-background, #40444b);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
}

.chat-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-normal);
    font-size: 1rem;
    margin: 0 10px;
    outline: none;
}

.chat-input-wrapper i {
    color: var(--interactive-normal);
    cursor: pointer;
    font-size: 1.2rem;
    margin: 0 4px;
}

.chat-input-wrapper i:hover {
    color: var(--interactive-hover);
}

/* Call UI */
#call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: none; /* Flex when active */
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.call-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.video-area {
    flex: 1;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
}

/* Improved Active Call UI */
.call-background-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.4);
    z-index: 0;
}

.call-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.call-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2f3136;
    padding: 16px 32px;
    border-radius: 24px;
    display: flex;
    gap: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 20;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--background-primary);
    color: var(--interactive-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background-color: var(--background-tertiary);
    color: var(--interactive-hover);
}

.decline-btn {
    background-color: var(--red-400);
    color: white;
}

.decline-btn:hover {
    background-color: #c03537;
    color: white;
}

/* Call UI Improvements */
.call-avatar-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 10;
}

.call-avatar-container.connected .pulse-ring {
    animation: none;
    opacity: 0;
}

.call-avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 4px solid var(--background-secondary);
    z-index: 2;
    background-color: var(--background-secondary);
    position: relative;
    object-fit: cover;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background-color: var(--brand-experiment);
    opacity: 0.5;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: 1;
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

.call-status-text {
    margin-top: 24px;
    color: white;
    font-weight: 600;
    font-size: 18px;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    background-color: rgba(0,0,0,0.4);
    padding: 6px 16px;
    border-radius: 16px;
}

/* Incoming Call UI */
#incoming-call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2001; /* Above call overlay */
    backdrop-filter: blur(8px);
}

.incoming-call-card {
    background-color: var(--background-secondary);
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    overflow: hidden;
    padding-bottom: 40px;
    position: relative;
    border: 1px solid #202225;
}

.incoming-call-header {
    width: 100%;
    padding: 40px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 100%);
}

.incoming-call-title {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.incoming-call-username {
    color: var(--header-primary);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.incoming-controls {
    display: flex;
    gap: 60px;
    margin-top: 40px;
    position: static;
    transform: none;
    background: none;
    box-shadow: none;
    padding: 0;
}

.incoming-controls .control-btn {
    width: 72px;
    height: 72px;
    font-size: 28px;
    flex-direction: column;
    gap: 8px;
    background-color: var(--background-tertiary);
    position: relative;
    overflow: visible;
}

.incoming-controls .control-btn i {
    z-index: 2;
}

.incoming-controls .btn-label {
    position: absolute;
    bottom: -30px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-normal);
    white-space: nowrap;
}

.incoming-controls .accept-btn {
    background-color: var(--green-360);
    color: white;
}

.incoming-controls .accept-btn:hover {
    background-color: #3ba55c;
    transform: scale(1.1);
}

.incoming-controls .decline-btn {
    background-color: var(--red-400);
    color: white;
}

.incoming-controls .decline-btn:hover {
    background-color: #ed4245;
    transform: scale(1.1);
}

.incoming-call-card .call-avatar-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-bottom: 0;
}

.incoming-avatar {
    /* Legacy cleanup if needed, but we use .call-avatar-container now */
}

/* User Profile Modal Styles */
#user-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    /* display: flex; Managed by JS */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.user-profile-card {
    width: 600px;
    background-color: var(--background-floating);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.24);
    display: flex;
    flex-direction: column;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.profile-banner {
    height: 100px;
    width: 100%;
    background-color: var(--brand-experiment);
    background-size: cover;
    background-position: center;
}

.profile-header {
    position: relative;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -60px;
}

.profile-avatar {
    position: relative;
}

.avatar-img-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid var(--background-floating);
    background-color: var(--background-secondary);
    background-size: cover;
    background-position: center;
}

.status-indicator-large {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 4px solid var(--background-floating);
    background-color: #747f8d;
}

.status-indicator-large.online { background-color: var(--green-360); }
.status-indicator-large.idle { background-color: #faa61a; }
.status-indicator-large.dnd { background-color: var(--red-400); }

.profile-body {
    padding: 16px;
    background-color: var(--background-secondary);
    margin: 16px;
    border-radius: 8px;
    margin-top: 0;
}

.profile-username {
    font-size: 20px;
    font-weight: 600;
    color: var(--header-primary);
    margin-bottom: 4px;
}

.profile-discriminator {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 400;
}

.profile-divider {
    height: 1px;
    background-color: var(--background-modifier-accent);
    margin: 12px 0;
}

.profile-section {
    margin-bottom: 16px;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--header-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.section-content {
    font-size: 14px;
    color: var(--text-normal);
}

.profile-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.role-pill {
    display: flex;
    align-items: center;
    background-color: var(--background-secondary-alt);
    border: 1px solid var(--background-modifier-accent);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--header-primary);
    gap: 4px;
}
