* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #f5f6fa;
}

.qq-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* 左侧面板 */
.left-panel {
    width: 300px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

/* 上部：个人信息 */
.user-profile {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.nickname {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.status {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

/* 中部：搜索框 */
.search-box {
    padding: 10px 15px;
    display: flex;
    gap: 5px;
    background-color: #f9f9f9;
}

.search-box input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.search-box button {
    padding: 6px 12px;
    background-color: #0099ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.search-box button:hover {
    background-color: #0077cc;
}

/* 下部：消息列表 */
.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-item:hover, .chat-item.active {
    background-color: #f0f5ff;
}

.chat-meta {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.chat-msg {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右侧面板 */
.right-panel {
    flex: 1;
    background-color: #f7f9fc;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 空白状态 */
.empty-state {
    text-align: center;
    color: #bbb;
}
.sub-text {
    font-size: 12px;
    margin-top: 5px;
}

/* QQ名片样式（动态生成） */
.card-container {
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
}

.card-header {
    height: 150px;
    background: linear-gradient(to bottom, #7bc6eb, #a3daf8); /* 模拟背景墙 */
    position: relative;
}

.card-body {
    padding: 60px 40px 20px 40px;
    position: relative;
}

.card-body .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
    position: absolute;
    top: -40px;
    left: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-name {
    font-size: 22px;
    font-weight: bold;
    color: #222;
    margin-bottom: 5px;
}

.info-qq {
    font-size: 12px;
    color: #777;
    margin-bottom: 20px;
}

.info-tags {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #555;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.info-company {
    font-size: 14px;
    color: #333;
}
.info-company span {
    color: #666;
    margin-right: 10px;
}
/* 申请加入群聊按钮 */
.join-group-btn {
    padding: 10px 24px;
    background-color: #0099ff;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,153,255,0.3);
}
.join-group-btn:hover {
    background-color: #0077cc;
}

/* 弹窗遮罩层 */
.qq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 弹窗主体 */
.modal-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    width: 320px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}
.modal-content h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}
.validation-question {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    background: #f5f6fa;
    padding: 10px;
    border-radius: 4px;
}
.modal-content input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    outline: none;
}

/* 弹窗按钮组 */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.modal-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
.modal-btn.cancel {
    background: #e0e0e0;
    color: #333;
}
.modal-btn.confirm {
    background: #0099ff;
    color: white;
}

/* --- 群聊界面样式 --- */
.group-chat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f4f5f7;
}

/* 群聊头部与黄色公告条 */
.group-chat-header {
    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;
}
.group-title {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    color: #333;
    text-align: center;
}
.group-notice {
    background-color: #fffbeb; /* 浅黄色公告栏 */
    border: 1px solid #fef3c7;
    margin: 0 15px 10px 15px;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.notice-badge {
    background-color: #f59e0b;
    color: white;
    font-size: 11px;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
}
.notice-text {
    font-size: 12px;
    color: #d97706;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 聊天消息区域 */
.group-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.system-time {
    text-align: center;
    font-size: 11px;
    color: #b0b0b0;
    margin: 5px 0;
}
.msg-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.msg-avatar {
    width: 35px;
    height: 35px;
    border-radius: 4px;
}
.msg-content-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.msg-author {
    font-size: 11px;
    color: #888;
}
/* 气泡样式 */
.msg-bubble {
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    max-width: 400px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    line-height: 1.4;
    position: relative;
}

/* 底部输入框占位 */
.group-chat-footer {
    padding: 10px 15px;
    background: #f9f9f9;
    border-top: 1px solid #e8e8e8;
    display: flex;
    gap: 10px;
}
.group-chat-footer input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f0f0f0;
}
.group-chat-footer button {
    padding: 0 15px;
    background: #ccc;
    color: white;
    border: none;
    border-radius: 4px;
}