:root {
    --bg-base: #0a0a0c;
    --bg-panel: #141416;
    --bg-input: #0f0f11;
    --border-color: #2d2d30;
    --accent-color: #7b2cbf;
    --text-main: #e0e0e0;
    --text-secondary: #8b8b93;
    --text-muted: #5a5a62;
    --msg-bg-in: #1f1f23;
    --msg-bg-out: #7b2cbf;
    --online: #4caf50;
}
[data-theme="light"] {
    --bg-base: #f5f5f5;
    --bg-panel: #ffffff;
    --bg-input: #f0f0f0;
    --border-color: #e0e0e0;
    --accent-color: #7b2cbf;
    --text-main: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --msg-bg-in: #e8e8e8;
    --msg-bg-out: #7b2cbf;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-base); color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    height: 100vh; display: flex; flex-direction: column; overflow: hidden;
}

/* HEADER */
.header {
    padding: 12px 16px; background-color: var(--bg-base);
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
    min-height: 52px; z-index: 50;
}
.logo-container { display: flex; align-items: center; }
.logo-icon {
    width: 28px; height: 28px; margin-right: 8px;
    background: var(--accent-color); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: white; font-size: 14px;
    overflow: hidden; flex-shrink: 0;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.logo-text {
    font-size: 22px; font-weight: 700; font-style: italic;
    color: var(--text-main);
}
.search-toggle-btn {
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; padding: 6px; border-radius: 50%;
}
.search-toggle-btn svg { width: 22px; height: 22px; }

/* SEARCH MODAL */
.search-bar-container {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-base); padding: 12px 16px;
    z-index: 250; display: none; flex-direction: column;
}
.search-bar-container.active { display: flex; }
.search-bar-top { display: flex; align-items: center; gap: 8px; padding-top: 10px; }
.search-input-wrapper { position: relative; flex-grow: 1; }
.search-input {
    width: 100%; background-color: var(--bg-input);
    border: 1px solid var(--border-color); color: var(--text-main);
    padding: 10px 15px 10px 36px; border-radius: 8px;
    font-size: 14px; outline: none;
}
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); width: 16px; height: 16px; }
.close-search-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; }

/* CONTENT */
.content-area { flex: 1; overflow-y: auto; position: relative; max-width: 900px; margin: 0 auto; width: 100%; }
.tab-content { display: none; padding-bottom: 70px; animation: fadeIn 0.15s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* CHAT LIST */
.chat-item {
    display: flex; align-items: center; padding: 10px 16px;
    border-bottom: 1px solid var(--border-color); cursor: pointer;
}
.chat-item:hover { background-color: rgba(128,128,128,0.05); }
/* AVATAR BASE */
/* AVATARS — simple and clean */
.avatar,
.profile-avatar,
.msg-avatar,
.comment-avatar,
.member-avatar,
.chat-info-avatar,
.search-result-item .avatar,
.user-search-result .mini-avatar {
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    position: relative;
}
.avatar img,
.profile-avatar img,
.msg-avatar img,
.comment-avatar img,
.member-avatar img,
.chat-info-avatar img,
.search-result-item .avatar img,
.user-search-result .mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.avatar { width: 44px; height: 44px; margin-right: 12px; font-size: 16px; }
.avatar .status-dot {
    position: absolute; bottom: 1px; right: 1px;
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--bg-base);
    z-index: 2; background: var(--online);
}
.profile-avatar { width: 72px; height: 72px; margin: 0 auto 12px; font-size: 28px; }
.msg-avatar { width: 28px; height: 28px; font-size: 11px; }
.comment-avatar { width: 24px; height: 24px; font-size: 10px; }
.member-avatar { width: 32px; height: 32px; font-size: 12px; }
.chat-info-avatar { width: 72px; height: 72px; margin: 0 auto 12px; font-size: 28px; }
.user-search-result .mini-avatar { width: 32px; height: 32px; font-size: 13px; margin-right: 0; }
.chat-info { flex: 1; min-width: 0; }
.chat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.chat-name { font-weight: 600; font-size: 14px; }
.chat-type-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; margin-left: 6px; letter-spacing: 0.5px; }
.chat-time { font-size: 11px; color: var(--text-muted); }
.chat-preview { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ACTIVE CHAT */
.active-chat-view {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-base); z-index: 200;
    display: none; flex-direction: column;
    transform: translateY(100%); transition: transform 0.25s ease;
}
.active-chat-view.open { display: flex; transform: translateY(0); }
.chat-header-bar {
    padding: 10px 16px; background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 12px;
}
.back-btn {
    background: none; border: 1px solid var(--border-color); color: var(--text-main);
    cursor: pointer; padding: 6px 10px; border-radius: 6px; display: flex; align-items: center;
}
.back-btn svg { width: 18px; height: 18px; }
.chat-header-info { flex: 1; }
.chat-header-info h3 { font-size: 15px; font-weight: 600; cursor: pointer; }
.chat-header-info h3:hover { opacity: 0.8; }
.chat-header-info span { font-size: 11px; color: var(--text-secondary); }
.status-online { color: var(--online); }

