.wechat-container {
    /* 高度设置 - 优雅降级 */
    min-height: 100vh;
    min-height: -webkit-fill-available;
    min-height: 100dvh;
    height: 100%;
    
    /* 布局设置 */
    display: flex;
    flex-direction: column;
    background: rgba(247, 247, 247, 0.3);
    
    /* 定位控制 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    
    /* 性能优化 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000;
    -webkit-perspective: 1000;
    
    /* 安全区域适配 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-top: constant(safe-area-inset-top, 0px);
    padding-bottom: constant(safe-area-inset-bottom, 0px);
    padding-left: constant(safe-area-inset-left, 0px);
    padding-right: constant(safe-area-inset-right, 0px);
}


.header {
    height: 44px;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    position: fixed;
    top: env(safe-area-inset-top);
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.title {
    font-size: 17px;
    font-weight: 500;
    color: #000;
    text-align: center;
    flex: 1;
    margin: 0 48px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icons {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    background: transparent;
    padding: 8px 0;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    z-index: 1;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    padding-top: calc(60px + env(safe-area-inset-top));
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.chat-list::-webkit-scrollbar {
    display: none;  /* Chrome, Safari */
    width: 0;
}

.chat-item {
    display: flex;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(238, 238, 238, 0.5);
    margin: 0 8px 8px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

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

.chat-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
    background: rgba(255, 255, 255, 0.7);
}

.avatar img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content {
    flex: 1;
    margin-left: 10px;
    overflow: hidden;
}

.name {
    font-size: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message {
    font-size: 14px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time {
    font-size: 12px;
    color: #999;
}

.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: rgba(247, 247, 247, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom);
    height: calc(60px + env(safe-area-inset-bottom));
    height: calc(60px + constant(safe-area-inset-bottom));
}


.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    position: relative;
    cursor: pointer;
    height: 60px;
    padding-bottom: 0;
}

