/* ========== 基础变量 ========== */
:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-hover: #f0f0f0;
  --text: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e5e5e5;
  --red: #e74c3c;
  --radius: 12px;
  --radius-full: 9999px;
  --header-h: 52px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; font-size: inherit; }
a { color: var(--text); text-decoration: none; }
ul { list-style: none; }
input { font-family: inherit; }

/* ========== 视图系统 ========== */
.view { display: none; position: fixed; inset: 0; background: var(--bg); z-index: 1; flex-direction: column; }
.view.active { display: flex; }

/* ========== 主页 Header ========== */
.main-header { height: var(--header-h); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 16px; }
.header-left { display: flex; align-items: center; gap: 10px; }
.header-spacer { flex: 1; }
.header-avatar { width: 32px; height: 32px; border-radius: var(--radius-full); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.header-avatar-letter { color: #fff; font-weight: 800; font-size: 0.875rem; line-height: 1; }
.header-name { font-size: 0.9375rem; font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 6px; }
.btn-header-login { height: 32px; padding: 0 14px; background: var(--text); color: var(--bg); font-size: 0.8125rem; font-weight: 700; border-radius: var(--radius-full); white-space: nowrap; }
.btn-header-login:active { opacity: 0.85; }
.header-menu-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); }
.header-menu-btn:active { background: var(--bg-hover); }
.header-menu-btn .material-icons-round { font-size: 24px; }

/* ========== 主页内容滚动 ========== */
.main-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ========== 横幅 + 头像 (放大50%) ========== */
.hero-section { position: relative; }
.hero-banner { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-secondary); }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.hero-avatar { position: absolute; bottom: -36px; left: 16px; width: 96px; height: 96px; border-radius: var(--radius-full); border: 3px solid var(--bg); overflow: hidden; background: var(--bg-secondary); box-shadow: 0 2px 12px rgba(0,0,0,0.12); }
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ========== 创作者信息 ========== */
.creator-info { padding: 48px 20px 0; }
.creator-name { font-size: 1.625rem; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 4px; }
.creator-tagline { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 6px; }
.creator-members { font-size: 0.875rem; color: var(--text-secondary); }

/* ========== 订阅按钮 ========== */
.subscribe-section { padding: 20px 20px 0; }
.btn-subscribe { width: 100%; height: 48px; background: var(--text); color: var(--bg); font-size: 0.9375rem; font-weight: 700; border-radius: var(--radius-full); transition: opacity 0.15s; }
.btn-subscribe:active { opacity: 0.85; }

