/* CSS Variables */
:root {
    --accent: #5865f2;
    --accent-hover: color-mix(in srgb, var(--accent) 80%, black);
    --accent-text: #ffffff;
}

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

/* Auto text color on accent backgrounds */
.submit-btn, .action-btn, .channel-btn, .create-channel-btn,
.copy-btn, .generate-btn, .send-btn, .call-btn,
.strip-add-server, .strip-server-icon,
.channel-item.active a, .toast-success {
    color: var(--accent-text);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #0d0d0d;
    color: #e1e1e1;
    overflow: hidden;
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #111111;
    border: none;
    color: white;
    font-size: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .chat-header {
        padding: 15px 15px 15px 50px;
    }

    .voice-header {
        padding: 15px 15px 15px 50px;
    }

    .messages-container {
        padding: 10px;
    }

    .message-input-container {
        padding: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    .media-image {
        max-width: 100%;
    }

    .media-video {
        max-width: 100%;
    }

    .media-audio {
        width: 100%;
        max-width: 300px;
    }

    .invite-link-container {
        flex-direction: column;
    }

    .invite-link-container .copy-btn,
    .invite-link-container .generate-btn {
        width: 100%;
        text-align: center;
    }

    .danger-action-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .danger-action-item .btn-warning,
    .danger-action-item .btn-danger {
        width: 100%;
        text-align: center;
    }

    .member-item {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .member-actions {
        width: 100%;
    }

    .member-actions button {
        flex: 1;
    }

    .toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .toast {
        min-width: auto;
    }

    .welcome-container {
        padding-top: 50px;
    }

    .server-container {
        padding: 50px 15px 15px;
    }

    /* Prevent iOS Safari auto-zoom on input focus (requires font-size >= 16px) */
    .message-input,
    input[type="text"],
    input[type="search"],
    textarea {
        font-size: 16px !important;
    }
}

/* Left Panel (strip + sidebar + user bar) */
.left-panel {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}

.left-panel-top {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Server Icon Strip */
.server-strip {
    width: 64px;
    flex-shrink: 0;
    background-color: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    overflow: hidden;
    z-index: 101;
}

.strip-servers {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 0 8px;
    scrollbar-width: none;
}

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

.strip-home-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #1e1e1e;
    color: #a0a0a0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    transition: border-radius 0.2s, background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.strip-home-btn:hover {
    border-radius: 30%;
    background-color: var(--accent);
    color: var(--accent-text);
}

.strip-home-btn.active {
    border-radius: 30%;
    background-color: var(--accent);
    color: var(--accent-text);
}

.strip-divider {
    width: 32px;
    height: 2px;
    background-color: #1e1e1e;
    margin: 4px 0;
    flex-shrink: 0;
}

.strip-server-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #1e1e1e;
    color: #a0a0a0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.2s;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.strip-server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strip-server-icon span {
    color: #a0a0a0;
}

.strip-server-icon:hover {
    background-color: var(--accent);
}

.strip-server-icon:hover span {
    color: var(--accent-text);
}

.strip-server-icon.active {
    background-color: var(--accent);
}

.strip-server-icon.active span {
    color: var(--accent-text);
}

.strip-add-server {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #1e1e1e;
    color: #43b581;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: border-radius 0.2s, background-color 0.2s, color 0.2s;
    flex-shrink: 0;
    margin-top: 4px;
    text-decoration: none;
}

.strip-add-server:hover {
    border-radius: 30%;
    background-color: #43b581;
    color: white;
}

/* Remote (federated) server icons in the strip */
.strip-remote-server {
    position: relative;
}

.strip-remote-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #5865f2;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #111;
    line-height: 1;
    pointer-events: none;
}

/* User Bar (bottom of left panel) */
.user-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background-color: #0a0a0a;
    border-top: 1px solid #1a1a1a;
    flex-shrink: 0;
    position: relative;
}

.user-bar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: var(--accent-text);
    cursor: pointer;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    transition: border-radius 0.2s;
}

.user-bar-avatar:hover {
    border-radius: 30%;
}

/* Sidebar (Channel List) */
.sidebar {
    width: 220px;
    background-color: #111111;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1a1a1a;
    position: relative;
    z-index: 100;
}

.sidebar.sidebar-hidden {
    display: none;
}

