/* qiqiudxy.com — Apple 风格样式 */

:root {
  color-scheme: light dark;

  --bg: #fbfbfd;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hair: rgba(0, 0, 0, .08);
  --hair-strong: rgba(0, 0, 0, .16);
  --fill: rgba(0, 0, 0, .045);
  --fill-2: rgba(0, 0, 0, .08);
  --card: rgba(255, 255, 255, .72);
  --card-solid: #ffffff;
  --nav-bg: rgba(251, 251, 253, .72);
  --accent: #0071e3;
  --accent-2: #5e5ce6;
  --accent-3: #bf5af2;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 18px rgba(0, 0, 0, .05);
  --shadow-m: 0 2px 6px rgba(0, 0, 0, .04), 0 18px 44px rgba(0, 0, 0, .10);
  --shadow-l: 0 40px 100px rgba(0, 0, 0, .22);
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --hair: rgba(255, 255, 255, .10);
    --hair-strong: rgba(255, 255, 255, .20);
    --fill: rgba(255, 255, 255, .07);
    --fill-2: rgba(255, 255, 255, .14);
    --card: rgba(36, 36, 40, .78);
    --card-solid: #1c1c1e;
    --nav-bg: rgba(0, 0, 0, .60);
    --accent: #0a84ff;
    --accent-2: #8b8bff;
    --accent-3: #da8fff;
    --shadow-s: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 22px rgba(0, 0, 0, .35);
    --shadow-m: 0 2px 8px rgba(0, 0, 0, .5), 0 22px 50px rgba(0, 0, 0, .45);
    --shadow-l: 0 40px 100px rgba(0, 0, 0, .65);
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --hair: rgba(255, 255, 255, .10);
  --hair-strong: rgba(255, 255, 255, .20);
  --fill: rgba(255, 255, 255, .07);
  --fill-2: rgba(255, 255, 255, .14);
  --card: rgba(36, 36, 40, .78);
  --card-solid: #1c1c1e;
  --nav-bg: rgba(0, 0, 0, .60);
  --accent: #0a84ff;
  --accent-2: #8b8bff;
  --accent-3: #da8fff;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 22px rgba(0, 0, 0, .35);
  --shadow-m: 0 2px 8px rgba(0, 0, 0, .5), 0 22px 50px rgba(0, 0, 0, .45);
  --shadow-l: 0 40px 100px rgba(0, 0, 0, .65);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(0, 113, 227, .22); }

button, input { font: inherit; color: inherit; }

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

/* ------------------------------------------------------------- 背景光晕 */

.aurora {
  position: fixed;
  inset: -20vh -10vw;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  filter: blur(60px);
  opacity: .85;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform;
}

.blob-a {
  width: 56vw;
  height: 56vw;
  left: -8vw;
  top: -16vw;
  background: radial-gradient(circle at 40% 40%, rgba(0, 113, 227, .30), transparent 68%);
  animation: drift 26s var(--ease) infinite alternate;
}

.blob-b {
  width: 50vw;
  height: 50vw;
  right: -12vw;
  top: 4vw;
  background: radial-gradient(circle at 50% 50%, rgba(94, 92, 230, .26), transparent 68%);
  animation: drift 32s var(--ease) infinite alternate-reverse;
}

.blob-c {
  width: 44vw;
  height: 44vw;
  left: 26vw;
  bottom: -22vw;
  background: radial-gradient(circle at 50% 50%, rgba(191, 90, 242, .18), transparent 66%);
  animation: drift 38s var(--ease) infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 5vh, 0) scale(1.12); }
}

/* ------------------------------------------------------------------ 导航 */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}

.nav.scrolled { border-bottom-color: var(--hair); }

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  height: 54px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #0a84ff, #5e5ce6 60%, #bf5af2);
  box-shadow: 0 2px 8px rgba(94, 92, 230, .35);
}

.brand-mark svg { width: 15px; height: 15px; }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 6px;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  transition: color .2s ease;
}

