/* ============================================================
   鹿枫堂网页版 · 全局样式（移动端优先）
   ============================================================ */
:root {
  --primary: #FF6B6B;
  --primary-d: #e85a5a;
  --ad: #ff9f43;
  --bg: #F5F6F8;
  --card: #ffffff;
  --text: #222;
  --sub: #999;
  --line: #eee;
  --tab-h: 56px;
  --maxw: 750px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
#app { max-width: var(--maxw); margin: 0 auto; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, textarea { font-family: inherit; outline: none; }
img { display: block; max-width: 100%; }

.lf-app { min-height: 100vh; background: var(--bg); }

/* 页面容器，留出底部 tab 高度 */
.lf-page { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
.lf-page.no-nav { padding-bottom: 0; }
.page { padding: 12px; }

/* 启动动画 */
.app-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; color: var(--sub); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 底部导航 */
.lf-tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: var(--maxw);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; background: #fff; border-top: 1px solid var(--line); z-index: 50;
}
.lf-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--sub); font-size: 11px; }
.lf-tab.active { color: var(--primary); }
.lf-tab-icon { font-size: 20px; line-height: 1; margin-bottom: 2px; }

/* 签到浮窗按钮 */
.lf-sign-float { position: fixed; right: 14px; bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 60; }
.lf-sign-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--ad)); color: #fff;
  box-shadow: 0 6px 16px rgba(255,107,107,0.4); font-size: 11px;
}
.lf-sign-icon { font-size: 18px; }

