/* style.css - V6: Paid Recharge Module Added */

/* --- Variables & Reset --- */
:root {
    /* 核心金色系 */
    --gold-primary: #C69C6D; 
    --gold-dark: #A67C52;
    --gold-gradient: linear-gradient(135deg, #E3C08D 0%, #C69C6D 100%);
    --gold-text: #B58548;

    /* 基础色系 */
    --bg-body: #FBFBFD; 
    --bg-white: #FFFFFF;
    --text-main: #1D1D1F; 
    --text-secondary: #86868B; 
    
    /* 功能色 */
    --bg-gray-btn: #F2F2F7;
    --bg-gray-btn-hover: #E5E5EA;
    --border-light: rgba(0, 0, 0, 0.06);
    
    /* 阴影与圆角 */
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    --shadow-btn-gold: 0 4px 12px rgba(198, 156, 109, 0.4); 
    --radius-lg: 24px;
    --radius-btn: 999px;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden { display: none; }

/* --- Header --- */
.site-header {
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    cursor: default;
}

.logo-img {
    height: 34px;
    width: 34px;
    border-radius: 8px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Nav --- */
.main-nav { display: flex; align-items: center; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.logged-in-area { display: flex; align-items: center; gap: 12px; }

.header-coin-balance {
    display: flex;
    align-items: center;
    background: rgba(198, 156, 109, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    transition: transform 0.2s;
}
.header-coin-balance:hover { transform: scale(1.02); }

.coin-label { color: var(--gold-text); margin-right: 6px; }
.coin-value { color: var(--text-main); font-weight: 700; margin-right: 0; }

/* --- Hero --- */
.hero-section { text-align: center; padding: 60px 0 40px; }
.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 16px;
    letter-spacing: -1px;
}
.text-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0 auto;
    max-width: 600px;
}

/* --- Paid Recharge Section (New V6) --- */
/* --- Paid Recharge Section (V10: 三栏式紧凑布局) --- */
.paid-recharge-section {
    margin-bottom: 40px; /* 减小底部间距，让下方内容更紧凑 */
}

.paid-card-wrapper {
    background: var(--bg-white);
    border-radius: 24px; /* 稍微减小圆角，显得更干练 */
    /* 核心修改：大幅减小垂直内边距，压缩高度 */
    padding: 30px 40px; 
    box-shadow: 0 15px 40px rgba(198, 156, 109, 0.12);
    display: flex;
    justify-content: space-between; /* 三栏均匀分布 */
    align-items: center; /* 垂直居中对齐 */
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(198, 156, 109, 0.2);
}

/* 背景光效 */
.paid-card-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,248,240,0.8) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* --- 1. 左侧：标题区 --- */
.paid-col-left {
    z-index: 1;
    flex: 1; /* 占据剩余空间 */
    padding-right: 40px;
    position: relative;
    max-width: 320px; /* 限制宽度 */
}

/* 分割线1：左侧和中间的分割 */
.paid-col-left::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: rgba(0,0,0,0.06); /* 淡淡的分割线 */
}

.badge-gold {
    display: inline-block;
    background: rgba(198, 156, 109, 0.1);
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.paid-title {
    font-size: 32px; /* 稍微减小字号，适配紧凑布局 */
    font-weight: 800;
    margin: 0 0 12px 0;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.paid-tip {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* --- 2. 中间：列表区 --- */
.paid-col-center {
    z-index: 1;
    flex: 1.2; /* 中间稍微宽一点 */
    padding: 0 40px;
    position: relative;
    display: flex;
    align-items: center;
}

/* 分割线2：中间和右侧的分割 */
.paid-col-center::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: rgba(0,0,0,0.06);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 20px; /* 列表项间距 */
}

.feature-list li:last-child {
    margin-bottom: 0;
}

.feature-icon {
    width: 42px;
    height: 42px;
    object-fit: contain;
    margin-right: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 2px;
    font-weight: 700;
}

.feature-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* --- 3. 右侧：二维码区 --- */
.paid-col-right {
    z-index: 1;
    flex-shrink: 0;
    padding-left: 40px;
}

.qr-container-inner {
    text-align: center;
    /* 移除背景框，因为在右侧独立区域，不需要额外的白色背景了 */
}

.qr-border {
    width: 140px; /* 缩小二维码尺寸，降低整体卡片高度 */
    height: 140px;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    margin-left: auto;
    margin-right: auto;
}

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

.qr-action {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wechat-icon {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2307C160'%3E%3Cpath d='M8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm6 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/%3E%3Cpath fill-rule='evenodd' d='M12 2C6.48 2 2 5.86 2 10.5c0 2.47 1.25 4.73 3.32 6.27-.13.7-.47 2.05-.54 2.37-.1.44.33.77.7.53.5-.32 2.27-1.42 3.16-1.99.78.22 1.6.35 2.45.35 5.25 0 9.5-3.6 9.5-8.03C20.59 5.6 16.52 2 12 2zm-5.75 9.75a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5zm6.5 0a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: cover;
}

/* --- 移动端适配 (堆叠布局) --- */
@media (max-width: 900px) { /* 调整断点，平板竖屏也切换为堆叠 */
    .paid-card-wrapper {
        flex-direction: column;
        align-items: stretch; /* 让子元素占满宽度 */
        padding: 30px 24px;
        text-align: center;
        height: auto;
    }

    .paid-col-left, .paid-col-center, .paid-col-right {
        max-width: none;
        padding: 0;
        width: 100%;
        margin-bottom: 30px;
    }

    .paid-col-right {
        margin-bottom: 0;
    }
    
    /* 移除分割线 */
    .paid-col-left::after, .paid-col-center::after {
        display: none;
    }

    /* 列表居中 */
    .feature-list li {
        justify-content: center;
        text-align: left;
    }
    
    /* 二维码居中 */
    .qr-border {
        width: 160px; /* 移动端可以稍微大一点方便扫 */
        height: 160px;
    }
}
/* --- Section Divider --- */
.section-divider {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.section-divider h3 {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-body);
    display: inline-block;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    margin: 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: rgba(0,0,0,0.05);
    z-index: 0;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    text-decoration: none;
    letter-spacing: -0.2px;
    outline: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: white;
    box-shadow: var(--shadow-btn-gold);
}
.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(198, 156, 109, 0.5);
}

.btn-secondary {
    background-color: var(--bg-gray-btn);
    color: #8C6C48;
}
.btn-secondary:hover {
    background-color: var(--bg-gray-btn-hover);
    color: var(--gold-primary);
}

.logout-button { 
    background: none; border: none; cursor: pointer; 
    color: var(--text-secondary); font-size: 13px; padding: 8px;
}
.logout-button:hover { color: var(--text-main); }
.user-id { font-weight: 600; color: var(--text-main); margin-right: 8px;}

/* --- Gift Cards (Free Section) --- */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    padding-bottom: 60px;
}

.gift-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.gift-card.is-clickable { cursor: pointer; }

.gift-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-hover);
}

