/* ============================================================
   AURA STORE · 设计系统（用户端 / 管理端共用）
   暗色极光玻璃 + 渐变描边 + 克制动效
   ============================================================ */

:root {
  --bg: #07070c;
  --bg-soft: #0c0c14;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f3f7;
  --text-dim: #a5a7b8;
  --text-mute: #6f7183;
  --brand-1: #7c5cff;
  --brand-2: #12d8fa;
  --brand-3: #ff5ca8;
  --success: #35e5a1;
  --danger: #ff5f6d;
  --warn: #ffc857;
  --radius-l: 26px;
  --radius-m: 18px;
  --radius-s: 12px;
  --shadow-l: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* hidden 属性优先级最高，避免被 .btn / .panel 等 display 规则覆盖 */
[hidden] { display: none !important; }


html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

::selection { background: rgba(124, 92, 255, 0.4); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: content-box; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------- 极光背景 */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(124, 92, 255, 0.20), transparent 60%),
    radial-gradient(1000px 600px at 85% 5%, rgba(18, 216, 250, 0.13), transparent 62%),
    radial-gradient(900px 700px at 55% 105%, rgba(255, 92, 168, 0.12), transparent 65%),
    linear-gradient(180deg, #07070c 0%, #08080f 45%, #06060a 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.orb-1 {
  width: 46vw; height: 46vw; min-width: 320px; min-height: 320px;
  left: -10vw; top: -12vw;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.75), transparent 68%);
  animation: float1 22s var(--ease) infinite alternate;
}
.orb-2 {
  width: 38vw; height: 38vw; min-width: 280px; min-height: 280px;
  right: -8vw; top: 6vh;
  background: radial-gradient(circle, rgba(18, 216, 250, 0.55), transparent 68%);
  animation: float2 26s var(--ease) infinite alternate;
}
.orb-3 {
  width: 40vw; height: 40vw; min-width: 260px; min-height: 260px;
  left: 30vw; bottom: -18vw;
  background: radial-gradient(circle, rgba(255, 92, 168, 0.45), transparent 70%);
  animation: float3 30s var(--ease) infinite alternate;
}
@keyframes float1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
@keyframes float2 { to { transform: translate3d(-6vw, 10vh, 0) scale(1.1); } }
@keyframes float3 { to { transform: translate3d(-10vw, -6vh, 0) scale(1.2); } }

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------- 导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: rgba(7, 7, 12, 0.62);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--stroke);
  background: rgba(7, 7, 12, 0.86);
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 8px 26px -8px rgba(124, 92, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-mark.small { width: 26px; height: 26px; border-radius: 9px; }
.brand-text {
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 15px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.brand-text em {
  font-style: normal;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--text-mute);
}

.nav-search {
  position: relative;
  flex: 1;
  max-width: 460px;
  margin-left: auto;
}
.nav-search .ico {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  pointer-events: none;
}
.nav-search input {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 42px;
  border-radius: 99px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  appearance: none;
}
.nav-search input::placeholder { color: var(--text-mute); }
.nav-search input:focus {
  outline: none;
  border-color: rgba(124, 92, 255, 0.65);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.14);
}
.nav-search kbd {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-mute);
  border: 1px solid var(--stroke);
  border-radius: 6px;
  padding: 1px 6px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
}

.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* ---------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 99px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--stroke-strong); }
.btn:active { transform: scale(0.975); }

.btn-primary {
  border: none;
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-weight: 650;
  box-shadow: 0 14px 34px -14px rgba(124, 92, 255, 0.95);
}
.btn-primary:hover {
  box-shadow: 0 18px 42px -14px rgba(124, 92, 255, 1);
  filter: brightness(1.06);
}

.btn-ghost { background: transparent; }

/* ---------------------------------------------------------- 页面容器 */
.page {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px 40px;
}

/* ---------------------------------------------------------- 首屏 */
.hero { padding: 78px 0 46px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  font-size: 11.5px;
  letter-spacing: 0.3em;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(53, 229, 161, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(53, 229, 161, 0.03); } }

