/* ============================================================
   壁纸星球 · 纯静态站点样式
   ============================================================ */

:root {
  --bg: #070a17;
  --bg-2: #0c1124;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.085);
  --surface-solid: #11162c;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(139, 124, 248, 0.45);
  --text: #eef2ff;
  --text-muted: #9aa5c8;
  --text-dim: #6f7a9c;
  --accent: #8b7cf8;
  --accent-2: #45d3f0;
  --accent-soft: rgba(139, 124, 248, 0.16);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
  --radius: 18px;
  --header-height: 78px;
}

[data-theme="light"] {
  --bg: #f6f7fc;
  --bg-2: #eef1fa;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-solid: #ffffff;
  --border: rgba(36, 42, 78, 0.11);
  --border-strong: rgba(112, 90, 230, 0.42);
  --text: #1b2240;
  --text-muted: #606b8f;
  --text-dim: #8992ad;
  --accent: #6d55e6;
  --accent-2: #0e9fb8;
  --accent-soft: rgba(109, 85, 230, 0.10);
  --shadow: 0 24px 60px rgba(38, 45, 90, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 82% -8%, rgba(99, 82, 220, 0.20), transparent 62%),
    radial-gradient(900px 600px at 8% 22%, rgba(38, 168, 196, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .3s ease;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(1100px 650px at 82% -8%, rgba(139, 124, 248, 0.18), transparent 62%),
    radial-gradient(900px 600px at 6% 18%, rgba(69, 211, 240, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

::selection { background: rgba(139, 124, 248, 0.4); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 124, 248, 0.35); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 124, 248, 0.6); background-clip: padding-box; }

/* ---------------- 背景光斑 ---------------- */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(120px); opacity: .5; }
.orb-1 { width: 420px; height: 420px; background: #6d52e8; top: 8%; left: 48%; }
.orb-2 { width: 360px; height: 360px; background: #159bb5; top: 42%; left: -10%; opacity: .35; }
.orb-3 { width: 380px; height: 380px; background: #a04bd8; bottom: -12%; right: 4%; opacity: .28; }
[data-theme="light"] .orb { opacity: .20; }

.site-header, main, .site-footer, .lightbox { position: relative; z-index: 1; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.header-inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px rgba(109, 82, 232, .35);
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; letter-spacing: .5px; }
.brand-text small { font-size: 9px; color: var(--text-dim); letter-spacing: 2.2px; margin-top: 3px; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.search-box {
  display: flex; align-items: center; gap: 9px;
  width: 290px; height: 42px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text-muted);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.search-box:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--surface-strong);
}
.search-box svg { width: 18px; height: 18px; flex-shrink: 0; }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 13px;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.search-box kbd {
  font-family: inherit; font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px;
}
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text-muted);
  transition: color .25s, border-color .25s, transform .25s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.icon-btn svg { width: 19px; height: 19px; }
[data-theme="dark"] .icon-sun, [data-theme="light"] .icon-moon { display: none; }

.lang-picker {
  display: flex; align-items: center; gap: 6px; height: 42px;
  padding: 0 8px 0 12px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface); color: var(--text-muted);
  transition: border-color .25s, color .25s, background .25s;
}
.lang-picker:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-strong); }
.lang-picker svg { width: 17px; height: 17px; flex-shrink: 0; }
.lang-picker select {
  -webkit-appearance: none; appearance: none;
  border: 0; outline: 0; background: transparent; color: var(--text);
  font-size: 12px; font-weight: 600; max-width: 126px; cursor: pointer;
  padding: 0 2px;
}
.lang-picker select option { background: var(--surface-solid); color: var(--text); }
.ghost-btn {
  height: 42px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 13px; font-weight: 600; background: var(--surface);
  transition: border-color .25s, transform .25s, background .25s;
}
.ghost-btn:hover { border-color: var(--border-strong); transform: translateY(-2px); background: var(--surface-strong); }
.ghost-btn svg { width: 16px; height: 16px; }

