/* 引用统一基础样式 */
/* 用户中心页面特有的主容器样式 */
.main-container {
    /* 用户中心特有的背景 */
    
    
    /* background: url('../images/user-center-bg.png') no-repeat center center, linear-gradient(180deg, #ffe8d6 0%, #fef7f0 50%, #faf8f5 100%);
    background-size: cover, 100% 100%; */
    /* background-image: url('../images/ptbcz/ptbcz-bg.png'); */ /* 已在 user-center.html 中使用 __TMPL__ 引用 */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;


    padding: 0 1.33rem;
    /* 用户中心特有的滚动行为 */
    overflow-y: auto;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling: touch;
    height:calc(100vh - 4.15rem);
    min-height:auto;
}
.main-container::-webkit-scrollbar{width:0.5rem}
.main-container::-webkit-scrollbar-track{background:#f1f1f1;border-radius:0.25rem}
.main-container::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:0.25rem}
.main-container::-webkit-scrollbar-thumb:hover{background:#a8a8a8}

.bottom-nav {
    max-width: 500px;
}

/* 头部用户信息区域 */
.header {
    position: relative;
    margin-bottom: 1.66rem;
    padding-top: 0.83rem;
}

.header-actions {
    position: absolute;
    top: 0.83rem;
    right: 0;
    display: flex;
    z-index: var(--z-index-overlay);
}

.action-btn {
    width: 2.66rem;
    height: 2.66rem;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
}

.action-btn:hover {
    transform: scale(1.1);
    opacity: 0.7;
}

.message-icon {
    width: 1.66rem;
    height: 1.66rem;
    display: block;
}

.settings-icon {
    width: 1.83rem;
    height: 1.66rem;
    display: block;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.33rem;
    margin-top: 2.5rem;
}

.avatar {
    width: 4.15rem;
    height: 4.15rem;
    border-radius: 50%;
    overflow: hidden;
    border: 0.083rem solid #fff;
    box-shadow: 0 0.17rem 0.66rem rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

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

.user-details {
    flex: 1;
    min-width: 0;
}

.username {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.2;
}

.account-id {
    font-size: 1.25rem;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.3;
}

/* 平台币钱包卡片 */
.balance-card-section {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.balance-card {
    position: relative;
    width: 100%;
    border-radius: 1.33rem;
    overflow: visible;
    color: var(--text-color-secondary, #666);
    z-index: 15; /* 高于 balance-icon (z-index: 10) 以覆盖图标 */
}

.balance-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 16px);
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    z-index: 1;
    margin-right: 16px;
}

.balance-card-content {
    position: relative;
    z-index: 2;
    padding: 16px 0px 10px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.balance-header {
    display: flex;
    align-items: center;
    gap: 5px;
}

.balance-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.balance-title-icon {
    width: 17px;
    height: 17px;
}

.balance-amount-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 10px 0;
}

.balance-amount {
    font-size: 36px;
    font-weight: 600;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    margin-bottom: 4px;
}

.details-link {
    background-color: #ffffff;
    color: var(--accent-color, #ff6b35);
    font-size: 13px;
    font-weight: 500;
    padding: 2px 5px;
    border-radius: 8px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 4px;
}

.balance-details {
    display: flex;
    gap: 4px;
    margin-top: auto;
}

.balance-detail-tag {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 400;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    backdrop-filter: blur(10px);
}

.recharge-button-content {
    position: absolute;
    top: 8px;
    right: 0px;
    width: 100px;
    height: 60px;
    z-index: var(--z-index-overlay);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    background-image: url('../images/recharge-button-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.recharge-text-main {
    color: #333333;
    font-size: 12px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.2;
}

.recharge-text-promo {
    color: #ff6b35;
    font-size: 12px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.2;
}

.balance-icon {
    position: absolute;
    top: 60px; /* 8px (recharge-button-content top) + 60px (recharge-button-content height) - 8px = 60px */
    right: 0px; /* 与 recharge-button-content 右对齐 (right: -10px) */
    width: 24px;
    height: 19px;
    z-index: var(--z-index-overlay); /* 现在可以与 balance-card (z-index: 3) 在同一层级比较 */
}

.balance-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 功能图标网格 */
.features-section {
    border-radius: 8px;
    padding: 15px 0;
    box-shadow: 0px 0px 13px rgba(126, 167, 249, 0.2);
    width: 100%;
    margin-bottom: 24px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 24px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 4px;
    border-radius: 12px;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.feature-icon-wrapper {
    position: relative;
    width: 37px;
    height: 37px;
}

.feature-label {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-color-primary, #333);
    text-align: center;
}

/* 功能图标统一样式 */
.feature-icon {
    width: var(--feature-icon-size);
    height: var(--feature-icon-size);
}

/* 推广横幅图片统一样式 */
.promo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 推广横幅 */
.promo-banner-section {
    position: relative;
    width: 100%;
    aspect-ratio: 345 / 194;
    border-radius: 22px;
    overflow: hidden;
    /* margin-bottom: 20px; */
    margin-bottom: 80px;
}

.promo-banner-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.promo-banner-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.promo-logo {
    position: absolute;
    top: 10px;
    left: 11px;
    width: 60.28px;
    height: 20.64px;
    text-decoration: none;
}

.promo-logo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.promo-text {
    position: absolute;
    top: 72px;
    left: 12px;
    width: 198px;
}

.promo-text p {
    margin: 0;
    font-family: var(--font-family-special);
    font-size: 17px;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0px 0px 3px #422013;
}

.promo-button {
    position: absolute;
    top: 118px;
    left: 12px;
    width: 117px;
    height: 33px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.promo-button-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.promo-button-text {
    position: relative;
    z-index: 2;
    font-family: var(--font-family-button);
    font-weight: 700;
    font-size: 16.5px;
    color: #ffffff;
    text-shadow: 1.4px 0.3px 1.5px #632c04;
}

/* 底部导航栏样式已移至 base.css */

/* 响应式设计 - 横屏适配 */
@media screen and (orientation: landscape) {
    /* .main-container 样式已移至 base.css */
    
    .features-grid {
        /* Keep 4 columns even in landscape */
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .feature-item {
        padding: 8px 4px;
    }
    
    
    .balance-amount {
        font-size: 28px;
    }
    
    .promo-banner {
        padding: 24px;
        min-height: 100px;
    }
    
    .banner-image {
        width: 100px;
        height: 100px;
    }

    /* .bottom-nav 样式已移至 base.css */
}

/* 响应式设计 - 大屏设备 */
/* .main-container 和 .bottom-nav 样式已移至 base.css */

/* 响应式设计 - 小屏设备 */
@media screen and (max-width: 375px) {
    /* .main-container 样式已移至 base.css */
    
    .features-grid {
        gap: 16px;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
    }
    
    .feature-icon img {
        width: 20px;
        height: 20px;
    }
    
    .balance-amount {
        font-size: 28px;
    }
}

/* 移动端特定优化 */
@media screen and (max-height: 667px) {
    /* .main-container 样式已移至 base.css */
    
    .header {
        margin-bottom: 16px;
    }
    
    .balance-card-section {
        margin-bottom: 20px;
    }
    
    .features-section {
        margin-bottom: 20px;
    }
    
    .promo-banner-section {
        /* margin-bottom: 16px; */
        margin-bottom: 80px;
    }
}

/* 超小屏幕优化 */
@media screen and (max-height: 568px) {
    /* .main-container 样式已移至 base.css */
    
    .balance-amount {
        font-size: 32px;
    }
    
    .features-grid {
        row-gap: 20px;
    }
    
    .feature-item {
        padding: 8px 4px;
    }
}

/* 移除动画效果，消除页面刷新时的闪烁现象 */

/* 触摸反馈 */
.feature-item:active,
.action-btn:active,
.details-btn:active,
.banner-btn:active {
    transform: scale(0.95);
}

/* 滚动优化和安全区域适配已移至 base.css */

/* 从 user-center.html 迁移的内联样式 */

/* 登出按钮样式 */
.user_logout {
    position: absolute;
    right: 1.3rem;
    top: 3.5rem;
    width: 5rem;
    height: 1.6rem;
    color: #2196F3;
    padding: 2px 5px;
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    user-select: none;
}

/* 提示点样式 */
.tip_dot {
    position: absolute;
    top: 0;
    right: 0px;
    width: 8px;
    height: 8px;
    background-color: #FF0000;
    border-radius: 50%;
    display: none;
}

/* 消息按钮专用角标样式 */
.message-btn .tip_dot {
    top: 0.3rem;
    right: 0.3rem;
    z-index: 10;
}

/* VIP状态容器样式 */
.user_vip_status {
    margin-top: 6px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    /* background: rgba(255, 255, 255, 0.50); */
    padding: 2px 4px;
    width: fit-content;
}

/* VIP状态图片样式 */
.user_vip_status img {
    width: 28px;
    height: 23px;
}

/* VIP状态标签样式 */
.user_vip_status_lb {
    color: rgba(1, 1, 1, 0.50);
    font-family: "Alibaba PuHuiTi";
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: -0.12px;
}
