:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-chat: #fafbfc;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

body.dark-theme {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --secondary: #a78bfa;
    --success: #34d399;
    --danger: #f87171;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-chat: #1a2332;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #64748b;
    
    --border: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    top: -200px;
    left: -200px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    bottom: -175px;
    right: -175px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-xl);
}

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

.modal-content p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.settings-modal .modal-content {
    max-width: 500px;
    width: 90%;
    text-align: left;
}

.settings-group {
    margin-bottom: 28px;
}

.settings-group h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-group h3 i {
    color: var(--primary);
    font-size: 18px;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-value {
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
}

.setting-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
    transition: all 0.2s ease;
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

.setting-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
    transition: all 0.2s ease;
}

.setting-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

.setting-description {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
    font-style: italic;
}

.settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

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

.btn-primary {
    flex: 1;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

body.dark-theme .chat-header {
    background: rgba(15, 23, 42, 0.8);
}

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

.header-logo {
    width: 36px;
    height: 36px; 
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.header-info h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.online-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.online-count i {
    color: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-badge i {
    color: var(--primary);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: var(--danger);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.users-sidebar {
    width: 280px;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header i {
    font-size: 20px;
    color: var(--primary);
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-item:hover {
    background: var(--bg-primary);
    transform: translateX(4px);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-badge.admin {
    padding: 4px 8px;
    background: var(--danger);
    color: white;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.messages-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-chat);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease;
    transition: all 0.2s ease;
    padding: 4px 0;
    margin-bottom: 16px;
}

.message:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateX(2px);
}

body.dark-theme .message:hover {
    background: rgba(255, 255, 255, 0.02);
}

.message-actions {
    display: none;
    position: absolute;
    top: -12px;
    right: 60px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 4px;
    gap: 2px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 10;
}

.message.own .message-actions {
    right: auto;
    left: 60px;
}

.message:hover .message-actions {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.message.scrolling .message-actions {
    display: none !important;
}

.message-actions button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}
.message-actions button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: scale(1.1);
}

.message-actions button.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    padding: 6px;
    min-width: 180px;
    z-index: 9999;
    display: none;
    animation: contextMenuAppear 0.15s ease;
}

@keyframes contextMenuAppear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.1s ease;
}

.context-menu-item:hover {
    background: var(--primary);
    color: white;
}

.context-menu-item.danger:hover {
    background: var(--danger);
}

.context-menu-item i {
    width: 16px;
    font-size: 14px;
}

.context-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.reply-preview {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    margin: 8px 20px 0 20px;
    border-radius: 6px;
    display: none;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reply-preview.active {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-info {
    flex: 1;
}

.reply-username {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.reply-text {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.reply-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.reply-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.message-reply {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary);
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.message-reply:hover {
    background: var(--bg-primary);
}

.message-reply-username {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.message-reply-text {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.reaction {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reaction:hover {
    background: var(--bg-primary);
    transform: scale(1.05);
}

.reaction.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.reaction-emoji {
    font-size: 16px;
}

.reaction-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.reaction-picker {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    padding: 8px;
    display: none;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 250px;
    z-index: 999;
    animation: contextMenuAppear 0.15s ease;
}

.reaction-picker.active {
    display: flex;
}

.reaction-picker-emoji {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.reaction-picker-emoji:hover {
    background: var(--bg-tertiary);
    transform: scale(1.2);
}

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.message-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.message-role.admin {
    padding: 3px 8px;
    background: var(--danger);
    color: white;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.message-text {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    background: transparent;
}

.message-text img {
    max-width: 300px;
    max-height: 300px;
    border-radius: var(--radius);
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.message-text img:hover {
    transform: scale(1.02);
}

.message.own {
    flex-direction: row-reverse;
}

.message.own .message-avatar {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.message.own .message-content {
    align-items: flex-end;
}

.message.own .message-text {
    color: var(--text-primary);
}

.message-actions {
    display: none;
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    padding: 4px;
    gap: 2px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 10;
}

.message:hover .message-actions {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.message-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.delete-btn:hover {
    background: var(--danger);
    color: white;
}

.edit-btn {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

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

.message-input-area {
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#messageInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
}

#messageInput::placeholder {
    color: var(--text-tertiary);
}

.btn-attach,
.btn-send {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-attach {
    background: transparent;
    color: var(--text-secondary);
}

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

.btn-send {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.btn-send:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 4px;
}

.char-counter {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.input-hints {
    display: flex;
    gap: 12px;
}

.hint-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-tertiary);
}

.hint-item i {
    font-size: 12px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    text-align: center;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

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

.modal-content p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-primary {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

emoji-picker {
    --background: var(--bg-secondary);
    --border-radius: 16px;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

.btn-emoji {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.muted-notice {
    padding: 16px;
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    color: var(--warning);
    font-weight: 600;
    margin: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.muted-notice::before {
    content: "\f06a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 20px;
}

.message-text.grouped-text {
    margin-top: 6px;
    position: relative;
}

.message.grouped {
    margin-top: 2px;
    margin-bottom: 2px;
}

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

.message.grouped .message-content {
    margin-left: 48px;
}

.message.grouped.own .message-content {
    margin-left: 0;
    margin-right: 48px;
}

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

.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: var(--bg-tertiary);
    transition: 0.3s;
    border-radius: 34px;
}

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

input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

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

@media (max-width: 1024px) {
    .users-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .users-sidebar {
        position: absolute;
        left: -280px;
        height: calc(100% - 85px);
        top: 85px;
        z-index: 50;
        box-shadow: var(--shadow-xl);
    }
    
    .users-sidebar.open {
        left: 0;
    }
    
    .chat-header {
        padding: 16px;
    }
    
    .header-logo {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .header-info h1 {
        font-size: 18px;
    }
    
    .btn-danger span {
        display: none;
    }
    
    .input-hints {
        display: none;
    }
}

@media (max-width: 480px) {
    .user-badge span {
        display: none;
    }
    
    .messages-container {
        padding: 16px;
    }
    
    .message-input-area {
        padding: 12px;
    }
}