* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f5f5; max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 60px; color: #333; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* Header */
.header { background: #fff; padding: 15px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.header h1 { font-size: 18px; font-weight: 600; }
.header-link { color: #4A90D9; font-size: 14px; }
.back-btn { color: #4A90D9; font-size: 15px; }

/* 瀑布流 */
.waterfall { columns: 2; column-gap: 8px; padding: 10px; }
.waterfall .card { break-inside: avoid; margin-bottom: 8px; background: #fff; border-radius: 8px; overflow: hidden; display: block; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.waterfall .card img { width: 100%; display: block; min-height: 100px; object-fit: cover; transition: transform .2s; }
.waterfall .card:active img { transform: scale(1.05); }
.card-info { padding: 8px; }
.card-title { font-size: 13px; font-weight: 500; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-title.small { font-size: 11px; }
.card-badge { font-size: 11px; color: #888; }
.no-cover-large { height: 150px; display: flex; align-items: center; justify-content: center; color: #999; background: #f0f0f0; }
.waterfall.small .card img { min-height: 60px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 15px 10px 20px; }
.page-btn { padding: 8px 20px; background: #fff; border: 1px solid #ddd; border-radius: 20px; font-size: 13px; color: #333; }
.page-btn.disabled { opacity: .4; pointer-events: none; }
.page-info { font-size: 13px; color: #888; }

/* 底部导航 */
.bottom-tabs { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; display: flex; border-top: 1px solid #eee; max-width: 480px; margin: 0 auto; z-index: 100; }
.tab { flex: 1; text-align: center; padding: 8px 0 6px; font-size: 13px; color: #888; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; }
.tab svg { width: 22px; height: 22px; }
.tab span { font-size: 11px; line-height: 1; }
.tab.active { color: #4A90D9; font-weight: 600; }

/* 空状态 */
.empty { text-align: center; color: #999; padding: 30px 10px; }

/* Toast */
.toast { padding: 10px; text-align: center; font-size: 13px; background: #4A90D9; color: #fff; }
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }

/* 锁定页面 */
.locked-box { text-align: center; padding: 60px 20px; }
.lock-icon { font-size: 60px; margin-bottom: 20px; }
.locked-box h2 { font-size: 22px; margin-bottom: 10px; }
.locked-box p { color: #888; margin-bottom: 20px; }
.balance { font-size: 14px; color: #666; margin-top: 15px; }
.btn-primary.big, .buy-form .btn-primary { width: 100%; max-width: 300px; padding: 14px; font-size: 16px; }

/* 按钮 */
.btn-primary { background: #4A90D9; color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; cursor: pointer; width: 100%; }
.btn-primary:active { opacity: .8; }
.btn-cancel { background: #eee; color: #666; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; cursor: pointer; width: 100%; margin-top: 10px; }

/* 我的页面 */
.profile-card { background: #fff; padding: 20px; display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: #4A90D9; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }
.nickname { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.badge { padding: 3px 8px; border-radius: 4px; font-size: 12px; }
.badge.success { background: #e8f8f0; color: #27ae60; }
.btn-bind { background: #4A90D9; color: #fff; border: none; padding: 5px 12px; border-radius: 15px; font-size: 12px; cursor: pointer; }

/* 统计行 */
.stats-row { display: flex; background: #fff; padding: 15px 10px; margin-bottom: 10px; }
.stat-box { flex: 1; text-align: center; }
.stat-value { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 5px; }
.stat-label { font-size: 12px; color: #888; margin-bottom: 8px; }
.btn-recharge, .btn-vip { padding: 4px 15px; border: 1px solid #4A90D9; color: #4A90D9; border-radius: 15px; font-size: 12px; cursor: pointer; background: #fff; }
.btn-vip { border-color: #f39c12; color: #f39c12; }

/* 区块 */
.section { background: #fff; padding: 15px; margin-bottom: 10px; }
.section h3 { font-size: 15px; margin-bottom: 12px; }

/* 列表 */
.list-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.list-item:last-child { border-bottom: none; }

/* 快捷登录 */
.phone-login-link { color: #4A90D9; font-size: 14px; }

/* 弹窗 */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 200; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: 12px; padding: 25px; width: 90%; max-width: 380px; }
.modal-content h3 { margin-bottom: 20px; }
.modal-content input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.modal-content form { }
.modal-content p { text-align: center; margin-bottom: 10px; font-size: 15px; }
.tip { font-size: 12px !important; color: #999; }
.wechat-qrcode { width: 200px; height: 200px; object-fit: cover; display: block; margin: 10px auto; }
.wechat-name { font-weight: 600; }

/* 手机号登录 */
.login-form { background: #fff; padding: 30px 20px; margin-top: 10px; }
.login-form .form-group { margin-bottom: 15px; }
.login-form label { display: block; font-size: 13px; color: #888; margin-bottom: 5px; }
.login-form input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.login-form .btn-primary { margin-top: 10px; }
.btn-primary.big { padding: 14px; font-size: 16px; }

/* 图片查看器 */
.viewer { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.95); z-index: 300; align-items: center; justify-content: center; touch-action: none; }
.viewer.show { display: flex; }
#viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-close { position: absolute; top: 15px; right: 15px; color: #fff; font-size: 32px; cursor: pointer; z-index: 2; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 36px; padding: 10px; cursor: pointer; user-select: none; z-index: 2; }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }

/* 图片卡片 */
.photo-card { cursor: pointer; }

/* 手机响应 */
@media (max-width: 480px) {
    .waterfall { column-gap: 5px; padding: 5px; }
    .waterfall .card { margin-bottom: 5px; }
}
/* 充值金额选择 */
.amount-box { margin-bottom: 15px; }
.amount-preset { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.amount-btn { flex: 1; min-width: 50px; padding: 8px 5px; background: #fff; border: 1px solid #4A90D9; color: #4A90D9; border-radius: 6px; font-size: 13px; cursor: pointer; }
.amount-btn:active { background: #4A90D9; color: #fff; }
#recharge-amount { margin-bottom: 10px; }
.amount-box .btn-primary { margin-bottom: 10px; }

/* 区块标题 - 更多链接 */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-header h3 { margin-bottom: 0; }
.more-link { color: #4A90D9; font-size: 13px; text-decoration: none; }

/* 搜索框 */
.search-box { background: #fff; padding: 10px; border-bottom: 1px solid #f0f0f0; }
.search-box form { display: flex; gap: 8px; }
.search-input { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 20px; font-size: 14px; outline: none; background: #f5f5f5; }
.search-input:focus { border-color: #4A90D9; background: #fff; }
.search-btn { padding: 8px 18px; background: #4A90D9; color: #fff; border: none; border-radius: 20px; font-size: 14px; cursor: pointer; }
.search-btn:active { opacity: .8; }

/* 分类选项卡 */
.category-tabs { display: flex; background: #fff; padding: 8px 10px; gap: 8px; border-bottom: 1px solid #f0f0f0; position: sticky; top: 52px; z-index: 99; }
.cat-tab { flex: 1; text-align: center; padding: 8px 0; border-radius: 20px; font-size: 13px; color: #888; background: #f5f5f5; }
.cat-tab.active { background: #4A90D9; color: #fff; font-weight: 600; }

/* 查看全部链接 */
.see-all-link { display: block; text-align: center; color: #4A90D9; font-size: 13px; padding: 10px; text-decoration: none; margin-top: 5px; }
.pay-method-label { font-size: 13px; color: #888; text-align: left; margin: 12px 0 4px; padding-top: 8px; border-top: 1px dashed #eee; }
.pay-method-label:first-of-type { border-top: none; }

/* 底部抽屉弹窗（充值用） */
.sheet-mask { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 200; }
.sheet-mask.show { display: block; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; z-index: 201; transform: translateY(100%); transition: transform .3s ease; max-width: 480px; margin: 0 auto; max-height: 80vh; display: flex; flex-direction: column; }
.sheet.show { transform: translateY(0); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.sheet-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.sheet-close { background: none; border: none; font-size: 22px; color: #999; cursor: pointer; line-height: 1; padding: 4px 8px; }
.sheet-body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }

/* 充值自定义金额输入框 */
.recharge-amount-wrap { position: relative; margin-bottom: 12px; }
.recharge-amount-wrap .currency { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; color: #999; font-weight: 600; }
#recharge-amount { width: 100%; padding: 13px 14px 13px 32px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 17px; font-weight: 600; color: #333; background: #f9f9f9; outline: none; transition: border-color .2s, background .2s; margin-bottom: 0; }
#recharge-amount:focus { border-color: #4A90D9; background: #fff; }
#recharge-amount::placeholder { color: #bbb; font-weight: 400; font-size: 14px; }

/* 我的页面九宫格菜单 */
.grid-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 15px; background: #fff; }
.grid-menu .grid-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 8px; background: #f9f9f9; border-radius: 12px; text-decoration: none; color: #333; gap: 8px; }
.grid-menu .grid-item:active { background: #f0f0f0; }
.grid-menu .grid-ico { font-size: 26px; line-height: 1; }
.grid-menu .grid-label { font-size: 13px; font-weight: 500; }
.grid-menu .grid-count { font-size: 11px; color: #999; }
