/**
 * 微信缺少的功能和页面样式
 * WeChat Missing Features & Pages
 * Version: 1.0
 * Date: 2025-10-28
 */

/* ==================== 朋友圈 (Moments) ==================== */
.wechat-moments {
    background: var(--wechat-bg-gray);
    min-height: 100vh;
}

.wechat-moments-header {
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.wechat-moments-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.wechat-moments-avatar {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    border: 2px solid white;
}

.wechat-moments-username {
    font-size: 18px;
    font-weight: 600;
}

.wechat-moments-post-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--wechat-green);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.wechat-moments-post-btn:hover {
    background: white;
    transform: translateY(-2px);
}

.wechat-moments-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.wechat-moment-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--wechat-shadow-light);
}

.wechat-moment-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.wechat-moment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 4px;
}

.wechat-moment-info {
    flex: 1;
}

.wechat-moment-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--wechat-text-primary);
    margin-bottom: 4px;
}

.wechat-moment-time {
    font-size: 12px;
    color: var(--wechat-text-tertiary);
}

.wechat-moment-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--wechat-text-primary);
    margin-bottom: 12px;
}

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

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

.wechat-moment-actions {
    display: flex;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--wechat-divider);
}

.wechat-moment-action {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--wechat-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.wechat-moment-action:hover {
    color: var(--wechat-green);
}

.wechat-moment-action.liked {
    color: var(--wechat-red);
}

/* ==================== 发现页面 (Discover) ==================== */
.wechat-discover {
    background: var(--wechat-bg-gray);
    min-height: 100vh;
    padding: 20px;
}

.wechat-discover-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.wechat-discover-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--wechat-divider);
}

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

.wechat-discover-item:hover {
    background: var(--wechat-bg-gray);
}

.wechat-discover-icon {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    color: var(--wechat-green);
    font-size: 20px;
}

.wechat-discover-label {
    flex: 1;
    font-size: 15px;
    color: var(--wechat-text-primary);
}

.wechat-discover-arrow {
    font-size: 12px;
    color: var(--wechat-text-tertiary);
}

.wechat-discover-badge {
    min-width: 18px;
    height: 18px;
    background: var(--wechat-red);
    color: white;
    border-radius: 9px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-right: 8px;
}

/* ==================== 通讯录 (Contacts) ==================== */
.wechat-contacts {
    display: flex;
    height: 100vh;
    background: var(--wechat-bg-gray);
}

.wechat-contacts-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--wechat-divider);
}

.wechat-contacts-header {
    padding: 16px;
    border-bottom: 1px solid var(--wechat-divider);
}

.wechat-contacts-search input {
    width: 100%;
    height: 36px;
    background: var(--wechat-bg-gray);
    border: none;
    border-radius: 18px;
    padding: 0 16px;
    font-size: 14px;
}

.wechat-contacts-list {
    overflow-y: auto;
    height: calc(100vh - 100px);
}

.wechat-contacts-group {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--wechat-text-tertiary);
    font-weight: 600;
    background: var(--wechat-bg-gray);
}

.wechat-contact-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.wechat-contact-item:hover {
    background: var(--wechat-bg-gray);
}

.wechat-contact-item.active {
    background: var(--wechat-green-light);
}

.wechat-contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 12px;
}

.wechat-contact-info {
    flex: 1;
}

.wechat-contact-name {
    font-size: 15px;
    color: var(--wechat-text-primary);
    margin-bottom: 4px;
}

.wechat-contact-remark {
    font-size: 12px;
    color: var(--wechat-text-tertiary);
}

.wechat-contacts-detail {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
}

.wechat-contacts-detail-header {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
}

.wechat-contacts-detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 3px solid white;
    margin-bottom: 12px;
}

.wechat-contacts-detail-name {
    font-size: 20px;
    font-weight: 600;
}

.wechat-contacts-detail-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.wechat-contacts-detail-section {
    margin-bottom: 24px;
}

.wechat-contacts-detail-title {
    font-size: 13px;
    color: var(--wechat-text-tertiary);
    margin-bottom: 12px;
    font-weight: 600;
}

.wechat-contacts-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--wechat-divider);
}

.wechat-contacts-detail-label {
    font-size: 14px;
    color: var(--wechat-text-secondary);
}

.wechat-contacts-detail-value {
    font-size: 14px;
    color: var(--wechat-text-primary);
}

.wechat-contacts-detail-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--wechat-divider);
}

