/* ============================================================
   高清壁纸分享平台 — 取图（壁纸）模块样式
   移动端优先（H5），PC 端做兼容
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --bg: #0a0a1a;
  --bg2: #12122a;
  --card: #171731;
  --text: #fff;
  --text2: rgba(255,255,255,0.6);
  --text3: rgba(255,255,255,0.32);
  --line: rgba(255,255,255,0.08);
  --accent: #32bd86;
  --accent-border: rgba(50,189,134,.4);
  --accent-soft: rgba(50,189,134,.13);
  --hot: #ff3b30;
  --latest: #34c759;
  --gold: #ffd60a;
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* 嵌入版子导航（首页 / 我的 / 创作者），吸顶于主项目顶栏之下 */
.wp-subnav {
  position: sticky; top: var(--header-height, 52px); z-index: 48;
  display: flex; gap: 4px; padding: 6px 10px;
  /* 吸顶元素去掉 backdrop-filter，避免滚动时持续重绘；用近实底保证可读性 */
  background: rgba(10,10,26,0.97);
  border-bottom: 1px solid var(--line);
}
.wp-subnav-item {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 0; border-radius: 10px;
  font-size: 0.74rem; font-weight: 600; color: var(--text2);
  background: rgba(255,255,255,0.05); border: 1px solid transparent;
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s, opacity .2s;
}
.wp-subnav-item.active { color: #fff; background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); font-weight: 800; }
.wp-subnav-item .wp-subnav-icon {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  font-size: 1rem; color: #fff;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px rgba(255,255,255,.2), 0 4px 10px rgba(0,0,0,.28);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.wp-subnav-item[data-view="home"] .wp-subnav-icon { background: linear-gradient(145deg, #7ec8ff, #4f7dff); }
.wp-subnav-item[data-view="profile"] .wp-subnav-icon { background: linear-gradient(145deg, #ffd08a, #ff8a5c); }
.wp-subnav-item[data-view="creator"] .wp-subnav-icon { background: linear-gradient(145deg, #b98aff, #6d5cff); }
.wp-subnav-item.active .wp-subnav-icon { transform: scale(1.08); box-shadow: 0 0 0 3px rgba(255,255,255,.14), 0 6px 14px rgba(0,0,0,.32); }
.wp-subnav-item:active .wp-subnav-icon { transform: scale(.92); }

.wp-view { padding: 2px 0 calc(74px + var(--safe-bottom)); min-height: calc(100vh - var(--header-height, 52px) - var(--nav-height, 60px)); }

/* ============================================================
   首页：搜索 / 双榜单 / 分类 / 瀑布流
   ============================================================ */
.wp-search-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px 4px;
}
.wp-search-input {
  flex: 1; height: 38px; border-radius: 20px; padding: 0 16px;
  background: rgba(255,255,255,0.07); border: 1px solid var(--line);
  color: var(--text); font-size: 0.82rem; outline: none;
}
.wp-search-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.wp-search-input::placeholder { color: var(--text3); }
.wp-search-input:focus { border-color: rgba(255,255,255,0.22); }
.wp-search-go {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.1); border: 1px solid var(--line);
  font-size: 0.95rem;
}

.wp-rank-tabs { display: flex; gap: 10px; padding: 12px 12px 4px; }
.wp-rank-tab {
  flex: 1; padding: 11px 0; border-radius: 12px; text-align: center;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.5px;
  color: var(--text2); background: rgba(255,255,255,0.05);
  border: 1px solid transparent; transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s, opacity .2s;
}
.wp-rank-tab.hot.active { color: #fff; background: rgba(255,59,48,0.16); border-color: rgba(255,59,48,0.55); }
.wp-rank-tab.latest.active { color: #fff; background: rgba(52,199,89,0.16); border-color: rgba(52,199,89,0.55); }
.wp-rank-rule {
  padding: 6px 14px 0; font-size: 0.62rem; color: var(--text3);
  line-height: 1.5;
}

.wp-cats {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 12px 12px 4px; scrollbar-width: none;
}
.wp-cats::-webkit-scrollbar { display: none; }
.wp-cat {
  flex-shrink: 0; padding: 5px 13px; border-radius: 20px;
  font-size: 0.68rem; font-weight: 500;
  color: var(--text2); background: rgba(255,255,255,0.05);
  border: 1px solid var(--line); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s, opacity .2s;
}
.wp-cat.active { color: #000; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.wp-cat:active { transform: scale(0.95); }

/* 统一网格（全部卡片统一大小 9:16，排列有序；排名 1/2/3 自然落在第一排从左到右） */
.wp-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px 4px 4px;
}
.wp-card {
  position: relative;
  border-radius: 8px; overflow: hidden; background: #111;
  cursor: pointer;
}
.wp-card img {
  width: 100%; display: block;
  aspect-ratio: 9 / 16; object-fit: cover;
  transition: transform .35s ease;
}
.wp-card:active img { transform: scale(1.04); }
.wp-card-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 42%);
}
.wp-card-rank, .wp-card-time {
  position: absolute; top: 5px; left: 5px; z-index: 2;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 0.62rem; font-weight: 800;
  background: rgba(0,0,0,0.55); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.wp-card-time { background: rgba(52,199,89,0.85); }
.wp-card-fav {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  font-size: 0.75rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}
.wp-card-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 22px 6px 6px; pointer-events: none;
}
.wp-card-title {
  font-size: 0.64rem; font-weight: 600; line-height: 1.25; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wp-card-meta { font-size: 0.52rem; color: rgba(255,255,255,0.65); margin-top: 2px; }
.wp-card-meta .dot { margin: 0 3px; opacity: 0.5; }

.wp-sentinel { height: 1px; }
.wp-load-status {
  text-align: center; padding: 14px 0 24px;
  font-size: 0.7rem; color: var(--text3);
}
.wp-empty {
  text-align: center; padding: 60px 20px; color: var(--text3);
  font-size: 0.82rem; grid-column: 1 / -1; column-span: all;
}
.wp-empty-sub { margin-top: 6px; font-size: 0.7rem; color: var(--text3); opacity: .8; }

/* ============================================================
   详情预览页（核心）
   ============================================================ */
.wp-detail-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #111;
  display: flex; flex-direction: column;
  animation: wpFadeIn .2s ease;
  isolation: isolate;
  overscroll-behavior: contain;
}
.wp-detail-backdrop {
  position: absolute; inset: -64px; z-index: -2; overflow: hidden;
  background: #111;
}
.wp-detail-backdrop img {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(46px) saturate(1.12);
  transform: scale(1.18);
  opacity: .88;
}
.wp-detail-backdrop::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(7,10,9,.32);
}
@keyframes wpFadeIn { from { opacity: 0; } to { opacity: 1; } }

.wp-detail-top {
  height: calc(50px + var(--safe-top)); padding-top: var(--safe-top);
  display: flex; align-items: center; gap: 8px; padding-left: 10px; padding-right: 10px;
  flex-shrink: 0;
  background: linear-gradient(180deg,rgba(0,0,0,.28),transparent);
}
.wp-detail-close {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.1); border: 1px solid var(--line);
  color: #fff; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.wp-detail-top-title {
  flex: 1; text-align: center; font-size: 0.86rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wp-detail-top-spacer { width: 34px; flex-shrink: 0; }

.wp-detail-stage {
  flex: 1; min-height: 0; overflow: hidden; position: relative;
  touch-action: pan-y;
}
.wp-preview-track {
  display: flex; width: 200%; height: 100%;
  will-change: transform;
}
.wp-preview-pane {
  width: 50%; height: 100%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 0;
}

/* --- iOS 手机模型（iPhone 15/16 直屏外框，画布固定 393×852） --- */
.wp-phone { width: min(70vw, calc((100vh - 166px) * 393 / 852), 286px); min-width: 198px; position: relative; }
.wp-phone-frame {
  position: relative;
  background: linear-gradient(115deg, #77777d 0%, #242428 13%, #0e0e11 50%, #4b4b51 88%, #171719 100%);
  border-radius: 13.5% / 6.4%;
  box-shadow:
    0 24px 70px rgba(0,0,0,.78),
    inset 0 0 0 1px rgba(255,255,255,.32),
    inset 0 0 0 3px rgba(0,0,0,.7);
  padding: 7px;
}
.wp-phone-frame::before {
  content: ''; position: absolute; inset: 3px; z-index: 8; pointer-events: none;
  border-radius: 12.8% / 6%; border: 1px solid rgba(255,255,255,.16);
}
.wp-phone-screen {
  position: relative; width: 100%;
  aspect-ratio: 393 / 852; /* 统一预览画布：iPhone 标准竖屏尺寸 */
  border-radius: 12% / 5.4%;
  overflow: hidden;
  background: #000;
}
.wp-phone-action-key,.wp-phone-volume-up,.wp-phone-volume-down,.wp-phone-side-key,.wp-phone-camera-key {
  position: absolute; z-index: 0; display: block;
  background: linear-gradient(180deg,#74747a,#202024 45%,#5c5c62);
  box-shadow: inset 1px 0 rgba(255,255,255,.24), 0 2px 5px rgba(0,0,0,.6);
}
.wp-phone-action-key { left: -3px; top: 13%; width: 4px; height: 5.5%; border-radius: 3px 0 0 3px; }
.wp-phone-volume-up { left: -3px; top: 23%; width: 4px; height: 9%; border-radius: 3px 0 0 3px; }
.wp-phone-volume-down { left: -3px; top: 34%; width: 4px; height: 9%; border-radius: 3px 0 0 3px; }
.wp-phone-side-key { right: -3px; top: 24%; width: 4px; height: 14%; border-radius: 0 3px 3px 0; }
.wp-phone-camera-key { right: -3px; top: 62%; width: 4px; height: 10%; border-radius: 0 3px 3px 0; }
.wp-phone-speaker {
  position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
  width: 18%; height: 2px; border-radius: 2px; background: #3b3b3f; opacity: .8;
}
/* 壁纸底层：等比例铺满整屏，不模糊、不压暗（真实 iPhone 设置壁纸逻辑） */
.wp-wallpaper {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.wp-ui-mask {
  position: absolute; inset: 0; z-index: 7;
  display: block; width: 100%; height: 100%;
  object-fit: fill; pointer-events: none; user-select: none;
}

/* 状态栏（锁屏/主屏完全一致，固定白色不透明） */
.wp-phone-statusbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  height: 5.4%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4.5%;
  color: #fff;
}
.wp-status-time { font-size: 0.6rem; font-weight: 300; letter-spacing: 0.2px; font-variant-numeric: tabular-nums; }
.wp-status-date {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 0.55rem; font-weight: 400; white-space: nowrap;
}
.wp-status-icons { display: flex; align-items: center; gap: 3px; }
.wp-status-icons svg { display: block; }
.st-batpct { font-size: 0.5rem; font-weight: 600; margin-left: 1px; }

/* --- 遮罩 A：锁屏 UI 透明图层（状态栏 + 居中大时钟 + 手电/相机 + Home 指示条，背景全透明） --- */
.wp-lock-ui { position: absolute; inset: 0; z-index: 5; }
.wp-lock-center {
  position: absolute; top: 16.5%; left: 0; right: 0; z-index: 2;
  text-align: center;
}
.wp-lock-clock {
  color: rgba(255,255,255,0.94); /* 半透明白色，叠加在壁纸上方 */
  font-size: 3.05rem; font-weight: 700; letter-spacing: -1px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wp-lock-date {
  margin-top: 6px; color: rgba(255,255,255,0.9);
  font-size: 0.6rem; font-weight: 500;
}
.wp-lock-actions {
  position: absolute; bottom: 8.5%; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: space-between; padding: 0 7%;
}
.wp-lock-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center; color: #fff;
}

/* --- 遮罩 B：主屏 UI 透明图层（状态栏 + 4列图标带名称 + Dock + Home 指示条，背景全透明） --- */
.wp-home-ui { position: absolute; inset: 0; z-index: 5; }
.wp-home-icons {
  position: absolute; top: 9.5%; left: 0; right: 0; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px 3px; padding: 0 5%;
}
.wp-home-icon {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  opacity: 0.92; /* 图标半透明，不遮挡壁纸主体 */
}
.wp-home-icon-glyph {
  width: 82%; aspect-ratio: 1; border-radius: 24%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 0 0 0.6px rgba(255,255,255,0.22);
}
.wp-home-icon-glyph svg { width: 58%; height: 58%; display: block; }
.wp-home-icon-name {
  font-size: 0.5rem; color: #fff; font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.wp-home-dock {
  position: absolute; bottom: 6%; left: 7%; right: 7%; z-index: 3;
  padding: 8px 9px; border-radius: 22px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.26);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8%;
}
.wp-home-dock .wp-home-icon { opacity: 0.95; }
.wp-home-dock .wp-home-icon-glyph { width: 100%; }
.wp-home-indicator {
  position: absolute; bottom: 2%; left: 50%; transform: translateX(-50%); z-index: 4;
  width: 36%; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.95);
}

/* 指示点 */
.wp-preview-dots {
  flex-shrink: 0; height: 26px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.wp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.25); cursor: pointer; transition: background-color .25s, border-color .25s, color .25s, transform .25s, box-shadow .25s, opacity .25s;
}
.wp-dot.active { width: 20px; border-radius: 5px; background: var(--accent); }

/* 底部操作栏 */
.wp-detail-actions {
  flex-shrink: 0;
  display: flex; padding: 8px 8px calc(12px + var(--safe-bottom));
  gap: 6px;
}
.wp-act-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line);
  color: var(--text); font-size: 0.6rem;
  transition: transform .15s;
}
.wp-act-btn:active { transform: scale(0.95); }
.wp-act-btn.on { border-color: rgba(255,59,48,0.5); color: #ff6b61; }
.wp-act-icon { display: grid; place-items: center; font-size: 1.18rem; line-height: 1; }
.wp-search-go { display: grid; place-items: center; }
.wp-search-go .brand-svg-icon { width: 19px; height: 19px; }
.wp-rank-tab { display: flex; align-items: center; justify-content: center; gap: 6px; }
.wp-rank-tab .brand-svg-icon { width: 17px; height: 17px; }
body:not(.cms-mode) .wp-detail-top,
body:not(.cms-mode) .wp-detail-close,
body:not(.cms-mode) .wp-act-btn,
body:not(.cms-mode) .wp-rank-tab.active,
body:not(.cms-mode) .wp-card-title,
body:not(.cms-mode) .wp-home-icon-name,
body:not(.cms-mode) .wp-original-close {
  color: var(--pale-sky, #e4f6ff);
}

/* 原图全屏浮层（长按查看原图） */
.wp-original-overlay {
  position: fixed; inset: 0; z-index: 400; background: #000;
  display: flex; align-items: center; justify-content: center;
  animation: wpFadeIn .18s ease; cursor: zoom-out;
  overscroll-behavior: contain;
}
.wp-original-overlay img { max-width: 100%; max-height: 100%; object-fit: contain; }
.wp-original-close {
  position: absolute; top: calc(16px + var(--safe-top)); right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
  color: #fff; pointer-events: auto;
}
.wp-original-size {
  position: absolute; bottom: calc(20px + var(--safe-bottom)); left: 0; right: 0;
  text-align: center; color: var(--text3); font-size: 0.7rem;
}

/* 信息底部弹层 */
.wp-info-sheet { position: fixed; inset: 0; z-index: 350; overscroll-behavior: contain; }
.wp-sheet-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.wp-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg2); border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(24px + var(--safe-bottom));
  max-height: 78vh; overflow-y: auto;
  animation: wpSheetUp .25s cubic-bezier(.22,.61,.36,1);
}
@keyframes wpSheetUp { from { transform: translateY(100%); } to { transform: none; } }
.wp-sheet-handle { width: 40px; height: 4px; border-radius: 3px; background: rgba(255,255,255,0.2); margin: 4px auto 12px; }
.wp-sheet-title { font-size: 1rem; font-weight: 800; text-align: center; margin-bottom: 12px; }
.wp-info-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--text2); margin-bottom: 8px;
}
.wp-info-label { color: var(--text3); flex-shrink: 0; }
.wp-tag {
  padding: 2px 8px; border-radius: 10px; font-size: 0.62rem;
  background: rgba(255,255,255,0.08); border: 1px solid var(--line);
}
.wp-info-desc { font-size: 0.8rem; color: var(--text2); line-height: 1.6; margin-bottom: 12px; }
.wp-info-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 6px;
}
.wp-info-stats div {
  text-align: center; padding: 10px 4px; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
}
.wp-info-stats b { display: block; font-size: 0.9rem; }
.wp-info-stats span { font-size: 0.6rem; color: var(--text3); }