/* ---------------- 通用小组件 ---------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--accent-2);
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .16);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } }

.primary-btn, .secondary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 22px; border-radius: 12px;
  font-size: 14px; font-weight: 700; border: 1px solid transparent;
  transition: transform .25s, box-shadow .25s, border-color .25s, background .25s;
}
.primary-btn {
  color: #fff; background: linear-gradient(135deg, #7d6af0, #4cb8e8);
  box-shadow: 0 12px 30px rgba(105, 90, 235, .32);
}
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(105, 90, 235, .45); }
.primary-btn svg, .secondary-btn svg { width: 17px; height: 17px; }
.secondary-btn {
  color: var(--text); background: var(--surface);
  border-color: var(--border);
}
.secondary-btn:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-strong); }

/* ---------------- Hero ---------------- */
.hero {
  max-width: 1240px; margin: 0 auto; padding: 84px 28px 76px;
  display: grid; grid-template-columns: 1.04fr .96fr; gap: 68px; align-items: center;
}
.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: 1.18; letter-spacing: -1.5px; font-weight: 800;
}
.hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #a99bff 0%, #6ed8f5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] .hero-copy h1 em { background: linear-gradient(100deg, #6d55e6, #0e9fb8); -webkit-background-clip: text; background-clip: text; }
.hero-copy p { max-width: 480px; margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-stats { display: flex; gap: 38px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border); }
.hero-stats div { display: flex; flex-direction: column; gap: 5px; }
.hero-stats strong { font-size: 26px; letter-spacing: -.5px; }
.hero-stats span { font-size: 12px; color: var(--text-dim); }