.wechat-contacts-detail-btn {
    flex: 1;
    height: 44px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.wechat-contacts-detail-btn.primary {
    background: var(--wechat-green);
    color: white;
}

.wechat-contacts-detail-btn.secondary {
    background: var(--wechat-bg-gray);
    color: var(--wechat-text-primary);
}

.wechat-contacts-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--wechat-shadow-medium);
}

/* ==================== 个人中心 (Profile) ==================== */
.wechat-profile {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--wechat-bg-gray);
    min-height: 100vh;
}

.wechat-profile-header {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 12px;
    text-align: center;
}

.wechat-profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.wechat-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.wechat-profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--wechat-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid white;
}

.wechat-profile-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--wechat-text-primary);
    margin-bottom: 8px;
}

.wechat-profile-id {
    font-size: 14px;
    color: var(--wechat-text-tertiary);
}

.wechat-profile-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.wechat-profile-section-title {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--wechat-text-primary);
    border-bottom: 1px solid var(--wechat-divider);
}

.wechat-profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--wechat-divider);
}

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

.wechat-profile-item:hover {
    background: var(--wechat-bg-gray);
}

.wechat-profile-item-label {
    font-size: 15px;
    color: var(--wechat-text-primary);
}

.wechat-profile-item-value {
    font-size: 14px;
    color: var(--wechat-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== 设置页面 (Settings) ==================== */
.wechat-settings {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--wechat-bg-gray);
    min-height: 100vh;
}

.wechat-settings-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.wechat-settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--wechat-divider);
}

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

.wechat-settings-item:hover {
    background: var(--wechat-bg-gray);
}

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

.wechat-settings-item-icon {
    width: 20px;
    text-align: center;
    color: var(--wechat-green);
}

.wechat-settings-item-label {
    font-size: 15px;
    color: var(--wechat-text-primary);
}

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

.wechat-settings-item-value {
    font-size: 14px;
    color: var(--wechat-text-secondary);
}

.wechat-settings-item-arrow {
    font-size: 12px;
    color: var(--wechat-text-tertiary);
}

.wechat-settings-logout-btn {
    width: 100%;
    height: 48px;
    background: var(--wechat-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}

.wechat-settings-logout-btn:hover {
    background: #e64545;
    transform: translateY(-2px);
    box-shadow: var(--wechat-shadow-medium);
}

/* ==================== 小程序 (Mini Programs) ==================== */
.wechat-miniprogram {
    background: var(--wechat-bg-gray);
    min-height: 100vh;
    padding: 20px;
}

.wechat-miniprogram-header {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wechat-miniprogram-search input {
    width: 100%;
    height: 40px;
    background: var(--wechat-bg-gray);
    border: none;
    border-radius: 20px;
    padding: 0 20px;
    font-size: 15px;
}

.wechat-miniprogram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.wechat-miniprogram-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.wechat-miniprogram-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--wechat-shadow-medium);
}

.wechat-miniprogram-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin: 0 auto 12px;
}

.wechat-miniprogram-name {
    font-size: 14px;
    color: var(--wechat-text-primary);
    margin-bottom: 4px;
}

.wechat-miniprogram-desc {
    font-size: 12px;
    color: var(--wechat-text-tertiary);
}

/* ==================== 扫一扫 (Scan QR) ==================== */
.wechat-scan {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 3000;
    display: flex;
    flex-direction: column;
}

.wechat-scan-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: white;
}

.wechat-scan-close {
    font-size: 24px;
    cursor: pointer;
}

.wechat-scan-title {
    font-size: 18px;
}

.wechat-scan-camera {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wechat-scan-frame {
    width: 300px;
    height: 300px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.wechat-scan-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid var(--wechat-green);
}

.wechat-scan-corner.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-radius: 12px 0 0 0;
}

.wechat-scan-corner.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 12px 0 0;
}

.wechat-scan-corner.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 12px;
}

.wechat-scan-corner.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 12px 0;
}

.wechat-scan-line {
    width: 100%;
    height: 2px;
    background: var(--wechat-green);
    position: absolute;
    top: 0;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

.wechat-scan-tips {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
    margin-top: 24px;
}

/* ==================== 响应式优化 ==================== */
@media (max-width: 768px) {
    .wechat-moments-list,
    .wechat-discover,
    .wechat-profile,
    .wechat-settings {
        padding: 12px;
    }
    
    .wechat-moment-images {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wechat-contacts {
        flex-direction: column;
    }
    
    .wechat-contacts-sidebar {
        width: 100%;
        height: auto;
    }
    
    .wechat-miniprogram-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