/* ========== 帖子区域 ========== */
.posts-section { padding: 28px 0 40px; }
.posts-title { font-size: 1.375rem; font-weight: 800; padding: 0 20px; margin-bottom: 16px; }
.post-list { display: flex; flex-direction: column; }
.post-card { padding: 0 20px 20px; cursor: pointer; transition: opacity 0.15s; }
.post-card:active { opacity: 0.8; }
.post-media { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; background: var(--bg-secondary); }
.post-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.post-lock-badge { position: absolute; bottom: 8px; left: 8px; display: flex; align-items: center; gap: 3px; background: rgba(0,0,0,0.65); color: #fff; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; backdrop-filter: blur(6px); }
.post-lock-badge .material-icons-round { font-size: 13px; }
.post-play-btn { position: absolute; bottom: 8px; right: 8px; width: 34px; height: 34px; background: rgba(0,0,0,0.55); border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: #fff; backdrop-filter: blur(6px); }
.post-play-btn .material-icons-round { font-size: 18px; }
.post-body { padding: 0; }
.post-title { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 0.8125rem; color: var(--text-muted); }
.post-likes { display: flex; align-items: center; gap: 3px; }
.post-likes .material-icons-round { font-size: 14px; color: var(--red); }
.load-more { display: flex; justify-content: center; padding: 8px 0; }
.btn-load-more { display: flex; align-items: center; gap: 4px; padding: 10px 24px; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); border: 1px solid var(--border); border-radius: var(--radius-full); }
.btn-load-more:active { background: var(--bg-hover); }
.btn-load-more .material-icons-round { font-size: 18px; }

/* ========== 帖子详情 ========== */
.detail-header { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 4px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.detail-back, .detail-more { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); }
.detail-back:active, .detail-more:active { background: var(--bg-hover); }
.detail-header-name { font-size: 0.9375rem; font-weight: 700; }
.detail-scroll { flex: 1; overflow-y: auto; }
.detail-media { position: relative; background: var(--bg-secondary); }
.detail-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail-lock-badge { position: absolute; bottom: 10px; left: 10px; display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,0.65); color: #fff; padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.8125rem; font-weight: 600; }
.detail-lock-badge .material-icons-round { font-size: 15px; }
.detail-content { padding: 20px; }
.detail-title { font-size: 1.375rem; font-weight: 800; line-height: 1.35; margin-bottom: 10px; }
.detail-meta { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 20px; }
.detail-divider { height: 1px; background: var(--border); margin-bottom: 24px; }
.detail-locked-card { text-align: center; padding: 32px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.locked-icon { margin-bottom: 12px; }
.locked-icon .material-icons-round { font-size: 32px; color: var(--text); }
.detail-locked-card h3 { font-size: 1.125rem; font-weight: 800; margin-bottom: 8px; }
.detail-locked-card p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }
.btn-unlock { width: 100%; height: 48px; background: var(--text); color: var(--bg); font-size: 0.9375rem; font-weight: 700; border-radius: var(--radius-full); }
.btn-unlock:active { opacity: 0.85; }

/* ========== 账户页面(白底主题) ========== */
.account-header { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; flex-shrink: 0; border-bottom: 1px solid var(--border); }
.account-back { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--bg-hover); display: flex; align-items: center; justify-content: center; color: var(--text); }
.account-back:active { background: var(--border); }
.account-header-title { font-size: 1.125rem; font-weight: 700; color: var(--text); padding-right: 12px; }
#view-account { background: var(--bg); }
#view-account .account-body { flex: 1; overflow-y: auto; padding: 0 20px; }
.account-profile { display: flex; flex-direction: column; align-items: center; padding: 40px 0 32px; }
.account-avatar { width: 80px; height: 80px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; font-weight: 900; margin-bottom: 12px; overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-name { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.account-sub-status { font-size: 0.875rem; color: var(--text-muted); }
.account-sub-expire { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }
.account-menu { padding: 8px 0; }
.account-menu-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 4px; color: var(--text); font-size: 1rem; font-weight: 500; border-bottom: 1px solid var(--border); }
.account-menu-item:active { background: var(--bg-hover); }
.account-menu-item .material-icons-round { font-size: 24px; color: var(--text-secondary); }
.account-menu-item .menu-arrow { margin-left: auto; font-size: 20px; color: var(--text-muted); }
.account-menu-danger { color: #ef4444; }
.account-menu-danger .material-icons-round { color: #ef4444; }

/* ========== 编辑资料 & 设置 ========== */
.settings-scroll { flex: 1; overflow-y: auto; padding: 20px; }
.settings-section { margin-bottom: 28px; }
.settings-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.settings-field { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 0.9375rem; }
.settings-field label { color: var(--text-secondary); }
.settings-hint { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 12px; }
.settings-form { display: flex; flex-direction: column; gap: 10px; }
.btn-settings { height: 40px; background: var(--text); color: var(--bg); font-size: 0.875rem; font-weight: 600; border-radius: var(--radius-full); }
.btn-settings:active { opacity: 0.85; }

/* ========== 点赞数页面 ========== */
.likes-scroll { flex: 1; overflow-y: auto; padding: 20px; }
.likes-summary { text-align: center; padding: 40px 0 32px; }
.likes-total-icon { margin-bottom: 12px; }
.likes-total-icon .material-icons-round { font-size: 48px; color: var(--red); }
.likes-total-count { font-size: 3rem; font-weight: 900; margin-bottom: 4px; }
.likes-total-label { font-size: 0.9375rem; color: var(--text-muted); }
.likes-list { border-top: 1px solid var(--border); padding-top: 16px; }
.likes-empty { text-align: center; color: var(--text-muted); padding: 24px 0; font-size: 0.9375rem; }
.likes-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.likes-item-img { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--bg-secondary); }
.likes-item-img img { width: 100%; height: 100%; object-fit: cover; }
.likes-item-info { flex: 1; }
.likes-item-title { font-size: 0.9375rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.likes-item-time { font-size: 0.75rem; color: var(--text-muted); }

/* ========== 弹窗通用 ========== */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.25s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-sheet { width: 100%; max-width: 480px; max-height: 90vh; background: var(--bg); border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1); overflow-y: auto; }
.modal-overlay.active .modal-sheet { transform: translateY(0); }
.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 10px auto 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 8px; }
.modal-header h3 { font-size: 1.125rem; font-weight: 700; }
.modal-close { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--bg-hover); }
.modal-body { padding: 4px 20px 32px; }