.tab-item i {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tab-item span {
    font-size: 12px;
    color: #666;
    transition: color 0.3s ease;
}

.tab-item.active span {
    color: #07c160;
    font-weight: 500;
}



/* 定图标样式 */
.icon-chat::before {
    content: '';
    display: inline-block;
    width: 100%;
    height: 100%;
    background: no-repeat center;
    background-image: url('https://cdn-icons-png.flaticon.com/512/1380/1380370.png');
    background-size: contain;
    opacity: 0.7;
}

.icon-contacts::before {
    content: '';
    display: inline-block;
    width: 100%;
    height: 100%;
    background: no-repeat center;
    background-image: url('https://cdn-icons-png.flaticon.com/512/1250/1250592.png');
    background-size: contain;
    opacity: 0.7;
}

.icon-discover::before {
    content: '';
    display: inline-block;
    width: 100%;
    height: 100%;
    background: no-repeat center;
    background-image: url('./assert/discover.png');
    background-size: contain;
    opacity: 0.7;
}

.icon-me::before {
    content: '';
    display: inline-block;
    width: 100%;
    height: 100%;
    background: no-repeat center;
    background-image: url('https://cdn-icons-png.flaticon.com/512/1077/1077063.png');
    background-size: contain;
    opacity: 0.7;
}

/* 激活状态的图标样式 */
.tab-item.active i::before {
    opacity: 1;
    filter: invert(57%) sepia(75%) saturate(1304%) hue-rotate(93deg) brightness(95%) contrast(89%);
}

/* 悬停状态的图标样式 */
.tab-item:hover i::before {
    opacity: 0.9;
}


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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.chat-list::-webkit-scrollbar {
    display: none;
}

.chat-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.chat-list::-webkit-scrollbar-track {
    background: transparent;
}

/* 页面切换相关样式 */
.page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: transform 0.3s ease;
    background: rgba(247, 247, 247, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    top: env(safe-area-inset-top); /* 从安全区域开始 */
    bottom: env(safe-area-inset-bottom); /* 从安全区域开始 */
}

.main-page {
    transform: translateX(0);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.main-page.slide-out {
    transform: translateX(-100%);
}

.chat-page {
    transform: translateX(100%);
    padding-top: 44px; /* header的高度 */
    padding-top: calc(44px + env(safe-area-inset-top)); /* 顶部状态栏高度 + 安全区域 */
    padding-bottom: calc(24px + env(safe-area-inset-bottom)); /* 底部导航栏高度 + 安全区域 */

}

.chat-page.slide-in {
    transform: translateX(0);
}

/* 聊天详情页样式 */
.back-button {
    padding: 10px;
    margin-left: -10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.back-button:active {
    transform: scale(0.95);
}

.back-button::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(45deg);
    margin-right: -4px;
}

.chat-page .header {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chat-page .header .title {
    text-align: center;
    margin: 0 auto;
    font-weight: 500;
    color: #333;
}

.chat-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-top: calc(24px + env(safe-area-inset-top)); /* 顶部状态栏高度 + 安全区域 */
    padding-bottom: calc(44px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.chat-content::-webkit-scrollbar {
    width: 0 !important;
    display: none !important;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding-bottom: 15px;
}

.message-hint {
    color: #999;
    font-size: 14px;
}

/* 添加点击效果 */
.chat-item {
    cursor: pointer;
}

.chat-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 聊天输入区域容器 */
.chat-input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: #f7f7f7;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.input-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666;
    padding: 0px;
}

.input-toolbar i {
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
}

.input-toolbar i:hover {
    color: #07c160;
    transform: scale(1.1);
}

.input-box {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 4px;
    border: none;
    padding: 8px 12px;
    min-height: 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}

.input-box:focus-within {
    border-color: #07c160;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

.input-box input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    min-height: 24px;
}

/* 优化聊天页面的整体布局 */
.chat-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 发按钮样式 */
.send-btn {
    min-width: 56px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #07c160;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    flex-shrink: 0;
}

.send-btn.active {
    opacity: 1;
}

.send-btn:hover {
    background: #06ae56;
}

.send-btn:active {
    transform: scale(0.95);
}

/* 图片上传按钮样式 */
.upload-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-btn .icon-image {
    width: 24px;
    height: 24px;
}

.upload-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.upload-btn:active {
    transform: scale(0.95);
}

.icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.upload-btn:hover .icon-image {
    opacity: 1;
}

/* 聊天消息样式 */
.chat-messages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
}

.message-item {
    max-width: 70%;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 2px 0;
}

.message-content {
    padding: 10px 12px;
    border-radius: 3px 15px 15px 15px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.message-item.self {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.message-item.self .message-content {
    background: #95ec69;
    border-radius: 15px 3px 15px 15px;
}

.message-image {
    max-width: 200px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* 通讯录页面样式 */
.contacts-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f7f7f7;
    position: relative;
    padding-top: calc(44px + env(safe-area-inset-top)); /* 顶部状态栏高度 + 安全区域 */
    padding-bottom: calc(60px + env(safe-area-inset-bottom)); /* 底部导航栏高度 + 安全区域 */

}

/* 搜索框容器 */
.search-container {
    position: sticky;
    top: 44px;
    z-index: 99;
    padding: 8px 12px;
    background: #f7f7f7;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 搜索框样式优化 */
.search-box {
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
}

.search-box .icon-search {
    color: #888;
    font-size: 15px;
    margin-right: 6px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    width: 100%;
    color: #333;
}

.search-box input::placeholder {
    color: #999;
}

/* 联系人列表容器 */
.contact-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 50px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    z-index: 1;
}

/* 特殊联系人组样式 */
.special-contacts {
    background: #fff;
    margin-bottom: 8px;
}

.special-contacts .contact-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
}

.special-contacts .contact-item:last-child {
    border-bottom: none;
}

/* 联系人分组标题 */
.section-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    padding: 12px 16px;
    background: #F8F9FC;  /* 浅灰色背景 */
    border-radius: 8px;   /* 圆角 */
    margin-bottom: 12px;
    display: flex;
    align-items: center;

    padding: 4px 16px;
    background: #f7f7f7;
    color: #666;
    font-size: 14px;
    top:0px;
}



/* 联系人项样式 */
.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.contact-item:active {
    background: #f0f0f0;
}

.contact-item .avatar {
    width: 42px;
    height: 42px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
}

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

.contact-item .name {
    font-size: 16px;
    color: #333;
}

/* 母索引样式优化 */
.letter-index {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    padding: 8px 4px;
    background: transparent;
    z-index: 10;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.letter-index span {
    font-size: 12px;
    color: #07c160;
    padding: 4px 6px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.letter-index span:active {
    color: #ffffff;
    background: #07c160;
    border-radius: 8px;
}

/* 联系人分组样式 */
.contact-section {
    background: #fff;
    margin-bottom: 8px;
}

/* 特殊联系人组（如新的朋友、群聊等）样式 */
.special-contacts {
    margin-bottom: 8px;
}

.special-contacts .contact-item {
    padding: 12px 16px;
}

.special-contacts .avatar {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.special-contacts .avatar i {
    font-size: 24px;
    color: #07c160;
}

/* 新的朋友图标 */
.icon-new-friend {
    background: #57be6a;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-new-friend::before {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url('https://cdn-icons-png.flaticon.com/512/9840/9840707.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(100%);
}

/* 群聊图标 */
.icon-group {
    background: #57be6a;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-group::before {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url('https://cdn-icons-png.flaticon.com/512/9840/9840701.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(100%);
}

/* 标签图标 */
.icon-tag {
    background: #57be6a;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-tag::before {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url('https://cdn-icons-png.flaticon.com/512/9840/9840765.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(100%);
}

/* 公众号图标 */
.icon-official {
    background: #57be6a;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-official::before {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url('https://cdn-icons-png.flaticon.com/512/9840/9840719.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(100%);
}

/* 发现页面样式 */
.discover-page {
    flex: 1;
    background: rgba(247, 247, 247, 0.5);
    padding-top: calc(44px + env(safe-area-inset-top)); /* 顶部状态栏高度 + 安全区域 */
    padding-bottom: calc(60px + env(safe-area-inset-bottom)); /* 底部导航栏高度 + 安全区域 */
}

.discover-section {
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.8);
}

.discover-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.discover-item i {
    font-size: 22px;
    margin-right: 15px;
    color: #07c160;
}

.discover-item span {
    flex: 1;
}

.icon-arrow {
    color: #ccc;
    font-size: 14px;
}

/* 的页面样式 */
.me-page {
    flex: 1;
    background: rgba(247, 247, 247, 0.5);
    padding-top: calc(44px + env(safe-area-inset-top)); /* 顶部状态栏高度 + 安全区域 */
    padding-bottom: calc(60px + env(safe-area-inset-bottom)); /* 底部导航栏高度 + 安全区域 */
}

.user-info {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.user-info .avatar img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
}

.user-info .info {
    flex: 1;
    margin-left: 15px;
}

.user-info .name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
}

.user-info .wxid {
    font-size: 14px;
    color: #666;
}

.me-section {
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.me-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.me-item i:first-child {
    font-size: 22px;
    margin-right: 15px;
    color: #07c160;
}

/* 加消息时间样式 */
.message-time {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin: 10px 0;
    width: 100%;
}

/* 图预览区域样式 - 合后的版本 */
.image-preview {
    position: relative;
    padding: 8px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    margin: 8px;
    display: inline-block;
}

.image-preview img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 关闭图标样式 - 合并后的版本 */
.image-preview .icon-close {
    position: absolute;
    top: -8px;
    right: -8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-preview .icon-close::before,
.image-preview .icon-close::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background: white;
    border-radius: 1px;
}

.image-preview .icon-close::before {
    transform: rotate(45deg);
}

.image-preview .icon-close::after {
    transform: rotate(-45deg);
}

.image-preview .icon-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.image-preview .icon-close:active {
    transform: scale(0.95);
}

/* 头像样式 - 合并后的版本 */
.contact-item .avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.contact-item .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* 多图片预览区域样式 */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    margin: 8px;
}

/* 输入框区域样式 */
.input-box {
    display: flex;
    flex-direction: column;
}

.input-box input {
    min-height: 24px;
}

/* 联系人详情页面样式优化 */
.contact-detail-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f7f7f7;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding-top: 44px; /* header的高度 */
    padding-top: calc(44px + env(safe-area-inset-top)); /* 顶部状栏高度 + 安全区域 */

 
}

.contact-detail-content{
    padding-top: calc(env(safe-area-inset-top)); /* 顶部状态栏度 + 全区域 */
}

.contact-detail-page.slide-in {
    transform: translateX(0);
}

/* 个人信息卡片样式 */
.info-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.avatar-large {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

.avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.info-main .name {
    font-size: 22px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.info-main .wxid {
    font-size: 14px;
    color: #888;
}

/* 详细信息列表样式 */
.detail-list {
    background: #fff;
    margin-bottom: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
}

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

.detail-item .label {
    width: 80px;
    color: #333;
    font-size: 16px;
}

.detail-item .value {
    flex: 1;
    color: #666;
    font-size: 16px;
}

.icon-arrow {
    width: 16px;
    height: 16px;
    background-size: contain;
    opacity: 0.3;
}

/* 底部操作按钮样式 */
.bottom-actions {
    margin-top: auto;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: #f7f7f7;
}

.action-buttons {
    display: flex;
    gap: 16px;
    padding: 0 16px;
}

.action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.action-btn .icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-message::before,
.icon-video::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-message::before {
    background-image: url('https://cdn-icons-png.flaticon.com/512/3193/3193015.png');
    filter: invert(57%) sepia(75%) saturate(1304%) hue-rotate(93deg) brightness(95%) contrast(89%);
}

.icon-video::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-image: url('https://cdn-icons-png.flaticon.com/512/9840/9840573.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(57%) sepia(75%) saturate(1304%) hue-rotate(93deg) brightness(95%) contrast(89%);
}

.action-btn span {
    font-size: 15px;
    color: #07c160;
}

/* 点击效果 */
.action-btn:active {
    background: rgba(0, 0, 0, 0.05);
}

/* 通讯录 - 特殊联系人样式 */
.special-contacts {
    background: #fff;
}

.special-contacts .contact-item {
    padding: 6px 16px;
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
}

.special-contacts .special-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.special-contacts .special-avatar.green-bg {
    background-color: #07c160;  /* 微信特征绿色 */
}

/* 特殊联系人图标样式 */
.special-contacts .icon-new-friend {
    width: 15px;
    height: 15px;
}

.special-contacts .icon-group {
    width: 18px;
    height: 18px;
    transform: scale(0.85);
}

.special-contacts .icon-tag {
    width: 14px;
    height: 14px;
}

.special-contacts .icon-official {
    width: 16px;
    height: 16px;
    transform: scale(0.9);
}

.special-contacts .contact-item .name {
    margin-left: 10px;
    font-size: 14px;
    color: #333;
}

/* 联系人列表样式 */
.contact-section {
    background: #fff;
}



.contact-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #f5f5f5;
}

.contact-item .avatar {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.contact-item .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.contact-item .name {
    font-size: 16px;
    color: #333;
}

/* 字母索引样式 */
.letter-index {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    padding: 8px 4px;
    background: transparent;
}

.letter-index span {
    font-size: 12px;
    color: #07c160;
    padding: 2px 4px;
    cursor: pointer;
}

/* 特殊联系人图标样式调整 */
.special-contacts .contact-item .avatar {
    width: 36px;  /* 稍微缩小容器尺寸 */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.special-contacts .contact-item .avatar img {
    width: 36px;
    height: 36px;
    border-radius: 3px;  /* 稍微调整圆角 */
}

/* 调整图标与文字的间距 */
.special-contacts .contact-item .name {
    margin-left: 12px;
    font-size: 14px;
}

/* 普通联系人头像样式（用作参考） */
.contact-item .avatar {
    width: 40px;
    height: 40px;
}

.contact-item .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* 添加滚动条样式 */
.contact-list::-webkit-scrollbar {
    width: 0;  /* 在移动端隐滚动条 */
}

/* 修改读消息徽章的样式 */
.chat-item .badge {
    position: absolute;
    left: 5px; /* 调整到头像左上角 */
    top: 2px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: #f43530;
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    padding: 0 4px;
    z-index: 1;
}

/* 当未读消息数大于99时的样式 */
.chat-item .badge.large {
    font-size: 10px;
    padding: 0 2px;
}

/* 调整头像容器为相对定位 */
.chat-item .avatar {
    position: relative;
    width: 48px;
    height: 48px;
    margin-right: 10px;
}

/* 发现页面样式 */
.discover-page {
    background: #f7f7f7;
    height: 100%;
    overflow-y: auto;
}

.discover-list {
    padding-top: 10px;
}

.discover-section {
    margin-bottom: 8px;
    background: #fff;
}

.discover-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
}

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

.discover-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.discover-item span {
    flex: 1;
    font-size: 17px;
    color: #000;
}

.discover-item .icon-arrow {
    width: 8px;
    height: 8px;
    border-top: 2px solid #c7c7cc;
    border-right: 2px solid #c7c7cc;
    transform: rotate(45deg);
}

/* 朋友圈页样式 */
.moments-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    visibility: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.moments-page.slide-in {
    transform: translateX(0);
    visibility: visible;
}
/* 隐藏滚动条 */
.moments-page::-webkit-scrollbar {
    width: 0;  /* 在移动端隐藏滚动条 */
    display: none;  /* 兼容性更好的方案 */
}

/* 适配 Firefox */
.moments-page {
    scrollbar-width: none;
}

/* 适配 IE */
.moments-page {
    -ms-overflow-style: none;
}

/* 朋友圈顶部背景区域 */
.moments-header {
    position: relative;
    height: 375px;
    background: #000;
    overflow: hidden;
}

.moments-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.user-info-moments {
    position: absolute;
    bottom: 20px;
    right: 15px;
    display: flex;
    align-items: center;
    color: #fff;
    z-index: 2;
}

.user-name-moments {
    font-size: 18px;
    margin-right: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-avatar-moments {
    width: 70px;
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

/* 添加渐变遮罩，使底部文字更清晰 */
.moments-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5));
    pointer-events: none;
}

/* 朋友圈内容区域 */
.moments-content {
    background: #fff;
    min-height: calc(100% - 375px);
    padding-bottom: env(safe-area-inset-bottom);
}

.moment-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.moment-header {
    display: flex;
    align-items: flex-start;
}

.moment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
}

.moment-info {
    flex: 1;
}

.moment-name {
    font-size: 16px;
    font-weight: 500;
    color: #576b95;
    margin-bottom: 6px;
}

.moment-text {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.5;
}

.moment-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.moment-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

.moment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #999;
}

.moment-time {
    font-size: 13px;
}

.moment-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.moment-action {
    color: #576b95;
}

/* 朋友圈导航栏 */
.moments-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    z-index: 99;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    background: rgb(255, 255, 255);
}