/* MESSAGES */
.messages-container { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.message-wrapper { display: flex; align-items: flex-end; gap: 8px; max-width: 85%; }
.message-wrapper.outgoing { align-self: flex-end; flex-direction: row-reverse; }
.message-wrapper.incoming { align-self: flex-start; }
.msg-bubble {
    padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4;
    position: relative; min-width: 60px;
}
.message-wrapper.incoming .msg-bubble {
    background-color: var(--msg-bg-in); border-bottom-left-radius: 4px;
}
.message-wrapper.outgoing .msg-bubble {
    background-color: var(--msg-bg-out); color: white; border-bottom-right-radius: 4px;
}
.message-wrapper.channel .msg-bubble {
    background-color: var(--msg-bg-in); border-bottom-left-radius: 4px;
}
.msg-sender { font-size: 11px; font-weight: 600; margin-bottom: 2px; cursor: pointer; }
.msg-sender:hover { text-decoration: underline; }
.msg-content { word-wrap: break-word; }
.msg-content .emoji-only { font-size: 32px; line-height: 1.2; }
.msg-image { max-width: 100%; border-radius: 8px; margin-bottom: 4px; max-height: 300px; }
.msg-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 3px; }
.msg-time { font-size: 10px; opacity: 0.6; }
.msg-checks svg { width: 14px; height: 14px; opacity: 0.5; }
.msg-checks.read svg { opacity: 1; }

/* INPUT AREA */
.chat-input-area {
    padding: 8px 16px; background-color: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 6px;
}
.chat-input {
    flex: 1; background-color: var(--bg-input);
    border: 1px solid var(--border-color); color: var(--text-main);
    padding: 8px 14px; border-radius: 18px; outline: none; font-size: 14px;
}
.emoji-btn, .attach-btn, .send-btn {
    background: none; border: none; color: var(--text-secondary);
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.send-btn { background: var(--accent-color); color: white; }
.emoji-btn:hover, .attach-btn:hover { background-color: rgba(128,128,128,0.1); }

/* EMOJI PICKER */
.emoji-picker {
    position: fixed; bottom: 60px; left: 16px;
    background: var(--bg-panel); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 10px; z-index: 215;
    display: none; width: 280px; max-height: 300px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    overflow: hidden;
}
.emoji-picker.open { display: flex; flex-direction: column; animation: toastDrop 0.25s ease; }
.emoji-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; overflow-y: auto; max-height: 260px; }
.emoji-item { font-size: 22px; cursor: pointer; padding: 6px; text-align: center; border-radius: 6px; line-height: 1; }
.emoji-item:hover { background: rgba(128,128,128,0.15); }

/* CHANNEL */
.channel-action-area { padding: 12px 16px; background: var(--bg-panel); border-top: 1px solid var(--border-color); display: none; justify-content: center; }
.join-btn { width: 100%; padding: 10px; background: var(--bg-input); border: 1px solid var(--accent-color); color: var(--accent-color); border-radius: 6px; font-weight: 600; cursor: pointer; }

/* FAB */
.fab-btn {
    position: fixed; bottom: 76px; left: 16px;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--accent-color); border: none; color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 40;
}
.fab-btn:hover { transform: scale(1.05); }