.hero-title {
  margin: 0 0 22px;
  font-size: clamp(40px, 7.2vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.grad-text {
  background: linear-gradient(100deg, #a58fff 0%, #12d8fa 48%, #ff5ca8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  margin: 0;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 42px;
  padding: 20px 28px;
  border-radius: var(--radius-m);
  border: 1px solid var(--stroke);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  width: fit-content;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #fff, #b9b2ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span { font-size: 12px; color: var(--text-mute); letter-spacing: 0.06em; }
.stat-sep { width: 1px; height: 32px; background: var(--stroke); }

/* ---------------------------------------------------------- 筛选栏 */
.toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  margin-bottom: 8px;
  background: rgba(7, 7, 12, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.chips {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
  flex: 1;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  height: 36px;
  padding: 0 16px;
  border-radius: 99px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-dim);
  font-size: 13.5px;
  transition: all 0.25s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--stroke-strong); }
.chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.95), rgba(18, 216, 250, 0.85));
  box-shadow: 0 10px 26px -12px rgba(124, 92, 255, 0.95);
}

.toolbar-right { flex: none; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select {
  appearance: none;
  height: 36px;
  padding: 0 34px 0 15px;
  border-radius: 99px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-dim);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.select-wrap select:hover { color: var(--text); border-color: var(--stroke-strong); }
.select-wrap select:focus { outline: none; border-color: rgba(124, 92, 255, 0.6); }
.select-wrap .chev {
  position: absolute;
  right: 13px;
  pointer-events: none;
  color: var(--text-mute);
}
.select-wrap option { background: #12121b; color: var(--text); }

/* ---------------------------------------------------------- 应用网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
  padding-top: 10px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 22px;
  border-radius: var(--radius-l);
  border: 1px solid var(--stroke);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.018));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease), border-color 0.35s, box-shadow 0.4s;
  animation: cardIn 0.6s var(--ease) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.55), rgba(18, 216, 250, 0.25), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 2;
}
.card::after {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  right: -110px; top: -130px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.32), transparent 62%);
  opacity: 0;
  transition: opacity 0.45s;
  pointer-events: none;
  z-index: -1;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.95);
}
.card:hover::before, .card:hover::after { opacity: 1; }

.card-head { display: flex; align-items: center; gap: 14px; }

.app-icon {
  position: relative;
  width: 58px; height: 58px;
  flex: none;
  border-radius: 17px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #2a2440, #171422);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 26px -14px rgba(0, 0, 0, 0.9);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-title-wrap { min-width: 0; flex: 1; }
.card-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta .ver { color: var(--brand-2); font-weight: 600; }
.card-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; flex: none; }

.card-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 11px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cfc7ff;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.22);
  white-space: nowrap;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border-radius: 99px;
  border: none;
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 12px 26px -14px rgba(124, 92, 255, 0.95);
  transition: transform 0.22s var(--ease), filter 0.25s, box-shadow 0.25s;
}
.dl-btn:hover { filter: brightness(1.08); box-shadow: 0 16px 34px -14px rgba(124, 92, 255, 1); }
.dl-btn:active { transform: scale(0.96); }

.badge-new {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  padding: 3px 9px;
  border-radius: 99px;
  color: #061018;
  background: linear-gradient(120deg, #35e5a1, #12d8fa);
}

/* 骨架屏 */
.sk {
  height: 196px;
  border-radius: var(--radius-l);
  border: 1px solid var(--stroke);
  background: linear-gradient(100deg, rgba(255,255,255,0.035) 30%, rgba(255,255,255,0.075) 50%, rgba(255,255,255,0.035) 70%);
  background-size: 250% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------------------------------------------------------- 空状态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 72px 24px 88px;
}
.empty-art {
  width: 78px; height: 78px;
  display: grid; place-items: center;
  border-radius: 24px;
  color: var(--text-mute);
  border: 1px solid var(--stroke);
  background: var(--surface);
  margin-bottom: 8px;
}
.empty h3 { margin: 0; font-size: 18px; font-weight: 650; }
.empty p { margin: 0 0 12px; color: var(--text-mute); font-size: 13.5px; max-width: 340px; }

/* ---------------------------------------------------------- 加载更多 */
.load-more-wrap { display: flex; justify-content: center; padding: 40px 0 12px; }
.btn-load {
  min-width: 180px;
  background: rgba(255, 255, 255, 0.05);
}
.btn-load[disabled] { opacity: 0.55; cursor: default; }

/* ---------------------------------------------------------- 页脚 */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  border-top: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.012);
}
.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.footer-note { margin: 0; font-size: 12.5px; color: var(--text-mute); flex: 1; }
.footer-link { font-size: 12.5px; color: var(--text-dim); border-bottom: 1px dashed var(--stroke-strong); }
.footer-link:hover { color: var(--text); }