/* 遮罩 / 弹窗 */
.lf-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.lf-sign-panel, .lf-ad-modal { background: #fff; border-radius: 14px; width: 100%; max-width: 320px; padding: 20px; }
.lf-sign-title { font-size: 18px; font-weight: 700; text-align: center; }
.lf-sign-sub { color: var(--sub); font-size: 12px; text-align: center; margin: 6px 0 14px; }
.lf-sign-progress { font-size: 13px; margin-bottom: 6px; }
.lf-sign-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.lf-sign-bar-in { height: 100%; background: linear-gradient(90deg, var(--primary), var(--ad)); transition: width 0.3s; }
.lf-sign-done { text-align: center; color: var(--primary); margin: 8px 0; }

/* 账号关联弹窗 */
.lf-bind-modal { background: #fff; border-radius: 14px; width: 100%; max-width: 320px; padding: 22px 20px; text-align: center; }
.lf-bind-title { font-size: 18px; font-weight: 700; }
.lf-bind-sub { color: var(--sub); font-size: 12px; margin: 8px 0 16px; line-height: 1.6; }
.lf-bind-qr { display: flex; justify-content: center; min-height: 160px; align-items: center; }
.lf-bind-qr img { width: 160px; height: 160px; border: 1px solid var(--line); border-radius: 8px; }
.lf-bind-status { font-size: 13px; color: var(--sub); margin: 12px 0 4px; }
.lf-mine-menu-tag { font-size: 12px; color: var(--primary); background: rgba(255,107,107,0.12); padding: 2px 8px; border-radius: 10px; }

/* 账号登录弹窗 */
.lf-login-modal { background: #fff; border-radius: 14px; width: 100%; max-width: 320px; padding: 20px 20px 16px; text-align: center; }
.lf-login-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.lf-login-tabs { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.lf-login-tab { flex: 1; padding: 9px 0; font-size: 14px; color: var(--sub); background: #fafafa; }
.lf-login-tab.active { background: #fff; color: var(--primary); font-weight: 700; }
.lf-login-pwd { display: flex; flex-direction: column; gap: 10px; }
.lf-input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; text-align: left; }
.lf-input:focus { border-color: var(--primary); }
.lf-login-err { color: #e85a5a; font-size: 13px; text-align: left; min-height: 16px; }
.lf-login-hint { color: var(--sub); font-size: 12px; line-height: 1.6; margin: 6px 0 2px; text-align: left; }
.lf-login-scan .lf-bind-qr { margin: 4px 0; }
.lf-login-guest { color: var(--sub); font-size: 13px; margin: 12px 0 4px; text-decoration: underline; }
.lf-login-guest:active { color: var(--primary); }

/* 按钮 */
.lf-btn { display: block; width: 100%; padding: 11px; border-radius: 10px; font-size: 15px; margin: 8px 0; background: #f0f0f0; color: #333; }
.lf-btn-primary { background: var(--primary); color: #fff; }
.lf-btn-primary:active { background: var(--primary-d); }
.lf-btn-ad { background: linear-gradient(135deg, var(--ad), #ffbe76); color: #fff; }
.lf-btn-ghost { background: transparent; color: var(--sub); border: 1px solid var(--line); }
.lf-btn-mini { display: inline-block; width: auto; padding: 6px 14px; font-size: 13px; margin: 6px 0; }
.lf-btn-danger { background: #ffe3e3; color: #e74c3c; }
.lf-btn:disabled { opacity: 0.5; }

/* 广告弹窗 */
.lf-ad-modal { max-width: 340px; }
.lf-ad-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 12px; }
.lf-ad-close { color: var(--sub); font-size: 16px; }
.lf-ad-creative { height: 160px; border-radius: 10px; background: linear-gradient(135deg, #6a89cc, #4a69bd); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lf-ad-logo { width: 44px; height: 44px; border-radius: 8px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }
.lf-ad-count { text-align: center; color: var(--sub); margin: 14px 0; }

/* Toast */
.lf-toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 200; font-size: 14px; max-width: 80%; text-align: center; }
.lf-toast-success { background: rgba(46,204,113,0.92); }
.lf-toast-error { background: rgba(231,76,60,0.92); }
.lf-fade-enter-active, .lf-fade-leave-active { transition: opacity 0.25s; }
.lf-fade-enter-from, .lf-fade-leave-to { opacity: 0; }

/* 星级 */
.lf-stars { display: inline-flex; gap: 2px; font-size: 22px; color: #ddd; }
.lf-stars .lf-star.on { color: #ffb400; }
.lf-stars.readonly .lf-star { cursor: default; }

/* 通用区块 */
.block { background: var(--card); border-radius: 12px; padding: 12px; margin: 12px 0; }
.block-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 10px; }
.block-more { color: var(--primary); font-size: 12px; font-weight: 400; }

/* 首页 */
.home-hero { background: linear-gradient(135deg, var(--primary), var(--ad)); color: #fff; border-radius: 14px; padding: 18px; display: flex; justify-content: space-between; align-items: center; }
.home-points { font-size: 30px; font-weight: 800; }
.home-points-label { font-size: 12px; opacity: 0.9; }
.home-sign-btn { background: #fff; color: var(--primary); padding: 8px 14px; border-radius: 20px; font-weight: 600; font-size: 13px; }
.cat-quick { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; }
.cat-quick-item { flex: 0 0 auto; background: var(--card); border-radius: 18px; padding: 8px 14px; font-size: 13px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.home-bottom-tip { text-align: center; color: var(--sub); font-size: 12px; margin: 20px 0 10px; }

/* 商品卡片 */
.goods-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.goods-card { flex: 0 0 110px; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.goods-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.goods-card-img { width: 100%; height: 110px; object-fit: cover; background: #f2f2f2; }
.goods-card-title { font-size: 12px; padding: 6px 8px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goods-card-point { font-size: 12px; color: var(--primary); padding: 0 8px 8px; font-weight: 600; }
.goods-card-foot { display: flex; justify-content: space-between; padding: 0 8px 8px; }
.goods-tag { font-size: 11px; color: #2ecc71; background: #eafaf1; border-radius: 4px; padding: 0 4px; }

/* 搜索 */
.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-input { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 9px 14px; background: #fff; }
.search-btn { background: var(--primary); color: #fff; border-radius: 20px; padding: 0 18px; }

/* 分类 tabs */
.cat-tabs, .rank-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.cat-tab, .rank-tab { flex: 0 0 auto; padding: 6px 14px; border-radius: 16px; background: #fff; font-size: 13px; color: #555; }
.cat-tab.active, .rank-tab.active { background: var(--primary); color: #fff; }

/* 详情页 */
.detail-topbar { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 12px; }
.detail-topbar .back { color: var(--primary); font-size: 16px; }
.detail-loading, .list-state, .detail-loading { text-align: center; color: var(--sub); padding: 30px 0; }
.detail-banner { width: 100%; border-radius: 12px; }
.detail-title { font-size: 18px; font-weight: 700; margin: 10px 0; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--sub); font-size: 12px; margin-bottom: 12px; }
.detail-redeem { background: var(--card); border-radius: 12px; padding: 14px; text-align: center; margin-bottom: 12px; }
.detail-cost { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.detail-tip { color: var(--sub); font-size: 12px; margin-top: 8px; }
.detail-links .link-item { display: flex; justify-content: space-between; align-items: center; background: #fafafa; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.link-label { font-weight: 600; }
.rating-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-content { font-size: 14px; line-height: 1.7; word-break: break-word; }
.detail-content img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.lf-textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 70px; resize: vertical; }

/* 我的 */
.mine-head { background: linear-gradient(135deg, var(--primary), var(--ad)); color: #fff; border-radius: 14px; padding: 22px; text-align: center; }
.mine-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 8px; border: 2px solid rgba(255,255,255,0.6); object-fit: cover; }
.mine-avatar-default { background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.mine-name { font-size: 17px; font-weight: 700; }
.mine-point { font-size: 13px; opacity: 0.9; margin-top: 2px; }
.mine-sign { background: var(--card); border-radius: 12px; padding: 14px; margin: 12px 0; text-align: center; font-weight: 600; color: var(--primary); }
.mine-menu { background: var(--card); border-radius: 12px; overflow: hidden; }
.mine-menu-item { display: flex; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.mine-menu-item:last-child { border-bottom: none; }
.mine-menu-icon { font-size: 18px; width: 28px; }
.mine-menu-text { flex: 1; }
.mine-menu-arrow { color: var(--sub); }

/* 我的兑换 / 积分明细 */
.mg-list, .jf-list { background: var(--card); border-radius: 12px; overflow: hidden; }
.mg-item, .jf-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.mg-item:last-child, .jf-item:last-child { border-bottom: none; }
.mg-img, .rank-img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; margin-right: 12px; background: #f2f2f2; }
.mg-info, .jf-info { flex: 1; }
.mg-title, .jf-title { font-weight: 600; }
.mg-sub, .jf-time { color: var(--sub); font-size: 12px; }
.jf-num { font-weight: 700; font-size: 16px; }
.jf-num.plus { color: #2ecc71; }
.jf-num.minus { color: var(--primary); }

/* 文章 */
.art-list { background: var(--card); border-radius: 12px; overflow: hidden; }
.art-item { display: flex; padding: 12px; border-bottom: 1px solid var(--line); }
.art-item:last-child { border-bottom: none; }
.art-img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; margin-right: 12px; background: #f2f2f2; }
.art-title { font-weight: 600; }
.art-sub { color: var(--sub); font-size: 12px; margin-top: 4px; }
.ad-title { font-size: 20px; font-weight: 800; margin: 6px 0; }
.ad-time { color: var(--sub); font-size: 12px; margin-bottom: 12px; }
.ad-content { font-size: 14px; line-height: 1.7; word-break: break-word; }
.ad-content img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.ad-comments { margin-bottom: 10px; }
.ad-comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ad-comment-nick { font-size: 12px; color: var(--primary); }
.ad-comment-text { margin-top: 2px; }

/* 排行榜 */
.rank-list { background: var(--card); border-radius: 12px; overflow: hidden; }
.rank-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border-bottom: none; }
.rank-no { width: 26px; font-weight: 800; color: var(--sub); text-align: center; }
.rank-no.top { color: var(--primary); }
.rank-info { flex: 1; }
.rank-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { color: var(--primary); font-weight: 700; }

/* 推荐测试 */
.rec-intro { text-align: center; color: var(--sub); margin-bottom: 14px; }
.rec-q { background: var(--card); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.rec-q-title { font-weight: 600; margin-bottom: 10px; }
.rec-opts { display: flex; flex-direction: column; gap: 8px; }
.rec-opt { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.rec-opt.on { border-color: var(--primary); background: #fff0f0; color: var(--primary); font-weight: 600; }
.rec-result { text-align: center; background: var(--card); border-radius: 12px; padding: 18px; margin-bottom: 12px; }
.rec-result-img { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 8px; }
.rec-result-name { font-size: 18px; font-weight: 800; color: var(--primary); }
.rec-result-desc { color: var(--sub); font-size: 13px; margin-top: 6px; }

/* 更新记录 */
.ul-list { background: var(--card); border-radius: 12px; padding: 6px 14px; }
.ul-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ul-item:last-child { border-bottom: none; }
.ul-date { color: var(--primary); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.ul-content { font-size: 14px; }

/* 关于 */
.about-box { text-align: center; padding: 30px 20px; }
.about-logo { font-size: 48px; }
.about-box h2 { margin: 10px 0; }
.about-desc { color: var(--sub); font-size: 13px; line-height: 1.7; }
.about-links { margin-top: 20px; }
.about-link { background: var(--card); border-radius: 10px; padding: 14px; margin-bottom: 10px; }

/* 编辑资料 */
.profile-box { background: var(--card); border-radius: 12px; padding: 18px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; object-fit: cover; }
.profile-avatar-default { background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.profile-field { margin-bottom: 16px; }
.profile-field label { display: block; color: var(--sub); font-size: 12px; margin-bottom: 6px; }
.profile-field input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.avatar-list { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-opt { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; }
.avatar-opt.on { border-color: var(--primary); }

/* 合集 */
.coll-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.coll-item { background: var(--card); border-radius: 12px; padding: 16px; }
.coll-title { font-weight: 700; }
.coll-sub { color: var(--sub); font-size: 12px; margin-top: 4px; }

.load-more { display: block; width: 100%; padding: 12px; background: transparent; color: var(--sub); font-size: 13px; }
