@media (min-width: 1200px) {
    .sidebar {
        width: 280px;
    }
    
    .messages {
        padding: var(--spacing-xl);
    }
}
@media (max-width: 1199px) and (min-width: 992px) {
    .sidebar {
        width: 240px;
    }
    
    .message-content {
        max-width: 75%;
    }
}
@media (max-width: 991px) and (min-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .logo span {
        display: none;
    }
    
    .user-info span {
        display: none;
    }
    
    .message-content {
        max-width: 80%;
    }
    
    .emoji-category {
        grid-template-columns: repeat(8, 1fr);
    }
}
@media (max-width: 767px) {
    
    .private-chat-page {
        height: 100vh;
    }
    
    .private-chat-navbar {
        height: 48px;
        padding: 8px 12px;
    }
    
    .private-chat-title span:first-child {
        font-size: 15px;
    }
    
    .private-chat-title span:last-child {
        font-size: 11px;
    }
    
    .private-chat-messages {
        padding: 12px;
        gap: 10px;
    }
    
    .private-chat-messages .message {
        max-width: 85%;
    }
    
    .private-chat-input-area {
        padding: 8px 12px;
    }
    
    .private-chat-tools {
        gap: 12px;
        margin-bottom: 8px;
    }
    
    .private-chat-tools .btn-icon {
        font-size: 20px;
        padding: 6px;
    }
    
    .private-chat-input-container input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .private-chat-input-container .btn-primary {
        min-width: 44px;
        height: 44px;
    }
    
    
    .main-content {
        flex-direction: column;
    }
    
    
    .sidebar {
        position: fixed;
        top: 64px;
        left: -280px;
        width: 280px;
        height: calc(100vh - 64px);
        z-index: 1000;
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.left-sidebar.open {
        left: 0;
    }
    
    .sidebar.right-sidebar {
        left: auto;
        right: -280px;
    }
    
    .sidebar.right-sidebar.open {
        right: 0;
    }
    
    
    .navbar {
        padding: 0 var(--spacing-md);
    }
    
    .logo span {
        display: none;
    }
    
    .room-info {
        font-size: var(--font-size-md);
    }
    
    .user-info span {
        display: none;
    }
    
    
    .messages {
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }
    
    .message-content {
        max-width: 85%;
    }
    
    
    .input-area {
        padding: var(--spacing-md);
    }
    
    .input-tools {
        justify-content: center;
    }
    
    
    .modal-content {
        width: 100%;
        max-width: 400px;
        margin: auto;
        max-height: calc(100vh - 24px);
    }
    
    
    .emoji-panel {
        bottom: 100px;
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .emoji-category {
        grid-template-columns: repeat(6, 1fr);
    }
    
    
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-sm);
        background-color: transparent;
        border: none;
        color: white;
        font-size: var(--font-size-xl);
        cursor: pointer;
        margin-right: var(--spacing-sm);
    }
    
    
    .online-count-mobile {
        display: inline-block;
        background-color: var(--primary-color);
        color: white;
        font-size: var(--font-size-xs);
        padding: 2px 8px;
        border-radius: 10px;
        margin-left: var(--spacing-xs);
    }
    
    
    .system-info p {
        font-size: var(--font-size-xs);
    }
}
@media (max-width: 479px) {
    .navbar {
        height: 56px;
    }
    
    .logo i {
        font-size: 24px;
    }
    
    .sidebar {
        top: 56px;
        height: calc(100vh - 56px);
    }
    
    .message-avatar {
        width: 36px;
        height: 36px;
    }
    
    .message-content {
        max-width: 90%;
    }
    
    .message-text {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    .input-area {
        padding: var(--spacing-sm);
    }
    
    .input-tools {
        margin-bottom: var(--spacing-xs);
    }
    
    #messageInput {
        padding: var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
    
    .input-container .btn-primary {
        min-width: 44px;
        height: 44px;
        padding: var(--spacing-sm);
    }
    
    .emoji-category {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .emoji {
        font-size: 20px;
    }
}
@media (orientation: landscape) and (max-width: 767px) {
    .sidebar {
        height: calc(100vh - 64px);
    }
    
    .chat-area {
        height: calc(100vh - 64px);
    }
    
    .messages {
        max-height: calc(100vh - 180px);
    }
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .avatar,
    .message-avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        transform: scale(0.95);
    }
    
    .message-image:active {
        transform: scale(1.05);
    }
    
    .emoji:active {
        transform: scale(1.2);
    }
    .plugin-btn-floating {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        min-height: 56px !important;
        padding: 0 !important;
    }
    .plugin-btn-floating i {
        font-size: 24px !important;
    }
    .plugin-btn-toolbar {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
    }
    .plugin-btn-input-toolbar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
    }
    .lxh-float-card {
        touch-action: none;
    }
    .lxh-float-card-header {
        min-height: 44px !important;
    }
    .plugin-card {
        padding: 12px !important;
    }
    .plugin-card-header {
        gap: 12px !important;
    }
    .plugin-card-icon {
        width: 44px !important;
        height: 44px !important;
    }
    .plugin-card-icon i {
        font-size: 20px !important;
    }
    .plugin-entry-chip {
        padding: 8px 12px !important;
        min-height: 40px !important;
    }
    .plugin-card-toggle {
        width: 50px !important;
        height: 28px !important;
    }
    .plugin-card-toggle::after {
        width: 24px !important;
        height: 24px !important;
    }
    .plugin-card-toggle.on::after {
        transform: translateX(22px);
    }
}
@media print {
    .navbar,
    .sidebar,
    .input-area,
    .modal,
    .settings-panel,
    .emoji-panel {
        display: none !important;
    }
    
    .chat-area {
        height: auto;
        overflow: visible;
    }
    
    .messages {
        height: auto;
        overflow: visible;
        padding: 0;
    }
    
    .message {
        animation: none;
        page-break-inside: avoid;
    }
    
    body {
        background-color: white;
        color: black;
    }
}
