:root{color-scheme:light;--bg:#f8f9ff;--surface:#fff;--soft:#f0efff;--border:#e1e3f4;--text:#18203d;--muted:#6d7897;--accent:#7058ed;--glow:rgba(135,115,242,.12);--shadow:0 8px 30px #6454d008;--mark:#eee8ff}
:root[data-theme=dark]{color-scheme:dark;--bg:#151a27;--surface:#202737;--soft:#2a3047;--border:#363e55;--text:#eef0ff;--muted:#a3acc8;--accent:#a393ff;--glow:rgba(112,88,237,.09);--shadow:0 8px 30px #0001;--mark:#4b3e72}
*{box-sizing:border-box}body{margin:0;min-height:100vh;display:flex;flex-direction:column;color:var(--text);background:radial-gradient(ellipse at 80% 27%,var(--glow),transparent 48%),radial-gradient(ellipse at 0 65%,var(--glow),transparent 50%),var(--bg);font:15px/1.65 -apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',sans-serif;-webkit-font-smoothing:antialiased}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit}button:disabled{opacity:.55;cursor:wait}a{color:var(--accent);text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:4px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.topbar{width:min(1320px,100%);margin:0 auto;padding:28px 48px;display:flex;align-items:center;justify-content:space-between}.brand{display:inline-flex;align-items:center;gap:13px;color:var(--text);font-size:26px;font-weight:800;letter-spacing:-1px}.brand-mark{display:block;width:40px;height:40px;flex-shrink:0;color:#7460ef}.search-icon{display:inline-block;width:31px;height:31px;border:5px solid #7460ef;border-radius:50%;position:relative;flex-shrink:0}.search-icon:after{content:'';position:absolute;width:16px;height:5px;background:#7460ef;border-radius:4px;transform:rotate(46deg);right:-12px;bottom:-6px}.theme-switch{display:flex;gap:4px;padding:4px;border:1px solid var(--border);border-radius:16px;background:var(--surface)}.theme-switch button{border:0;background:none;border-radius:12px;padding:5px 13px;color:var(--muted);font-size:18px}.theme-switch button span{font-size:13px}.theme-switch button.active{color:var(--accent);background:var(--soft)}main{width:min(1120px,100%);margin:0 auto;padding:0 28px 64px;flex:1}.hero{min-height:290px;display:flex;align-items:center;justify-content:space-between;padding:24px 0 10px}.eyebrow{font-size:12px;letter-spacing:4px;color:var(--accent);margin:0 0 14px}.hero h1{font-size:clamp(32px,4.4vw,58px);font-weight:800;letter-spacing:-2px;line-height:1.3;margin:0;white-space:nowrap}.hero h1 span{background:linear-gradient(110deg,#8260ef,#587fee);background-clip:text;color:transparent}.hero-subtitle{font-size:23px;color:var(--muted);margin:17px 0}.search-art{width:300px;height:240px;position:relative;flex-shrink:0}.glass{position:absolute;left:80px;top:35px;width:136px;height:136px;border:15px solid #a69af4;border-radius:50%;background:linear-gradient(140deg,#d1efff80,#c6b4ff60);box-shadow:inset 5px 7px 12px #fff9,5px 12px 25px #7d66ef25;transform:rotate(-12deg)}.glass:after{content:'';position:absolute;width:75px;height:22px;right:-64px;bottom:-30px;transform:rotate(52deg);background:linear-gradient(#d1ccff,#9688ee);border-radius:12px;box-shadow:inset 0 2px 3px #fff8}.orbit{position:absolute;width:285px;height:100px;left:10px;top:90px;border:1px solid #b3a5f766;border-radius:50%;transform:rotate(-24deg)}.orbit-two{transform:rotate(25deg);height:185px;top:30px;width:260px;left:20px}.orb{position:absolute;border-radius:50%;background:linear-gradient(135deg,#f5faff,#9c90ee);box-shadow:2px 4px 8px #8a78e126;width:18px;height:18px}.orb-one{top:65px;left:20px}.orb-two{top:85px;right:0;width:28px;height:28px}.orb-three{bottom:16px;left:88px;width:13px;height:13px}
#search-form{display:flex;align-items:center;gap:20px;padding:8px 8px 8px 26px;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:0 9px 35px var(--glow)}#search-form:focus-within{border-color:var(--accent)}.search-icon{width:18px;height:18px;border:2px solid var(--muted)}.search-icon:after{height:2px;width:8px;right:-6px;bottom:-3px;background:var(--muted)}#q{width:100%;min-width:0;border:0;outline:none;background:none;color:var(--text);height:58px;font-size:18px}#q:focus-visible{outline:none}#q::placeholder{color:var(--muted)}#submit,.btn.primary{background:linear-gradient(115deg,#7961f4,#684cf0);color:#fff;border:1px solid transparent;box-shadow:0 4px 10px #7460ef1a}#submit{height:58px;border-radius:12px;padding:0 44px;font-weight:600;font-size:18px}.controls{margin-top:26px;display:grid;gap:16px}.filter-row{display:flex;align-items:center;gap:25px}.filter-label{color:var(--muted);font-size:14px;flex-shrink:0}.chips{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.chip,.hot-keywords button{border:1px solid var(--border);border-radius:24px;background:var(--surface);padding:7px 20px;white-space:nowrap;font-size:13px}.chip.active{background:linear-gradient(115deg,#7961f4,#684cf0);color:white;border-color:transparent}.chip:hover,.hot-keywords button:hover{border-color:var(--accent);box-shadow:0 3px 12px var(--glow)}.hot-search{margin-top:42px;padding:28px 0;border-top:1px solid var(--border)}.section-heading{display:flex;align-items:center;gap:16px;margin-bottom:18px}.section-heading h2{font-size:19px;margin:0}.section-heading h2 span{color:#fb856b;margin-right:8px}.section-heading>span{font-size:12px;color:var(--muted)}.hot-keywords{display:flex;flex-wrap:wrap;gap:12px}.hot-keywords button{min-width:95px;padding:9px 24px;background:transparent}
.has-search .hero,.has-search .hot-search{display:none}.has-search .topbar{padding-top:22px;padding-bottom:22px}.has-search .panel{padding-top:10px}.has-search #q{height:44px;font-size:16px}.has-search #submit{height:44px;font-size:15px;padding:0 30px}.has-search .controls{margin-top:18px;gap:10px}.meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;color:var(--muted);font-size:12px;margin:28px 0 14px}.meta span:first-child{font-size:14px;color:var(--text);font-weight:600}.meta span:last-child{margin-left:auto}.status{margin:22px 0 16px;border:1px solid var(--border);padding:12px 16px;border-radius:12px;background:var(--surface);font-size:14px}.status.error{color:#c34c61;border-color:#db899555;background:#dc667a0c}.retry{border:0;background:transparent;color:inherit;text-decoration:underline;margin-left:16px}.results{display:grid;gap:14px}.card{position:relative;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:var(--shadow);padding:22px 24px 20px 84px}.resource-icon{position:absolute;left:22px;top:24px;width:43px;height:43px;display:grid;place-items:center;background:var(--soft);color:var(--accent);border-radius:12px;font-size:24px}.card-head{display:flex;justify-content:space-between;align-items:start;gap:14px}.card-title{font-size:17px;line-height:1.6;font-weight:600;margin:0;overflow-wrap:anywhere}.card-title mark{color:inherit;background:var(--mark);border-radius:3px}.badge{font-size:11px;color:white;border-radius:7px;padding:3px 9px;flex-shrink:0}.card-info{display:flex;gap:5px 16px;flex-wrap:wrap;margin:9px 0;color:var(--muted);font-size:12px}.pwd{color:var(--text)}.card-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:12px}.btn{border:1px solid var(--border);border-radius:9px;background:transparent;color:var(--accent);padding:8px 18px;font-size:13px}.variants{font-size:12px;color:var(--muted);margin-top:8px}.variants summary{cursor:pointer;width:fit-content}.variants ul{list-style:none;margin:10px 0;padding:12px;border-radius:10px;background:var(--soft);max-height:240px;overflow:auto}.variants li{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;padding:8px 0;border-bottom:1px solid var(--border)}.variants li:last-child{border:0}.btn.tiny{padding:3px 12px;margin-left:auto;order:2;font-size:12px}.variant-name{font-weight:600;color:var(--text)}.skel{height:160px;border-radius:16px;background:linear-gradient(100deg,var(--surface) 20%,var(--soft) 45%,var(--surface) 70%);background-size:250% 100%;animation:shimmer 1.4s infinite}@keyframes shimmer{to{background-position:-180% 0}}.empty{text-align:center;padding:40px 12px}.empty-art{font-size:100px;line-height:1.4;color:var(--accent);text-shadow:5px 8px 0 var(--soft)}.empty h2{font-size:19px;margin:8px}.empty p{color:var(--muted);font-size:14px;margin:8px auto 22px;max-width:430px}.more-wrap{display:flex;justify-content:center;margin-top:24px}#more{border:1px solid var(--border);background:var(--soft);color:var(--muted);padding:9px 60px;border-radius:30px;font-size:13px}footer{text-align:center;padding:22px 24px max(24px,env(safe-area-inset-bottom));border-top:1px solid var(--border);font-size:11px;color:var(--muted)}footer p{margin:4px 0}
.toast{position:fixed;bottom:calc(28px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);padding:12px 22px;background:#20263a;color:#fff;border:1px solid #ffffff20;border-radius:12px;box-shadow:0 8px 35px #0002;z-index:10;font-size:13px;white-space:nowrap}
@media(min-width:1500px){.hero{min-height:350px}.hot-search{margin-top:55px}}
@media(max-width:650px){.topbar{padding:calc(20px + env(safe-area-inset-top)) 22px 16px}.brand{font-size:21px;gap:11px}.brand-mark{width:32px;height:32px}.theme-switch button{padding:4px 9px}.theme-switch button span{display:none}main{padding:0 18px 36px}.hero{min-height:195px;justify-content:center;text-align:center;padding:22px 0}.eyebrow{font-size:10px;letter-spacing:3px;margin-bottom:12px}.hero h1{font-size:31px;letter-spacing:-1.5px}.hero-subtitle{font-size:15px;margin:12px 0}.search-art{display:none}#search-form{padding:6px 6px 6px 16px;gap:12px;border-radius:14px}#q{height:45px;font-size:14px}#submit{height:45px;padding:0 23px;font-size:15px;border-radius:10px}.filter-row{gap:10px;align-items:start}.filter-label{display:none}.controls{margin-top:18px;gap:15px}.chips{gap:6px}.chip{padding:7px 12px;font-size:12px;min-height:36px}.hot-search{margin-top:28px;padding-top:24px}.section-heading h2{font-size:16px}.hot-keywords{gap:9px}.hot-keywords button{font-size:12px;min-width:0;padding:7px 15px}.has-search .topbar{padding-top:calc(16px + env(safe-area-inset-top));padding-bottom:14px}.has-search .panel{padding-top:2px}.has-search #q{font-size:14px}.has-search #submit{padding:0 20px}.meta{margin:22px 1px 12px;font-size:11px}.meta span:first-child{font-size:12px}.card{padding:16px}.resource-icon{display:none}.card-title{font-size:15px}.badge{font-size:10px;padding:3px 7px}.card-info{font-size:11px;gap:4px 10px}.card-actions .btn{flex:1;padding:9px 5px;font-size:12px}.variants summary{width:100%;padding:5px 10px;background:var(--soft);border-radius:6px}.variants li{gap:7px;font-size:11px}.variant-name{width:100%}.skel{height:180px}footer{font-size:10px;padding:18px 20px max(20px,env(safe-area-inset-bottom))}.empty{padding-top:25px}.empty-art{font-size:85px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}}

#submit{flex-shrink:0;white-space:nowrap}

.hero h1 span{-webkit-background-clip:text}

/* 桌面首页以搜索为中心，保持移动端现有布局。 */
@media (min-width: 651px) {
  body:not(.has-search) .topbar {
    width: 100%;
    max-width: none;
    padding: 8px max(32px, calc((100vw - 1240px) / 2));
    border-bottom: 1px solid var(--border);
    background: var(--surface);
  }

  body:not(.has-search) .brand { font-size: 23px; }

  body:not(.has-search) main {
    width: min(1120px, 100%);
    padding: 0 40px 28px;
  }

  body:not(.has-search) .hero {
    min-height: 0;
    justify-content: center;
    text-align: center;
    padding: clamp(26px, 5vh, 54px) 0 28px;
  }

  body:not(.has-search) .eyebrow {
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 12px;
  }

  body:not(.has-search) .hero h1 {
    font-size: clamp(34px, 3.4vw, 46px);
    letter-spacing: -1.5px;
  }

  body:not(.has-search) .hero-subtitle {
    font-size: 18px;
    margin: 14px 0 0;
  }

  body:not(.has-search) .search-art { display: none; }

  body:not(.has-search) .panel {
    max-width: 960px;
    margin: 0 auto;
  }

  body:not(.has-search) #search-form {
    max-width: 800px;
    margin: 0 auto;
    gap: 18px;
    padding: 7px 7px 7px 24px;
    border-color: #a89bf0;
    border-radius: 22px;
  }

  body:not(.has-search) #q { height: 48px; font-size: 16px; }
  body:not(.has-search) #submit {
    height: 48px;
    padding: 0 36px;
    border-radius: 16px;
    font-size: 16px;
  }

  body:not(.has-search) .controls { margin-top: 18px; gap: 10px; }
  body:not(.has-search) .filter-row { justify-content: center; gap: 16px; }
  body:not(.has-search) .filter-label { font-size: 12px; }
  body:not(.has-search) .chip { padding: 6px 17px; }

  body:not(.has-search) .hot-search {
    margin: 28px auto 0;
    padding: 22px 0 0;
    max-width: 960px;
  }

  body:not(.has-search) .section-heading { margin-bottom: 14px; }
  body:not(.has-search) .section-heading h2 { font-size: 17px; }
  body:not(.has-search) .hot-keywords { gap: 10px; }
  body:not(.has-search) .hot-keywords button {
    min-width: 0;
    padding: 6px 20px;
    font-size: 13px;
  }

  body:not(.has-search) .more-wrap { margin-top: 0; }
  body:not(.has-search) footer { padding-top: 15px; padding-bottom: 15px; }
}

/* 图标保留各平台原色，选中时用浅底衬托。 */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  box-shadow: 0 2px 5px #24305706;
}
.platform-logo {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 5px;
  background: #fff;
}
.all-platforms-icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.theme-moon { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; flex-shrink: 0; }
.chip.active { box-shadow: 0 4px 12px #7058ed25; }
.app-tools { text-align: center; padding: 10px 20px; }
.hub-dialog { width: min(440px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--border); border-radius: 20px; color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.hub-dialog::backdrop { background: #11182788; }
.hub-dialog h2 { margin: 0 0 12px; font-size: 21px; }
.hub-dialog p { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.hub-dialog input { display: block; width: 100%; padding: 12px; margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--bg); font-size: 22px; letter-spacing: 6px; }
.hub-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
#auth-dialog { width: min(428px, calc(100% - 32px)); padding: 20px 28px 28px; border-radius: 16px; background: radial-gradient(ellipse at 50% 0, var(--glow), transparent 65%), var(--surface); box-shadow: 0 20px 65px #18203d26; }
#auth-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
#auth-close:hover { background: var(--soft); }
#auth-close svg { width: 20px; height: 20px; }
.auth-emblem { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: radial-gradient(circle, var(--soft), var(--bg)); }
.auth-emblem::before, .auth-emblem::after { content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #d9d3ff; }
.auth-emblem::before { right: -12px; top: 20px; }
.auth-emblem::after { left: -13px; bottom: 20px; opacity: .6; }
.auth-emblem svg { width: 46px; height: 46px; filter: drop-shadow(0 6px 6px #7058ed25); }
#auth-dialog h2 { margin: 0 0 4px; text-align: center; font-size: 23px; font-weight: 800; }
#auth-dialog .auth-description { margin: 0 0 20px; text-align: center; font-size: 14px; }
#auth-form label { display: block; font-size: 14px; font-weight: 600; }
.auth-input { position: relative; margin-top: 8px; }
.auth-input svg { position: absolute; left: 15px; top: 15px; width: 20px; height: 20px; color: var(--muted); opacity: .8; pointer-events: none; }
#auth-code { height: 51px; margin: 0; padding: 12px 14px 12px 50px; border-radius: 8px; font-size: 16px; letter-spacing: 2px; }
#auth-code::placeholder { color: var(--muted); opacity: .8; letter-spacing: 0; }
#auth-code:focus { outline: none; border-color: var(--accent); }
#auth-error { color: #e45151; min-height: 18px; margin: 4px 0 7px; font-size: 12px; }
#get-auth-code { display: block; width: 100%; min-height: 46px; margin-bottom: 16px; border-radius: 8px; font-weight: 600; }
#auth-dialog .hub-actions { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 0; }
#auth-dialog .hub-actions .btn { min-height: 42px; padding: 9px 8px; border-radius: 8px; font-size: 13px; }
#auth-submit { background: linear-gradient(110deg, #917bff, #6047f5); color: #fff; box-shadow: 0 6px 16px #7058ed26; }
#auth-submit:disabled { opacity: .45; cursor: default; box-shadow: none; }
@media (min-width: 651px) {
  body:not(.has-search) .chips { justify-content: center; }
}
@media (max-width: 650px) {
  #auth-dialog { width: 75%; padding: 18px 16px 20px; border-radius: 14px; max-height: calc(100dvh - 32px); overflow-y: auto; }
  #auth-dialog .auth-emblem { width: 60px; height: 60px; margin-bottom: 10px; }
  #auth-dialog .auth-emblem svg { width: 44px; height: 44px; }
  #auth-dialog h2 { font-size: 20px; }
  #auth-dialog .auth-description { margin-bottom: 16px; font-size: 12px; }
  #auth-form label { font-size: 12px; }
  #auth-code { height: 44px; padding-left: 36px; font-size: 16px; }
  .auth-input svg { left: 11px; top: 13px; width: 18px; height: 18px; }
  #auth-dialog .hub-actions { gap: 8px; }
  #auth-dialog .hub-actions .btn { padding: 8px 4px; font-size: 12px; }
  .chip { gap: 6px; }
  .platform-logo { width: 18px; height: 18px; }
  .all-platforms-icon { width: 16px; height: 16px; }
}

#submit[data-loading="true"]::before,#more[data-loading="true"]::before{content:"";display:inline-block;width:12px;height:12px;margin-right:8px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;animation:search-spin .8s linear infinite}
#more[data-loading="true"]{cursor:wait;color:var(--accent)}
@media(prefers-reduced-motion:reduce){#more[data-loading="true"]::before{animation:none}}
@keyframes search-spin{to{transform:rotate(360deg)}}

/* 搜索结果采用紧凑行布局，标题与操作并排，长标题自然换行。 */
.has-search main { width: min(1040px, 100%); padding-bottom: 36px; }
.has-search .topbar { width: min(1040px, 100%); padding: 16px 28px; }
.has-search .brand { font-size: 22px; gap: 10px; }
.has-search .brand-mark { width: 32px; height: 32px; }
.has-search .panel { padding-top: 4px; }
.has-search #search-form { padding: 5px 5px 5px 20px; border-radius: 14px; box-shadow: none; }
.has-search #q, .has-search #submit { height: 40px; }
.has-search .controls { margin-top: 12px; }
.has-search .filter-row { gap: 16px; }
.has-search .chip { min-height: 34px; padding: 4px 14px; font-size: 12px; box-shadow: none; }
.has-search .platform-logo { width: 17px; height: 17px; }
.has-search .meta { margin: 18px 0 10px; }
.has-search .meta span:last-child { margin-left: 0; }
.results { gap: 8px; }
.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 5px;
  padding: 24px 20px;
  border-radius: 12px;
  box-shadow: none;
}
.resource-icon { display: none; }
.card-head { grid-column: 1; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; }
.card-title { font-size: 15px; line-height: 1.5; }
.badge { padding: 2px 7px; border-radius: 5px; font-size: 10px; white-space: nowrap; }
.card-info { grid-column: 1; margin: 0; gap: 3px 14px; line-height: 1.5; }
.card-actions { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0; gap: 8px; }
.card-actions .btn { padding: 7px 13px; font-size: 12px; white-space: nowrap; min-height: 36px; }
.skel { height: 100px; border-radius: 12px; }
@media (max-width: 650px) {
  .has-search main { padding: 0 16px 28px; }
  .has-search .topbar { padding: calc(12px + env(safe-area-inset-top)) 16px 12px; }
  .has-search .brand { font-size: 20px; }
  .has-search .filter-row { gap: 8px; }
  .has-search .chips { gap: 6px; }
  .has-search .chip { min-height: 36px; padding: 5px 10px; }
  .has-search .meta { margin-top: 14px; }
  .card { grid-template-columns: minmax(0, 1fr); padding: 16px 14px; gap: 6px; }
  .card-head { align-items: flex-start; justify-content: space-between; }
  .card-title { font-size: 14px; }
  .card-info { font-size: 11px; }
  .card-actions { grid-column: 1; grid-row: 3; justify-content: flex-end; margin-top: 2px; }
  .card-actions .btn { flex: 0 0 auto; min-height: 40px; padding: 8px 16px; }
  .skel { height: 134px; }
}
