/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 夜间模式 */
body.dark-mode {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

body.dark-mode .chat-container {
    background: #2c3e50;
}

body.dark-mode .sidebar {
    background: #34495e;
    border-right: 1px solid #4a5f7a;
}

body.dark-mode .main-chat {
    background: #2c3e50;
}

body.dark-mode .chat-header {
    background: #34495e;
    border-bottom: 1px solid #4a5f7a;
    color: #ecf0f1;
}

body.dark-mode .messages-container {
    background: #2c3e50;
}

body.dark-mode .message-content {
    background: #34495e;
    color: #ecf0f1;
}

body.dark-mode .message.own .message-content {
    background: #3498db;
    color: white;
}

body.dark-mode .message-input-container {
    background: #34495e;
    border-top: 1px solid #4a5f7a;
}

body.dark-mode #message-input {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #4a5f7a;
}

body.dark-mode .search-input {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #4a5f7a;
}

body.dark-mode .emoji-picker {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
}

body.dark-mode .right-panel {
    background: #34495e;
    border-left: 1px solid #4a5f7a;
}

body.dark-mode .panel-header {
    background: #2c3e50;
    border-bottom: 1px solid #4a5f7a;
    color: #ecf0f1;
}

/* 登录界面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 400px;
    animation: slideIn 0.5s ease-out;
}

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

.login-header {
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 300;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-btn i {
    margin-right: 8px;
}

/* 主聊天界面 */
.chat-container {
    display: flex;
    height: 100vh;
    background: #f5f5f5;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.user-info {
    padding: 20px;
    background: #34495e;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #3498db;
}

.user-details {
    flex: 1;
}

.username {
    font-weight: bold;
    font-size: 16px;
}

.user-status {
    font-size: 12px;
    color: #95a5a6;
}