.nav-links a:hover { color: var(--text); }

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

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s var(--ease);
}

.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; }

.icon-btn.small { width: 28px; height: 28px; }
.icon-btn.small svg { width: 15px; height: 15px; }

.i-sun, .i-moon { display: none; }

:root[data-theme="light"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: block; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .i-sun { display: block; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

.pill-btn {
  border: 0;
  cursor: pointer;
  padding: 7px 15px;
  border-radius: 980px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  transition: transform .2s var(--ease), opacity .2s ease;
}

.pill-btn:hover { transform: scale(1.04); }
.pill-btn:active { transform: scale(.97); }

/* ----------------------------------------------------------------- 首屏 */

main { flex: 1 0 auto; }

.hero {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(52px, 9vh, 104px) 24px 44px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text-2);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 6.6vw, 4.6rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.038em;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(100deg, #0a84ff 0%, #5e5ce6 45%, #bf5af2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 auto;
  max-width: 540px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-2);
  text-wrap: pretty;
}

/* ----------------------------------------------------------------- 数据 */

.stats {
  display: flex;
  justify-content: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 22px;
  background: var(--card);
  border: .5px solid var(--hair);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow-s);
}

.stat {
  flex: 1;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: .5px;
  height: 32px;
  transform: translateY(-50%);
  background: var(--hair-strong);
  opacity: .6;
}

.stat-num {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ----------------------------------------------------------------- 列表 */

.files {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(34px, 5vh, 52px) 24px 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.segment {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 13px;
  background: var(--fill);
}

.segment button {
  border: 0;
  background: transparent;
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color .22s ease, background .22s ease, box-shadow .22s ease;
  white-space: nowrap;
}

.segment button:hover { color: var(--text); }

.segment button[aria-selected="true"] {
  background: var(--card-solid);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .05);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .segment button[aria-selected="true"] {
    background: rgba(255, 255, 255, .16);
    box-shadow: none;
  }
}

:root[data-theme="dark"] .segment button[aria-selected="true"] {
  background: rgba(255, 255, 255, .16);
  box-shadow: none;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 250px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--fill);
  color: var(--text-3);
  transition: background .2s ease, box-shadow .2s ease;
}

.search:focus-within {
  background: var(--card-solid);
  box-shadow: 0 0 0 3.5px rgba(0, 113, 227, .18);
}

.search svg { width: 16px; height: 16px; flex: none; }

.search input {
  border: 0;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text);
}

.search input::placeholder { color: var(--text-3); }

.search input::-webkit-search-cancel-button { display: none; }

/* ----------------------------------------------------------------- 卡片 */

.grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: .5px solid var(--hair);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow-s);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s ease;
  animation: rise .65s var(--ease) both;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  from { transform: translateY(14px) scale(.985); }
  to   { transform: translateY(0) scale(1); }
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-m);
    border-color: var(--hair-strong);
  }
}

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

.icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #9a9aa0, #6e6e73);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 12px rgba(0, 0, 0, .14);
}

.icon svg { width: 22px; height: 22px; }

