:root {
    /* Brand Colors */
    --brand-primary: #7C7CF2;
    --brand-primary-hover: #6668E0;
    --brand-primary-active: #5355C6;
    --brand-secondary: #7289DA;
    --brand-tertiary: #99AAB5;
    
    /* Background Colors */
    --bg-primary: #36393f;
    --bg-secondary: #2f3136;
    --bg-tertiary: #202225;
    --bg-quaternary: #18191c;
    --bg-overlay: rgba(0, 0, 0, 0.85);
    --bg-hover: rgba(79, 84, 92, 0.16);
    --bg-active: rgba(79, 84, 92, 0.24);
    --bg-selected: rgba(79, 84, 92, 0.32);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #dcddde;
    --text-muted: #96989d;
    --text-faint: #72767d;
    --text-link: #00aff4;
    --text-danger: #f23f42;
    --text-success: #23a55a;
    --text-warning: #f0b232;
    
    /* Status Colors */
    --status-online: #23a55a;
    --status-idle: #f0b232;
    --status-dnd: #f23f42;
    --status-offline: #80848e;
    --status-streaming: #593695;
    
    /* Functional Colors */
    --success: #23a55a;
    --warning: #f0b232;
    --danger: #f23f42;
    --info: #5865f2;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.5);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-base: 0;
    --z-nav: 10;
    --z-dropdown: 100;
    --z-modal: 1000;
    --z-toast: 2000;
    --z-tooltip: 3000;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    height: 100vh;
    overflow: hidden;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-quaternary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #18191c;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* ==================== SPLASH SCREEN ==================== */
.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    animation: fadeOut 0.4s ease-out 1.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

.splash-content {
    text-align: center;
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.splash-logo-img {
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.splash-title {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin-top: 24px;
    letter-spacing: -1px;
}

.splash-loader {
    margin-top: 32px;
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 40%;
    background: white;
    border-radius: 2px;
    animation: loading 1.2s ease-in-out infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* ==================== AUTH SCREEN ==================== */
.auth-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    overflow: auto;
}

.auth-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.auth-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
}

.auth-bg-shapes {
    position: absolute;
    inset: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -50px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 24px;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.auth-logo-img {
    width: 72px;
    height: 72px;
    display: block;
    margin: 0 auto 16px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-input:hover {
    border-color: var(--bg-quaternary);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: var(--bg-secondary);
}

.form-input::placeholder {
    color: var(--text-faint);
}

.password-toggle {
    position: absolute;
    right: 12px;
    bottom: 10px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.login-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -8px;
}

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

.checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--brand-primary);
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.link-text {
    font-size: 14px;
    color: var(--text-link);
    text-decoration: none;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.btn-primary:active {
    background: var(--brand-primary-active);
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-footer {
    text-align: center;
    margin-top: 8px;
}

.footer-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-right: 4px;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-hover);
}

.auth-divider span {
    padding: 0 16px;
}

.auth-footer-links {
    text-align: center;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-footer-link {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.auth-footer-link:hover {
    color: var(--text-primary);
}

.separator {
    color: var(--text-faint);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.verification-modal {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.code-input {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 14px;
    text-indent: 14px;
    padding: 14px;
    margin-bottom: 4px;
}

.code-input::placeholder {
    letter-spacing: 6px;
    text-indent: 6px;
    font-size: 20px;
    font-weight: 400;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-subtext {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-devlink {
    font-size: 14px;
    margin-bottom: 24px;
}

.modal-devlink a {
    color: var(--text-link);
    word-break: break-all;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

/* ==================== MAIN APP LAYOUT ==================== */
.main-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==================== SERVER LIST ==================== */
.server-list {
    width: 72px;
    background: var(--bg-tertiary);
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    overflow-y: auto;
    flex-shrink: 0;
}

.server-item {
    position: relative;
    width: 48px;
    height: 48px;
    background: var(--bg-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.server-item:hover {
    border-radius: var(--radius-lg);
    background: var(--brand-primary);
    color: white;
}

.server-item.active {
    border-radius: var(--radius-lg);
    background: var(--brand-primary);
    color: white;
}

.server-item.active::before {
    content: '';
    position: absolute;
    left: -16px;
    width: 8px;
    height: 40px;
    background: white;
    border-radius: 0 4px 4px 0;
}

.server-item:hover .server-tooltip,
.server-item:focus .server-tooltip {
    opacity: 1;
    pointer-events: auto;
}

.server-tooltip {
    position: absolute;
    left: 60px;
    background: var(--bg-quaternary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: var(--z-tooltip);
    box-shadow: var(--shadow-lg);
}

.server-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--bg-quaternary);
}

.server-icon svg {
    width: 24px;
    height: 24px;
}

.home-server .server-icon {
    background: none;
}

.add-server .server-icon svg,
.explore-server .server-icon svg,
.download-app .server-icon svg {
    color: var(--success);
}

.add-server:hover .server-icon svg,
.explore-server:hover .server-icon svg,
.download-app:hover .server-icon svg {
    color: white;
}

.server-separator {
    width: 32px;
    height: 2px;
    background: var(--bg-primary);
    border-radius: 1px;
    margin: 4px 0;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    border: 2px solid var(--bg-tertiary);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== CHANNELS SIDEBAR ==================== */
.channels-sidebar {
    width: 240px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.server-header {
    height: 48px;
    padding: 0 16px;
    border-bottom: 1px solid var(--bg-tertiary);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.server-name-btn {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-fast);
}

.server-name-btn:hover {
    color: var(--text-primary);
}

.server-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.server-name-btn:hover .dropdown-icon {
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-bar {
    position: relative;
    padding: 12px 8px;
}

.search-bar input {
    width: 100%;
    padding: 8px 32px 8px 12px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    background: var(--bg-quaternary);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

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

/* ==================== USER PANEL ==================== */
.user-panel {
    height: 52px;
    background: var(--bg-tertiary);
    padding: 0 8px;
}

.user-panel-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info-btn {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 8px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-info-btn:hover {
    background: var(--bg-hover);
}

.user-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-primary);
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--status-online);
    border: 3px solid var(--bg-tertiary);
}

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

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.user-controls {
    display: flex;
    gap: 4px;
}

.control-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.control-btn.muted {
    color: var(--danger);
}

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

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    min-width: 0;
}

.chat-header {
    height: 48px;
    padding: 0 16px;
    border-bottom: 1px solid var(--bg-tertiary);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.channel-icon-wrapper {
    flex-shrink: 0;
}

.channel-hash {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.channel-info {
    min-width: 0;
}

.channel-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-description {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon-btn {
    position: relative;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.header-icon-btn:hover {
    color: var(--text-primary);
}

.header-icon-btn svg {
    width: 24px;
    height: 24px;
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 144px;
    padding: 4px 28px 4px 8px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-normal);
}

.search-input:focus {
    outline: none;
    width: 240px;
    background: var(--bg-quaternary);
}

.search-wrapper .search-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

/* ==================== CHAT BODY ==================== */
.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.messages-wrapper {
    flex: 1;
    overflow: hidden;
}

.messages-scroller {
    height: 100%;
    overflow-y: auto;
    padding: 16px;
}

.typing-indicator {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: scale(1); opacity: 0.5; }
    30% { transform: scale(1.2); opacity: 1; }
}

.typing-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==================== MESSAGE INPUT ==================== */
.message-input-container {
    padding: 16px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.attachment-btn {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.attachment-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

.message-input-wrapper {
    flex: 1;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    max-height: 200px;
    overflow-y: auto;
}

.message-input {
    width: 100%;
    min-height: 22px;
    max-height: 176px;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    line-height: 1.375;
    resize: none;
    overflow-y: auto;
}

.message-input:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
}

.message-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.message-action-btn {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.message-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.message-action-btn svg {
    width: 24px;
    height: 24px;
}

/* ==================== MEMBERS SIDEBAR ==================== */
.members-sidebar {
    width: 240px;
    background: var(--bg-secondary);
    overflow-y: auto;
    flex-shrink: 0;
}

.members-header {
    padding: 24px 16px 8px;
}

.members-count {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.members-list {
    padding: 0 8px 16px;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: var(--z-toast);
    max-width: 400px;
}

.toast {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .members-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .channels-sidebar {
        position: absolute;
        left: 72px;
        top: 0;
        bottom: 0;
        z-index: var(--z-nav);
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }
    
    .channels-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    
    .channel-description {
        display: none;
    }
    
    .search-input {
        width: 100px;
    }
    
    .search-input:focus {
        width: 140px;
    }
}
