/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* 设置基础字体大小 */
    -webkit-text-size-adjust: 100%; /* 防止iOS Safari自动调整字体大小 */
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    height: 100vh;
    height: 100dvh; /* 使用动态视口高度，考虑移动端浏览器UI */
    overflow: hidden;
    font-size: 1rem; /* 确保基础字体大小 */
    -webkit-text-size-adjust: 100%; /* 防止iOS Safari自动调整字体大小 */
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    margin: 0;
    padding: 0;
}

/* 页面管理 */
.page {
    display: none;
    height: 100vh;
    height: 100dvh; /* 使用动态视口高度 */
    flex-direction: column;
}

.page.active {
    display: flex;
}

/* 登录注册页面样式 */
.container, .login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.container::before, .login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
    z-index: 1;
}

.login-header h1 {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-header p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 300;
}

.form, .login-form {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    font-weight: 500;
}

.form-group input::placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-weight: 400;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.form-group input:hover:not(:focus) {
    border-color: rgba(102, 126, 234, 0.3);
}

.btn, button.btn, .btn-primary {
    width: 100% !important;
    padding: 25px 40px !important;
    border: none !important;
    border-radius: 25px !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    margin: 15px auto !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.4),
        0 3px 10px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.btn-primary {
    background: linear-gradient(145deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    position: relative;
    text-transform: none;
    border: 3px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: buttonGlow 2s ease-in-out infinite alternate;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.5),
        0 4px 12px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    background: linear-gradient(145deg, #7c8ef0 0%, #8a5fb8 50%, #f5a5fc 100%);
}

.btn-primary:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.35),
        0 4px 15px rgba(102, 126, 234, 0.25);
}

/* 登录按钮特殊效果 */