/* FILES */
.file-search-container.visible { display: block; }
.file-list-item {
    background: var(--bg-panel); border: 1px solid var(--border-color);
    margin: 12px 16px; border-radius: 10px; padding: 12px;
    display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
}
.file-list-item:hover { border-color: var(--text-secondary); }
.file-thumb { width: 44px; height: 44px; background: var(--bg-input); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-details { flex: 1; }
.file-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.file-meta { font-size: 11px; color: var(--text-muted); }
.file-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.file-actions-bar { display: flex; gap: 8px; margin-top: 6px; }
.file-actions-bar button { font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-input); color: var(--text-main); cursor: pointer; }
.file-actions-bar .like-btn.active { color: var(--accent-color); border-color: var(--accent-color); }
.file-delete-btn { color: #ff4d4d; border-color: #ff4d4d; }

/* PROFILE */
.profile-header { padding: 24px 16px; text-align: center; position: relative; }
.profile-menu-btn {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; padding: 6px; border-radius: 6px; font-size: 18px;
}
.profile-menu-btn:hover { background: rgba(128,128,128,0.1); }
.profile-dropdown {
    position: absolute; top: 40px; right: 16px;
    background: var(--bg-panel); border: 1px solid var(--border-color);
    border-radius: 8px; z-index: 100; display: none; min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.profile-dropdown.open { display: block; }
.profile-dropdown-item {
    padding: 10px 16px; cursor: pointer; font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}
.profile-dropdown-item:last-child { border: none; }
.profile-dropdown-item:hover { background: rgba(128,128,128,0.05); }
.profile-handle { color: var(--text-secondary); font-size: 13px; margin-bottom: 4px; }
.profile-status { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.profile-status.online { color: var(--online); }
.stats-row { display: flex; justify-content: center; gap: 24px; margin-top: 16px; }
.stat-item { text-align: center; }
.stat-value { font-weight: 700; font-size: 16px; }
.stat-label { font-size: 11px; color: var(--text-muted); }
.about-section {
    background: var(--bg-panel); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 12px; margin: 0 16px 16px;
}
.section-title-small { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.about-text { font-size: 13px; color: var(--text-main); line-height: 1.4; }
.profile-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 12px; }
.profile-tab-btn {
    flex: 1; padding: 10px; background: none; border: none;
    color: var(--text-secondary); font-size: 13px; font-weight: 600;
    cursor: pointer; border-bottom: 2px solid transparent;
}
.profile-tab-btn.active { color: var(--accent-color); border-bottom-color: var(--accent-color); }
.sent-files-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 8px; }
.sent-file-item {
    flex: 0 0 90px; height: 90px; background: var(--bg-panel);
    border: 1px solid var(--border-color); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 11px; cursor: pointer;
}

/* SETTINGS */
.settings-list { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.settings-item {
    background: var(--bg-panel); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 12px; display: flex; justify-content: space-between;
    align-items: center; cursor: pointer;
}
.settings-item-content { display: flex; align-items: center; gap: 12px; }
.settings-icon { width: 20px; height: 20px; color: var(--text-secondary); }
.settings-text { font-size: 14px; font-weight: 500; }
.settings-right { display: flex; align-items: center; gap: 8px; }
.vcoin-badge { font-size: 13px; font-weight: 700; color: var(--accent-color); }

/* MODALS */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #000; z-index: 300; display: none;
    align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-card {
    background: var(--bg-panel); width: 92%; max-width: 380px;
    border-radius: 14px; padding: 18px; border: 1px solid var(--border-color);
    max-height: 90vh; overflow-y: auto;
}
.modal-card.large { max-width: 460px; }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; text-align: center; }
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.form-input {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border-color);
    color: var(--text-main); padding: 9px; border-radius: 7px; outline: none; font-size: 13px;
}
.form-input:focus { border-color: var(--accent-color); }
.btn-primary {
    width: 100%; padding: 10px; background: var(--accent-color);
    color: white; border: none; border-radius: 7px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
    width: 100%; padding: 10px; background: transparent;
    color: var(--text-secondary); border: 1px solid var(--border-color);
    border-radius: 7px; margin-top: 8px; cursor: pointer;
}

/* BOTTOM NAV */
.bottom-nav {
    background: var(--bg-panel); border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-around; padding: 8px 0;
    position: fixed; bottom: 0; width: 100%; z-index: 50;
}
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-secondary); text-decoration: none; font-size: 10px; }
.nav-item.active { color: var(--accent-color); }
.nav-item svg { width: 22px; height: 22px; margin-bottom: 2px; }

