/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(165deg, #ede9fe 0%, #e9d5ff 28%, #f5f3ff 55%, #fdf4ff 82%, #fff7ed 100%);
    min-height: 100vh;
    padding-bottom: 76px;
    color: #1a1f2e;
    letter-spacing: 0.01em;
}

body.front-app {
    position: relative;
}

body.page-home {
    background: linear-gradient(160deg, #ddd6fe 0%, #e9d5ff 25%, #f3e8ff 55%, #faf5ff 78%, #fff1f2 100%);
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 15px;
}

/* 顶部用户信息 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 8px;
    color: #1e293b;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-hero {
    align-items: flex-start;
}

.user-info-stack {
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}

.user-text-block {
    flex: 1;
    min-width: 0;
}

.user-account-line {
    font-size: 17px;
    font-weight: 700;
    color: #312e81;
    margin-bottom: 6px;
    line-height: 1.3;
}

.user-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.user-level-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff;
}

.user-level-pill.level-guest {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.user-level-pill.vip-lv-1 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.user-level-pill.vip-lv-2 { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }
.user-level-pill.vip-lv-3 { background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; }
.user-level-pill.vip-lv-4 { background: linear-gradient(135deg, #a78bfa, #6d28d9); color: #fff; }
.user-level-pill.vip-lv-5 { background: linear-gradient(135deg, #fbbf24, #d97706); color: #1e293b; }

.avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #8b5cf6, #6366f1 45%, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.guest-pending-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.guest-pending-banner strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.balance-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.balance-card-link:hover {
    filter: brightness(1.03);
}

.product-name-wrap {
    background: linear-gradient(145deg, rgba(238, 242, 255, 0.95), rgba(224, 231, 255, 0.9));
    border-radius: 14px;
    padding: 12px 10px;
    margin: 10px 0 6px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: inset 0 1px 2px rgba(99, 102, 241, 0.06);
}

.product-card .product-name {
    margin-top: 0;
    font-size: 16px;
}

.home-footer-notice {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 255, 0.85));
    border-radius: 14px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.06);
}

.modal-buy .qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #475569;
}

.qty-control input {
    width: 48px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    background: #fff;
    color: #0f172a;
}

.pay-methods-col {
    flex-direction: column;
    gap: 10px !important;
}

.pay-methods-col .pay-method {
    width: 100%;
    margin: 0 !important;
    justify-content: flex-start;
}

.order-total-row {
    margin-top: 8px;
    font-size: 16px;
}

.buy-modal-notice {
    margin: 16px 0 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    max-height: 100px;
    overflow-y: auto;
}

.mine-vip-tag.level-guest {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}

.vip-badge {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: bold;
}

.vip-badge.vip-lv-1 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}
.vip-badge.vip-lv-2 {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #fff;
}
.vip-badge.vip-lv-3 {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: #fff;
}
.vip-badge.vip-lv-4 {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff;
}
.vip-badge.vip-lv-5 {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #1e293b;
}

.user-stats {
    font-size: 14px;
    color: #64748b;
}

.user-stats strong {
    color: #6366f1;
    font-weight: 700;
}

/* 余额卡片 */
.balance-card {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    border-radius: 20px;
    padding: 22px 20px;
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 
        0 12px 36px rgba(99, 102, 241, 0.32),
        0 4px 12px rgba(139, 92, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 100px;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(25deg);
    pointer-events: none;
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-info .label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.balance-info .amount {
    font-size: 28px;
    font-weight: bold;
}

.balance-card .arrow {
    font-size: 24px;
    opacity: 0.8;
}

/* 区块标题 */
.section {
    margin: 20px 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e1b4b;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.section-title .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

/* 商品网格 - 每行2个 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.product-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 20px 16px 18px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(99, 102, 241, 0.08);
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.08),
        0 1px 3px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card.active::before,
.product-card:hover::before {
    opacity: 1;
}

.product-card.active,
.product-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 
        0 12px 40px rgba(99, 102, 241, 0.18),
        0 4px 12px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-4px);
}

.product-card .product-stock {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
    color: #6366f1;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 10px;
    letter-spacing: 0.02em;
}

.product-card .product-stock .stock-num {
    font-variant-numeric: tabular-nums;
}

.product-name {
    font-size: 17px;
    font-weight: 700;
    color: #1e1b4b;
    margin-top: 8px;
    letter-spacing: 0.02em;
}

.product-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 6px 0 2px;
    font-weight: 500;
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: #6366f1;
    margin: 12px 0 14px;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);
}

.buy-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto;
    min-width: 80px;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.buy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* 代理卡片 - 独占一行 */
.product-card.agent-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    padding: 22px;
    text-align: left;
}

/* 警告框 */
.warning-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.92));
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    box-shadow: 
        0 8px 32px rgba(99, 102, 241, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04);
    border: 1.5px solid rgba(99, 102, 241, 0.1);
}

