/**
 * 朋友圈访客记录系统 - 自定义样式
 */

/* 全局样式 - 微信风格 */
body {
    background-color: #ededed;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
}

/* 页面样式 - 微信风格 */
.page {
    position: relative;
    min-height: 100vh;
    background-color: #ededed;
}

.page__bd {
    padding-bottom: 60px;
}

.page__hd {
    padding: 40px 20px 20px;
    text-align: center;
    background-color: #07c160;
    color: #fff;
}

.page__title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 5px;
}

.page__desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* 登录页面 */
.login-page .weui-msg {
    padding-top: 60px;
}

/* 头像样式 */
.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

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

/* 个人中心页面样式 */
.profile-page {
    background-color: #f5f5f5;
    padding-bottom: 60px;
}

.profile-header {
    background-color: #07c160;
    color: #fff;
    padding: 30px 15px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

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

.profile-nickname {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 10px;
}

.profile-vip {
    margin-bottom: 10px;
}

.vip-badge {
    background-color: #ffba00;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-right: 5px;
}

.vip-expire {
    font-size: 14px;
    opacity: 0.9;
}

.account-info {
    background-color: #fff;
    margin: 10px 0;
    border-radius: 3px;
}

.account-info-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.account-info-label {
    color: #333;
    font-size: 15px;
}

.account-info-value {
    color: #999;
    font-size: 14px;
}

.account-info-title {
    font-weight: 500;
    color: #333;
}

.account-info-section {
    margin-top: 15px;
}

.logout-btn {
    color: #3478f6;
    font-size: 15px;
    text-align: center;
    display: block;
    padding: 12px 0;
    text-decoration: none;
}

/* VIP套餐样式 - 微信风格 */
.vip-package {
    border: none;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    position: relative;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 统计卡片样式 */
.stats-container {
    padding: 15px 0;
    text-align: center;
}

.stats-item {
    position: relative;
}

.stats-item:not(:last-child):after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background-color: #eee;
}

.stats-value {
    font-size: 24px;
    font-weight: 500;
    color: #07c160;
    margin-bottom: 5px;
}

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

.vip-package.recommended {
    border-left: 3px solid #07c160;
}

.vip-package.recommended:before {
    content: "推荐";
    position: absolute;
    top: -10px;
}

/* VIP套餐项样式 - 微信风格 */
.vip-package-item {
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.vip-package-item:active {
    background-color: #f7f7f7;
}

.package-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

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

.package-price {
    font-size: 18px;
    font-weight: 500;
    color: #07c160;
}

.package-tag {
    right: 10px;
    background-color: #07c160;
    color: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.vip-package-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.vip-package-price {
    color: #ff6b00;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.vip-package-price small {
    font-size: 14px;
    font-weight: normal;
}

.vip-package-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* 朋友圈内容样式 */
.moment-item {
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.moment-header {
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.moment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

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

.moment-info {
    flex: 1;
}

.moment-nickname {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 2px;
}

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

.moment-content {
    padding: 0 15px 15px;
}

.moment-text {
    margin-bottom: 10px;
    line-height: 1.6;
}

.moment-images {
    display: flex;
    flex-wrap: wrap;
}

.moment-image {
    width: calc(33.333% - 5px);
    margin-right: 5px;
    margin-bottom: 5px;
    position: relative;
    padding-bottom: calc(33.333% - 5px);
}

.moment-image:nth-child(3n) {
    margin-right: 0;
}

.moment-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.moment-footer {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

/* 访客列表样式 */
.visitor-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.visitor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

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

.visitor-info {
    flex: 1;
}

.visitor-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.visitor-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.visitor-content {
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 底部导航栏固定 */
.weui-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background-color: #F7F7FA;
    border-top: 1px solid #D9D9D9;
    display: flex;
    padding: 8px 0;
}

.weui-tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

.weui-tabbar__item.weui-bar__item_on {
    color: #07C160;
}

.weui-tabbar__icon {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
}

.weui-tabbar__icon img {
    width: 100%;
    height: 100%;
}

.weui-tabbar__label {
    font-size: 12px;
    line-height: 1.4;
}

/* 适配iPhone X等刘海屏 */
@supports (padding-bottom: constant(safe-area-inset-bottom)) {
    .weui-tabbar {
        padding-bottom: calc(8px + constant(safe-area-inset-bottom));
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .weui-tabbar {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* 统计卡片 */
.stats-card {
    background-color: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stats-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stats-item {
    text-align: center;
    flex: 1;
}

.stats-value {
    font-size: 24px;
    font-weight: bold;
    color: #07c160;
    margin-bottom: 5px;
}

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

/* 按钮样式 */
.btn-fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
    z-index: 100;
}

/* 适配iPhone X等刘海屏 */
@supports (padding-bottom: constant(safe-area-inset-bottom)) {
    .btn-fixed-bottom {
        padding-bottom: calc(15px + constant(safe-area-inset-bottom));
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .btn-fixed-bottom {
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }
}

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

.image-preview {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 18px;
    display: none;
    z-index: 9900;
}

.back-to-top:after {
    content: "↑";
}

/* 支付页面样式 */
.pay-page {
    padding-top: 20px;
}

.pay-info {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    text-align: center;
    color: #666;
}

/* 支付按钮样式增强 */
.weui-btn_primary {
    background-color: #07c160;
    position: relative;
    overflow: hidden;
}

.weui-btn_primary:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.weui-btn_primary:active:after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}