/* ---------------------------------------------------------- 详情抽屉 */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 3, 7, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.drawer-mask.show { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  z-index: 90;
  right: 0; top: 0;
  width: min(460px, 100%);
  height: 100%;
  padding: 34px 30px 40px;
  overflow-y: auto;
  border-left: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 16, 24, 0.98), rgba(8, 8, 13, 0.99));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: -40px 0 90px -40px rgba(0, 0, 0, 0.95);
  transform: translateX(102%);
  transition: transform 0.45s var(--ease);
  overscroll-behavior: contain;
}
.drawer.show { transform: none; }

.drawer-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  transition: background 0.25s, color 0.25s;
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.drawer-body { display: flex; flex-direction: column; gap: 20px; }

.d-hero { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.d-hero .app-icon { width: 76px; height: 76px; border-radius: 22px; font-size: 28px; }
.d-title { margin: 0; font-size: 23px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.25; }
.d-sub { margin: 5px 0 0; font-size: 13px; color: var(--text-mute); }

.d-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
}
.pill b { color: var(--text); font-weight: 650; }

.d-section { display: flex; flex-direction: column; gap: 9px; }
.d-section h4 {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
}
.d-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-break: break-word;
}

.d-actions { display: flex; gap: 10px; margin-top: 6px; }
.d-actions .btn { flex: 1; height: 50px; border-radius: 16px; font-size: 15px; }

/* ---------------------------------------------------------- Toast */
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 26px);
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--stroke-strong);
  background: rgba(20, 20, 28, 0.96);
  backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: var(--shadow-l);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease);
  max-width: min(86vw, 460px);
  text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255, 95, 109, 0.5); }
.toast.ok { border-color: rgba(53, 229, 161, 0.45); }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
  .nav-inner, .page, .footer-inner { padding-left: 24px; padding-right: 24px; }
  .hero { padding: 56px 0 34px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); gap: 16px; }
}