.warning-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.warning-box p {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

/* ========== 平台规则区块 ========== */
.platform-rules-section {
    background: linear-gradient(145deg, #fff9f0 0%, #fff5eb 100%);
    border-radius: 20px;
    padding: 0;
    margin-top: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.rules-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}

.rules-header .rules-icon {
    font-size: 24px;
}

.rules-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #b45309;
    letter-spacing: 2px;
}

.rules-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
}

.rule-icon {
    flex-shrink: 0;
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.rule-text {
    flex: 1;
    color: #78350f;
}

.rule-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.rule-success {
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.rule-success .rule-text {
    color: #166534;
}

.rule-highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.rule-danger {
    background: linear-gradient(135deg, #fef3c7 0%, #fecaca 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.rule-danger .rule-text {
    color: #991b1b;
    font-weight: 600;
}

.rule-info {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.rule-gift {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border: 1px solid rgba(251, 113, 133, 0.25);
}

.rule-gift .rule-text {
    color: #9f1239;
}

.rule-bonus {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.rule-bonus .rule-text {
    color: #9d174d;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    transition: color 0.25s ease, transform 0.2s ease;
}

.nav-item.active {
    color: #3451d1;
    transform: translateY(-1px);
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 3px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.close-btn {
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.order-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.order-info p {
    margin: 5px 0;
    color: #666;
}

.order-info .price {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 18px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4158d0;
}

.pay-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.pay-method {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pay-method.active {
    border-color: #4158d0;
    background: rgba(65, 88, 208, 0.05);
}

.pay-method input {
    display: none;
}

.method-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4158d0 0%, #3a47d5 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(65, 88, 208, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 二维码样式 */
#qrcode {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.qr-tip {
    color: #666;
    margin: 10px 0;
}

.qr-price {
    color: #ff6b6b;
    font-size: 18px;
    font-weight: bold;
}

.qr-order {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.text-center {
    text-align: center;
}

/* 成功弹窗 */
.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00c853, #00e676);
    color: white;
    font-size: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.card-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
    word-break: break-all;
}

/* ========== 新版购买弹窗 ========== */
.modal-buy-new {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header-new h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.close-btn-new {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn-new:hover {
    background: #f5f5f5;
    color: #666;
}

.modal-body-new {
    padding: 20px;
}

.product-title-row {
    margin-bottom: 16px;
    display: none;
}

.product-label {
    font-size: 15px;
    color: #666;
}

.qty-section {
    text-align: center;
    margin-bottom: 24px;
}

.qty-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.qty-control-new {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e8e8e8;
    border-radius: 25px;
    overflow: hidden;
    background: #fff;
}

.qty-btn-new {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 22px;
    font-weight: 400;
    cursor: pointer;
    color: #6366f1;
    transition: all 0.2s ease;
}

.qty-btn-new:hover {
    background: #f8f7ff;
}

.qty-btn-new:active {
    background: #ede9fe;
}

.qty-control-new input {
    width: 60px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    background: transparent;
    color: #1a1a1a;
}

.qty-hint {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.price-section {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 24px;
    gap: 8px;
}

.price-label {
    font-size: 15px;
    color: #666;
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: #6366f1;
}

.pay-methods-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-method-new {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
}

.pay-method-new:hover {
    border-color: #c7d2fe;
    background: #fafafa;
}

.pay-method-new.active {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.pay-method-new input {
    display: none;
}

.method-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pay-method-new.active .method-checkbox {
    border-color: #6366f1;
    background: #6366f1;
    color: #fff;
}

.pay-method-new.active .method-checkbox::after {
    content: '✓';
}

.method-text {
    font-size: 15px;
    color: #333;
    flex: 1;
}

.method-sub {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.buy-modal-notice-new {
    margin-top: 16px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

/* 支付按钮组 */
.pay-buttons-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-btn-new {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
}

.pay-btn-new:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pay-btn-balance {
    background: #fff;
    border: 2px solid #6366f1;
    color: #6366f1;
}

.pay-btn-balance:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.05);
}

.pay-btn-balance .pay-btn-checkbox {
    display: none;
}

.pay-btn-wechat {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.pay-btn-wechat:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.pay-btn-qrcode {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
    flex-wrap: wrap;
}

.pay-btn-qrcode:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.pay-btn-icon {
    margin-right: 6px;
}

.pay-btn-text {
    flex-shrink: 0;
}

.pay-btn-sub {
    width: 100%;
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

.pay-btn-new.loading {
    pointer-events: none;
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 新版二维码弹窗 ========== */
.modal-qr-new {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ========== 新版成功弹窗 ========== */
.modal-success-new {
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 380px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.modal-header-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 28px 20px;
    text-align: center;
}

.success-icon-new {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 28px;
    color: #fff;
}

.modal-header-success h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.modal-body-success {
    padding: 20px;
}

.card-list {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.card-item {
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

.card-item:last-child {
    margin-bottom: 0;
}

.card-item-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.card-item-value {
    font-size: 14px;
    color: #1e293b;
    word-break: break-all;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    line-height: 1.5;
    user-select: all;
}

/* 新版卡密显示样式 */
.card-item-new {
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.card-item-new:last-child {
    margin-bottom: 0;
}

.card-item-header {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.card-item-label-new {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.card-item-body {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
}

.card-item-value-new {
    flex: 1;
    font-size: 15px;
    color: #1e293b;
    word-break: break-all;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    line-height: 1.5;
    user-select: all;
}

.card-copy-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.card-copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.success-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.notice-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 8px;
}

.notice-content {
    font-size: 13px;
    color: #a16207;
    line-height: 1.6;
}

.success-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.success-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.success-btn:active {
    transform: translateY(0);
}

.card-info p {
    margin: 5px 0;
    color: #333;
}

.card-info .card-value {
    color: #4158d0;
    font-weight: bold;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式调整 */
@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .product-card {
        padding: 18px 14px 16px;
    }
    .product-name {
        font-size: 16px;
    }
    .product-price {
        font-size: 20px;
    }
}

/* ========== 我的 + 通用高级浅色组件 ========== */
.glass-elevated {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07), 0 2px 10px rgba(15, 23, 42, 0.04);
}

.text-indigo {
    color: #3451d1;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.page-mine .mine-bg-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(147, 197, 253, 0.35), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(233, 213, 255, 0.25), transparent);
    z-index: 0;
}

.page-mine .mine-container {
    position: relative;
    z-index: 1;
    padding-bottom: 96px;
}

.mine-header-spacer {
    height: 8px;
}

.mine-profile-card {
    border-radius: 20px;
    padding: 20px 18px;
    margin-bottom: 14px;
}

.mine-profile-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mine-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.mine-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffe4e6, #fda4af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.2);
}

.mine-vip-tag {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.mine-vip-tag.vip-lv-1 {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}
.mine-vip-tag.vip-lv-2 {
    background: linear-gradient(90deg, #34d399, #10b981);
}
.mine-vip-tag.vip-lv-3 {
    background: linear-gradient(90deg, #60a5fa, #2563eb);
}
.mine-vip-tag.vip-lv-4 {
    background: linear-gradient(90deg, #a78bfa, #7c3aed);
}
.mine-vip-tag.vip-lv-5 {
    background: linear-gradient(90deg, #fbbf24, #d97706);
    color: #1e293b;
}

.mine-profile-meta {
    flex: 1;
    min-width: 0;
}

.mine-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mine-main-id {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: 0.02em;
}

.mine-settings-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(52, 81, 209, 0.08);
    color: #3451d1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: default;
}

.mine-sub-id {
    margin: 6px 0 0;
    font-size: 12px;
    color: #64748b;
}

.mine-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.mine-stat {
    border-radius: 18px;
    padding: 16px 14px;
    text-align: center;
}

.mine-stat-emoji {
    font-size: 22px;
    display: block;
    margin-bottom: 6px;
}

.mine-stat-value {
    font-size: 1.15rem;
}

.mine-stat-label {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

.mine-upgrade {
    border-radius: 20px;
    padding: 18px 16px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.95) 0%, rgba(232, 121, 249, 0.92) 50%, rgba(167, 139, 250, 0.9) 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 16px 40px rgba(192, 38, 211, 0.22);
}

.mine-upgrade-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 12px;
}

.mine-upgrade-title::before {
    content: '📈 ';
}

.mine-upgrade-help {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: help;
}

.mine-upgrade-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    overflow: hidden;
}

.mine-upgrade-fill {
    height: 100%;
    width: 18%;
    background: #fff;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.mine-upgrade-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-top: 8px;
    opacity: 0.95;
}

.mine-upgrade-msg {
    margin: 12px 0 0;
    font-size: 12px;
    opacity: 0.95;
    line-height: 1.5;
}

.mine-upgrade-hint {
    margin-top: 10px;
    opacity: 0.75;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 16px 0 10px;
}

.section-heading-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e0e7ff, #fae8ff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.mine-section-heading {
    margin-top: 8px;
}

.mine-promo {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 6px;
}

.mine-promo-input {
    flex: 1;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    color: #334155;
    background: rgba(248, 250, 252, 0.9);
    min-width: 0;
}

.mine-promo-copy {
    flex-shrink: 0;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3451d1, #5c6cfa);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(52, 81, 209, 0.3);
}

.mine-accordion {
    border-radius: 16px;
    margin-bottom: 10px;
    overflow: hidden;
}

.mine-accordion summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #1e293b;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mine-accordion summary::-webkit-details-marker {
    display: none;
}

.mine-accordion summary::after {
    content: '⌄';
    color: #94a3b8;
    font-size: 18px;
    transition: transform 0.25s ease;
}

.mine-accordion[open] summary::after {
    transform: rotate(-180deg);
}

.mine-accordion-body {
    padding: 0 16px 16px;
    font-size: 13px;
    color: #475569;
    line-height: 1.65;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

/* 购买记录 */
.mine-orders {
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.orders-loading, .orders-empty {
    text-align: center;
    padding: 24px;
    color: #64748b;
    font-size: 14px;
}

.order-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.order-item:last-child {
    margin-bottom: 0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.order-product {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.order-time {
    font-size: 12px;
    color: #94a3b8;
}

.order-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
}

.order-card:last-child {
    margin-bottom: 0;
}

.order-card-label {
    font-size: 12px;
    color: #64748b;
    flex-shrink: 0;
}

.order-card-value {
    flex: 1;
    font-size: 13px;
    color: #1e293b;
    word-break: break-all;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

.order-copy-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.order-copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.mine-payinfo {
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
    margin: 16px 0 12px;
}

.mine-payinfo-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.mine-payinfo-text {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.55;
}

.mine-btn-primary {
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #3451d1, #5c6cfa);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(52, 81, 209, 0.32);
}

.mine-withdraw {
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 8px;
}

.mine-withdraw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mine-withdraw-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.mine-withdraw-balance {
    font-size: 13px;
    color: #166534;
    font-weight: 600;
}

.mine-btn-withdraw {
    flex-shrink: 0;
    padding: 10px 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
}

.modal-content {
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
}