.hero-preview { position: relative; padding: 18px; }
.preview-glow {
  position: absolute; inset: 8% 4% -6% 6%; border-radius: 36px;
  background: linear-gradient(135deg, rgba(139, 124, 248, .35), rgba(69, 211, 240, .25));
  filter: blur(46px); z-index: -1;
}
.preview-frame {
  position: relative; overflow: hidden; aspect-ratio: 16 / 11;
  border-radius: 24px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.preview-frame:hover { transform: perspective(1400px) rotateY(0) rotateX(0) translateY(-6px); }
.preview-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .5s ease; }
.preview-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px; background: linear-gradient(180deg, rgba(4,6,18,.35), transparent 40%, rgba(4,6,18,.82));
}
.preview-tag {
  align-self: flex-start; padding: 6px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: #fff; background: rgba(255,255,255,.16); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
}
.preview-meta { display: flex; flex-direction: column; gap: 5px; }
.preview-meta strong { font-size: 22px; color: #fff; }
.preview-meta span { font-size: 12px; color: rgba(255,255,255,.72); }

/* ---------------- 壁纸库 ---------------- */
.gallery-section { max-width: 1240px; margin: 0 auto; padding: 20px 28px 100px; scroll-margin-top: calc(var(--header-height) + 20px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { margin: 10px 0 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.6px; }
.results-info { font-size: 13px; color: var(--text-muted); }
.results-info strong { color: var(--text); font-size: 17px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  transition: all .25s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.chip.is-active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px rgba(109, 90, 235, .28);
}
.chip .chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--chip-color, var(--accent)); }
.chip.is-active .chip-dot { background: #fff; }
.chip .chip-count { font-size: 11px; opacity: .65; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}
.card {
  position: relative; overflow: hidden; cursor: pointer;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  animation: cardIn .55s both;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.card:hover {
  transform: translateY(-7px); border-color: var(--border-strong);
  box-shadow: 0 22px 48px rgba(0,0,0,.32);
}
.card img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .65s ease; }
.card:hover img { transform: scale(1.07); }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,5,16,.28) 0%, transparent 38%, rgba(3,5,16,.88) 100%); }
.card-info { position: absolute; left: 17px; right: 17px; bottom: 15px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.card-info-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-info-text strong { font-size: 16px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-info-text span { font-size: 11px; color: rgba(255,255,255,.66); }
.card-tag {
  position: absolute; top: 13px; left: 13px; padding: 5px 10px; border-radius: 8px;
  font-size: 10px; font-weight: 700; color: #fff;
  background: rgba(10,12,28,.52); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px);
}
.card-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 7px; }
.card-icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid rgba(255,255,255,.20);
  background: rgba(10,12,28,.48); color: #fff; backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-5px);
  transition: opacity .25s, transform .25s, background .25s;
}
.card:hover .card-icon, .card-icon.is-active, .card-icon:focus-visible { opacity: 1; transform: translateY(0); }
.card-icon:hover { background: rgba(139,124,248,.75); }
.card-icon svg { width: 16px; height: 16px; }
.card-icon.is-active { color: #ff90b6; background: rgba(20,12,30,.7); }
.card-icon.is-active svg { fill: currentColor; }

.empty-state { text-align: center; padding: 90px 20px; color: var(--text-muted); }
.empty-state svg { width: 66px; height: 66px; color: var(--accent); opacity: .7; }
.empty-state h3 { margin: 20px 0 6px; color: var(--text); font-size: 20px; }
.empty-state p { margin: 0 0 22px; font-size: 14px; }

/* ---------------- 页脚 ---------------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(0,0,0,.10); }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 30px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-inner > div:first-child { display: flex; align-items: baseline; gap: 14px; }
.footer-inner strong { font-size: 15px; }
.footer-inner span, .footer-note { font-size: 12px; color: var(--text-dim); }

/* ---------------- 灯箱 ---------------- */
.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 34px; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(3,5,14,.86); backdrop-filter: blur(14px); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-panel {
  position: relative; width: min(1180px, 100%); max-height: calc(100vh - 68px);
  display: grid; grid-template-columns: minmax(0, 1fr) 310px;
  border-radius: 22px; overflow: hidden; border: 1px solid var(--border);
  background: var(--surface-solid); box-shadow: 0 40px 100px rgba(0,0,0,.6);
  animation: panelIn .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.lightbox-image-wrap { min-height: 380px; background: #05070f; display: grid; place-items: center; overflow: hidden; }
.lightbox-image-wrap img { width: 100%; height: 100%; max-height: calc(100vh - 68px); object-fit: contain; display: block; }
.lightbox-side { padding: 36px 26px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.lightbox-side h3 { margin: 0; font-size: 25px; letter-spacing: -.5px; }
.lightbox-en { margin: -10px 0 0; font-size: 12px; color: var(--text-dim); letter-spacing: .5px; }
.detail-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.detail-list div { display: flex; justify-content: space-between; padding: 11px 14px; font-size: 12px; border-bottom: 1px solid var(--border); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list span { color: var(--text-dim); }
.detail-list strong { font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list span { padding: 5px 10px; border-radius: 999px; font-size: 11px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); }
.lightbox-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.lightbox-actions .primary-btn, .lightbox-actions .secondary-btn { width: 100%; }
.text-btn { border: 0; background: transparent; color: var(--text-dim); font-size: 12px; padding: 4px; }
.text-btn:hover { color: var(--accent-2); }
.lightbox-close, .lightbox-nav {
  position: absolute; display: grid; place-items: center; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); background: rgba(10,12,28,.55);
  color: #fff; backdrop-filter: blur(8px);
  transition: background .25s, transform .25s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--accent); transform: scale(1.08); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-close svg, .lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-nav { top: 50%; margin-top: -20px; }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { left: calc(100% - 310px - 56px); }
body.is-locked { overflow: hidden; }

/* ---------------- 提示条 ---------------- */
#toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 200;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 12px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(20, 22, 44, .92); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(12px); box-shadow: 0 16px 40px rgba(0,0,0,.35);
  transition: opacity .3s ease, transform .3s ease;
}
#toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .hero { gap: 36px; padding-top: 60px; }
  .search-box { width: 220px; }
  .lightbox-panel { grid-template-columns: minmax(0, 1fr) 270px; }
  .lightbox-nav.next { left: calc(100% - 270px - 56px); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 54px 22px 60px; }
  .hero-preview { max-width: 620px; width: 100%; margin: 0 auto; }
  .preview-frame { transform: none; }
  .header-actions .ghost-btn { display: none; }
  .search-box { width: 200px; }
  .lang-picker select { max-width: 96px; }
  .lightbox { padding: 18px; }
  .lightbox-panel { grid-template-columns: 1fr; max-height: calc(100vh - 36px); overflow-y: auto; }
  .lightbox-image-wrap img { max-height: 48vh; }
  .lightbox-side { padding: 24px; }
  .lightbox-nav.next { left: auto; right: 16px; }
  .lightbox-nav { top: 44%; }
}

@media (max-width: 600px) {
  :root { --header-height: 66px; }
  .header-inner { padding: 0 16px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 16px; }
  .brand-mark { width: 36px; height: 36px; }
  .search-box { width: 42px; padding: 0 11px; transition: width .3s; }
  .search-box:focus-within { width: min(60vw, 240px); }
  .search-box input { width: 0; opacity: 0; }
  .search-box:focus-within input { width: 100%; opacity: 1; }
  .search-box kbd { display: none; }
  .icon-btn { width: 38px; height: 38px; }
  .lang-picker { height: 38px; padding: 0 4px; }
  .lang-picker svg { display: none; }
  .lang-picker select { max-width: 74px; font-size: 11px; }
  .hero { padding: 42px 16px 54px; }
  .hero-copy h1 { font-size: 34px; letter-spacing: -.8px; }
  .hero-stats { gap: 22px; margin-top: 34px; }
  .hero-stats strong { font-size: 21px; }
  .hero-stats span { font-size: 10px; }
  .gallery-section { padding: 10px 16px 70px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
  .card-icon { opacity: 1; transform: none; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