@keyframes buttonGlow {
    0% {
        box-shadow: 
            0 6px 20px rgba(102, 126, 234, 0.4),
            0 3px 10px rgba(102, 126, 234, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    100% {
        box-shadow: 
            0 8px 25px rgba(102, 126, 234, 0.6),
            0 4px 12px rgba(102, 126, 234, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 
            0 12px 35px rgba(102, 126, 234, 0.35),
            0 4px 15px rgba(102, 126, 234, 0.2);
    }
    50% {
        box-shadow: 
            0 15px 45px rgba(102, 126, 234, 0.4),
            0 6px 20px rgba(102, 126, 234, 0.25);
    }
}

.form-footer {
    text-align: center;
    margin-top: 32px;
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.95rem;
    font-weight: 400;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.form-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.form-footer a:hover::after {
    width: 100%;
}

.form-footer a:hover {
    color: #5a67d8;
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.switch-text {
    text-align: center;
    color: #666;
}

.switch-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* 主页面样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    color: white;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    position: relative;
    z-index: 1;
}

/* 聊天信息样式 */
.chat-info {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.chat-title-info h3 {
    margin: 0 0 2px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.chat-title-info p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 聊天操作按钮样式 */
.chat-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.chat-actions .action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.chat-actions .action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

/* 返回按钮样式 */
.back-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    color: white;
    font-size: 1.5rem;
    margin-right: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: white;
}

.back-btn:active {
    transform: translateY(0) scale(1.02);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.icon-btn i {
    font-size: 1.1rem;
    color: #6c757d;
}

/* 文字按钮样式 */
.text-btn {
    padding: 12px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
    margin-left: 8px;
}

/* 好友操作按钮样式 */
.friend-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.chat-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.group-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 好友请求页面样式 */
.request-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-btn:hover {
    color: #007bff;
}

.request-list {
    padding: 0;
}

.request-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.request-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.request-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    overflow: hidden;
}

.request-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.request-info {
    flex: 1;
}

.request-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.request-phone {
    font-size: 0.9rem;
    color: #666;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.accept-btn, .reject-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.accept-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.reject-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.accept-btn:hover, .reject-btn:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.request-status {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-accepted {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.text-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #007bff;
}

.text-btn:active {
    transform: translateY(0) scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 添加好友按钮样式 */
.add-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: white;
    font-size: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.add-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #667eea;
}

.add-btn:active {
    transform: translateY(0) scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 确认按钮样式 */
.confirm-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

/* 搜索区域样式 */
.search-section {
    padding: 20px;
    background: white;
    margin-bottom: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-section .form-group {
    margin-bottom: 15px;
}

.search-section .form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-section .form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 搜索按钮样式 */
#searchFriendBtn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#searchFriendBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#searchFriendBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 搜索结果样式 */
.search-result {
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    min-height: 200px;
    display: block;
}

.search-result.empty {
    color: #999;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result .user-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-result .user-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.search-result .user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-result .user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 20px;
}

.search-result .user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.search-result .user-phone {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.search-result .add-user-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    min-width: 140px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result .add-user-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.search-result .add-user-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.confirm-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 群聊表单样式 */
.group-form {
    padding: 20px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 20px 0 15px 0;
    padding-left: 5px;
}

/* 好友选择样式 */
.friend-selection {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.friend-checkbox {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.friend-checkbox:last-child {
    border-bottom: none;
}

.friend-checkbox:hover {
    background: #f8f9fa;
}

.friend-checkbox input[type="checkbox"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.friend-checkbox .friend-info {
    flex: 1;
}

.friend-checkbox .friend-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.friend-checkbox .friend-phone {
    font-size: 0.85rem;
    color: #666;
}

.logout-btn {
    background: #fee;
}

.logout-btn:hover {
    background: #fdd;
    transform: scale(1.1);
}

.logout-btn i {
    color: #dc3545;
}

/* 聊天列表样式 */
.chat-list {
    flex: 1;
    overflow-y: auto;
    background: white;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

/* IP和设备信息显示区域 */
.chat-user-info {
    margin-top: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
}

.user-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}

.user-info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 8px;
    font-weight: 500;
    min-width: 25px;
}

.info-value {
    color: white;
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    line-height: 1.2;
}

.info-location {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    margin-left: 8px;
    font-style: italic;
}

/* 多设备信息显示样式 */
.user-devices-list {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
}

.device-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    min-width: 200px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.device-item:last-child {
    margin-right: 0;
}

.device-info-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.device-info-row:last-child {
    margin-bottom: 0;
}

.device-label {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 8px;
    font-weight: 500;
    min-width: 25px;
    font-size: 0.75rem;
}

.device-value {
    color: white;
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    line-height: 1.2;
    flex: 1;
}

.device-location {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    margin-left: 8px;
    font-style: italic;
}

.device-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
    margin-top: 6px;
    font-style: italic;
    text-align: center;
}

/* 移动端基础优化 */
@media (max-width: 768px) {
    /* 防止移动端缩放问题 */
    * {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
    }
    
    /* 移动端高度优化 */
    html {
        height: 100%;
        height: 100dvh; /* 使用动态视口高度 */
    }
    
    body {
        height: 100%;
        height: 100dvh; /* 使用动态视口高度 */
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    /* 确保容器不会超出屏幕 */
    .container {
        max-width: 100vw;
        overflow-x: hidden;
        width: 100%;
    }
    
    /* 页面基础优化 */
    .page {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* 聊天界面优化 */
    .chat-container {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: 100dvh; /* 使用动态视口高度 */
        height: calc(var(--vh, 1vh) * 100); /* 使用JavaScript计算的动态高度 */
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .chat-messages {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .message {
        max-width: 85%;
        word-wrap: break-word;
        word-break: break-word;
        margin-bottom: 10px;
    }
    
    .message.own {
        justify-content: flex-end;
        margin-left: auto;
    }
    
    /* 个人资料页面移动端优化 */
    .profile-section {
        padding: 15px;
    }
    
    .profile-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .user-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        margin-right: 18px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .user-info h3 {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }
    
    .user-info p {
        font-size: 0.95rem;
    }
    
    /* 输入框优化 */
    .chat-input-container {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .chat-input {
        width: calc(100% - 60px);
        box-sizing: border-box;
    }
    
    .user-devices-list {
        gap: 8px;
        padding: 6px 0;
    }
    
    .device-item {
        min-width: 180px;
        padding: 8px 10px;
    }
    
    .device-label {
        font-size: 0.7rem;
        min-width: 20px;
    }
    
    .device-value {
        font-size: 0.7rem;
    }
    
    .device-location {
        font-size: 0.65rem;
    }
    
    .device-time {
        font-size: 0.6rem;
    }
}

/* 用户管理搜索样式 */
.user-search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.search-input-group {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
}

.clear-search-btn:hover {
    background: #f0f0f0;
    color: #666;
}

.user-level-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    min-width: 120px;
}

/* 好友请求徽章样式 */
.friend-request-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.chat-name {
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-message {
    color: #999;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    color: #999;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.chat-badge {
    position: relative;
}

.unread-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
    animation: pulse 2s infinite;
}

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

.unread-message {
    font-weight: 600;
    color: #333 !important;
}

.chat-item:has(.unread-count) {
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid #667eea;
}

/* 底部导航 */
.navigation {
    display: flex;
    background: white;
    border-top: 1px solid #e1e1e1;
    padding: 8px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    min-height: 60px;
}

.nav-btn:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

.nav-btn.active {
    color: #007bff;
    font-weight: 600;
}

.nav-text {
    font-size: 1rem;
    font-weight: 500;
}

/* 用户管理样式 */
.user-list {
    padding: 20px;
}

.user-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.user-list-header h4 {
    margin: 0;
    color: #333;
}

.user-level-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

.user-list-content {
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
    transition: all 0.3s ease;
}

.user-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    margin-right: 15px;
    flex-shrink: 0;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-info-small {
    flex: 1;
    min-width: 0;
}

.user-name-small {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-phone-small {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.user-level-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.user-level-badge.level-1 {
    background: #ff4757;
    color: white;
}

.user-level-badge.level-2 {
    background: #ffa502;
    color: white;
}

.user-level-badge.level-3 {
    background: #747d8c;
    color: white;
}

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

.user-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-action-btn.change-level {
    background: #007bff;
    color: white;
}

.user-action-btn.change-level:hover {
    background: #0056b3;
}

.user-level-form {
    padding: 20px;
}

.user-level-form .form-group {
    margin-bottom: 20px;
}

.user-level-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.user-level-form span {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
}

.user-level-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

/* IP和设备信息显示样式 */
.message-ip-info {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    border-left: 3px solid #007bff;
}

.message-ip-info .ip-address {
    font-weight: 600;
    color: #007bff;
}

.message-ip-info .device-info {
    margin-top: 4px;
    color: #666;
    word-break: break-all;
}

.message-ip-info.hidden {
    display: none;
}

/* 用户等级标识 */
.message-sender-level {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.message-sender-level.level-1 {
    background: #ff4757;
    color: white;
}

.message-sender-level.level-2 {
    background: #ffa502;
    color: white;
}

.message-sender-level.level-3 {
    background: #747d8c;
    color: white;
}

/* 主页面内容区域 */
#mainPage .content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px; /* 为底部导航留出空间 */
}

/* 子页面样式 */
.sub-page {
    display: none;
    height: 100vh;
    flex-direction: column;
}

.sub-page.active {
    display: flex;
}

/* 好友列表样式 */
.friend-list {
    flex: 1;
    overflow-y: auto;
    background: white;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.friend-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    margin-right: 15px;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    margin-bottom: 3px;
}

.friend-phone {
    color: #999;
    font-size: 0.9rem;
}

.friend-status {
    font-size: 0.8rem;
    margin-right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.friend-status.online {
    color: #28a745;
}

.friend-status.offline {
    color: #6c757d;
}

.friend-status i {
    font-size: 0.7rem;
}

.friend-status.online i {
    color: #28a745;
    animation: pulse 2s infinite;
}

.friend-status.offline i {
    color: #6c757d;
}

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

/* 个人资料页面 */
.profile-content {
    flex: 1;
    padding: 30px 20px;
    background: white;
    overflow-y: auto;
}

.avatar-section {
    text-align: center;
    margin-bottom: 40px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    cursor: pointer;
    transition: transform 0.3s;
    background-size: cover;
    background-position: center;
}

.avatar:hover {
    transform: scale(1.05);
}

.profile-info {
    max-width: 400px;
    margin: 0 auto;
}

.info-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.info-item label {
    display: block;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.editable-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editable-field span {
    font-size: 1.1rem;
    font-weight: 600;
}

.edit-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.edit-btn:hover {
    background: #f8f9fa;
}

/* 聊天页面样式 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.message.own {
    justify-content: flex-end;
}

.message.own .message-avatar {
    order: 2;
    margin-left: 8px;
    margin-right: 0;
}

.message.own .message-bubble {
    order: 1;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-bottom: 5px;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sender-name {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 3px;
    font-weight: 500;
}

.message-content {
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
}

.message-content br {
    line-height: 1.4;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.message-image-container {
    position: relative;
    display: inline-block;
}

.message-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.message-image-container:hover .message-image-overlay {
    opacity: 1;
}

.message.own .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.message:not(.own) .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    font-size: 0.7rem;
}

.message-time {
    color: #999;
}

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

.read-status {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 8px;
}

.read-status.read {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.read-status.unread {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.message.own .read-status.read {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.message.own .read-status.unread {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* 消息输入区域 */
.input-area {
    padding: 20px 24px 24px 24px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.input-container {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 28px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.input-container input,
.input-container textarea {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 16px 16px 16px 0;
    background: transparent;
    color: #333;
    box-sizing: border-box;
    font-family: inherit;
    resize: none;
    min-height: 48px;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.4;
}

.input-container textarea {
    height: auto;
}

.input-container input::placeholder,
.input-container textarea::placeholder {
    color: #aaa;
    font-weight: 400;
}

.image-btn {
    width: 56px;
    height: 56px;
    border: none;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.4rem;
    margin-right: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    flex-shrink: 0;
}

.image-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.image-btn:active {
    transform: translateY(0) scale(1.02);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.send-btn {
    width: 56px;
    height: 56px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.4rem;
    margin-left: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.send-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
    transform: translateY(0) scale(1.02);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 移除重复的样式定义 */

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

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

.modal-body {
    padding: 20px;
}

/* 好友选择 */
.friend-selection {
    margin-top: 20px;
}

.friend-selection h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #666;
}

.friend-checkbox {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.friend-checkbox:hover {
    background: #f8f9fa;
}

.friend-checkbox input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.friend-checkbox .friend-info {
    flex: 1;
}

.friend-checkbox .friend-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.friend-checkbox .friend-phone {
    font-size: 0.8rem;
    color: #999;
}

/* 小屏幕移动端优化 */
@media (max-width: 480px) {
    /* 基础样式重置 */
    html {
        font-size: 14px; /* 小屏幕使用更小的基础字体 */
    }
    
    body {
        font-size: 0.875rem;
    }
    
    /* 容器优化 */
    .container {
        padding: 10px;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .form {
        padding: 20px 15px;
        max-width: 100%;
    }
    
    .header {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .chat-item, .friend-item {
        padding: 12px 15px;
    }
    
    /* 聊天界面移动端优化 */
    .chat-container {
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* 使用动态视口高度 */
        height: calc(var(--vh, 1vh) * 100); /* 使用JavaScript计算的动态高度 */
        max-width: 100vw;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .chat-header {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .chat-messages {
        padding: 10px;
        width: 100%;
        max-width: 100%;
    }
    
    .message {
        max-width: 80%;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .message.own {
        justify-content: flex-end;
        margin-left: auto;
    }
    
    .message-content {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* 个人资料页面移动端优化 */
    .profile-section {
        padding: 15px;
    }
    
    .profile-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .user-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-right: 20px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .user-info h3 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .user-info p {
        font-size: 1rem;
    }
    
    .message-time {
        font-size: 0.7rem;
    }
    
    /* 移动端搜索框优化 */
    .search-section {
        padding: 10px 15px;
    }
    
    .search-input-group {
        padding: 6px 12px;
    }
    
    .search-input {
        font-size: 0.9rem;
    }
    
    .chat-input-container {
        padding: 10px;
    }
    
    .chat-input {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .send-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* 模态框移动端优化 */
    .modal-content {
        width: 95vw;
        max-width: 95vw;
        margin: 5vh auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-body {
        padding: 15px;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .messages {
        padding: 15px;
    }
    
    .input-area {
        padding: 16px 20px 20px 20px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
        border-top: 1px solid rgba(102, 126, 234, 0.1);
    }
    
    .input-container {
        padding: 6px 6px 6px 20px;
        border-radius: 28px;
        display: flex;
        align-items: center;
        background: white;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
        border: 2px solid rgba(102, 126, 234, 0.1);
    }
    
    .input-container input,
    .input-container textarea {
        padding: 16px 16px 16px 0;
        font-size: 16px; /* 防止iOS缩放 */
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        resize: none;
        min-height: 20px;
        max-height: 100px;
        overflow-y: auto;
        line-height: 1.4;
    }
    
    .input-container textarea {
        height: auto;
    }
    
    .send-btn {
        width: 52px;
        height: 52px;
        border-radius: 26px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    
    .image-btn {
        width: 52px;
        height: 52px;
        border-radius: 26px;
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-right: 8px;
    }
}

/* 图片预览模态框 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.image-modal-close:hover {
    color: #ccc;
}

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

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

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

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

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page.active {
    animation: fadeIn 0.3s ease-out;
}

/* 消息动画 */
@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message {
    animation: messageSlideIn 0.3s ease-out;
}

/* 聊天页面头像样式 */
.chat-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-right: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 搜索框样式 */
.search-section {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 8px 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.search-icon {
    color: #6c757d;
    margin-right: 10px;
    font-size: 0.9rem;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: #333;
    padding: 5px 0;
}

.search-input::placeholder {
    color: #adb5bd;
}

.clear-search-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.clear-search-btn:hover {
    background: #e9ecef;
    color: #495057;
}

/* 备注相关样式 */
.remark-action {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.remark-action:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
}

.form-hint {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.friend-remark {
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 2px;
}

.friend-name-with-remark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.friend-name-with-remark .friend-name {
    font-weight: 500;
    color: #333;
}

/* 个人资料页面样式 */
.profile-section {
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.user-info {
    flex: 1;
}

.user-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: #333;
}

.user-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.change-avatar-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: #666;
    font-size: 1rem;
}

.change-avatar-btn:hover {
    background: #e0e0e0;
}

.profile-menu {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

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

.menu-item.logout {
    color: #e74c3c;
}

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

.menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.menu-item span {
    flex: 1;
}

.menu-item .fas.fa-chevron-right {
    margin-right: 0;
    margin-left: auto;
    color: #ccc;
}

/* 登录页面响应式优化 */
@media (max-width: 768px) {
    .login-container {
        padding: 20px 15px;
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
    
    .login-form {
        padding: 32px 24px;
        max-width: 100%;
        margin: 0 10px;
    }
    
    .form-group input {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px 10px;
    }
    
    .login-header h1 {
        font-size: 1.8rem;
    }
    
    .login-form {
        padding: 28px 20px;
        border-radius: 20px;
        margin: 0 5px;
    }
    
    .form-group input {
        padding: 16px 18px;
        border-radius: 16px;
        font-size: 16px;
    }
    
    .btn {
        padding: 20px 35px;
        border-radius: 20px;
        font-size: 1.2rem;
        min-height: 50px;
        margin: 10px auto;
    }
}


/* 图片消息容器样式优化 */
.message-image-container {
    position: relative;
    display: inline-block;
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.message-image-container:hover .message-image-overlay {
    opacity: 1;
}

.message-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.message-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 8px;
}

.message-image-overlay i {
    color: white;
    font-size: 24px;
}

/* 群聊信息弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.group-info-section {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.group-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.group-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.group-details h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
}

.group-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.group-members-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1rem;
}

.members-list {
    max-height: 200px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-right: 12px;
    flex-shrink: 0;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-weight: 500;
    color: #333;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-phone {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

.member-action {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.member-action:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.member-status {
    padding: 6px 12px;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 15px;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-left: 10px;
}

/* 好友操作菜单样式 */
.friend-menu-content {
    max-width: 350px;
}

.friend-menu-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.friend-menu-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.friend-menu-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.friend-menu-details h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #333;
}

.friend-menu-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.friend-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-action-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-align: left;
}

.menu-action-btn:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.menu-action-btn i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.menu-action-btn.chat-action {
    color: #007bff;
}

.menu-action-btn.chat-action:hover {
    background: #e3f2fd;
}

.menu-action-btn.group-action {
    color: #28a745;
}

.menu-action-btn.group-action:hover {
    background: #e8f5e8;
}

.menu-action-btn.recommend-action {
    color: #ffc107;
}

.menu-action-btn.recommend-action:hover {
    background: #fff8e1;
}

.menu-action-btn.delete-action {
    color: #dc3545;
}

.menu-action-btn.delete-action:hover {
    background: #fdeaea;
}

/* 好友列表箭头样式 */
.friend-arrow {
    color: #ccc;
    font-size: 0.9rem;
    margin-left: auto;
    transition: color 0.3s ease;
}

.friend-item:hover .friend-arrow {
    color: #999;
}

/* 好友请求提示样式 */
.friend-request-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

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

/* 聊天类型区分样式 */
.group-chat-item {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
}

.private-chat-item {
    border-left: 4px solid #007bff;
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
}

.group-chat-item:hover {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
}

.private-chat-item:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
}

/* 聊天头部类型区分 */
.chat-info.group-chat {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f8fff8 0%, #ffffff 100%);
}

.chat-info.private-chat {
    border-left: 4px solid #007bff;
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
}

/* 聊天类型指示器 */
.chat-type-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.group-indicator {
    background: #28a745;
}

.private-indicator {
    background: #007bff;
}

/* 聊天类型徽章 */
.chat-type-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 500;
}

.group-badge {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 聊天头像容器 */
.chat-avatar {
    position: relative;
}

/* 群聊特殊样式 */
.group-chat-item .chat-avatar {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.private-chat-item .chat-avatar {
    background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
}

/* 聊天名称样式调整 */
.group-chat-item .chat-name {
    color: #155724;
    font-weight: 600;
}

.private-chat-item .chat-name {
    color: #004085;
    font-weight: 600;
}

/* 群聊操作按钮特殊样式 */
.group-chat .chat-actions .action-btn {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.group-chat .chat-actions .action-btn:hover {
    background: rgba(40, 167, 69, 0.2);
    color: #1e7e34;
}

/* 私聊头部样式 */
.private-chat .chat-title {
    color: #004085;
}

.private-chat .chat-subtitle {
    color: #6c757d;
}

/* 群聊头部样式 */
.group-chat .chat-title {
    color: #155724;
}

.group-chat .chat-subtitle {
    color: #28a745;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .group-info-section {
        flex-direction: column;
        text-align: center;
    }
    
    .group-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .friend-menu-content {
        max-width: 95%;
    }
    
    .menu-action-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .chat-type-indicator {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
    
    .chat-type-badge {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
}

/* 安装提示样式 */
.install-prompt {
    margin-top: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 12px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    animation: slideInUp 0.3s ease-out;
}

.install-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.install-content i {
    font-size: 1.2rem;
    color: #fff;
}

.install-content span {
    font-size: 0.95rem;
    font-weight: 500;
}

.install-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.install-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.install-btn:active {
    transform: translateY(0);
}

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

/* 通知设置样式 */
.notification-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-status span {
    font-size: 0.9rem;
    color: #666;
}

.notification-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.notification-setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: #333;
}

.setting-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.setting-control {
    flex-shrink: 0;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.notification-help {
    margin-top: 20px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.notification-help p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-help i {
    color: #007bff;
}

/* 设置相关样式 */
.settings-section {
    margin-bottom: 24px;
}

.settings-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.settings-item {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.settings-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

.settings-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-item-info i {
    font-size: 18px;
    color: #666;
    width: 20px;
    text-align: center;
}

.settings-item-info span {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-help {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    color: #007bff;
    border: 1px solid #007bff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

/* 群聊信息相关样式 */
.group-members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.group-members-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

/* 添加群成员模态框样式 */
.friends-list-section {
    margin-bottom: 20px;
}

.friends-list-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.friends-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.friend-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.friend-item:hover {
    background-color: #f8f9fa;
}

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

.friend-item.selected {
    background-color: #e3f2fd;
}

.friend-item input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.friend-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    margin-right: 12px;
}

.friend-item-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.friend-item-info {
    flex: 1;
}

.friend-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
}

.friend-item-phone {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.selected-members-section {
    margin-bottom: 20px;
}

.selected-members-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.selected-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-member-tag {
    display: flex;
    align-items: center;
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    gap: 6px;
}

.selected-member-tag .remove-btn {
    background: none;
    border: none;
    color: #1976d2;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.selected-member-tag .remove-btn:hover {
    background: #bbdefb;
}

.no-friends-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-friends-message i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 16px;
}

.no-friends-message p {
    font-size: 14px;
    margin: 0;
}

/* 系统消息样式 */
.system-message {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.system-message-content {
    background: #f0f0f0;
    color: #666;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 80%;
    text-align: center;
}

.system-message-content i {
    color: #999;
    font-size: 12px;
}