[data-cat="doc"] .icon { background: linear-gradient(145deg, #3a9bff, #0a6cff); }
[data-cat="install"] .icon { background: linear-gradient(145deg, #a06bff, #6a3df5); }
[data-cat="archive"] .icon { background: linear-gradient(145deg, #ffb340, #f2820c); }
[data-cat="image"] .icon { background: linear-gradient(145deg, #ff7ab2, #f2417f); }
[data-cat="video"] .icon { background: linear-gradient(145deg, #ff6b6b, #e01f4a); }
[data-cat="audio"] .icon { background: linear-gradient(145deg, #3ddc97, #0aa96b); }

.card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.36;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.card-desc {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

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

.dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 17px;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  transition: transform .22s var(--ease), filter .22s ease, box-shadow .22s ease;
  box-shadow: 0 4px 14px rgba(0, 113, 227, .24);
}

.dl:hover { filter: brightness(1.07); transform: scale(1.035); }
.dl:active { transform: scale(.97); }
.dl svg { width: 15px; height: 15px; }

.dl-count {
  font-size: 12.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dl-count svg { width: 13px; height: 13px; }

.del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--text-2);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
}

.card:hover .del, .del:focus-visible { opacity: 1; }
.del:hover { background: rgba(255, 59, 48, .14); color: #ff3b30; }
.del svg { width: 13px; height: 13px; }

/* ----------------------------------------------------------------- 空态 */

.empty {
  padding: 56px 0 28px;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--text-3);
}

.empty-icon svg { width: 28px; height: 28px; }
.empty-title { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.empty-sub { margin: 0; font-size: 13.5px; color: var(--text-3); }
.empty-cta { margin-top: 20px; padding: 9px 20px; }
.empty-sub code {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--fill);
}

/* ----------------------------------------------------------------- 页脚 */

.footer {
  margin-top: 68px;
  padding: 32px 24px 44px;
  border-top: .5px solid var(--hair);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
}

.footer-brand {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
}

.footer-note { margin: 0 0 12px; }

.footer-meta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--text-2);
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--hair-strong);
}

.link-btn:hover { color: var(--text); }

/* ----------------------------------------------------------------- 弹层 */

.sheet {
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: var(--card-solid);
  color: var(--text);
  box-shadow: var(--shadow-l);
  overflow: hidden;
}

.sheet[open] { animation: sheet-in .4s var(--ease); }

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sheet::backdrop {
  background: rgba(0, 0, 0, .38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 12px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.sheet-body {
  padding: 4px 22px 24px;
  display: grid;
  gap: 16px;
}

.field { display: grid; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }

.field input {
  padding: 11px 14px;
  border-radius: 12px;
  border: .5px solid var(--hair-strong);
  background: var(--fill);
  font-size: 14px;
  outline: none;
  transition: box-shadow .2s ease, background .2s ease;
}

.field input:focus {
  background: var(--card-solid);
  box-shadow: 0 0 0 3.5px rgba(0, 113, 227, .18);
}

.drop {
  border: 1.5px dashed var(--hair-strong);
  border-radius: 16px;
  padding: 26px 16px;
  text-align: center;
  transition: border-color .2s ease, background .2s ease;
}

.drop.over {
  border-color: var(--accent);
  background: rgba(0, 113, 227, .06);
}

.drop-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.drop-sub { margin: 0; font-size: 13px; color: var(--text-3); }

.queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
}

.queue li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--fill);
  font-size: 12.5px;
}

.queue .q-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue .q-bar {
  flex: none;
  width: 84px;
  height: 4px;
  border-radius: 2px;
  background: var(--fill-2);
  overflow: hidden;
}

.queue .q-bar i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--accent);
  transition: width .2s linear;
}

.queue .q-state { flex: none; color: var(--text-3); min-width: 34px; text-align: right; }

.sheet-status { margin: 0; min-height: 18px; font-size: 12.5px; color: var(--text-2); }
.sheet-status.err { color: #ff3b30; }

/* ----------------------------------------------------------------- Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 80;
  padding: 11px 18px;
  border-radius: 980px;
  background: rgba(29, 29, 31, .92);
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity .32s ease, transform .32s var(--ease);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ----------------------------------------------------------------- 响应式 */

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-inner { padding: 0 18px; gap: 12px; }

  .hero { padding-top: 54px; }

  .stats { max-width: 100%; padding: 4px; border-radius: 18px; }
  .stat { padding: 10px 6px; }
  .stat-num { font-size: 21px; }

  .files { padding-left: 18px; padding-right: 18px; }
  .toolbar { justify-content: flex-start; }
  .search { width: 100%; order: 2; }
  .segment { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segment::-webkit-scrollbar { display: none; }

  .grid { grid-template-columns: 1fr; gap: 14px; }
  .footer { margin-top: 48px; }
}

/* ----------------------------------------------------------------- 动效降级 */

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