/* 微信风格CSS样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

/* 微信容器 */
.wechat-container {
    max-width: 100%;
    margin: 0 auto;
    background-color: #fff;
    min-height: calc(100vh - 44px);
    margin-top: 44px;
    overflow-y: auto;
}

/* 微信头部 */
.wechat-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background-color: #07c160;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1000;
    color: white;
}

.wechat-header-title {
    font-size: 17px;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

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

.wechat-header-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.wechat-header-btn:hover {
    opacity: 1;
}

/* 图标字体 */
.icon-back::before {
    content: '←';
    font-size: 18px;
}

.icon-add::before {
    content: '+';
    font-size: 20px;
    font-weight: bold;
}

.icon-search::before {
    content: '🔍';
    font-size: 16px;
}

.icon-more::before {
    content: '⋯';
    font-size: 18px;
    font-weight: bold;
}

.icon-chat::before {
    content: '💬';
}

.icon-contact::before {
    content: '👥';
}

.icon-discover::before {
    content: '🔍';
}

.icon-me::before {
    content: '👤';
}

/* 微信列表 */
.wechat-list {
    background-color: #fff;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.wechat-list-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    z-index: 1;
}

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

.wechat-list-item:hover {
    background-color: #f8f8f8;
}

/* 确保列表项之间有足够的间距 */
.mt-20 {
    margin-top: 20px !important;
}

.mt-30 {
    margin-top: 30px !important;
}

/* 微信头像 */
.wechat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    overflow: hidden;
}

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

/* 列表内容 */
.wechat-list-content {
    flex: 1;
    min-width: 0;
}

.wechat-list-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.wechat-list-desc {
    font-size: 14px;
    color: #999;
}

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

/* 徽章 */
.wechat-badge {
    background-color: #fa5151;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
}

/* 输入框 */
.wechat-input-container {
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 0 15px;
}

.wechat-input {
    width: 100%;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: #333;
}

.wechat-input::placeholder {
    color: #999;
}

/* 编辑资料页面特定样式 */
.wechat-list-item .wechat-input {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 16px;
    text-align: right;
    color: #333;
}

.wechat-list-item .wechat-input:focus {
    background: none;
    border: none;
    outline: none;
}

.wechat-textarea {
    width: 100%;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: #333;
    resize: none;
    min-height: 60px;
    font-family: inherit;
}

.wechat-textarea::placeholder {
    color: #999;
}

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

.wechat-form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

/* 编辑资料页面布局优化 */
.wechat-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.wechat-list-item:hover {
    background-color: #f8f8f8;
}

.wechat-list-arrow {
    color: #ccc;
    font-size: 14px;
    margin-left: 10px;
}

/* 按钮 */
.wechat-btn {
    background-color: #07c160;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

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

.wechat-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 模态框 */
.wechat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.wechat-modal-content {
    background-color: white;
    border-radius: 8px;
    max-width: 320px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.wechat-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.wechat-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
}

.wechat-modal-body {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
}

.wechat-modal-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.wechat-modal-item:hover {
    background-color: #f8f8f8;
}

.wechat-modal-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #07c160;
}

.wechat-modal-item span {
    font-size: 16px;
    color: #333;
}

/* 模态框底部 */
.wechat-modal-footer {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.wechat-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.wechat-btn-secondary:hover {
    background-color: #e0e0e0;
}

.wechat-btn-danger {
    background-color: #fa5151;
}

.wechat-btn-danger:hover {
    background-color: #e84141;
}

/* 底部标签栏 */
.wechat-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: #f7f7f7;
    display: flex;
    border-top: 1px solid #e5e5e5;
    z-index: 1000;
}

.wechat-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    font-size: 12px;
    transition: color 0.2s;
}

.wechat-tab-item:hover,
.wechat-tab-item.active {
    color: #07c160;
}

.wechat-tab-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

/* 工具类 */
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.p-15 { padding: 15px; }

/* 响应式设计 */
@media (max-width: 768px) {
    .wechat-header {
        padding: 0 10px;
    }
    
    .wechat-list-item {
        padding: 10px 12px;
    }
    
    .wechat-modal-content {
        max-width: 90%;
    }
}

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

.wechat-modal-content {
    animation: fadeIn 0.3s ease-out;
}

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

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

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

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

/* 状态指示器 */
.online-dot {
    width: 8px;
    height: 8px;
    background-color: #07c160;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid white;
}

.offline-dot {
    width: 8px;
    height: 8px;
    background-color: #ccc;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid white;
}