/* Server Info */
.server-info {
    padding: 15px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.server-info h2 {
    flex: 1;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-menu-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

.server-menu-btn:hover {
    color: #ffffff;
}

.server-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 10px;
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.server-menu-dropdown.show {
    display: block;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    color: #a0a0a0;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.menu-item:hover {
    background-color: #1e1e1e;
    color: #ffffff;
}

.menu-item i {
    margin-right: 8px;
}

/* Channels */
.channels {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.channels-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 10px;
}

.channels-header h3 {
    color: #a0a0a0;
    font-size: 12px;
    text-transform: uppercase;
}

.create-channel-btn-small {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 5px;
}

.create-channel-btn-small:hover {
    color: #ffffff;
}

.channel-list {
    list-style: none;
    min-height: 8px;
}

.channel-item {
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.channel-item a {
    flex: 1;
    min-width: 0;
}

.channel-category .channel-item a {
    padding-left: 18px;
}

.channel-item a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #a0a0a0;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.channel-item a:hover {
    background-color: #1e1e1e;
    color: #ffffff;
}

.channel-item.active a {
    background-color: var(--accent);
    color: var(--accent-text);
}

.channel-item i {
    margin-right: 8px;
    font-size: 16px;
}

.channel-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-channel-users {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 10px 4px 34px;
    width: 100%;
}

.voice-user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voice-user-initial {
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
}

.no-channels {
    color: #a0a0a0;
    font-size: 14px;
    padding: 10px;
    text-align: center;
}

/* User Info (now in .user-bar) */

.user-details {
    flex: 1;
    min-width: 0;
}

.username {
    display: block;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-container {
    position: relative;
}

.status {
    display: block;
    font-size: 12px;
    color: #a0a0a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status.online {
    color: #43b581;
}

.status.away {
    color: #faa61a;
}

.status.busy {
    color: #f04747;
}

.status.invisible {
    color: #747f8d;
}

.status-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    min-width: 200px;
    margin-bottom: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.status-dropdown.show {
    display: block;
}

.status-option {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-option:hover {
    background-color: #1e1e1e;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-option.online .status-dot {
    background-color: #43b581;
}

.status-option.away .status-dot {
    background-color: #faa61a;
}

.status-option.busy .status-dot {
    background-color: #f04747;
}

.status-option.invisible .status-dot {
    background-color: #747f8d;
}

.custom-status-container {
    padding: 10px;
    border-top: 1px solid #1a1a1a;
}

#custom-status-input {
    width: 100%;
    padding: 8px;
    background: #1a1a1a;
    border: 1px solid #1e1e1e;
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.user-controls {
    display: flex;
    gap: 5px;
    position: relative;
}

.logout-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}

.logout-btn:hover {
    color: #f04747;
}

/* Notification Bell */
.notification-bell-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    position: relative;
}

.notification-bell-btn:hover {
    color: #ffffff;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: #f04747;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Notifications Modal */
.notifications-modal-content {
    max-width: 420px;
    width: 90%;
}

.notifications-modal-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

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

.clear-all-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    background: none;
    border: 1px solid #4f545c;
    color: #a0a0a0;
    cursor: pointer;
    font-size: 12px;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
}

.clear-all-btn:hover {
    color: #ffffff;
    border-color: var(--accent);
}

.notifications-modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.notifications-modal-actions .clear-all-btn {
    flex: 1;
    margin-top: 0;
}

.notification-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #72767d;
    padding: 4px 0;
    letter-spacing: 0.5px;
}

.notification-mention {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-preview {
    font-style: italic;
    opacity: 0.7;
}

.mention-go-btn {
    color: var(--accent);
    text-decoration: none;
    font-size: 16px;
    flex-shrink: 0;
    padding: 4px;
}

.mention-go-btn:hover {
    color: #ffffff;
}

.notification-empty {
    text-align: center;
    color: #72767d;
    padding: 24px 16px;
    font-size: 13px;
}

.notification-item {
    padding: 10px 12px;
    border-radius: 6px;
    background: #1a1a1a;
    margin-bottom: 6px;
}

.notification-item:last-child {
    margin-bottom: 0;
}

.notification-details {
    margin-bottom: 8px;
}

.notification-details strong {
    color: #ffffff;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.notification-details div {
    font-size: 12px;
    color: #a0a0a0;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.notification-actions .accept-invite {
    background: #43b581;
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.notification-actions .accept-invite:hover {
    background: #3ca374;
}

.notification-actions .decline-invite {
    background: #4f545c;
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.notification-actions .decline-invite:hover {
    background: #5d6269;
}

/* Main Content */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Voice Channel Layout */
.voice-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.voice-content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.voice-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.voice-chat-sidebar {
    width: 340px;
    background: #0f0f0f;
    border-left: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.voice-chat-header {
    padding: 15px;
    background: #0a0a0a;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voice-chat-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}

.close-chat-btn {
    background: none;
    border: none;
    color: #72767d;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.close-chat-btn:hover {
    color: #fff;
}

.voice-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.voice-chat-input {
    padding: 15px;
    background: #111111;
    border-top: 1px solid #1a1a1a;
    flex-shrink: 0;
    min-height: 70px;
}

/* Chat Wrapper (chat + members sidebar) */
.chat-wrapper {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    min-width: 0;
}

.chat-header {
    padding: 15px 20px;
    background-color: #111111;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.header-btn:hover {
    background-color: #1a1a1a;
    color: #fff;
}

.header-btn.active {
    color: var(--accent);
}

/* Members Sidebar */
.members-sidebar {
    width: 220px;
    background-color: #0f0f0f;
    border-left: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.members-sidebar.hidden {
    display: none;
}

.members-sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid #1a1a1a;
}

.members-sidebar-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.members-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 8px;
}

.members-group-label {
    font-size: 11px;
    font-weight: 600;
    color: #72767d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 8px 4px;
    margin-top: 8px;
}

.members-group-label:first-child {
    margin-top: 0;
}

.member-sidebar-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: default;
    gap: 8px;
}

.member-sidebar-item:hover {
    background-color: #1e1e1e;
}

.member-sidebar-item.offline {
    opacity: 0.4;
}

.member-sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-text);
    flex-shrink: 0;
    position: relative;
}

.member-sidebar-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.member-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #0f0f0f;
    background-color: #747f8d;
}

.member-status-dot.online { background-color: #43b581; }
.member-status-dot.away { background-color: #faa61a; }
.member-status-dot.busy { background-color: #f04747; }
.member-status-dot.offline { background-color: #747f8d; }
.member-status-dot.invisible { background-color: #747f8d; }

.member-sidebar-info {
    min-width: 0;
    flex: 1;
}

.member-sidebar-name {
    font-size: 13px;
    font-weight: 500;
    color: #dcddde;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.member-sidebar-name .owner-badge {
    color: #faa61a;
    font-size: 10px;
    margin-left: 4px;
}

.member-sidebar-name .fed-badge {
    color: #7289da;
    font-size: 10px;
    margin-left: 4px;
}

.member-name .fed-badge {
    color: #7289da;
    font-size: 10px;
    margin-left: 4px;
}

.member-sidebar-status {
    font-size: 11px;
    color: #72767d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.member-sidebar-status .custom-emoji-inline {
    width: 13px;
    height: 13px;
    vertical-align: middle;
}

.member-sidebar-status .custom-emoji-inline.sticker-message {
    width: 13px;
    height: 13px;
}

@media (max-width: 768px) {
    .members-sidebar {
        display: none;
    }
}

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

.channel-info i {
    color: #a0a0a0;
    font-size: 20px;
}

.channel-info h2 {
    font-size: 16px;
    font-weight: 600;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

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

.message:not(.message-continuation) {
    padding-top: 16px;
}

.message:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    flex-shrink: 0;
}

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

.message-content {
    flex: 1;
    min-width: 0;
}

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

.date-separator {
    display: flex;
    align-items: center;
    margin: 16px 0 8px;
    padding: 0 16px;
    color: #72767d;
    font-size: 12px;
    font-weight: 600;
}

.date-separator::before,
.date-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #3f4147;
}

.date-separator::before { margin-right: 8px; }
.date-separator::after  { margin-left:  8px; }

/* Message stacking - hide avatar and header for consecutive messages from same user */
.message-continuation {
    padding-top: 2px;
    padding-bottom: 2px;
    margin-bottom: 0;
}

.message-continuation .message-avatar {
    display: none;
}

.message-continuation .message-content {
    margin-left: 55px;
}

.message-continuation .message-header {
    display: none;
}

.message-author {
    font-weight: 600;
    color: #ffffff;
}

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

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

.message-text a {
    color: #00b0f4;
    text-decoration: none;
}

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

/* ── Message action toolbar (hover) ──────────────────────── */
.msg-actions {
    display: none;
    position: absolute;
    top: 2px;
    right: 8px;
    background: #2f3136;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    padding: 2px 4px;
    gap: 2px;
    z-index: 10;
    align-items: center;
}

.message:hover .msg-actions {
    display: flex;
}

.msg-action-btn {
    background: none;
    border: none;
    color: #8e9297;
    cursor: pointer;
    padding: 4px 7px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1;
    transition: background 0.1s, color 0.1s;
}

.msg-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #dcddde;
}

.msg-action-btn[data-action="delete"]:hover {
    background: rgba(240, 71, 71, 0.15);
    color: #f04747;
}

/* Inline edit textarea */
.msg-edit-wrap {
    margin-top: 2px;
}

.msg-edit-input {
    width: 100%;
    background: #40444b;
    border: 1px solid #7289da;
    border-radius: 6px;
    color: #dcddde;
    font-size: 14px;
    line-height: 1.4;
    padding: 8px 10px;
    resize: vertical;
    min-height: 38px;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}

.msg-edit-hint {
    font-size: 11px;
    color: #72767d;
    margin-top: 4px;
}

.msg-edit-hint kbd {
    background: #2f3136;
    border: 1px solid #40444b;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 10px;
}

.msg-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 16px;
    color: #dcddde;
    line-height: 1.4;
    transition: background 0.1s, border-color 0.1s;
}

.reaction-chip:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

.reaction-chip.reacted {
    background: rgba(88,101,242,0.2);
    border-color: rgba(88,101,242,0.4);
    color: #8ea0f5;
}

.reaction-chip.reacted:hover {
    background: rgba(88,101,242,0.3);
}

.reaction-count {
    font-size: 14px;
    font-weight: 600;
}

.reaction-emoji-custom {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    object-fit: contain;
}

.message-media {
    margin-top: 10px;
}

.message-embed {
    margin-top: 8px;
    max-width: 480px;
    border-radius: 4px;
    overflow: hidden;
    background: #1e1e23;
}

.embed-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.embed-iframe-spotify {
    width: 100%;
    border: none;
    display: block;
    border-radius: 12px;
}

.media-image {
    max-width: 320px;
    max-height: 220px;
    border-radius: 4px;
    cursor: zoom-in;
    object-fit: contain;
    display: block;
}

.media-video {
    width: 320px;
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
    display: block;
}

.media-audio {
    width: 320px;
    max-width: 100%;
}

.media-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #111111;
    border-radius: 4px;
    color: #00b0f4;
    text-decoration: none;
}

.media-file:hover {
    background-color: #1e1e1e;
}

.message-input-container {
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    background-color: #111111;
    position: relative;
    z-index: 950;
}

#message-form {
    display: flex;
    align-items: flex-end;
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 5px;
}

.attachment-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 10px;
    font-size: 18px;
    display: inline-block;
    visibility: visible;
    opacity: 1;
}