/* ============================================================
   个人中心
   ============================================================ */
.wp-profile-login-card {
  margin: 60px 24px; padding: 30px 20px; text-align: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
}
.wp-profile-login-card p { color: var(--text2); font-size: 0.8rem; margin: 12px 0 16px; }
.wp-primary-btn {
  width: 100%; padding: 13px; border-radius: 12px;
  background: var(--accent); color: #000; font-weight: 800; font-size: 0.85rem;
  transition: transform .15s;
}
.wp-primary-btn:active { transform: scale(0.98); }
.wp-profile-avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: rgba(255,255,255,0.1); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.wp-profile-avatar.big { width: 64px; height: 64px; font-size: 1.9rem; margin: 0 auto; }
.wp-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wp-avatar-initial {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.2rem;
}
.wp-profile-head { display: flex; flex-direction: column; align-items: center; padding: 22px 16px 14px; }
.wp-profile-name { margin-top: 8px; font-size: 1rem; font-weight: 800; }
.wp-profile-phone { font-size: 0.68rem; color: var(--text3); margin-top: 3px; }
.wp-profile-badges { margin-top: 8px; }

.wp-profile-tabs {
  display: flex; margin: 6px 12px; border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
}
.wp-ptab { flex: 1; text-align: center; padding: 10px 0; font-size: 0.74rem; color: var(--text2); }
.wp-ptab.active { background: rgba(255,255,255,0.1); color: var(--accent); font-weight: 700; }
.wp-profile-body { padding: 8px 4px; }
.wp-profile-menu { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 20px; }
.wp-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%; padding: 13px; border-radius: 12px; text-align: left;
  background: var(--bg2); border: 1px solid var(--line); font-size: 0.8rem;
  color: #fff; font-weight: 700;
}
.wp-menu-btn .brand-svg-icon { display: block; width: 16px; height: 16px; flex: none; }
.wp-menu-btn.danger { color: #ff6b61; }

.wp-dl-row {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 12px; cursor: pointer;
}
.wp-dl-row img {
  width: 44px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0;
  background: #111;
}
.wp-dl-main { flex: 1; min-width: 0; }
.wp-dl-title { font-size: 0.8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-dl-time { font-size: 0.62rem; color: var(--text3); margin-top: 4px; }
.wp-history-head { padding: 4px 14px; text-align: right; }
.wp-link-btn { font-size: 0.7rem; color: var(--text3); }

/* ============================================================
   创作者中心
   ============================================================ */
.wp-creator-apply { margin: 60px 24px; padding: 30px 20px; text-align: center; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); }
.wp-creator-apply-icon { font-size: 2.4rem; }
.wp-creator-apply h3 { margin: 10px 0 8px; font-size: 1rem; }
.wp-creator-apply p { color: var(--text2); font-size: 0.76rem; line-height: 1.6; margin-bottom: 14px; }

.wp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; }
.wp-stat-card {
  padding: 14px; border-radius: 12px; text-align: center;
  background: var(--bg2); border: 1px solid var(--line);
}
.wp-stat-card b { display: block; font-size: 1.05rem; }
.wp-stat-card span { font-size: 0.62rem; color: var(--text3); }
.wp-stat-card.heat { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(255,59,48,0.16), rgba(255,214,10,0.1)); border-color: rgba(255,59,48,0.4); }
.wp-stat-card.heat b { color: var(--gold); font-size: 1.3rem; }