/* ========== 输入框 & 表单 ========== */
.input-field { width: 100%; height: 48px; padding: 0 16px; font-size: 0.9375rem; border: 1.5px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); outline: none; transition: border-color 0.15s; margin-bottom: 10px; }
.input-field:focus { border-color: var(--text); }
.input-field::placeholder { color: var(--text-muted); }
.btn-primary { width: 100%; height: 48px; background: var(--text); color: var(--bg); font-size: 0.9375rem; font-weight: 700; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; transition: opacity 0.15s; }
.btn-primary:active { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }
.btn-form-submit { margin-top: 6px; }
.form-error { font-size: 0.8125rem; color: var(--red); min-height: 20px; padding: 0 2px; }
.form-switch { text-align: center; font-size: 0.8125rem; color: var(--text-muted); margin-top: 16px; }
.form-switch a { color: var(--text); font-weight: 600; text-decoration: underline; }
.email-code-row { display: flex; gap: 8px; margin-bottom: 10px; }
.email-code-row .input-field { flex: 1; margin-bottom: 0 !important; }
.btn-send-code { height: 48px; padding: 0 14px; background: var(--text); color: var(--bg); font-size: 0.8125rem; font-weight: 600; border-radius: 10px; white-space: nowrap; min-width: 100px; transition: opacity 0.15s; }
.btn-send-code:active { opacity: 0.85; }
.btn-send-code:disabled { opacity: 0.5; pointer-events: none; }
.captcha-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.captcha-question { font-size: 1rem; font-weight: 700; white-space: nowrap; min-width: 90px; text-align: center; padding: 0 4px; background: var(--bg-secondary); border-radius: 8px; height: 48px; display: flex; align-items: center; justify-content: center; }
.captcha-input { flex: 1; margin-bottom: 0 !important; }
.captcha-refresh { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg-secondary); flex-shrink: 0; }
.captcha-refresh:active { background: var(--bg-hover); }
.captcha-refresh .material-icons-round { font-size: 20px; color: var(--text-secondary); }

/* ========== 会籍选项 (卡片轮播, 加长30%) ========== */
.membership-page { width: 100%; height: 100%; background: var(--bg-secondary); display: flex; flex-direction: column; }
.membership-page .detail-header { background: var(--bg); }
.membership-scroll { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 20px 0; overflow: hidden; }
.membership-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding: 20px 32px; scrollbar-width: none; -ms-overflow-style: none; }
.membership-carousel::-webkit-scrollbar { display: none; }