.attachment-btn:hover {
    color: #ffffff;
}

/* Ensure emoji button is always visible in main chat */
#emoji-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.message-input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    padding: 10px;
    font-size: 14px;
    outline: none;
    resize: none;
    overflow-y: auto;
    max-height: 200px;
    line-height: 1.5;
    font-family: inherit;
}

.message-input::placeholder {
    color: #72767d;
}

/* Markdown rendered inside messages */
.message-text p { margin: 0 0 4px; }
.message-text p:last-child { margin-bottom: 0; }
.message-text pre { background: #111; border-radius: 4px; padding: 8px 10px; overflow-x: auto; margin: 4px 0; }
.message-text code { background: #111; border-radius: 3px; padding: 1px 4px; font-size: 0.9em; }
.message-text pre code { background: none; padding: 0; }
.message-text blockquote { border-left: 3px solid #4f545c; margin: 4px 0; padding: 2px 10px; color: #a0a0a0; }
.message-text ul, .message-text ol { margin: 4px 0 4px 20px; padding: 0; }
.message-text a { color: #00aff4; }
.message-text strong { color: #fff; }
.message-text h1, .message-text h2, .message-text h3 { margin: 6px 0 2px; font-size: 1em; }

.send-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 10px;
    font-size: 18px;
}

.send-btn:hover {
    color: var(--accent-hover);
}

/* File Preview Styles */
.file-preview {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-preview-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.file-preview-name {
    flex: 1;
    color: #dcddde;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview-remove {
    background: none;
    border: none;
    color: #ed4245;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.file-preview-remove:hover {
    background-color: #4e5058;
}

/* Modal Styles */
.modal {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.7);
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Discord modals open on top of server settings modal */
#discordImportModal.show,
#discordEmojiImportModal.show {
    z-index: 10001;
}

/* Generic confirm/prompt dialog always on top of everything */
#fDialog.show {
    z-index: 10002;
}

.modal-content {
    position: relative;
    background: #111111;
    border-radius: 8px;
    padding: 0;
    max-width: 440px;
    width: 90%;
    max-height: 90dvh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #1e1e1e;
    background: #0a0a0a;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    padding-right: 30px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
}

.modal-content > form {
    padding: 20px 24px 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #b0b0b0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: var(--accent-hover);
}

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

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Invite Sections */
.invite-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e1e1e;
}

.invite-section:last-child {
    border-bottom: none;
}

.invite-section h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.invite-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.invite-link {
    flex: 1;
    padding: 10px;
    background-color: #1a1a1a;
    border: 1px solid #1e1e1e;
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.copy-btn,
.generate-btn {
    padding: 10px 15px;
    background-color: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn:hover,
.generate-btn:hover {
    background-color: var(--accent-hover);
}

.invite-options {
    margin-top: 15px;
}

.expiry-selector {
    margin-top: 10px;
}

.active-invite-item {
    background-color: #1a1a1a;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invite-details {
    flex: 1;
}

.invite-details > div {
    margin-bottom: 4px;
    font-size: 14px;
}

.invite-code {
    font-family: monospace;
    background-color: #111111;
    padding: 3px 6px;
    border-radius: 3px;
}

.invite-controls {
    display: flex;
    gap: 10px;
}

.delete-invite-btn {
    padding: 5px 10px;
    background-color: #f04747;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.delete-invite-btn:hover {
    background-color: #d63939;
}

/* Permissions */
.permissions-content {
    padding: 20px;
}

.add-user-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #1e1e1e;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.permission-item:hover {
    background-color: #1e1e1e;
}

.permission-item input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.permission-item input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.permission-item span {
    user-select: none;
    color: #dcddde;
    font-size: 14px;
}

#permissionsUserSelect {
    width: 100%;
    padding: 10px;
    background-color: #1a1a1a;
    border: 1px solid #1e1e1e;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

#permissionsUserSelect:focus {
    outline: none;
    border-color: var(--accent);
}

#permissionsUserSelect option {
    background-color: #1a1a1a;
    color: white;
    padding: 8px;
}

@media (max-width: 768px) {
    .permissions-content {
        grid-template-columns: 1fr;
    }
}

/* Server Page */
.server-page-content {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
}

.server-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.server-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e1e1e;
}

.server-header h1 {
    margin-bottom: 12px;
}

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