/* CHAT INFO PANEL */
.chat-info-overlay {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 100%; max-width: 360px; background: var(--bg-base);
    z-index: 260; transform: translateX(100%); transition: transform 0.25s ease;
    border-left: 1px solid var(--border-color); display: flex; flex-direction: column;
}
.chat-info-overlay.open { transform: translateX(0); }
.chat-info-header { padding: 12px 16px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.chat-info-body { flex: 1; overflow-y: auto; padding: 16px; }
}
.chat-info-name { text-align: center; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.chat-info-type { text-align: center; color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }
.chat-info-desc { background: var(--bg-panel); padding: 10px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.member-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-color); cursor: pointer; }
.member-info { flex: 1; }
.member-name { font-size: 13px; font-weight: 500; }
.member-status { font-size: 11px; color: var(--text-muted); }
.member-status.online { color: var(--online); }
.chat-info-settings-btn { padding: 10px; background: var(--accent-color); color: white; border: none; border-radius: 7px; cursor: pointer; font-weight: 600; margin-top: 12px; width: 100%; }
.chat-info-delete-btn { padding: 10px; background: transparent; color: #ff4d4d; border: 1px solid #ff4d4d; border-radius: 7px; cursor: pointer; font-weight: 600; margin-top: 8px; width: 100%; }

/* SEARCH RESULTS */
.search-results { flex: 1; overflow-y: auto; margin-top: 12px; }
.search-result-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-color); cursor: pointer; }
.search-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; padding: 8px 0 4px; border-bottom: 1px solid var(--border-color); }