.wp-upload-btn {
  display: block; width: calc(100% - 24px); margin: 0 12px 12px;
  padding: 14px; border-radius: 14px; text-align: center;
  background: linear-gradient(135deg, #58d19e, #16b98d); color: #062a1d;
  font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 6px 24px rgba(50,189,134,.22);
  transition: transform .15s;
}
.wp-upload-btn:active { transform: scale(0.98); }

.wp-works-tabs { display: flex; gap: 6px; padding: 4px 12px 8px; overflow-x: auto; scrollbar-width: none; }
.wp-works-tabs::-webkit-scrollbar { display: none; }
.wp-wtab {
  flex-shrink: 0; padding: 6px 13px; border-radius: 20px;
  font-size: 0.68rem; color: var(--text2);
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
}
.wp-wtab.active { color: #000; background: var(--accent); border-color: var(--accent); font-weight: 700; }

.wp-works { padding: 4px 12px 24px; display: flex; flex-direction: column; gap: 10px; }
.wp-work {
  display: flex; gap: 10px; padding: 10px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
}
.wp-work-thumb { width: 56px; height: 92px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #111; cursor: pointer; }
.wp-work-main { flex: 1; min-width: 0; }
.wp-work-title { font-size: 0.8rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-work-badge { margin-top: 4px; }
.wp-work-stats { font-size: 0.6rem; color: var(--text3); margin-top: 5px; }
.wp-work-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.wp-mini-btn {
  padding: 6px 12px; border-radius: 8px; font-size: 0.66rem;
  background: rgba(255,255,255,0.08); border: 1px solid var(--line); color: var(--text2);
}
.wp-mini-btn.danger { color: #ff6b61; border-color: rgba(255,59,48,0.35); }

.wp-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 0.62rem; }
.wp-badge.green { background: rgba(52,199,89,0.16); color: #5fe08a; border: 1px solid rgba(52,199,89,0.4); }
.wp-badge.yellow { background: rgba(255,204,0,0.14); color: #ffd60a; border: 1px solid rgba(255,204,0,0.4); }
.wp-badge.red { background: rgba(255,59,48,0.14); color: #ff6b61; border: 1px solid rgba(255,59,48,0.4); }

/* ============================================================
   弹层：登录注册 / 上传 / 创作者主页
   ============================================================ */
.wp-auth-modal { position: fixed; inset: 0; z-index: 300; overscroll-behavior: contain; }
.wp-auth-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.wp-auth-box {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 88%; max-width: 360px; max-height: 86vh; overflow-y: auto;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 18px calc(20px + var(--safe-bottom));
  box-shadow: 0 20px 70px rgba(0,0,0,0.6);
  animation: wpPop .2s ease;
}
.wp-modal-close {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px;
  border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
  color: var(--text2);
}
.wp-auth-logo { text-align: center; font-size: 2rem; margin-bottom: 12px; }
.wp-auth-tabs { display: flex; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.wp-atab { flex: 1; text-align: center; padding: 10px 0; font-size: 0.82rem; color: var(--text2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.wp-atab.active { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.wp-auth-hint { font-size: 0.7rem; color: var(--text3); margin: -4px 0 10px; }
.wp-field { margin-bottom: 10px; }
.wp-field input, .wp-field textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line);
  color: var(--text); font-size: 0.8rem; outline: none; resize: none;
}
.wp-field input:focus-visible, .wp-field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.wp-field input:focus, .wp-field textarea:focus { border-color: rgba(255,255,255,0.24); }
.wp-label { display: block; font-size: 0.68rem; color: var(--text3); margin-bottom: 6px; }
.wp-auth-forgot { text-align: right; font-size: 0.68rem; color: var(--text3); margin: -2px 0 12px; cursor: pointer; }
.wp-auth-third { margin-top: 16px; }
.wp-auth-third-label { text-align: center; font-size: 0.66rem; color: var(--text3); margin-bottom: 10px; }
.wp-auth-third-row { display: flex; gap: 8px; }
.wp-third-btn {
  flex: 1; padding: 10px 0; border-radius: 10px; font-size: 0.72rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--text2);
}
.wp-code-row { display: flex; gap: 8px; }
.wp-code-row input { flex: 1; }
.wp-send-code {
  flex-shrink: 0; padding: 0 12px; border-radius: 10px; font-size: 0.7rem;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border);
}

/* 上传弹层 */
.wp-upload-box h3 { font-size: 0.95rem; margin-bottom: 12px; text-align: center; }
.wp-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wp-chip {
  padding: 6px 12px; border-radius: 16px; font-size: 0.68rem;
  color: var(--text2); background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s, opacity .15s;
}
.wp-chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }
.wp-upimg { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wp-up-preview {
  width: 64px; height: 110px; border-radius: 8px; overflow: hidden;
  background: #111; border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 0.62rem;
}
.wp-up-preview img { width: 100%; height: 100%; object-fit: cover; }

/* 创作者主页浮层 */
.wp-cm-head { display: flex; flex-direction: column; align-items: center; padding: 6px 0 12px; }
.wp-cm-name { margin-top: 8px; font-size: 0.95rem; font-weight: 800; }
.wp-cm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.wp-cm-stats div { text-align: center; padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.wp-cm-stats b { display: block; font-size: 0.9rem; }
.wp-cm-stats span { font-size: 0.6rem; color: var(--text3); }
.wp-cm-works { max-height: 40vh; overflow-y: auto; }

/* ============================================================
   Toast / 其他
   ============================================================ */
.wp-toast {
  position: fixed; top: calc(60px + var(--safe-top)); left: 50%;
  transform: translate(-50%, -12px);
  background: rgba(30,30,56,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line); color: #fff; padding: 10px 22px;
  border-radius: 22px; font-size: 0.78rem; z-index: 500;
  opacity: 0; pointer-events: none; transition: background-color .3s ease, border-color .3s ease, color .3s ease, transform .3s ease, box-shadow .3s ease, opacity .3s ease;
  max-width: 84%; text-align: center;
}
.wp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* PC 兼容：模块固定浮层限制最大宽度居中（整体布局由主项目处理） */
@media (min-width: 640px) {
  .wp-detail-overlay, .wp-auth-modal, .wp-info-sheet, .wp-original-overlay, .ad-popup {
    left: 50%; transform: translateX(-50%); width: 430px; max-width: 100vw;
  }
}

/* ============================================================
   广告弹窗（模拟广告，倒计时内关闭锁定）+ 下载按钮临时权限高亮
   ============================================================ */
.wp-act-btn.ready {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  animation: adReadyPulse 1.2s ease infinite;
}
@keyframes adReadyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(50,189,134,.38); }
  50% { box-shadow: 0 0 0 8px rgba(50,189,134,0); }
}

.ad-popup { position: fixed; inset: 0; z-index: 600; overscroll-behavior: contain; }
.ad-mask {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ad-box {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 84%; max-width: 360px;
  background: #141428; border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 20px 22px; text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  animation: wpPop .2s ease;
}
.ad-badge {
  display: inline-block; padding: 3px 11px; border-radius: 12px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 1px;
  color: #ffd60a; background: rgba(255,214,10,0.12); border: 1px solid rgba(255,214,10,0.35);
}
.ad-visual { font-size: 3rem; margin: 16px 0 10px; animation: adBounce 1.2s ease infinite; }
@keyframes adBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.ad-title { font-size: 0.92rem; font-weight: 800; }
.ad-sub { font-size: 0.66rem; color: var(--text3); margin: 6px 0 14px; line-height: 1.6; }
.ad-countdown { font-size: 2.1rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.ad-countdown em { font-style: normal; font-size: 1rem; margin-left: 2px; color: var(--text2); }
.ad-progress {
  height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08);
  margin: 12px 0 16px; overflow: hidden;
}
.ad-progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #58d19e, #16b98d);
  transition: width 1s linear;
}
.ad-close {
  width: 100%; padding: 13px; border-radius: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--line);
  color: var(--text2); font-size: 0.78rem; cursor: pointer;
}
.ad-close:disabled { opacity: 0.45; cursor: not-allowed; }