/* 导航栏图标样式 */
.moments-nav .icon-back,
.moments-nav .icon-camera {
    width: 24px;
    height: 24px;
    transition: all 0.3s;  /* 添加过渡效果 */
}

/* 标题样式 */
.moments-nav .title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 17px;
    font-weight: 500;
    pointer-events: none;  /* 防止标题影响点击事件 */
}

/* 图片预览样式 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    color: #fff;
    font-size: 30px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 1001;
}

.preview-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.preview-image {
    /* 移除最大尺寸限制，使用原始尺寸 */
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* 如果图片实在太大超出屏幕，才限制最大尺寸 */
@media screen and (max-width: 768px) {
    .preview-image {
        max-width: 100vw;
        max-height: 100vh;
    }
}

.preview-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
}
 


.draw-page {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background: #fff;
    transition: transform 0.3s ease;
    z-index: 100;
    visibility: hidden;
    padding-top: calc(44px + env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
}

.draw-page.slide-in {
    transform: translateX(-100%);
    visibility: visible;
}

.draw-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;  /* 将间距从20px减小到12px */
    padding-bottom: 80px; /* 为底部按钮留出空间 */
}

.section {
    margin-bottom: 20px;
}

.draw-section-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    padding: 8px 16px; /* 减小上下内边距 */
    background: #F8F9FC;  /* 浅灰色背景 */
    border-radius: 8px;   /* 圆角 */
    margin-bottom: 8px; /* 减小底部边距 */
    display: flex;
    align-items: center;
}

