* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: #f8f9fa; color: #333; }
.chat-page { height: 100vh; display: flex; flex-direction: column; }
.header { background: #fff; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eee; }
.header h2 { font-size: 16px; color: #666; display: flex; align-items: center; gap: 8px; }
.ws-info { font-size: 12px; color: #999; background: #f0f0f0; padding: 4px 8px; border-radius: 4px; }
.header-actions { display: flex; gap: 12px; }
.btn { padding: 6px 12px; border-radius: 6px; border: none; cursor: pointer; font-size: 12px; }
.btn-primary { background: #7c4dff; color: #fff; }
.btn-light { background: #f0f0f0; color: #333; }
.btn-sm { padding: 3px 8px; font-size: 11px; }
.main-layout { display: flex; flex: 1; overflow: hidden; }
.sidebar { width: 240px; background: #fff; border-right: 1px solid #eee; padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.profile { text-align: center; }
.profile .avatar { width: 60px; height: 60px; border-radius: 50%; background: #7c4dff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 8px; }
.profile .nickname { font-weight: 500; font-size: 14px; }
.profile .uid { font-size: 11px; color: #999; }
.menu-section { flex: 1; overflow-y: auto; }
.menu-item { padding: 8px; font-size: 12px; color: #666; border-radius: 4px; cursor: pointer; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.menu-item:hover { background: #f5f5f5; }
.menu-item.active { background: #e8f0fe; color: #1976d2; }
.theme-colors { display: flex; gap: 8px; margin-top: 8px; padding-left: 20px; }
.theme-color { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; }
.theme-color.active { border: 2px solid #333; }
.chat-area { flex: 1; display: flex; flex-direction: column; background: #fafafa; }
.chat-header { padding: 12px 20px; background: #fff; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; }
.chat-tabs { display: flex; gap: 8px; }
.chat-tab { padding: 4px 8px; font-size: 12px; border-radius: 4px; cursor: pointer; }
.chat-tab.active { background: #4caf50; color: #fff; }
.announcement { background: #fff3cd; padding: 8px 12px; font-size: 12px; color: #856404; border-radius: 4px; margin: 8px 20px; }
.chat-messages { flex: 1; padding: 16px 20px; overflow-y: auto; }
.message { margin-bottom: 12px; max-width: 70%; }
.message.own { margin-left: auto; text-align: right; }
.message .avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 8px; vertical-align: top; }
.message.own .avatar { margin-right: 0; margin-left: 8px; }
.message .content { display: inline-block; background: #fff; padding: 8px 12px; border-radius: 8px; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); max-width: 100%; word-break: break-all; }
.message.own .content { background: #7c4dff; color: #fff; }
.message .image-content { max-width: 240px; border-radius: 8px; }
.message .emoji-content { font-size: 20px; }
.chat-input-area { padding: 12px 20px; background: #fff; border-top: 1px solid #eee; display: flex; align-items: center; gap: 8px; }
.chat-input-area .input-tools { display: flex; gap: 8px; }
.tool-btn { width: 28px; height: 28px; border-radius: 4px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; }
.chat-input { flex: 1; padding: 8px 12px; border: 1px solid #eee; border-radius: 20px; font-size: 13px; outline: none; }
.send-btn { padding: 8px 16px; border: none; border-radius: 20px; background: #7c4dff; color: #fff; cursor: pointer; font-size: 13px; }
.online-members { width: 200px; background: #fff; border-left: 1px solid #eee; padding: 16px; overflow-y: auto; }
.online-members h4 { font-size: 12px; color: #666; margin-bottom: 12px; }
.member-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; }
.member-item .avatar { width: 20px; height: 20px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 999; }
.modal-content { background: #fff; padding: 20px; border-radius: 8px; width: 360px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h4 { font-size: 14px; }
.modal-close { cursor: pointer; font-size: 18px; color: #999; }