.action-btn {
    padding: 8px 16px;
    background-color: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

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

.action-btn i {
    margin-right: 5px;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.channel-card {
    background-color: #111111;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.channel-card-header {
    padding: 15px;
    background-color: #0a0a0a;
    display: flex;
    align-items: center;
}

.channel-icon {
    font-size: 20px;
    margin-right: 10px;
    color: var(--accent);
}

.channel-card-content {
    padding: 15px;
}

.channel-card-content p {
    margin-bottom: 5px;
    color: #999;
}

.channel-card-actions {
    padding: 15px;
    border-top: 1px solid #1e1e1e;
    text-align: center;
}

.channel-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--accent);
    color: var(--accent-text);
    text-decoration: none;
    border-radius: 4px;
}

.channel-btn:hover {
    background-color: var(--accent-hover);
}

.channel-btn i {
    margin-right: 5px;
}

.create-channel-btn {
    padding: 10px 20px;
    background-color: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.create-channel-btn:hover {
    background-color: var(--accent-hover);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #1e1e1e;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background-color: #43b581;
}

.toast-error {
    background-color: #f04747;
}

.toast-info {
    background-color: var(--accent);
}

.toast-hide {
    animation: slideOut 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* Loading Text */
.loading-text {
    color: #a0a0a0;
    font-style: italic;
}

.error-text {
    color: #f04747;
}

/* Welcome Page */
.welcome-container {
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-header {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-header h1 {
    font-size: 32px;
    color: #ffffff;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 120px));
    gap: 16px;
    justify-content: center;
    width: 100%;
}

.server-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: 12px;
    background-color: #111111;
    text-decoration: none;
    transition: background-color 0.15s, transform 0.15s;
    cursor: pointer;
}

.server-card:hover {
    background-color: #1a1a1a;
    transform: translateY(-3px);
}

.server-card-icon {
    width: 44px;
    height: 44px;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-text);
    flex-shrink: 0;
    overflow: hidden;
}

.server-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-card-name {
    font-size: 13px;
    font-weight: 500;
    color: #dcddde;
    text-align: center;
    word-break: break-word;
    line-height: 1.3;
}

.no-servers {
    text-align: center;
    padding: 60px 20px;
}

.no-servers p {
    font-size: 18px;
    color: #a0a0a0;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .welcome-container {
        padding: 20px;
    }
    
    .servers-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 110px));
        gap: 12px;
    }
}

/* Profile Modal Specific */
.profile-modal .avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--accent);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 36px;
    font-weight: bold;
}

.avatar-preview-container {
    text-align: center;
    margin-bottom: 20px;
}

.upload-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.upload-btn:hover {
    background-color: var(--accent-hover);
}

input[type="file"] {
    display: none;
}