@media (max-width: 820px) {
  :root { --nav-h: 64px; }
  .nav-inner { gap: 12px; }
  .brand-text { display: none; }
  .nav-search { max-width: none; margin-left: 0; }
  .nav-search kbd { display: none; }
  .btn-ghost span { display: none; }
  .btn-ghost { width: 42px; padding: 0; }

  .hero { padding: 40px 0 26px; }
  .hero-sub { font-size: 14.5px; }
  .br-pc { display: none; }
  .hero-stats { gap: 18px; padding: 16px 20px; width: 100%; justify-content: space-between; }
  .stat strong { font-size: 21px; }

  .toolbar { gap: 10px; padding: 10px 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
}

@media (max-width: 620px) {
  .nav-inner, .page, .footer-inner { padding-left: 16px; padding-right: 16px; }

  .toolbar { flex-wrap: wrap; row-gap: 8px; }
  .chips { flex: 1 1 100%; order: 2; }
  .toolbar-right { flex: 1 1 100%; order: 1; }
  .select-wrap { width: 100%; }
  .select-wrap select { width: 100%; justify-content: center; }

  .hero-title { font-size: clamp(34px, 10.5vw, 46px); }
  .eyebrow { font-size: 10px; letter-spacing: 0.22em; margin-bottom: 16px; }

  .grid { grid-template-columns: 1fr; gap: 12px; }

  .card { padding: 18px; border-radius: 22px; }
  .app-icon { width: 52px; height: 52px; border-radius: 15px; font-size: 20px; }
  .card-desc { -webkit-line-clamp: 2; min-height: 0; font-size: 13px; }

  .drawer {
    top: auto; bottom: 0;
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-left: none;
    border-top: 1px solid var(--stroke);
    border-radius: 26px 26px 0 0;
    padding: 26px 20px calc(30px + env(safe-area-inset-bottom));
    transform: translateY(102%);
  }
  .drawer.show { transform: none; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 22px; padding-bottom: 26px; }

  .toast { bottom: auto; top: 78px; }
}

/* 尊重系统「减弱动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 打印 */
@media print {
  .aurora, .nav, .footer, .toolbar, .drawer, .drawer-mask { display: none !important; }
  body { background: #fff; color: #111; }
}

/* ============================================================
   浅色模式（[data-theme="light"]）
   ============================================================ */
[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-soft: #ffffff;
  --surface: rgba(20, 24, 40, 0.04);
  --surface-2: rgba(20, 24, 40, 0.07);
  --stroke: rgba(20, 24, 40, 0.10);
  --stroke-strong: rgba(20, 24, 40, 0.18);
  --text: #141828;
  --text-dim: #4d5468;
  --text-mute: #8a90a4;
  color-scheme: light;
}

[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.72);
  border-bottom-color: var(--stroke);
}
[data-theme="light"] .nav.scrolled { background: rgba(255, 255, 255, 0.92); }
[data-theme="light"] .toolbar { background: rgba(244, 245, 251, 0.8); }
[data-theme="light"] .footer { background: rgba(20, 24, 40, 0.03); border-top-color: var(--stroke); }
[data-theme="light"] .card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.7));
  border-color: var(--stroke);
}
[data-theme="light"] .app-icon {
  background: linear-gradient(145deg, #e8e6f5, #f4f2fb);
  border-color: rgba(20, 24, 40, 0.10);
}
[data-theme="light"] .drawer {
  background: linear-gradient(180deg, #ffffff, #f6f7fc);
  border-left-color: var(--stroke);
}
[data-theme="light"] .drawer-mask { background: rgba(20, 24, 40, 0.35); }
[data-theme="light"] .btn {
  background: rgba(20, 24, 40, 0.05);
  border-color: var(--stroke);
  color: var(--text);
}
[data-theme="light"] .nav-search input {
  background: rgba(20, 24, 40, 0.05);
  border-color: var(--stroke);
  color: var(--text);
}
[data-theme="light"] .nav-search input::placeholder { color: var(--text-mute); }
[data-theme="light"] .chip {
  background: rgba(20, 24, 40, 0.05);
  border-color: var(--stroke);
  color: var(--text-dim);
}
[data-theme="light"] .stat strong {
  background: linear-gradient(120deg, #141828, #5b4bd6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .select-wrap select,
[data-theme="light"] .select-wrap option {
  background: #ffffff;
  color: var(--text-dim);
}
[data-theme="light"] .aurora {
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(124, 92, 255, 0.14), transparent 60%),
    radial-gradient(1000px 600px at 85% 5%, rgba(18, 216, 250, 0.12), transparent 62%),
    radial-gradient(900px 700px at 55% 105%, rgba(255, 92, 168, 0.10), transparent 65%),
    linear-gradient(180deg, #f4f5fb 0%, #eef0f8 45%, #eceef6 100%);
}
[data-theme="light"] .orb { opacity: 0.35; filter: blur(80px); }

/* 主题切换按钮：深色模式显示太阳（点了变浅色），浅色模式显示月亮 */
.theme-toggle {
  width: 42px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline-block; }
[data-theme="light"] .theme-toggle .icon-sun { display: inline-block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* 移动端分类栏通栏：抵消 .page 的左右 padding，贴到屏幕边缘 */
@media (max-width: 620px) {
  .toolbar {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
  }

  /* ===== 性能降级：手机端关闭重特效，提升滚动流畅度 ===== */
  /* 1) 三个大模糊球停止位移动画，降低不透明度与模糊半径 */
  .orb { animation: none !important; opacity: 0.28; filter: blur(60px); will-change: auto; }
  /* 2) 噪点层直接隐藏（turbulence SVG 每帧重绘开销极大） */
  .grain { display: none !important; }
  /* 3) 列表卡片去掉毛玻璃（一屏多张卡片叠加毛玻璃是最大卡顿源） */
  .card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  /* 4) 导航/工具栏毛玻璃半径减半 */
  .nav { backdrop-filter: blur(8px) saturate(140%); -webkit-backdrop-filter: blur(8px) saturate(140%); }
  .toolbar { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  /* 5) 抽屉遮罩去掉毛玻璃 */
  .drawer-mask { backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* 6) 顶部统计卡去掉毛玻璃 */
  .hero-stats { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* 浅色模式再补几处对比度 */
[data-theme="light"] .tag {
  color: #5b4bd6;
  background: rgba(124, 92, 255, 0.10);
  border-color: rgba(124, 92, 255, 0.25);
}
[data-theme="light"] .pill b { color: var(--text); }
[data-theme="light"] .dl-btn { box-shadow: 0 10px 22px -12px rgba(124, 92, 255, 0.7); }
[data-theme="light"] .toast { background: rgba(255, 255, 255, 0.96); color: #141828; border-color: var(--stroke-strong); }
