/* BuwaWA Wall — 深色竖屏壁纸主题 */
:root {
  --bg: #0b0b0f; --bg2: #121218; --card: #16161e; --line: #26262f;
  --text: #f1f1f5; --muted: #9a9aa8; --primary: #ec4899; --primary2: #f472b6;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2c2c36; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 导航 ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11,11,15,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.logo-text i { font-style: normal; color: var(--primary); }
.logo-text.sm { font-size: 14px; }
.icon-btn { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.icon-btn:hover { border-color: var(--primary); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 48px; }
.hero::before { content: ''; position: absolute; top: -240px; left: 50%; transform: translateX(-50%); width: 900px; height: 500px; background: radial-gradient(ellipse, rgba(236,72,153,.16), transparent 65%); pointer-events: none; }
.hero-inner { display: flex; align-items: center; gap: 48px; }
.hero-copy { flex: 1; min-width: 0; }
.hero-copy h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.hero-copy h1 em { font-style: normal; color: var(--primary); }
.hero-desc { margin-top: 16px; color: var(--muted); font-size: 16px; max-width: 560px; line-height: 1.7; }
.search-box { margin-top: 26px; max-width: 480px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; color: var(--muted); transition: border-color .2s; }
.search-box:focus-within { border-color: var(--primary); }
.search-box input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 15px; }
.hero-stats { margin-top: 22px; display: flex; gap: 26px; color: var(--muted); font-size: 13.5px; }
.hero-stats b { color: var(--text); font-size: 19px; font-weight: 700; margin-right: 5px; }

/* ---------- 手机壳 ---------- */
.hero-phone { flex: none; }
.phone { width: 280px; aspect-ratio: 9 / 19.2; border-radius: 46px; border: 9px solid #1d1d25; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06), 0 0 60px rgba(236,72,153,.12); position: relative; overflow: hidden; }
.phone-sm { width: 216px; border-radius: 36px; border-width: 7px; }
.phone-screen { position: absolute; inset: 0; border-radius: 37px; overflow: hidden; background: #101014; }
.phone-sm .phone-screen { border-radius: 29px; }
.phone-screen > img { width: 100%; height: 100%; object-fit: cover; }
.island { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 84px; height: 24px; background: #000; border-radius: 14px; z-index: 3; }
.phone-sm .island { width: 64px; height: 18px; top: 9px; }
.lockscreen { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.ls-date { margin-top: 66px; font-size: 15px; font-weight: 500; color: #fff; opacity: .92; }
.ls-time { margin-top: 2px; font-size: 68px; font-weight: 700; color: #fff; line-height: 1; letter-spacing: -1px; }
.ls-widgets { margin-top: 16px; display: flex; gap: 7px; padding: 0 16px; width: 100%; }
.ls-w { flex: 1; min-width: 0; background: rgba(255,255,255,.17); backdrop-filter: blur(10px); border-radius: 14px; padding: 8px 7px; display: flex; align-items: center; gap: 5px; }
.ls-w > span { font-size: 14px; flex: none; }
.ls-w-t { display: flex; flex-direction: column; min-width: 0; }
.ls-w-t b { font-size: 12px; color: #fff; line-height: 1.2; font-weight: 600; }
.ls-w-t i { font-style: normal; font-size: 9px; color: rgba(255,255,255,.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-actions { margin-top: auto; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; margin-bottom: 22px; }
.ls-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.2); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; color: #fff; }
.ls-bar { width: 106px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.92); }

/* 锁屏字体样式（模拟 iOS 表盘字体） */
.lock-font-rounded .ls-time, .lock-font-rounded .ls-date { font-family: 'SF Pro Rounded', 'Arial Rounded MT Bold', ui-rounded, -apple-system, sans-serif; }
.lock-font-serif .ls-time, .lock-font-serif .ls-date { font-family: 'New York', Georgia, 'Times New Roman', serif; font-weight: 600; }
.lock-font-mono .ls-time, .lock-font-mono .ls-date { font-family: 'SF Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace; font-weight: 600; }
.lock-font-thin .ls-time { font-weight: 300; }
.lock-font-wide .ls-time { letter-spacing: .09em; font-weight: 600; }
/* 锁屏表盘颜色 */
.lock-color-pink .ls-time, .lock-color-pink .ls-date { color: #f472b6; }
.lock-color-blue .ls-time, .lock-color-blue .ls-date { color: #7dd3fc; }
.lock-color-gold .ls-time, .lock-color-gold .ls-date { background: linear-gradient(180deg, #f9e7a0, #e0a83c); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.lock-color-mint .ls-time, .lock-color-mint .ls-date { background: linear-gradient(180deg, #b5f5dd, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.lock-color-violet .ls-time, .lock-color-violet .ls-date { background: linear-gradient(180deg, #e4d9ff, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
/* 小壳（弹窗）缩放 */
.phone-sm .ls-time { font-size: 46px; }
.phone-sm .ls-date { margin-top: 46px; font-size: 12px; }
.phone-sm .ls-widgets { margin-top: 12px; padding: 0 12px; gap: 5px; }
.phone-sm .ls-w { padding: 6px 5px; border-radius: 10px; }
.phone-sm .ls-w-t b { font-size: 10px; }
.phone-sm .ls-w-t i { font-size: 8px; }
.phone-sm .ls-actions { padding: 0 16px; margin-bottom: 16px; }
.phone-sm .ls-btn { width: 32px; height: 32px; }
.phone-sm .ls-bar { width: 74px; }
/* 控制条 */
.phone-controls { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.ctl-btn { padding: 8px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; transition: all .18s; }
.ctl-btn:hover { color: var(--text); border-color: var(--primary); }
.ctl-btn.on { color: #fff; background: var(--primary); border-color: var(--primary); }

/* ---------- 工具栏 ---------- */
.section { padding: 36px 0 72px; }
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; white-space: nowrap; transition: all .18s; }
.chip:hover { color: var(--text); border-color: #3a3a46; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.count { flex: none; color: var(--muted); font-size: 13px; }

/* ---------- 壁纸网格 ---------- */
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.wall-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: transform .2s, border-color .2s; }
.wall-card:hover { transform: translateY(-4px); border-color: #3d3d4a; }
.wall-card img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.wc-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 12px; background: linear-gradient(transparent, rgba(0,0,0,.82)); opacity: 0; transition: opacity .2s; }
.wall-card:hover .wc-info { opacity: 1; }
.wc-title { font-size: 12.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-dl { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s, background .2s; backdrop-filter: blur(4px); }
.wall-card:hover .wc-dl { opacity: 1; }
.wc-dl:hover { background: var(--primary); }

.more-wrap { text-align: center; margin-top: 34px; }
.btn-more { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 34px; font-size: 14px; font-weight: 600; transition: border-color .2s; }
.btn-more:hover { border-color: var(--primary); }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(5,5,8,.78); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.open { display: flex; }
.modal-wall { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 28px; max-width: 760px; width: 100%; max-height: 92vh; overflow: auto; display: flex; gap: 30px; }
.modal-close { position: absolute; top: 14px; right: 18px; background: none; border: none; color: var(--muted); font-size: 26px; line-height: 1; z-index: 2; }
.modal-close:hover { color: var(--text); }
.wall-view { flex: none; display: flex; align-items: center; }
.wall-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wall-info h2 { font-size: 19px; font-weight: 700; line-height: 1.4; padding-right: 24px; }
.wall-meta { margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.prompt-box { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prompt-head { padding: 10px 14px; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); letter-spacing: 1px; }
.prompt-body { padding: 14px; font-size: 13px; line-height: 1.75; color: #cfcfda; max-height: 220px; overflow: auto; }
.wall-actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 12px 22px; font-size: 14px; font-weight: 600; text-decoration: none; border: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary2); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); }
.dl-tip { margin-top: 12px; color: var(--muted); font-size: 12px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 0; }
.footer-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.footer-link { color: var(--muted); text-decoration: none; margin-left: auto; }
.footer-link:hover { color: var(--primary); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 80px); background: #1d1d27; border: 1px solid var(--line); color: var(--text); padding: 12px 22px; border-radius: 12px; font-size: 14px; transition: transform .3s; z-index: 200; }
.toast.show { transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero { padding: 40px 0 32px; }
  .hero-inner { flex-direction: column-reverse; gap: 34px; text-align: center; }
  .hero-copy h1 { font-size: 30px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .search-box { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .phone { width: 220px; border-radius: 38px; }
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .modal-wall { flex-direction: column; align-items: center; padding: 22px; }
  .wall-info { width: 100%; }
}