.membership-card { flex-shrink: 0; width: calc(100vw - 80px); max-width: 340px; scroll-snap-align: center; border-radius: 16px; overflow: hidden; background: var(--bg); border: 2.5px solid #000; position: relative; transform: scale(0.90); transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1); }
.membership-card.card-active { transform: scale(1); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.card-recommend { position: absolute; top: 0; left: 0; right: 0; text-align: center; padding: 8px; background: rgba(0,0,0,0.7); color: #fff; font-size: 0.8125rem; font-weight: 600; z-index: 2; backdrop-filter: blur(4px); }
.card-image { height: 238px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 20px 28px; }
.card-plan-name { font-size: 1.125rem; font-weight: 700; margin-bottom: 4px; }
.card-price { margin-bottom: 14px; }
.card-price-amount { font-size: 1.75rem; font-weight: 900; }
.card-price-period { font-size: 0.9375rem; color: var(--text-secondary); }
.card-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.card-perks { margin-bottom: 22px; }
.card-perks li { font-size: 0.8125rem; color: var(--text-secondary); padding: 4px 0 4px 14px; position: relative; }
.card-perks li::before { content: '·'; position: absolute; left: 2px; font-weight: 700; color: var(--text-muted); }
.btn-card-join { width: 100%; height: 46px; background: var(--text); color: var(--bg); font-size: 0.9375rem; font-weight: 700; border-radius: var(--radius-full); }
.btn-card-join:active { opacity: 0.85; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 20px 0 8px; }
.dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: #ccc; transition: all 0.2s; }
.dot.active { background: var(--text); width: 20px; }

/* ========== 锁定帖子图片模糊 ========== */
.post-card.post-locked .post-media img { filter: blur(28px) saturate(1.2); transform: scale(1.1); }
.post-card.post-locked .post-media { overflow: hidden; }
.detail-media.blurred img { filter: blur(30px) saturate(1.2); transform: scale(1.1); }
.detail-media.blurred { overflow: hidden; }

/* ========== 模糊评论区 ========== */
.blurred-comments { filter: blur(6px); pointer-events: none; user-select: none; padding: 0 0 16px; }
.blur-comment { display: flex; gap: 10px; padding: 10px 0; }
.blur-avatar { width: 32px; height: 32px; border-radius: var(--radius-full); background: #e0e0e0; flex-shrink: 0; }
.blur-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.blur-line { height: 10px; border-radius: 4px; background: #e8e8e8; }

/* ========== 收银台 ========== */
.checkout-safe { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 3px; padding-right: 12px; }
.checkout-scroll { flex: 1; overflow-y: auto; padding: 20px; }
.checkout-order { background: var(--bg-secondary); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.checkout-order-row { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 16px; }
.checkout-plan-name { font-weight: 600; color: var(--text); }
.checkout-amount { text-align: center; padding-top: 8px; border-top: 1px solid var(--border); }
.checkout-label { display: block; font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 4px; }
.checkout-price { font-size: 2rem; font-weight: 900; color: var(--text); }
.checkout-section { margin-bottom: 20px; }
.checkout-section h4 { font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s; }
.pay-method:has(input:checked) { border-color: #3b82f6; background: rgba(59,130,246,0.04); }
.pay-method input { display: none; }
.pay-method-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: 18px; }
.pay-alipay { background: #1677ff; }
.pay-wechat { background: #07c160; }
.pay-usdt { background: #26a17b; }
.pay-method-info { flex: 1; }
.pay-method-name { display: block; font-size: 0.9375rem; font-weight: 600; }
.pay-method-desc { display: block; font-size: 0.75rem; color: var(--text-muted); }
.pay-check { font-size: 20px !important; color: var(--border); }
.pay-method:has(input:checked) .pay-check { color: #3b82f6; }
.redeem-row { display: flex; gap: 8px; }
.redeem-input { flex: 1; margin-bottom: 0 !important; }
.btn-redeem { height: 48px; padding: 0 20px; background: var(--text); color: var(--bg); font-size: 0.875rem; font-weight: 600; border-radius: 10px; white-space: nowrap; }
.btn-redeem:active { opacity: 0.85; }
.btn-checkout { width: 100%; height: 52px; background: #3b82f6; color: #fff; font-size: 1rem; font-weight: 700; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 12px; }
.btn-checkout:active { opacity: 0.9; }
.btn-checkout:disabled { opacity: 0.5; }
.checkout-note { font-size: 0.75rem; color: var(--text-muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 4px; }

/* ========== OAuth 按钮 ========== */
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-muted); font-size: 0.8125rem; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.oauth-buttons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.btn-oauth { width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.875rem; font-weight: 600; border: 1.5px solid var(--border); border-radius: var(--radius-full); transition: background 0.15s; }
.btn-oauth:active { background: var(--bg-hover); }
.btn-google { color: var(--text); }
.btn-twitter { background: #000; color: #fff; border-color: #000; }
.btn-twitter:active { background: #333; }

/* ========== 加载动画 ========== */
.loading-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--text); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.post-card { animation: fadeIn 0.3s ease-out both; }
.post-card:nth-child(1) { animation-delay: 0.03s; }
.post-card:nth-child(2) { animation-delay: 0.06s; }
.post-card:nth-child(3) { animation-delay: 0.09s; }
.post-card:nth-child(4) { animation-delay: 0.12s; }

/* ========== 隐藏滚动条 ========== */
::-webkit-scrollbar { width: 0; height: 0; }

/* ========== 平板端弹窗优化 ========== */
@media (min-width: 768px) {
  .modal-overlay { align-items: center; }
  .modal-sheet { border-radius: 20px; max-width: 420px; }
  .modal-handle { display: none; }
}

/* ========== 桌面端 — 左右分栏布局 ========== */
@media (min-width: 1024px) {
  .view { position: relative; inset: auto; min-height: 100vh; }

  /* ---- 顶栏 ---- */
  .main-header {
    position: sticky; top: 0; z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  }
  .header-inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; }
  .btn-header-login { height: 36px; padding: 0 22px; font-size: 0.875rem; }

  /* ---- 主内容: CSS Grid 左右分栏 ---- */
  .main-scroll {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 40px 80px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0 52px;
    overflow: visible;
    flex: none;
  }

  /* 横幅: 跨两列 */
  .hero-section { grid-column: 1 / -1; margin-top: 28px; }
  .hero-banner { aspect-ratio: 16 / 5; border-radius: 16px; }
  .hero-avatar { width: 120px; height: 120px; bottom: -48px; left: 32px; border: 5px solid var(--bg); }

  /* 左栏: 创作者信息 */
  .creator-info { grid-column: 1; padding: 64px 0 0 0; }
  .creator-name { font-size: 1.5rem; }
  .creator-tagline { font-size: 0.875rem; }

  /* 左栏: 订阅按钮 */
  .subscribe-section { grid-column: 1; padding: 16px 0 0 0; }
  .btn-subscribe { height: 44px; font-size: 0.875rem; }

  /* 右栏: 帖子区 (从第2行起占满) */
  .posts-section { grid-column: 2; grid-row: 2 / 6; padding-top: 64px; }
  .posts-title { padding: 0; font-size: 1.25rem; margin-bottom: 24px; }
  .post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 0; }
  .post-card { padding: 0; }
  .post-media { border-radius: 12px; }
  .load-more { padding: 20px 0 0; }

  /* ---- 帖子详情页居中 ---- */
  #view-post-detail { min-height: 100vh; }
  .detail-header { max-width: 720px; margin: 0 auto; width: 100%; }
  .detail-scroll { max-width: 720px; margin: 0 auto; overflow: visible; flex: none; }

  /* ---- 账户页居中 ---- */
  #view-account .account-header { max-width: 520px; margin: 0 auto; width: 100%; }
  #view-account .account-body { max-width: 520px; margin: 0 auto; overflow: visible; flex: none; }

  /* ---- 编辑 / 点赞页居中 ---- */
  #view-edit-profile .detail-header { max-width: 520px; margin: 0 auto; width: 100%; }
  .settings-scroll { max-width: 520px; margin: 0 auto; overflow: visible; flex: none; }
  #view-likes .detail-header { max-width: 520px; margin: 0 auto; width: 100%; }
  .likes-scroll { max-width: 520px; margin: 0 auto; overflow: visible; flex: none; }

  /* ---- 收银台居中 ---- */
  #view-checkout .detail-header { max-width: 500px; margin: 0 auto; width: 100%; }
  .checkout-scroll { max-width: 500px; margin: 0 auto; overflow: visible; flex: none; }

  /* ---- 会员卡片弹窗: 并排展示 ---- */
  .membership-page { max-width: 820px; margin: 0 auto; }
  .membership-carousel { justify-content: center; overflow-x: visible; scroll-snap-type: none; padding: 24px; gap: 32px; }
  .membership-card { width: 340px; max-width: 340px; flex-shrink: 0; transform: none !important; }
  .membership-card.card-active { box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
  .carousel-dots { display: none; }

  /* ---- USDT支付页/客服页居中 ---- */
  #view-usdt-pay .detail-header { max-width: 500px; margin: 0 auto; width: 100%; }
  #view-usdt-pay .checkout-scroll { max-width: 500px; margin: 0 auto; overflow: visible; flex: none; }
  .chat-header { max-width: 500px; margin: 0 auto; width: 100%; }
  .chat-body { max-width: 500px; margin: 0 auto; }
  .chat-input-bar { max-width: 500px; margin: 0 auto; }
  .pay-success-body { max-width: 500px; margin: 0 auto; }
}

/* ========== 客服聊天(重设计) ========== */
.chat-header { height: 60px; display: flex; align-items: center; padding: 0 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; background: #fff; }
.chat-back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; }
.chat-back:active { background: var(--bg-hover); }
.chat-header-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.chat-header-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.chat-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-header-name { font-size: 0.9375rem; font-weight: 700; line-height: 1.2; }
.chat-header-status { font-size: 0.6875rem; color: #22c55e; display: flex; align-items: center; gap: 4px; }
.chat-online-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; background: #f5f5f5; display: flex; flex-direction: column; gap: 4px; }
.chat-welcome { text-align: center; padding: 24px 16px 20px; }
.chat-welcome-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; margin: 0 auto 12px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.chat-welcome-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-welcome-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.chat-welcome-desc { font-size: 0.8125rem; color: #666; line-height: 1.5; margin-bottom: 16px; }
.chat-quick-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-quick-tag { padding: 6px 14px; border: 1px solid #ddd; border-radius: 16px; font-size: 0.75rem; color: #444; background: #fff; cursor: pointer; }
.chat-quick-tag:active { background: #f0f0f0; }
.chat-time-divider { text-align: center; font-size: 0.6875rem; color: #999; padding: 8px 0; }
.chat-row { display: flex; gap: 8px; padding: 2px 0; max-width: 80%; }
.chat-row.is-user { margin-left: auto; flex-direction: row-reverse; }
.chat-row-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0; margin-top: 2px; }
.chat-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-bubble { padding: 10px 14px; border-radius: 18px; font-size: 0.875rem; line-height: 1.5; word-break: break-word; max-width: 100%; }
.chat-row.is-admin .chat-bubble { background: #fff; color: #111; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.chat-row.is-user .chat-bubble { background: #111; color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble-time { font-size: 0.625rem; color: #aaa; margin-top: 3px; padding: 0 4px; display: flex; align-items: center; gap: 4px; }
.chat-row.is-user .chat-bubble-time { justify-content: flex-end; }
.chat-input-bar { padding: 10px 16px; border-top: 1px solid var(--border); background: #fff; flex-shrink: 0; }
.chat-input-wrap { display: flex; gap: 8px; align-items: center; background: #f5f5f5; border-radius: 24px; padding: 4px 4px 4px 16px; }
.chat-input { flex: 1; border: none; background: transparent; font-size: 0.875rem; outline: none; padding: 8px 0; color: #111; }
.chat-input::placeholder { color: #999; }
.chat-send-btn { width: 36px; height: 36px; border-radius: 50%; background: #111; color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: opacity 0.15s; }
.chat-send-btn:active { opacity: 0.8; }
.chat-send-btn .material-icons-round { font-size: 18px; }

/* ========== 订单摘要弹窗 ========== */
.order-sheet { width: 100%; max-width: 480px; background: #1a1a1a; color: #fff; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1); padding: 0 0 32px; }
.modal-overlay.active .order-sheet { transform: translateY(0); }
.order-sheet .modal-handle { background: #555; }
.order-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 16px; }
.order-header h3 { font-size: 1.125rem; font-weight: 700; }
.order-header .modal-close { background: #333; color: #fff; }
.order-creator-row { padding: 0 20px 16px; display: flex; align-items: center; }
.order-creator-info { display: flex; align-items: center; gap: 10px; }
.order-creator-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.order-creator-name { font-size: 0.9375rem; font-weight: 600; }
.order-tier-tabs { display: flex; gap: 8px; padding: 0 20px 16px; }
.order-tier-tab { flex: 1; height: 40px; display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 10px; font-size: 0.8125rem; font-weight: 600; border: 1.5px solid #444; color: #aaa; background: transparent; cursor: pointer; transition: all 0.2s; }
.order-tier-tab.active { border-color: #fff; color: #fff; background: #333; }
.order-product { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.order-product-name { font-size: 0.9375rem; font-weight: 600; margin-bottom: 2px; }
.order-product-desc { font-size: 0.75rem; color: #888; }
.order-product-price { font-size: 1.25rem; font-weight: 800; }
.order-divider { height: 1px; background: #333; margin: 8px 20px; }
.order-line { display: flex; justify-content: space-between; padding: 8px 20px; font-size: 0.875rem; color: #ccc; }
.order-line-muted { font-size: 0.75rem; color: #666; }
.order-total { font-weight: 700; color: #fff; font-size: 1rem; padding-top: 12px; }
.order-buy-btn { width: calc(100% - 40px); height: 48px; margin: 20px 20px 0; background: #fff; color: #111; font-size: 0.9375rem; font-weight: 700; border-radius: var(--radius-full); border: none; cursor: pointer; }
.order-buy-btn:active { opacity: 0.9; }

/* ========== 支付成功页 ========== */
.pay-success-body { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 40px 20px; text-align: center; }
.pay-success-icon .material-icons-round { font-size: 72px; color: #22c55e; }
.pay-success-title { font-size: 1.5rem; font-weight: 800; margin: 16px 0 8px; }
.pay-success-desc { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 8px; }
.pay-success-countdown { font-size: 0.8125rem; color: var(--text-muted); }

/* ========== 升级会员弹窗 ========== */
.upgrade-sheet { width: 100%; max-width: 400px; background: #fff; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1); padding: 16px 24px 32px; text-align: center; position: relative; }
.modal-overlay.active .upgrade-sheet { transform: translateY(0); }
.upgrade-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; }
.upgrade-badge { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #111, #333); display: flex; align-items: center; justify-content: center; margin: 8px auto 12px; }
.upgrade-badge .material-icons-round { font-size: 28px; color: #fff; }
.upgrade-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; }
.upgrade-subtitle { font-size: 0.8125rem; color: #888; margin-bottom: 20px; line-height: 1.5; }
.upgrade-compare { background: #f8f8f8; border-radius: 12px; padding: 16px; text-align: left; margin-bottom: 20px; }
.upgrade-compare-item { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 6px 0; color: #666; }
.upgrade-old-price { text-decoration: line-through; color: #999; }
.upgrade-divider { height: 1px; background: #e5e5e5; margin: 8px 0; }
.upgrade-final { font-weight: 700; color: #111; font-size: 1rem; }
.upgrade-new-price { color: #111; font-weight: 800; font-size: 1.25rem; }
.upgrade-save { text-align: center; font-size: 0.75rem; color: #22c55e; font-weight: 600; margin-top: 10px; background: #f0fdf4; padding: 6px 12px; border-radius: 6px; }
.upgrade-btn { width: 100%; height: 48px; background: #111; color: #fff; font-size: 0.9375rem; font-weight: 700; border-radius: var(--radius-full); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.upgrade-btn:active { opacity: 0.85; }
.upgrade-skip { width: 100%; margin-top: 12px; font-size: 0.8125rem; color: #999; background: none; border: none; cursor: pointer; padding: 8px; }

/* ========== 超宽屏 ========== */
@media (min-width: 1440px) {
  .header-inner { max-width: 1200px; }
  .main-scroll { max-width: 1200px; grid-template-columns: 320px 1fr; gap: 0 64px; }
  .detail-header, .detail-scroll { max-width: 800px; }
}