input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-group input[type="color"] {
    width: 50px;
    height: 40px;
    padding: 2px;
    border: 1px solid #333;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

.form-group:has(input[type="color"]) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.form-group:has(input[type="color"]) label {
    width: 100%;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.secondary-btn {
    flex: 1;
    padding: 12px;
    background-color: #1e1e1e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
}

.secondary-btn:hover {
    background-color: #1e1e1e;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Register Page Specific */
.help-text {
    margin-top: 8px;
    color: #72767d;
    font-size: 12px;
}

.help-text ul {
    margin-left: 20px;
    margin-top: 5px;
}

.help-text li {
    margin-bottom: 3px;
    line-height: 1.4;
}

.permissions-modal-large .modal-content {
    max-width: 600px;
}

.permissions-user-select {
    margin-bottom: 30px;
}

.permissions-user-select label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.user-select-dropdown {
    width: 100%;
    padding: 10px;
    background-color: #111111;
    border: 1px solid #1e1e1e;
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.permission-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #111111;
    border-radius: 6px;
}

.permission-info {
    flex: 1;
}

.permission-info strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.permission-info small {
    color: #999;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-left: 15px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

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

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Emoji Picker Styles */
/* ── Emoji / Sticker picker tabs ── */
.emoji-picker-tabs {
    display: flex;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.emoji-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #777;
    font-size: 13px;
    font-weight: 600;
    padding: 8px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.emoji-tab-btn:hover {
    color: #ccc;
}

.emoji-tab-btn.active {
    color: #fff;
    border-bottom-color: var(--accent);
}

/* ── Sticker grid ── */
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sticker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.sticker-item:hover {
    background-color: #1e1e1e;
}

.sticker-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.sticker-label {
    font-size: 10px;
    color: #888;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 72px;
}

.sticker-empty {
    color: #555;
    font-size: 13px;
    text-align: center;
    padding: 20px;
}


.emoji-picker {
    display: none;
    position: fixed;
    width: 350px;
    max-height: 400px;
    background-color: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow: hidden;
}

.emoji-picker.show {
    display: flex;
    flex-direction: column;
}

.emoji-picker-search {
    padding: 10px;
    border-bottom: 1px solid #1a1a1a;
}

.emoji-picker-search input {
    width: 100%;
    padding: 8px;
    background-color: #1a1a1a;
    border: 1px solid #1e1e1e;
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.emoji-picker-search input:focus {
    outline: none;
    border-color: var(--accent);
}

.emoji-picker-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.emoji-category {
    margin-bottom: 15px;
}

.emoji-category-name {
    font-size: 12px;
    font-weight: 600;
    color: #a0a0a0;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding: 0 5px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.emoji-item {
    font-size: 28px;
    padding: 6px;
    cursor: pointer;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.2s;
    user-select: none;
}

.emoji-item:hover {
    background-color: #1e1e1e;
}

.custom-emoji-picker-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-emoji-inline {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Sticker — custom emoji sent via the sticker tab */
img.custom-emoji-inline.sticker-message {
    width: 128px;
    height: 128px;
    display: block;
}

#selfCustomStatus .custom-emoji-inline {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

/* @Mention Autocomplete */
.mention-autocomplete {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #1a1a1a;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    margin-bottom: 4px;
    z-index: 1000;
    display: none;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
}

.mention-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.mention-item:hover,
.mention-item.active {
    background: #1e1e1e;
}

.mention-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mention-avatar-fallback {
    background: var(--accent);
    color: var(--accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.mention-username {
    color: #e1e1e1;
    font-weight: 600;
    font-size: 13px;
}

.mention-displayname {
    color: #a0a0a0;
    font-size: 12px;
}

/* Inline mention styling in messages */
.mention {
    color: var(--accent);
    background: rgba(88, 101, 242, 0.15);
    padding: 0 2px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
}

.mention:hover {
    background: rgba(88, 101, 242, 0.25);
}

.mention-self {
    background: rgba(88, 101, 242, 0.3);
    font-weight: 600;
}

.mention-self:hover {
    background: rgba(88, 101, 242, 0.4);
}

.mention-broadcast {
    color: #fff;
    background: rgba(240, 71, 71, 0.25);
    font-weight: 700;
}

.mention-broadcast:hover {
    background: rgba(240, 71, 71, 0.4);
}

@media (max-width: 768px) {
    .emoji-picker {
        width: 90vw;
        max-width: 350px;
    }

    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Server Settings Modal */
.server-settings-modal .modal-content-large {
    max-width: 900px;
    width: 95%;
}

.modal-body-tabbed {
    display: flex;
    min-height: 500px;
}

.settings-tabs {
    width: 200px;
    background-color: #0a0a0a;
    border-right: 1px solid #1a1a1a;
    padding: 20px 0;
    flex-shrink: 0;
}

.settings-tab {
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #a0a0a0;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.settings-tab:hover {
    background-color: #111111;
    color: #ffffff;
}

.settings-tab.active {
    background-color: #1e1e1e;
    color: #ffffff;
    border-left-color: var(--accent);
}

.settings-tab i {
    width: 20px;
}

.settings-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

.settings-tab-content h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #ffffff;
}

.settings-tab-content h4 {
    margin: 20px 0 15px 0;
    font-size: 18px;
    color: #dcddde;
}

/* Icon Upload Section */
.icon-upload-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.server-icon-preview {
    width: 80px;
    height: 80px;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent-text);
    background-size: cover;
    background-position: center;
}

/* Members List */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background-color: #111111;
    border-radius: 6px;
}

.member-item:hover {
    background-color: #1e1e1e;
}

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

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--accent-text);
    font-size: 14px;
}

.member-avatar.banned {
    background-color: #f04747;
}

.member-details {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-weight: 500;
    color: #fff;
}

.member-role {
    font-size: 12px;
    color: #999;
}

.member-fed-node {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #7289da;
    margin-left: 4px;
}

.member-fed-node .fa-globe {
    font-size: 10px;
}

.member-actions {
    display: flex;
    gap: 8px;
}

.btn-kick, .btn-ban, .btn-unban {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: white;
}

.btn-kick {
    background-color: #faa61a;
}

.btn-kick:hover {
    background-color: #d89015;
}

.btn-ban {
    background-color: #f04747;
}

.btn-ban:hover {
    background-color: #d63939;
}

.btn-unban {
    background-color: #43b581;
}

.btn-unban:hover {
    background-color: #369e6e;
}

/* Emoji Upload Section */
.emoji-upload-section {
    background-color: #0a0a0a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.emoji-upload-section p {
    color: #a0a0a0;
    margin-bottom: 15px;
}

.emoji-upload-form {
    display: grid;
    gap: 15px;
}

.emoji-upload-form input[type="file"] {
    display: block;
    padding: 8px;
    background-color: #1a1a1a;
    border: 1px solid #1e1e1e;
    border-radius: 4px;
    color: #ddd;
    cursor: pointer;
}

.emoji-upload-form input[type="file"]::file-selector-button {
    padding: 6px 12px;
    background-color: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.emoji-upload-form input[type="file"]::file-selector-button:hover {
    background-color: var(--accent-hover);
}

.custom-emojis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.custom-emoji-item {
    background-color: #0a0a0a;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.custom-emoji-item:hover {
    background-color: #111111;
}

.custom-emoji-preview {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
    object-fit: contain;
}

.custom-emoji-name {
    font-size: 14px;
    color: #dcddde;
    margin-bottom: 5px;
}

.custom-emoji-code {
    font-size: 12px;
    color: #a0a0a0;
    font-family: monospace;
}

.delete-emoji-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #f04747;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    font-size: 12px;
}

.custom-emoji-item:hover .delete-emoji-btn {
    display: block;
}

/* Audit Log */
.audit-log-container {
    background-color: #0a0a0a;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.audit-log-entry {
    padding: 12px;
    border-bottom: 1px solid #1a1a1a;
    display: grid;
    grid-template-columns: 120px 1fr 150px;
    gap: 10px;
    font-size: 14px;
}

.audit-log-entry:last-child {
    border-bottom: none;
}

.audit-time {
    color: #72767d;
}

.audit-action {
    color: #dcddde;
}

.audit-action i {
    margin-right: 5px;
    color: var(--accent);
}

.audit-user {
    color: #a0a0a0;
    text-align: right;
}

/* Danger Zone */
.danger-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.danger-action-item {
    background-color: #0a0a0a;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #f04747;
}

.danger-action-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #ffffff;
}

.danger-action-info p {
    margin: 0;
    color: #a0a0a0;
    font-size: 14px;
}

.btn-warning {
    background-color: #faa61a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-warning:hover {
    background-color: #e89200;
}

.btn-danger {
    background-color: #f04747;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #d63939;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 85dvh;
        border-radius: 8px;
    }

    .server-settings-modal .modal-content-large {
        width: 98%;
        max-height: 90dvh;
    }

    .modal-body-tabbed {
        flex-direction: column;
        min-height: 400px;
    }

    .settings-tabs {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #1a1a1a;
        display: flex;
        overflow-x: auto;
        padding: 0;
        flex-shrink: 0;
        -webkit-overflow-scrolling: touch;
    }

    .settings-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 10px 14px;
        font-size: 12px;
    }

    .settings-tab.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }

    .settings-content {
        padding: 15px;
    }

    .permissions-grid {
        grid-template-columns: 1fr;
    }

    .custom-emojis-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .audit-log-entry {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .audit-user {
        text-align: left;
    }

    .active-invite-item {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .invite-controls {
        width: 100%;
    }

    .invite-controls button {
        flex: 1;
    }
}

/* Mobile sidebar - must come after base .sidebar styles to override them */
@media (max-width: 768px) {
    .app-container {
        overflow: visible;
        position: relative;
    }

    .left-panel {
        position: fixed;
        top: 0;
        left: -284px;
        bottom: 0;
        width: 284px;
        z-index: 1001;
        transition: left 0.3s ease;
    }

    .left-panel.show-mobile {
        left: 0;
    }

    .left-panel-top {
        flex: 1;
        min-height: 0;
    }

    .server-strip {
        position: static !important;
        width: 64px !important;
        height: auto !important;
    }

    .sidebar {
        position: static !important;
        width: 220px !important;
        height: auto !important;
        flex-shrink: 0;
    }

    .sidebar.sidebar-hidden {
        display: flex;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .content {
        width: 100vw !important;
        min-width: 100vw !important;
        flex: none !important;
    }

    .chat-wrapper {
        flex-direction: column;
    }

    .members-sidebar {
        display: none !important;
    }
}

/* ── Server Icon Images ── */
.server-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.server-icon:hover {
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.4);
    transition: box-shadow 0.2s;
}

/* ── Channel Categories ── */
.channel-category {
    margin-bottom: 2px;
    padding-top: 10px;
}

.channel-category:first-child {
    padding-top: 0;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    cursor: pointer;
    user-select: none;
    color: #a0a0a0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-header:hover {
    color: #e1e1e1;
}

.category-name {
    flex: 1;
}

.category-actions {
    display: none;
    gap: 2px;
    margin-left: auto;
}

.category-header:hover .category-actions {
    display: flex;
}

.category-action-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 10px;
    border-radius: 3px;
    line-height: 1;
}

.category-action-btn:hover {
    color: #e1e1e1;
    background: rgba(255, 255, 255, 0.1);
}

.category-action-btn.delete-category-btn:hover {
    color: #f04747;
    background: rgba(240, 71, 71, 0.1);
}

.category-toggle {
    font-size: 10px;
    color: var(--accent);
    transition: transform 0.2s;
}

.channel-category.collapsed .channel-list {
    display: none;
}

.channel-category.collapsed .category-toggle {
    transform: rotate(-90deg);
}

.channels-header-actions {
    display: flex;
    gap: 4px;
}

/* ── Drag and Drop ── */
.channel-item[draggable="true"] {
    cursor: grab;
}

.channel-item[draggable="true"]:active {
    cursor: grabbing;
}

.channel-item.dragging {
    opacity: 0.4;
}

.channel-list.drag-over {
    background-color: rgba(88, 101, 242, 0.05);
    border-radius: 4px;
}

.channel-category.drag-over-category > .category-header {
    background-color: rgba(88, 101, 242, 0.1);
    border-radius: 4px;
}

.drop-indicator {
    height: 2px;
    background-color: var(--accent);
    border-radius: 1px;
    margin: 2px 10px;
    box-shadow: 0 0 4px rgba(88, 101, 242, 0.5);
}

.category-drag-handle {
    display: none;
}

.category-drag-handle:active {
    cursor: grabbing;
}

.channel-category.category-dragging {
    opacity: 0.4;
}

.category-drop-indicator {
    height: 2px;
    background-color: var(--accent);
    border-radius: 1px;
    margin: 4px 0;
    box-shadow: 0 0 4px rgba(88, 101, 242, 0.5);
}

/* ── Role Management ── */

.roles-container {
    display: flex;
    gap: 20px;
    min-height: 400px;
}

.roles-sidebar {
    width: 200px;
    flex-shrink: 0;
    border-right: 1px solid #2a2a2a;
    padding-right: 16px;
}

.roles-sidebar h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #a0a0a0;
    text-transform: uppercase;
}

.roles-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.role-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.role-list-item:hover {
    background: #1e1e1e;
}

.role-list-item.active {
    background: #2a2a2a;
}

.role-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.role-list-name {
    flex: 1;
    font-size: 14px;
    color: #e0e0e0;
}

.role-member-count {
    font-size: 11px;
    color: #666;
}

.roles-editor {
    flex: 1;
    padding-left: 4px;
}

.roles-editor-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
}

