#page-wechat-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ededed;
    display: none; /* Hidden by default */
    flex-direction: column;
    z-index: 100;
}

.wechat-header {
    background-color: #f7f7f7;
    border-bottom: 1px solid #dcdcdc;
    padding: calc(env(safe-area-inset-top) + 10px) 15px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.wechat-header-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

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

.wechat-header .action-btn {
    font-size: 20px;
    cursor: pointer;
}

.wechat-content {
    flex: 1;
    overflow-y: auto;
    background-color: #fff;
}

.wechat-tab-content {
    display: none;
    height: 100%;
    overflow-y: auto;
}

.wechat-tab-content.active {
    display: block;
}

.wechat-footer {
    background-color: #f7f7f7;
    border-top: 1px solid #dcdcdc;
    display: flex;
    justify-content: space-around;
    padding: 5px 0 calc(env(safe-area-inset-bottom) + 5px);
    flex-shrink: 0;
}

.wechat-tab-item {
    cursor: pointer;
    text-align: center;
    font-size: 10px;
    color: #8a8a8a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

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

.wechat-tab-icon {
    font-size: 24px;
    width: 28px;
    height: 28px;
}

/* Chat List Styles */
.wechat-chat-list .chat-item {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #f2f2f2;
    align-items: center;
    position: relative;
}
.wechat-chat-list .chat-item.pinned {
    background-color: #f5f5f5;
}

.wechat-chat-list .avatar {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-right: 12px;
    background: #e0e0e0;
    flex-shrink: 0;
}
.wechat-chat-list .avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
}

.wechat-chat-list .chat-details {
    flex: 1;
    overflow: hidden;
}

.wechat-chat-list .chat-name {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

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

.wechat-chat-list .chat-time {
    font-size: 12px;
    color: #b2b2b2;
    position: absolute;
    top: 12px;
    right: 15px;
}

.wechat-chat-list .unread-badge {
    background-color: #ff3b30;
    color: white;
    font-size: 12px;
    border-radius: 50%;
    padding: 2px 6px;
    position: absolute;
    bottom: 10px;
    right: 15px;
}

/* Fullscreen Page Styles */
.wechat-page-fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ededed;
    z-index: 110;
    display: flex;
    flex-direction: column;
}

/* Chat Window Styles */
.wechat-chat-window {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.chat-bubble-row {
    display: flex;
    margin-bottom: 10px;
}
.chat-bubble-row.sent {
    justify-content: flex-end;
}
.chat-bubble-row.received {
    justify-content: flex-start;
}
.chat-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
}
.chat-bubble-row.sent .chat-bubble {
    background-color: #95ec69;
    color: #000;
    border-top-right-radius: 4px;
}
.chat-bubble-row.received .chat-bubble {
    background-color: #fff;
    color: #000;
    border-top-left-radius: 4px;
}

/* Contacts Styles */
.wechat-contact-list { padding-top: 10px; }
.contact-item { display: flex; align-items: center; padding: 8px 15px; }
.contact-item .avatar { width: 40px; height: 40px; border-radius: 4px; margin-right: 15px; flex-shrink: 0; }
.contact-name { font-size: 16px; color: #000; }

/* Discover/Moments Styles */
.wechat-moments-list { background-color: #fff; }
.moments-header-bg { height: 200px; background: url('https://via.placeholder.com/400x200/cccccc/969696') center/cover; }
.moments-user-info { position: relative; text-align: right; padding-right: 15px; margin-top: -30px; }
.moments-user-info .avatar { display: inline-block; width: 64px; height: 64px; border: 2px solid #fff; }
.moments-user-name { position: absolute; right: 85px; bottom: 10px; font-size: 16px; font-weight: bold; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.moment-item { display: flex; padding: 15px; border-bottom: 1px solid #f2f2f2; }
.moment-content { flex: 1; }
.moment-user-name { font-size: 15px; color: #576b95; font-weight: 600; margin-bottom: 5px; }
.moment-text { font-size: 15px; color: #000; line-height: 1.5; margin-bottom: 8px; }
.moment-image { max-width: 200px; max-height: 200px; object-fit: cover; border-radius: 4px; margin-bottom: 8px; }
.moment-footer { font-size: 12px; color: #b2b2b2; }
.moment-interactions { background: #f7f7f7; border-radius: 4px; margin-top: 8px; padding: 5px 8px; font-size: 13px; }
.likes { color: #576b95; margin-bottom: 3px; }
.comment { color: #000; }
.comment-user { color: #576b95; font-weight: 600; }

/* Me Page Styles */
.wechat-me-page { background: #f7f7f7; height: 100%; }
.me-profile-section { background: #fff; padding: calc(env(safe-area-inset-top) + 40px) 20px 20px; display: flex; align-items: center; }
.me-profile-section .avatar { width: 60px; height: 60px; border-radius: 8px; flex-shrink: 0; }
.me-profile-section .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.me-info { margin-left: 15px; flex: 1; overflow: hidden; }
.me-name { font-size: 20px; font-weight: bold; }
.me-signature { font-size: 14px; color: #999; margin-top: 5px; }
.me-list { margin-top: 10px; }
.me-list-item { background: #fff; padding: 15px; border-bottom: 1px solid #f2f2f2; display: flex; align-items: center; gap: 15px; font-size: 16px; }
.setting-option { margin-left: auto; display:flex; align-items:center; gap: 10px; font-size: 14px; color: #888; }

/* Wallet Page Styles */
.wallet-balance-card { background: linear-gradient(to right, #63b655, #57a349); color: white; border-radius: 12px; padding: 20px; margin: 15px; text-align: center; }
.wallet-balance-card .balance { font-size: 40px; font-weight: bold; margin-top: 10px; }
.wallet-details-title { padding: 0 15px; font-size: 14px; color: #888; }
.wallet-details-list { background: #fff; }
.wallet-detail-item { display: flex; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid #f2f2f2; font-size: 14px; }