.user-actions {
    display: flex;
    gap: 5px;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 房间和用户列表 */
.rooms-section, .users-section {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #34495e;
}

.section-header h3 {
    font-size: 14px;
    color: #bdc3c7;
    font-weight: normal;
}

.online-count {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.rooms-list, .users-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.room-item, .user-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-item:hover, .user-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.room-item.active {
    background: #3498db;
}

.room-info, .user-info-item {
    flex: 1;
}

.room-name, .user-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.room-users, .user-status-text {
    font-size: 12px;
    color: #95a5a6;
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #3498db;
}

/* 主聊天区域 */
.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-header {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.room-info h2 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.room-user-count {
    color: #7f8c8d;
    font-size: 14px;
}

.chat-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.chat-actions .icon-btn {
    color: #7f8c8d;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 20px;
    font-size: 14px;
    width: 200px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

/* 消息容器 */
.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.welcome-message {
    text-align: center;
    color: #7f8c8d;
    margin-top: 50px;
}

.welcome-message i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #bdc3c7;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: messageSlideIn 0.3s ease-out;
}

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

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e1e1e1;
}

.message-content {
    max-width: 70%;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message.own .message-content {
    background: #3498db;
    color: white;
}

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

.message-username {
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
}

.message.own .message-username {
    color: rgba(255, 255, 255, 0.9);
}

.message-time {
    font-size: 12px;
    color: #95a5a6;
}

.message.own .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.message-text {
    line-height: 1.4;
    word-wrap: break-word;
}

.message-recalled {
    font-style: italic;
    color: #95a5a6;
    background: #f8f9fa !important;
}

.message-actions {
    display: none;
    position: absolute;
    top: 5px;
    right: 5px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 5px;
    gap: 5px;
}

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

.message-action-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.message-action-btn:hover {
    background: #f8f9fa;
    color: #3498db;
}

.file-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e1e1e1;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: bold;
    margin-bottom: 2px;
}

.file-size {
    font-size: 12px;
    color: #7f8c8d;
}

.file-download {
    background: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.file-download:hover {
    background: #2980b9;
}

.image-message {
    max-width: 300px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

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

/* 系统消息 */
.system-message {
    text-align: center;
    color: #95a5a6;
    font-size: 14px;
    margin: 10px 0;
    font-style: italic;
}

/* 正在输入指示器 */
.typing-indicator {
    padding: 10px 20px;
    color: #7f8c8d;
    font-style: italic;
    font-size: 14px;
    background: rgba(52, 152, 219, 0.1);
}

/* 消息输入区域 */
.message-input-container {
    background: white;
    border-top: 1px solid #e1e1e1;
    padding: 20px;
}

.input-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tool-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tool-btn:hover {
    background: #f8f9fa;
    color: #3498db;
}

.input-area {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#message-input {
    flex: 1;
    border: 2px solid #e1e1e1;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

#message-input:focus {
    outline: none;
    border-color: #3498db;
}

.send-btn {
    background: #3498db;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.send-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* 表情选择器 */
.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 20px;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 300px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-item {
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

.emoji-item:hover {
    background: #f8f9fa;
}

/* 搜索结果 */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e1e1;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-content {
    font-size: 14px;
    margin-bottom: 5px;
}

.search-result-meta {
    font-size: 12px;
    color: #7f8c8d;
}

.search-highlight {
    background: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
}

/* 上传进度 */
.upload-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 250px;
}

.upload-progress-bar {
    width: 100%;
    height: 6px;
    background: #e1e1e1;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}

.upload-progress-fill {
    height: 100%;
    background: #3498db;
    transition: width 0.3s;
}

/* 消息操作菜单 */
.message-menu {
    position: absolute;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 120px;
}

.message-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    border-bottom: 1px solid #f8f9fa;
}

.message-menu-item:hover {
    background: #f8f9fa;
}

.message-menu-item:last-child {
    border-bottom: none;
}

.message-menu-item.danger {
    color: #e74c3c;
}

.message-menu-item.danger:hover {
    background: #fdf2f2;
}

/* 语音录制界面 */
.voice-recorder {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.voice-recorder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.voice-controls {
    display: flex;
    gap: 20px;
}

.voice-control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-control-btn.cancel {
    background: #e74c3c;
    color: white;
}

.voice-control-btn.cancel:hover {
    background: #c0392b;
}

.voice-control-btn.stop {
    background: #27ae60;
    color: white;
}

.voice-control-btn.stop:hover {
    background: #229954;
}

/* 语音消息播放器 */
.voice-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 15px;
    max-width: 250px;
}

.voice-play-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.voice-play-btn:hover {
    background: #2980b9;
}

.voice-waveform {
    flex: 1;
    height: 30px;
    background: #e1e1e1;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.voice-progress {
    height: 100%;
    background: #3498db;
    border-radius: 15px;
    transition: width 0.1s;
}

.voice-duration {
    font-size: 12px;
    color: #7f8c8d;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-modal {
    background: none;
    border: none;
    font-size: 18px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.close-modal:hover {
    background: #f8f9fa;
}

.modal-body {
    padding: 20px;
}

/* 管理员面板 */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.tab-content {
    display: none;
}

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

.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e1e1e1;
}

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

.admin-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.admin-user-details {
    display: flex;
    flex-direction: column;
}

.admin-user-name {
    font-weight: bold;
    margin-bottom: 2px;
}

.admin-user-role {
    font-size: 12px;
    color: #7f8c8d;
}

.admin-user-actions {
    display: flex;
    gap: 5px;
}

.admin-action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.admin-action-btn.primary {
    background: #3498db;
    color: white;
}

.admin-action-btn.danger {
    background: #e74c3c;
    color: white;
}

.admin-action-btn:hover {
    opacity: 0.8;
}

/* 表单样式 */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    padding: 10px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* 右键菜单 */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    min-width: 150px;
}

.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.context-menu-item:hover {
    background: #f8f9fa;
}

.context-menu-item.danger {
    color: #e74c3c;
}

.context-menu-item.danger:hover {
    background: #fdf2f2;
}

/* 通知横幅 */
.notification-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #3498db;
    color: white;
    padding: 15px;
    z-index: 10000;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.notification-content i {
    font-size: 18px;
}

/* 管理员标识 */
.admin-badge {
    background: #f39c12;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* 房间设置指示器 */
.room-settings-indicator {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.setting-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: #95a5a6;
    color: white;
}

.setting-badge.slow-mode {
    background: #e67e22;
}

.setting-badge.no-files {
    background: #e74c3c;
}

/* 右侧面板 */
.right-panel {
    width: 300px;
    background: white;
    border-left: 1px solid #e1e1e1;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

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

/* 私聊窗口 */
.private-chat-window {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 300px;
    height: 400px;
    background: white;
    border: 1px solid #e1e1e1;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.private-chat-header {
    padding: 15px;
    background: #3498db;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

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

.chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.chat-controls {
    display: flex;
    gap: 5px;
}

.chat-controls button {
    background: none;
    border: none;
    color: white;
    padding: 5px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.private-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.private-input {
    padding: 15px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.private-input textarea {
    flex: 1;
    border: 1px solid #e1e1e1;
    border-radius: 15px;
    padding: 8px 12px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
}

.send-private-btn {
    background: #3498db;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.send-private-btn:hover {
    background: #2980b9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }
    
    .right-panel {
        width: 250px;
    }
    
    .private-chat-window {
        width: 280px;
        right: 10px;
    }
    
    .login-box {
        min-width: 300px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
    }
    
    .main-chat {
        height: calc(100vh - 200px);
    }
    
    .right-panel {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        z-index: 1000;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}