.roles-editor h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
}

.roles-editor h4 {
    margin: 16px 0 8px 0;
    font-size: 13px;
    color: #a0a0a0;
    text-transform: uppercase;
}

.role-color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.role-color-picker input[type="color"] {
    width: 40px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

#editRoleColorHex {
    font-family: monospace;
    color: #a0a0a0;
    font-size: 13px;
}

.role-perms-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.role-perm-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.role-perm-toggle:hover {
    background: #1e1e1e;
}

.role-perm-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.role-perm-label {
    font-size: 14px;
    color: #e0e0e0;
}

.role-editor-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* Role badges on members */

.member-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.role-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Role assignment popup */

.role-assign-popup {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 100;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.role-assign-popup h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #a0a0a0;
}

.role-assign-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-assign-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
}

.role-assign-item:hover {
    background: #2a2a2a;
}

.role-assign-item input[type="checkbox"] {
    accent-color: var(--accent);
}

.member-item {
    position: relative;
}

.btn-edit-roles {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.btn-edit-roles:hover {
    color: var(--accent);
    background: rgba(88, 101, 242, 0.1);
}

/* Mass assign toolbar */
.mass-assign-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #2f3136;
    border-radius: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.mass-select-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #b0b0b0;
    font-size: 13px;
    cursor: pointer;
}

.mass-selected-count {
    color: #a0a0a0;
    font-size: 13px;
    margin-left: auto;
}

.mass-assign-btn,
.mass-remove-btn {
    padding: 4px 12px !important;
    font-size: 12px !important;
    min-width: auto !important;
}

.member-select {
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--accent);
}

.mass-role-popup {
    position: relative;
    margin-bottom: 10px;
}

/* ── Channel permissions button ── */
.channel-perms-btn {
    display: none;
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 3px 5px;
    font-size: 11px;
    border-radius: 3px;
    flex-shrink: 0;
    margin-right: 4px;
    line-height: 1;
}

.channel-item:hover .channel-perms-btn {
    display: inline-flex;
    align-items: center;
}

.channel-perms-btn:hover {
    color: #e1e1e1;
    background: rgba(255, 255, 255, 0.1);
}

/* ── Channel delete button ── */
.channel-delete-btn {
    display: none;
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 3px 5px;
    font-size: 11px;
    border-radius: 3px;
    flex-shrink: 0;
    margin-right: 2px;
    line-height: 1;
}

.channel-item:hover .channel-delete-btn {
    display: inline-flex;
    align-items: center;
}

.channel-delete-btn:hover {
    color: #ed4245;
    background: rgba(237, 66, 69, 0.1);
}

/* ── Unread dot ── */
.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent, #7289da);
    flex-shrink: 0;
    margin-left: 4px;
    align-self: center;
}

.channel-item.active .unread-dot {
    display: none;
}

/* ── Wide modal variant ── */
.modal-content-wide {
    max-width: 700px;
    width: 95%;
}

/* ── Channel permissions (role whitelist) ── */
.perms-loading,
.perms-empty {
    padding: 24px;
    text-align: center;
    color: #a0a0a0;
}

.perms-hint {
    font-size: 13px;
    color: #a0a0a0;
    margin: 0 0 16px;
    line-height: 1.5;
}

.perms-role-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.perms-role-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.perms-role-row:last-child {
    border-bottom: none;
}

.perms-role-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

.perms-role-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #5865f2;
    flex-shrink: 0;
}