.draw-section-title:before {
    content: '';
    width: 3px;
    height: 16px;
    background: #8E5CFF;
    border-radius: 1.5px;
    margin-right: 8px;
    display: inline-block;
}

.draw-card {
    background: #fff;
    border-radius: 12px;
    padding: 0 0 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 模板选择区域 */
.template-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
}

/* 提示词输入区域 */
.prompt-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
}

/* 参考图上传区域 */
.reference-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
}

.template-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
}

.template-list {
    display: flex;
    justify-content: space-between;  /* 平均分布空间 */
    padding: 16px;
    width: 100%;
}

.template-list::-webkit-scrollbar {
    display: none;
}

.template-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;  /* 平均分配宽度 */
    max-width: 64px;  /* 限制最大宽度 */
}

.template-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #F8F9FC;
    transition: all 0.3s ease;
}

.template-item.active .template-icon {
    background: #8E5CFF;
}

.template-name {
    font-size: 13px;
    color: #666;
    text-align: center;
    white-space: nowrap;  /* 防止文字换行 */
}

.template-item.active .template-name {
    color: #8E5CFF;
    font-weight: 500;
}

.template-item.active .template-icon img {
    filter: brightness(0) invert(1);  /* 图标变白 */
}

.prompt-input {
    position: relative;
    margin: 0;  /* 移除左右边距 */
    padding: 0;
    width: 100%;  /* 确保宽度占满 */
}