/* FILE MODAL */
.file-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-base); z-index: 200; display: none;
    flex-direction: column; transform: translateY(100%); transition: transform 0.25s ease;
}
.file-modal.open { display: flex; transform: translateY(0); }
.modal-header { padding: 12px 16px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 12px; }
.back-btn-modal { background: none; border: none; color: var(--text-main); cursor: pointer; }
.modal-body { flex: 1; overflow-y: auto; padding: 16px; }
.detail-file-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.detail-file-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.detail-desc { background: var(--bg-panel); padding: 12px; border-radius: 8px; font-size: 13px; line-height: 1.4; margin-bottom: 12px; white-space: pre-wrap; }
.file-actions-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.download-btn { flex: 1; padding: 10px; background: var(--accent-color); color: white; border: none; border-radius: 7px; font-weight: 600; cursor: pointer; }
.like-btn { padding: 10px 16px; background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-main); border-radius: 7px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.like-btn.liked { color: var(--accent-color); border-color: var(--accent-color); }
.like-btn svg { width: 16px; height: 16px; }
.comments-section h3 { font-size: 15px; margin-bottom: 12px; }
.comment { background: var(--bg-panel); padding: 10px; border-radius: 8px; margin-bottom: 8px; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
}
.comment-author { font-weight: 600; font-size: 12px; cursor: pointer; }
.comment-author:hover { text-decoration: underline; }
.comment-time { font-size: 10px; color: var(--text-muted); margin-left: auto; }
.comment-body { font-size: 13px; line-height: 1.4; }
.comment-reply-to { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; padding: 4px 8px; background: var(--bg-input); border-radius: 4px; cursor: pointer; }
.comment-reply-to:hover { text-decoration: underline; }
.comment-actions { display: flex; gap: 8px; margin-top: 4px; }
.comment-actions button { font-size: 11px; background: none; border: none; color: var(--text-muted); cursor: pointer; }
.comment-actions button:hover { color: var(--text-main); }
.comment-actions .delete-comment { color: #ff4d4d; }
.comment-input-area { display: flex; gap: 6px; margin-top: 8px; }
.comment-input-area input { flex: 1; }
.comment-input-area button { padding: 8px 14px; background: var(--accent-color); color: white; border: none; border-radius: 7px; cursor: pointer; }

/* BLOCKED */
.blocked-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.blocked-user-info { display: flex; align-items: center; gap: 8px; }
.unblock-btn { background: none; border: 1px solid #ff4d4d; color: #ff4d4d; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 11px; }

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    display: flex; flex-direction: column; align-items: center;
    pointer-events: none; padding-top: 20px;
}
.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    min-width: 280px;
    max-width: 400px;
    text-align: center;
    animation: toastDrop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    margin-bottom: 8px;
}
.toast.error { border-top: 3px solid #ff4d4d; }
.toast.success { border-top: 3px solid #4caf50; }
.toast.info { border-top: 3px solid var(--accent-color); }
@keyframes toastDrop {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast.removing {
    animation: toastFadeOut 0.25s ease forwards;
}
@keyframes toastFadeOut {
    to { opacity: 0; transform: translateY(-10px); max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* TAB TRANSITIONS */
.tab-content {
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.tab-content.active {
    opacity: 1;
    transform: translateY(0);
}
.tab-content:not(.active) {
    transform: translateY(8px);
    opacity: 0;
    pointer-events: none;
}

/* SETTINGS VISUAL */
.settings-section-title {
    font-size: 11px; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 1px; padding: 16px 16px 6px; font-weight: 600;
}
.settings-card {
    background: var(--bg-panel); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 14px 16px; margin: 0 16px 8px;
}
.settings-card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.settings-card-desc { font-size: 12px; color: var(--text-muted); }

/* SEARCH CLOSE VISUAL */
.search-close-wrapper {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-input); border: 1px solid var(--border-color);
    cursor: pointer;
}
.search-close-wrapper:hover { background: var(--border-color); }

/* ANIMATIONS */
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes scaleIn { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }
@keyframes slideRight { from { transform:translateX(100%); } to { transform:translateX(0); } }

.chat-item { animation: slideUp 0.2s ease backwards; }
.chat-item:nth-child(1) { animation-delay: 0.02s; }
.chat-item:nth-child(2) { animation-delay: 0.04s; }
.chat-item:nth-child(3) { animation-delay: 0.06s; }
.chat-item:nth-child(4) { animation-delay: 0.08s; }
.chat-item:nth-child(5) { animation-delay: 0.1s; }
.chat-item:nth-child(n+6) { animation-delay: 0.12s; }

.message-wrapper { animation: slideUp 0.15s ease backwards; }
.file-list-item { animation: fadeUp 0.2s ease backwards; }
.settings-item { animation: fadeUp 0.25s ease backwards; }
.settings-item:nth-child(1) { animation-delay: 0.03s; }
.settings-item:nth-child(2) { animation-delay: 0.06s; }
.settings-item:nth-child(3) { animation-delay: 0.09s; }
.settings-item:nth-child(4) { animation-delay: 0.12s; }
.settings-item:nth-child(5) { animation-delay: 0.15s; }

.modal-card { animation: scaleIn 0.2s ease; }
.file-modal.open { animation: slideRight 0.25s ease; }
.chat-info-overlay.open { animation: slideRight 0.25s ease; }

.fab-btn { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.fab-btn:hover { transform: scale(1.1); }

.nav-item { transition: color 0.2s ease; }
.chat-header-info h3 { transition: opacity 0.15s ease; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

/* Firefox scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border-color) var(--bg-base); }

/* NOTIFICATION BELL */
.notif-bell {
    position: relative; cursor: pointer; padding: 6px; border-radius: 50%;
    color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
}
.notif-bell:hover { background: rgba(128,128,128,0.1); color: var(--text-main); }
.notif-badge {
    position: absolute; top: 2px; right: 2px; background: #ff4d4d; color: white;
    font-size: 9px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.notif-badge.hidden { display: none; }

/* NOTIFICATION PANEL */
.notif-panel {
    position: fixed; top: 54px; right: 0; width: min(380px, 100vw);
    max-height: calc(100vh - 120px); background: var(--bg-panel);
    border: 1px solid var(--border-color); border-radius: 0 0 0 12px;
    z-index: 100; display: none; flex-direction: column;
    box-shadow: -4px 4px 20px rgba(0,0,0,0.3);
    animation: slideInRight 0.2s ease;
}
.notif-panel.open { display: flex; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.notif-panel-header {
    padding: 12px 16px; border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between; font-size: 14px;
}
.notif-list { overflow-y: auto; max-height: calc(100vh - 170px); }
.notif-item {
    padding: 12px 16px; border-bottom: 1px solid var(--border-color);
    cursor: pointer; transition: background 0.15s;
}
.notif-item:hover { background: rgba(128,128,128,0.05); }
.notif-item.unread { background: rgba(123,44,191,0.05); }
.notif-icon { font-size: 20px; margin-right: 10px; flex-shrink: 0; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.notif-body { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.notif-empty { text-align: center; color: var(--text-muted); padding: 40px 16px; font-size: 14px; }

/* PHOTO EDITOR */
.photo-editor {
    position:fixed;top:0;left:0;right:0;bottom:0;background:var(--bg-base);
    z-index:300;display:none;flex-direction:column;
}
.photo-editor.active { display:flex; }
.photo-editor-header {
    padding:12px 16px;border-bottom:1px solid var(--border-color);
    display:flex;align-items:center;justify-content:space-between;
    background:var(--bg-panel);
}
.photo-editor-canvas {
    flex:1;display:flex;align-items:center;justify-content:center;
    overflow:hidden;background:#000;position:relative;
}
.photo-editor-canvas canvas {
    max-width:100%;max-height:100%;cursor:crosshair;
}
.photo-editor-tools {
    padding:10px 16px;background:var(--bg-panel);border-top:1px solid var(--border-color);
    display:flex;align-items:center;gap:8px;
}
.photo-tool-btn {
    width:36px;height:36px;border-radius:8px;border:1px solid var(--border-color);
    background:var(--bg-input);color:var(--text-main);cursor:pointer;
    display:flex;align-items:center;justify-content:center;
}
.photo-tool-btn:hover { border-color:var(--accent-color); }
.photo-tool-btn.active { border-color:var(--accent-color); background:rgba(123,44,191,0.2); color:var(--accent-color); }


/* CUSTOM PHOTO VIEWER */
.photo-viewer {
    position:fixed;top:0;left:0;right:0;bottom:0;
    background:rgba(0,0,0,0.97);z-index:9999;
    display:none;flex-direction:column;align-items:center;justify-content:center;
    animation:fadeIn 0.2s ease;
}
.photo-viewer.active { display:flex; }
.photo-viewer-header { position:absolute;top:12px;right:12px;z-index:10010; }
.photo-viewer-container { display:flex;align-items:center;justify-content:center;flex:1;width:100%;cursor:zoom-in; }
.photo-viewer-actions {
    position:absolute;bottom:24px;left:50%;transform:translateX(-50%);
    display:flex;gap:12px;
}

/* CUSTOM VIDEO VIEWER */
.video-viewer {
    position:fixed;top:0;left:0;right:0;bottom:0;
    background:rgba(0,0,0,0.97);z-index:9999;
    display:none;flex-direction:column;align-items:center;justify-content:center;
    animation:fadeIn 0.2s ease;
}
.video-viewer.active { display:flex; }
.video-viewer-header { position:absolute;top:12px;right:12px;z-index:10010; }
.video-viewer-container { display:flex;align-items:center;justify-content:center;flex:1;width:100%; }

/* Chat edit mode */
.chat-edit-cb { accent-color: var(--accent-color); }


/* NOTIFICATION VIEWER */
.notif-viewer {
    position:fixed;top:0;left:0;right:0;bottom:0;
    background:var(--bg-base);z-index:10000;
    display:none;flex-direction:column;
    animation:slideUp 0.25s ease;
}
.notif-viewer-header {
    padding:12px 16px;border-bottom:1px solid var(--border-color);
    background:var(--bg-panel);display:flex;align-items:center;gap:12px;
}
.notif-viewer-body { flex:1;overflow-y:auto;padding:20px;max-width:600px;margin:0 auto;width:100%; }
.notif-rich-content { font-size:14px;line-height:1.7; }
.notif-rich-content strong { font-weight:700;color:var(--text-main); }
.notif-rich-content em { font-style:italic;color:var(--text-secondary); }
.notif-rich-content mark { background:rgba(123,44,191,0.15);padding:2px 6px;border-radius:4px; }
.notif-rich-content a { color:var(--accent-color);text-decoration:underline; }