.perms-role-status {
    font-size: 12px;
    color: #a0a0a0;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

/* ── Discord import wizard ── */
.import-how-it-works {
    margin: 12px 0 20px;
    padding-left: 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.discord-import-step { padding: 4px 0; }

.di-hint {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.di-help {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 4px;
}

.di-invite-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.95rem;
}

/* Preview sections */
.di-preview-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.di-preview-section {
    background: var(--bg-tertiary);
    border-radius: 6px;
    padding: 10px 14px;
}

.di-preview-section strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.di-preview-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 160px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.di-preview-list li {
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.di-preview-list .di-empty { font-style: italic; }
.di-preview-skipped li { color: #f0a500; }
.di-ch-cat { font-size: 0.78rem; opacity: 0.7; }

/* Guild header */
.di-guild-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.di-guild-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Options */
.di-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}

.di-option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.di-step2-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* Spinner step */
.di-spinner-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    gap: 16px;
    color: var(--text-secondary);
}

.di-spinner { font-size: 2rem; color: var(--accent); }

/* Result step */
.di-result-success {
    font-size: 1.1rem;
    color: #43b581;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.di-result-error {
    font-size: 1.05rem;
    color: #f04747;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.di-result-counts {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.di-result-notes-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 8px 0 4px;
}

.di-result-notes {
    list-style: disc;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.6;
}

/* ── Media Lightbox ── */
#mediaLightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

#mediaLightbox.hidden {
    display: none;
}

#mediaLightboxContent {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

#mediaLightboxContent img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    cursor: default;
}

#mediaLightboxContent video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
    display: block;
    cursor: default;
}

#mediaLightboxClose {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 10000;
}

#mediaLightboxClose:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── Announcement read-only bar ─────────────────────────────────────────── */
.announcement-readonly-bar {
    padding: 14px 20px;
    background: rgba(114, 137, 218, 0.08);
    border-top: 1px solid #3a3a3a;
    color: #8e9297;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.announcement-readonly-bar i {
    color: var(--accent);
}

/* ── Thread Forum ────────────────────────────────────────────────────────── */
.thread-forum-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

#thread-list-view,
#thread-detail-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.thread-forum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #3a3a3a;
    flex-shrink: 0;
}

.thread-forum-header .channel-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.thread-forum-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

#new-thread-composer {
    padding: 16px 20px;
    border-bottom: 1px solid #3a3a3a;
    background: #2a2a2a;
    flex-shrink: 0;
}

#new-thread-input {
    width: 100%;
    background: #36393f;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    padding: 10px 14px;
    color: #fff;
    resize: vertical;
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
}

#new-thread-input:focus {
    outline: none;
    border-color: var(--accent);
}

.composer-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

.thread-topics {
    flex: 1;
    overflow-y: auto;
}

.thread-topic {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    transition: background 0.15s;
}

.thread-topic:hover {
    background: #2a2a2a;
}

.thread-topic-avatar img,
.thread-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.thread-topic-avatar .avatar-initial,
.thread-avatar-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.thread-topic-body {
    flex: 1;
    min-width: 0;
}

.thread-topic-preview {
    color: #dcddde;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thread-topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0 2px;
}

.thread-tag-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid;
    cursor: pointer;
    transition: opacity 0.1s;
    user-select: none;
}

.thread-tag-pill:hover { opacity: 0.8; }
.thread-tag-pill.selected { box-shadow: 0 0 0 2px currentColor; }

#thread-tag-filter-bar,
.thread-tag-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.thread-filter-label {
    font-size: 12px;
    color: #72767d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.thread-tag-filter-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid;
    cursor: pointer;
    transition: opacity 0.1s;
    user-select: none;
}

.thread-tag-filter-pill.active { box-shadow: 0 0 0 2px currentColor; }
.thread-filter-clear {
    background: none;
    border: none;
    color: #72767d;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
}
.thread-filter-clear:hover { color: #dcddde; }

#thread-tag-picker {
    padding: 8px 0 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

#thread-tag-picker-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.thread-add-tag-btn {
    background: none;
    border: 1px dashed #72767d;
    color: #72767d;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.1s, color 0.1s;
}
.thread-add-tag-btn:hover { border-color: #dcddde; color: #dcddde; }

#thread-new-tag-form {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 0;
}

#thread-new-tag-name {
    background: #1e1f22;
    border: 1px solid #3f4147;
    border-radius: 4px;
    color: #dcddde;
    padding: 4px 8px;
    font-size: 13px;
    width: 140px;
}

#thread-new-tag-colors {
    display: flex;
    gap: 5px;
}

.tag-color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.1s;
}
.tag-color-swatch.selected { border-color: white; }
.tag-color-swatch:hover { border-color: rgba(255,255,255,0.5); }

.thread-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 6px 0 2px;
}

#thread-tag-editor {
    padding: 10px 16px;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.tag-editor-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
    min-height: 24px;
}

.tag-editor-create {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 8px;
}

#tag-editor-new-name {
    background: #1e1f22;
    border: 1px solid #3f4147;
    border-radius: 4px;
    color: #dcddde;
    padding: 4px 8px;
    font-size: 13px;
    width: 130px;
}

#tag-editor-colors {
    display: flex;
    gap: 4px;
}

.tag-editor-footer {
    display: flex;
    gap: 6px;
}

.thread-topic-meta {
    margin-top: 4px;
    font-size: 13px;
    color: #72767d;
    display: flex;
    gap: 8px;
}

.thread-topic-author {
    color: var(--accent);
    font-weight: 600;
}

.thread-topic-stats {
    flex-shrink: 0;
    font-size: 13px;
    color: #72767d;
    text-align: right;
}

.thread-reply-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.thread-empty {
    text-align: center;
    padding: 60px 20px;
    color: #72767d;
}

.thread-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* Thread detail view */
.thread-detail-header {
    padding: 12px 20px;
    border-bottom: 1px solid #3a3a3a;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.thread-detail-actions {
    display: flex;
    gap: 8px;
}

.thread-detail-actions button {
    background: none;
    border: none;
    color: #72767d;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.thread-detail-actions button:hover {
    background: #3a3a3a;
    color: #dcddde;
}

#thread-delete-btn:hover {
    color: #ed4245 !important;
}