.gift-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 20px;
}

.gift-details { width: 100%; margin-bottom: 20px; }

.gift-details h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: var(--text-main);
    line-height: 1.3;
}

.gift-details p {
    font-size: 14px;
    color: var(--gold-text);
    font-weight: 600;
    margin: 0;
}

.progress-bar {
    width: 100%;
    background-color: #F2F2F7;
    border-radius: 6px;
    height: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-bar-inner {
    background: var(--gold-gradient);
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease-out;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.gift-card .btn {
    width: 100%;
    padding: 10px 0;
    border-radius: 12px;
    margin-top: auto;
}

/* --- SEO Content Section (新增：提升搜索排名) --- */
.seo-content-section {
    margin-top: 60px;
    margin-bottom: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}

.seo-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-main);
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.seo-item {
    background: #F9F9FB;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.03);
}

.seo-item h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-main);
}

.seo-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* 链接样式优化 */
.sitemap-link {
    margin-top: 10px;
    font-size: 12px;
}
.sitemap-link a {
    color: #98989D;
    text-decoration: none;
}
.sitemap-link a:hover {
    color: var(--text-main);
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-white);
    padding: 60px 0 40px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    margin-top: auto;
}
.footer-logo {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-main);
}
.footer-desc {
    color: var(--text-secondary);
    font-size: 13px;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}
.copyright { font-size: 12px; color: #98989D; }
.copyright a { color: #98989D; text-decoration: none; }

/* --- Modal --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    z-index: 999;
    transition: opacity 0.3s;
}

#modal-dialog-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 32px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255,255,255,0.5);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #F2F2F7;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    color: #8E8E93;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-close-btn:hover {
    background: #E5E5EA;
    color: var(--text-main);
}

.modal-title { font-size: 20px; font-weight: 700; margin: 0 0 8px 0; color: var(--text-main); }
.modal-description { color: var(--text-secondary); font-size: 14px; margin: 0 0 20px 0; }

.qr-code-wrapper {
    background: white;
    border: 1px solid var(--border-light);
    padding: 10px;
    border-radius: 16px;
    width: 260px;
    height: 260px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.qr-code-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--text-main);
}
.qr-code-overlay p { font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.modal-countdown { margin-top: 16px; font-size: 13px; color: var(--text-secondary); }
.countdown-timer { font-weight: 700; color: var(--gold-dark); font-family: monospace; font-size: 14px; }
.btn-refresh { background: var(--text-main); color: white; }

@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    
    /* Paid Section Mobile Style */
    .paid-card-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .paid-content {
        padding-right: 0;
        margin-bottom: 30px;
        z-index: 2;
    }
    .paid-title {
        font-size: 28px;
    }
    .feature-list li {
        text-align: left;
    }
    
    .gift-grid { gap: 16px; }
    .gift-card { padding: 20px; }
    .header-container { padding: 0 15px; }
    #get-coins-btn-desktop { display: none; }
}