/* 输入框样式 */
.prompt-input textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    background: #FFFFFF;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
}

/* 输入框placeholder样式 */
.prompt-input textarea::placeholder {
    color: #999;
    font-size: 14px;
}

/* 输入框获得焦点时的样式 */
.prompt-input textarea:focus {
    border-color: #8E5CFF;
    box-shadow: 0 0 0 2px rgba(142, 92, 255, 0.1);
}

/* 字数统计样式 */
.word-count {
    position: absolute;
    bottom: 12px;
    margin-right: 14px;
    font-size: 12px;
    color: #999;
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.upload-area {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.upload-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 1px dashed #E8E8E8;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.upload-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    z-index: 1;
}

.upload-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 上传类型标签 */
.upload-type {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
}

/* 生成按钮区域 */
.generate-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.generate-button {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #9C6FFF, #8E5CFF);
    border-radius: 25px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.generate-button:active {
    transform: scale(0.98);
}

.generate-button .icon {
    width: 20px;
    height: 20px;
}

.template-icon img {
    width: 24px;
    height: 24px;
}

.word-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 12px;
    color: #999;
}

.prompt-input {
    position: relative;
}

/* 每个区域的内容部分增加内边距 */
.template-list,
.prompt-input,
.upload-area {
    padding: 0 16px;
}

/* 上传区域样式 */
.upload-area {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 上传按钮样式 */
.upload-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 1px dashed #E8E8E8;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* 加号图标样式 */
.plus-icon {
    position: relative;
    width: 20px;
    height: 20px;
}

.plus-icon:before,
.plus-icon:after {
    content: '';
    position: absolute;
    background: #8E5CFF;
}

/* 加号的横线 */
.plus-icon:before {
    width: 20px;
    height: 2px;
    top: 9px;
    left: 0;
}

/* 加号的竖线 */
.plus-icon:after {
    width: 2px;
    height: 20px;
    left: 9px;
    top: 0;
}

/* 上传按钮悬停效果 */
.upload-item:hover {
    border-color: #8E5CFF;
    background: rgba(142, 92, 255, 0.05);
}

/* 参考图说明样式 */
.reference-tips {
    padding: 12px 16px;
}

.tip-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.tip-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(142, 92, 255, 0.1);
    color: #8E5CFF;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.tip-text {
    font-size: 13px;
    color: #666;
}

/* 上传类型标签 */
.upload-type {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
}

/* 上传提示文字 */
.upload-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 上传组件容器 */
.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* 上传按钮样式 */
.upload-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 1px dashed #E8E8E8;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-item.empty:hover {
    border-color: #8E5CFF;
    background: rgba(142, 92, 255, 0.05);
}

/* 标签样式 */
.upload-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 4px 8px;
    background: #F5F5F5;
    border-radius: 4px;
    white-space: nowrap;
}

/* 上传区域布局 */
.upload-area {
    display: flex;
    gap: 20px;
    padding: 16px;
}

/* 加号图标样式优化 */
.plus-icon:before,
.plus-icon:after {
    background: #8E5CFF;
}

.upload-item.empty:hover .plus-icon:before,
.upload-item.empty:hover .plus-icon:after {
    background: #7B4FD6;
}