.thread-detail-header button {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.thread-detail-header button:hover {
    color: var(--accent-hover);
}

.thread-detail-original {
    flex-shrink: 0;
    border-bottom: 2px solid #3a3a3a;
}

.thread-detail-replies {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.thread-msg {
    display: flex;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid #2a2a2a;
}

.thread-msg-original {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    padding: 16px 20px;
    border-bottom: none;
}

.thread-msg-avatar {
    flex-shrink: 0;
}

.thread-msg-avatar img,
.thread-msg-avatar .thread-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.thread-msg-avatar .thread-avatar-initial {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.thread-msg-body {
    flex: 1;
    min-width: 0;
}

.thread-msg-header {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 4px;
}

.thread-msg-author {
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
}

.thread-msg-time {
    color: #72767d;
    font-size: 12px;
}

.thread-msg-content {
    color: #dcddde;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

.thread-detail-input {
    padding: 12px 20px;
    border-top: 1px solid #3a3a3a;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-shrink: 0;
}

#thread-reply-input {
    flex: 1;
    background: #36393f;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    padding: 10px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    resize: none;
}

#thread-reply-input:focus {
    outline: none;
    border-color: var(--accent);
}

#send-reply-btn {
    flex-shrink: 0;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

#send-reply-btn:hover {
    background: var(--accent-hover);
}

/* ── Generic .btn classes (thread forum, etc.) ───────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: #4f545c;
    color: #fff;
}

.btn-secondary:hover {
    background: #686d73;
}

/* ── Context menu ─────────────────────────────────────────────────────────── */
#ctxMenu {
    position: fixed;
    z-index: 10000;
    min-width: 185px;
    background: #2f3136;
    border-radius: 6px;
    padding: 4px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
    font-size: 13px;
}
.ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    cursor: pointer;
    color: #dcddde;
    user-select: none;
    white-space: nowrap;
}
.ctx-item:hover { background: rgba(255,255,255,.07); }
.ctx-item.danger { color: #ed4245; }
.ctx-item.danger:hover { background: rgba(237,66,69,.1); }
.ctx-item.checked { color: var(--accent, #7289da); }
.ctx-separator { height: 1px; background: rgba(255,255,255,.08); margin: 4px 0; }
.ctx-item i { width: 14px; text-align: center; font-size: 12px; }

/* ── Profile tabs ─────────────────────────────────────────────────────────── */
.profile-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.profile-tab {
    background: none;
    border: none;
    color: #72767d;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    margin-bottom: -1px;
    transition: color .15s;
}
.profile-tab:hover { color: #dcddde; }
.profile-tab.active {
    color: #fff;
    border-bottom-color: var(--accent, #7289da);
}
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }
.notif-mode-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0;
}
.notif-mode-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #dcddde;
}

/* ── VAD noise gate meter ─────────────────────────────────────────────────── */
.vad-meter-wrapper { margin: 4px 0 2px; }
.vad-meter-bar {
    position: relative;
    height: 14px;
    background: #1e2124;
    border-radius: 7px;
    overflow: hidden;
}
.vad-meter-fill {
    height: 100%;
    width: 0%;
    background: #4f545c;
    border-radius: 7px;
    transition: width 0.05s linear, background 0.1s;
}
.vad-meter-fill.active { background: #43b581; }
.vad-meter-threshold-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #faa61a;
    left: 20%;
    pointer-events: none;
    border-radius: 1px;
}

/* ── Header button group ────────────────────────────────────────────────────── */
.header-btn-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ── Pin indicator on messages ──────────────────────────────────────────────── */
.msg-pin-indicator {
    display: inline-block;
    color: var(--accent);
    font-size: 10px;
    margin-right: 4px;
    vertical-align: middle;
    opacity: 0.7;
}

.msg-pin-btn.active,
.msg-pin-btn.active:hover {
    color: var(--accent);
    background: rgba(114, 137, 218, 0.15);
}

/* ── Pinned messages panel ──────────────────────────────────────────────────── */
.pinned-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: #18191c;
    border-left: 1px solid #2d2f33;
    display: flex;
    flex-direction: column;
    z-index: 400;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.pinned-panel.open {
    transform: translateX(0);
}

.pinned-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #2d2f33;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.pinned-panel-header button {
    background: none;
    border: none;
    color: #8e9297;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.15s;
}

.pinned-panel-header button:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

#pinned-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.pinned-item {
    background: #111214;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    border: 1px solid #2d2f33;
    transition: border-color 0.15s;
}

.pinned-item:hover {
    border-color: var(--accent);
}

.pinned-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.pinned-item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #36393f;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.pinned-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pinned-avatar-initial {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.pinned-item-meta {
    display: flex;
    flex-direction: column;
}

.pinned-item-author {
    font-size: 13px;
    font-weight: 600;
    color: #dcddde;
}

.pinned-item-time {
    font-size: 11px;
    color: #72767d;
}

.pinned-item-content {
    font-size: 13px;
    color: #b9bbbe;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.pinned-empty {
    text-align: center;
    color: #72767d;
    padding: 40px 20px;
}

.pinned-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

/* ── Message search panel ───────────────────────────────────────────────────── */
.search-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    height: 100vh;
    background: #18191c;
    border-left: 1px solid #2d2f33;
    display: flex;
    flex-direction: column;
    z-index: 401;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.search-panel.open {
    transform: translateX(0);
}

.search-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #2d2f33;
}

.search-panel-icon {
    color: #72767d;
    font-size: 14px;
    flex-shrink: 0;
}

.search-panel-input {
    flex: 1;
    background: #111214;
    border: 1px solid #2d2f33;
    border-radius: 4px;
    color: #dcddde;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
}

.search-panel-input:focus {
    border-color: var(--accent);
}

.search-panel-header button {
    background: none;
    border: none;
    color: #8e9297;
    cursor: pointer;
    font-size: 15px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.15s;
    flex-shrink: 0;
}

.search-panel-header button:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.search-result-item {
    background: #111214;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #2d2f33;
}

.search-empty {
    text-align: center;
    color: #72767d;
    padding: 40px 20px;
}

.search-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

/* ── Thread pin badge on topic cards ────────────────────────────────────────── */
.pin-badge {
    color: var(--accent);
    font-size: 11px;
    margin-right: 6px;
    opacity: 0.85;
}

#thread-pin-btn.active {
    color: var(--accent);
}

/* ── DM search panel ────────────────────────────────────────────────────────── */
.dm-search-panel {
    padding: 10px 14px;
    background: #2f3136;
    border-bottom: 1px solid #202225;
}

.dm-search-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dm-search-icon {
    color: #72767d;
    font-size: 13px;
    flex-shrink: 0;
}

.dm-search-input {
    flex: 1;
    background: #40444b;
    border: 1px solid #4f545c;
    border-radius: 4px;
    color: #dcddde;
    padding: 5px 10px;
    font-size: 13px;
    outline: none;
}

.dm-search-input:focus {
    border-color: #7289da;
}

.dm-search-panel #dm-search-close {
    background: none;
    border: none;
    color: #8e9297;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 4px;
}

.dm-search-panel #dm-search-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.dm-search-results {
    max-height: 260px;
    overflow-y: auto;
    margin-top: 8px;
}

.dm-search-result-item {
    background: #36393f;
    border-radius: 5px;
    padding: 8px 10px;
    margin-bottom: 6px;
}

.dm-search-result-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.dm-search-result-author {
    font-size: 12px;
    font-weight: 600;
    color: #dcddde;
}

.dm-search-result-time {
    font-size: 11px;
    color: #72767d;
}

.dm-search-result-content {
    font-size: 13px;
    color: #b9bbbe;
    word-break: break-word;
}

.dm-search-empty {
    text-align: center;
    color: #72767d;
    padding: 16px;
}

.dm-search-empty i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.dm-header-btn {
    background: none;
    border: none;
    color: #b9bbbe;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: auto;
    transition: color 0.15s;
}

.remote-node-label {
    font-size: 0.75em;
    color: #5865f2;
    display: block;
    margin-top: 2px;
}

.dm-header-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
