:root{
  color:#f3f5f8;background:#0b0d10;
  font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,SF Pro Text,PingFang SC,Microsoft YaHei,sans-serif;
  font-synthesis:none;color-scheme:dark;
  --canvas:#0b0d10;--control:#101318;--surface:#13161b;--surface-raised:#1a1e24;--surface-soft:#20242b;
  --text:#f3f5f8;--text-subtle:#a0a6b0;--text-muted:#747b86;
  --border:#2a2f38;--border-strong:#3a414c;
  --brand:#7868ff;--brand-bright:#978cff;--brand-soft:rgba(120,104,255,.16);
  --signal:#37d5b0;
  --blue:var(--brand);--ink:var(--text);--muted:var(--text-subtle);
  --line:rgba(255,255,255,.1);--panel:rgba(19,22,27,.92);
  --shadow:0 18px 50px rgba(0,0,0,.34);
}
.app-shell.theme-light{
  color:#1b1c20;background:#f7f7f9;color-scheme:light;
  --canvas:#f7f7f9;--control:#fff;--surface:#fff;--surface-raised:#fff;--surface-soft:#f2f2f5;
  --text:#1b1c20;--text-subtle:#62646c;--text-muted:#85878f;
  --border:#e4e4e7;--border-strong:#d4d4d8;
  --brand:#7868ff;--brand-bright:#978cff;--brand-soft:rgba(120,104,255,.12);
  --signal:#37d5b0;
  --blue:#0071e3;--ink:#1b1c20;--muted:#85878f;
  --line:rgba(0,0,0,.08);--panel:rgba(255,255,255,.92);
  --shadow:0 18px 50px rgba(0,0,0,.10);
}
*{box-sizing:border-box}
html,body,#root{width:100%;height:100%;margin:0;overflow:hidden}
body{color:var(--ink);font-size:14px;font-weight:450}
button,input,select,textarea{font:inherit}
button{color:inherit;cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(0,113,227,.25);outline-offset:2px}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
a{color:inherit;text-decoration:none}

/* ===== App Shell ===== */
.app-shell{display:grid;grid-template-columns:88px minmax(0,1fr);height:100%;background:radial-gradient(circle at 75% 0%,#eef5ff 0,transparent 36%),#f7f7f9}
.app-shell.theme-dark{background:radial-gradient(circle at 75% 0%,#1a1a2e 0,transparent 36%),#0b0d10}
.app-content{min-width:0;display:grid;grid-template-rows:70px minmax(0,1fr);overflow:hidden;height:100%}
.create-screen-host{display:contents}

/* ===== Sidebar ===== */
.sidebar{grid-row:1/-1;display:flex;flex-direction:column;align-items:center;padding:18px 12px;border-right:1px solid var(--line);background:#fafafccc;-webkit-backdrop-filter:blur(30px);backdrop-filter:blur(30px);z-index:10}
.app-shell.theme-dark .sidebar{background:rgba(15,17,21,.8)}
.logo{position:relative;width:48px;height:48px;border-radius:15px;background:#0c1320;box-shadow:0 10px 24px #0c13202e;margin-bottom:26px;overflow:hidden;flex-shrink:0}
.logo span:first-child{position:absolute;width:13px;height:30px;left:14px;top:9px;background:#71b9ff;border-radius:10px;transform:rotate(28deg)}
.logo span:last-child{position:absolute;width:14px;height:27px;right:11px;bottom:7px;background:#ff887a;border-radius:10px;transform:rotate(28deg)}
.sidebar nav{width:100%;display:grid;gap:8px}
.sidebar nav button{position:relative;width:64px;height:66px;padding:7px 4px;border:0;border-radius:17px;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#5f6368;transition:.2s ease}
.app-shell.theme-dark .sidebar nav button{color:#747b86}
.sidebar nav button:hover{background:#0000000a;color:var(--ink);transform:translateY(-1px)}
.app-shell.theme-dark .sidebar nav button:hover{background:rgba(255,255,255,.06);color:var(--text)}
.sidebar nav button.active{background:#fff;color:var(--ink);box-shadow:0 12px 30px #1d1d1f14}
.app-shell.theme-dark .sidebar nav button.active{background:var(--surface-raised);color:var(--text);box-shadow:0 12px 30px rgba(0,0,0,.3)}
.sidebar nav button.active::before{content:"";position:absolute;left:-13px;width:3px;height:22px;border-radius:2px;background:var(--ink)}
.sidebar nav button svg{width:22px;height:22px}
.sidebar nav button span{display:block;max-width:100%;font-size:10px;font-weight:700;line-height:1.12;text-align:center;white-space:normal}
.sidebar-bottom{margin-top:auto}
.sidebar-community{width:100%;margin-top:auto;padding-top:13px;border-top:1px solid var(--line);display:grid;justify-items:center;gap:7px}
.community-link{position:relative;width:44px;height:44px;border:1px solid rgba(24,25,28,.08);border-radius:14px;display:grid;place-items:center;background:#ffffffbd;text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
.app-shell.theme-dark .community-link{border-color:rgba(255,255,255,.08);background:rgba(255,255,255,.06)}
.community-link svg{width:20px;height:20px;fill:currentColor;stroke:none}
.community-link>span{position:absolute;left:52px;top:50%;z-index:40;min-width:max-content;padding:7px 10px;border:1px solid rgba(24,25,28,.1);border-radius:9px;background:#141519f0;box-shadow:0 8px 24px #1415192e;color:#fff;font-size:11px;font-weight:650;opacity:0;pointer-events:none;transform:translate(-5px,-50%);transition:opacity .16s ease,transform .16s ease}
.community-link:hover{transform:translateY(-1px);box-shadow:0 8px 18px #21283a1f}
.community-link:hover>span{opacity:1;transform:translateY(-50%)}
.community-link.qq{color:#1578e8;background:#edf6ff}
.community-link.telegram{color:#229ed9;background:#edf9ff}
.community-link.bilibili{color:#00aeec;background:#eefaff}
.community-link.youtube{color:#f03;background:#fff1f3}
.community-link.bilibili svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.community-link.youtube svg{fill:currentColor;stroke:none}
.community-link.youtube svg path{fill:#fff}

/* ===== Topbar ===== */
.topbar{height:70px;display:flex;align-items:center;padding:0 24px 0 30px;border-bottom:1px solid var(--line);background:#fafafcad;-webkit-backdrop-filter:saturate(160%) blur(28px);backdrop-filter:saturate(160%) blur(28px);z-index:9}
.app-shell.theme-dark .topbar{background:rgba(16,19,24,.85)}
.crumb{display:flex;gap:10px;align-items:center;font-size:14px}
.crumb>span,.crumb>small{color:var(--muted);font-weight:500}
.crumb>b{color:#bbb}
.crumb>strong{color:#1b1c20;font-size:15px;font-weight:760}
.app-shell.theme-dark .crumb>strong{color:var(--text)}
.crumb>i{width:8px;height:8px;border-radius:50%;background:#24b47e;box-shadow:0 0 0 5px #24b47e1a}
.crumb>i.busy{background:#ff9f0a;box-shadow:0 0 0 5px #ff9f0a1a}
.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.icon-button{width:38px;height:38px;margin-left:10px;border-radius:12px;border:1px solid var(--line);background:#fffc;display:grid;place-items:center}
.app-shell.theme-dark .icon-button{background:rgba(255,255,255,.06)}
.icon-button svg{width:17px}

/* ===== Page Scroll / Heading ===== */
.page-scroll{overflow:auto;scrollbar-width:thin}
.page-heading{display:flex;justify-content:space-between;align-items:center;max-width:1440px;margin:auto}
.page-heading h1{font-size:clamp(30px,3vw,46px);margin:8px 0 4px;letter-spacing:-.035em}
.page-heading p{margin:0;color:var(--muted)}
.heading-actions{display:flex;gap:10px}

/* ===== Buttons ===== */
.primary-button,.soft-button{border:0;border-radius:14px;min-height:40px;padding:0 17px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:650;font-size:13px}
.primary-button{background:var(--ink);color:#fff;box-shadow:0 10px 22px #1d1d1f21}
.primary-button svg{width:16px}
.soft-button{background:#fff;border:1px solid var(--line)}
.app-shell.theme-dark .soft-button{background:var(--surface);border-color:var(--border)}

/* ===== Segmented ===== */
.segmented{width:max-content;min-width:236px;display:flex;gap:3px;padding:4px;border-radius:14px;background:#e9e9ed}
.app-shell.theme-dark .segmented{background:var(--surface-soft)}
.segmented button{flex:1;border:0;border-radius:11px;background:transparent;padding:9px 16px;color:#737377;white-space:nowrap;cursor:pointer;font-size:12px}
.app-shell.theme-dark .segmented button{color:var(--text-muted)}
.segmented button.active{background:#fff;color:var(--ink);font-weight:700;box-shadow:0 2px 8px #00000012}
.app-shell.theme-dark .segmented button.active{background:var(--surface-raised);color:var(--text);box-shadow:0 2px 8px rgba(0,0,0,.2)}

/* ===== Studio Grid ===== */
.studio-grid{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 354px}
.studio-main{padding:30px 28px 18px 34px;position:relative;overflow:auto}
.studio-main>h1{font-size:clamp(34px,3.1vw,50px);margin:8px 0 4px;letter-spacing:-.035em}
.lead{color:var(--muted);margin-bottom:20px}

/* ===== Prompt Card ===== */
.prompt-card{margin:18px 0;background:#ffffffe0;border-radius:26px;box-shadow:0 16px 40px #1e243214;padding:18px 22px 13px}
.app-shell.theme-dark .prompt-card{background:rgba(19,22,27,.9);box-shadow:0 16px 40px rgba(0,0,0,.2)}
.prompt-title{display:flex;align-items:center;justify-content:space-between;font-size:13px}
.prompt-title button{display:flex;align-items:center;gap:5px;border:0;border-radius:20px;color:#ff665c;background:#fff0ee;padding:7px 10px;font-size:11px;cursor:pointer}
.prompt-title button svg{width:13px}
.prompt-card textarea{width:100%;height:82px;resize:vertical;border:0;background:transparent;margin-top:10px;line-height:1.8;color:#333;outline:none}
.app-shell.theme-dark .prompt-card textarea{color:var(--text)}
.prompt-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:10px}
.prompt-footer button{border:1px solid var(--line);background:transparent;border-radius:14px;padding:5px 9px;color:var(--muted);font-size:10px;margin-right:5px}
.prompt-footer span{color:#a0a0a5;font:10px ui-monospace,monospace}

/* ===== Upload Slot ===== */
.upload-slot{position:relative;height:158px;padding:0;overflow:hidden;border:1px dashed #c4c7cc;border-radius:22px;background:#fff9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:var(--muted);cursor:pointer}
.app-shell.theme-dark .upload-slot{border-color:var(--border);background:rgba(255,255,255,.03)}
.upload-slot svg{width:23px}
.upload-slot b{font-size:12px;color:#444}
.app-shell.theme-dark .upload-slot b{color:var(--text)}
.upload-slot span{font-size:10px}
.upload-slot img{width:100%;height:100%;object-fit:cover}
.upload-slot em{position:absolute;left:8px;right:8px;bottom:7px;padding:5px 7px;border-radius:8px;background:#0000008f;color:#fff;font-size:9px;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.upload-slot.compact{height:118px;border-style:solid}

/* ===== Frame Row ===== */
.frame-row{display:grid;grid-template-columns:1fr 130px 1fr;align-items:center;gap:12px;margin:18px 0}
.frame-link{display:flex;align-items:center;gap:6px;color:var(--muted)}
.frame-link span{height:1px;flex:1;background:#c7c9ce}
.frame-link b{font-size:9px;white-space:nowrap}

/* ===== Reference ===== */
.reference-tabs{display:flex;gap:8px;margin:18px 0 10px}
.reference-tabs button{border:1px solid var(--line);border-radius:15px;background:#fff;padding:8px 13px;font-size:10px;cursor:pointer}
.app-shell.theme-dark .reference-tabs button{background:var(--surface);border-color:var(--border)}
.reference-tabs button.active{background:var(--ink);color:#fff}
.reference-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-height:305px;overflow:auto}

/* ===== Inspector ===== */
.inspector{background:#fafafcd1;border-left:1px solid var(--line);padding:25px 20px 50px;-webkit-backdrop-filter:blur(28px);backdrop-filter:blur(28px);overflow:auto}
.app-shell.theme-dark .inspector{background:rgba(16,19,24,.8)}
.inspector-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:24px}
.inspector h3{font-size:13px;margin-bottom:8px}
.inspector label{display:block;font-size:11px;color:var(--muted);margin-bottom:6px;margin-top:16px}
.inspector select,.inspector input{height:44px;width:100%;border:1px solid var(--line);border-radius:12px;background:#ffffffd1;padding:0 11px;font-size:11px}
.app-shell.theme-dark .inspector select,.app-shell.theme-dark .inspector input{background:var(--surface-soft);border-color:var(--border);color:var(--text)}
.size-row{display:grid;grid-template-columns:1fr 15px 1fr 38px;align-items:center;gap:6px}
.size-row span{text-align:center;color:#aaa}
.size-row button,.seed-row button{height:44px;border:1px solid var(--line);border-radius:12px;background:#fff}
.app-shell.theme-dark .size-row button,.app-shell.theme-dark .seed-row button{background:var(--surface-soft);border-color:var(--border)}
.ratio-row{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:7px}
.ratio-row button{height:38px;border-radius:11px;border:1px solid var(--line);background:#fff;font-size:10px}
.app-shell.theme-dark .ratio-row button{background:var(--surface-soft);border-color:var(--border)}
.ratio-row button.active{border-color:#87c5ff;background:#edf6ff;color:var(--blue)}
.inspector input[type=range]{height:20px;padding:0;accent-color:var(--blue);border:0;background:transparent}
.seed-row{display:grid;grid-template-columns:1fr 65px;gap:6px}
.switch-row,.lora-toggle{min-height:48px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;font-size:11px}
.switch{width:37px;height:22px;border:0;border-radius:14px;background:#d1d1d6;padding:2px;cursor:pointer}
.switch i{display:block;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #00000040;transition:.2s}
.switch.on{background:#28c460}
.switch.on i{transform:translate(15px)}
.lora-toggle{width:100%;border-left:0;border-right:0;border-bottom:0;background:transparent;cursor:pointer}
.lora-toggle b{color:var(--muted);font-size:10px}
.lora-list{display:grid;gap:6px;padding-bottom:12px}
.lora-list>div{display:grid;grid-template-columns:24px minmax(0,1fr) 58px;gap:5px;align-items:center}
.lora-list span{font:9px ui-monospace,monospace;color:#aaa}
.lora-list select,.lora-list input{height:34px;padding:0 6px}

/* ===== Generate Button ===== */
.generate-side{width:100%;min-height:48px;margin-top:16px;border:0;border-radius:15px;background:var(--ink);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}
.generate-side svg{width:17px}

/* ===== Media Stage ===== */
.media-stage{height:min(39vh,410px);min-height:300px;border-radius:28px;overflow:hidden;position:relative;background:#111;box-shadow:var(--shadow)}
.media-stage>img{width:100%;height:100%;object-fit:cover}
.play{width:58px;height:58px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.45);border-radius:50%;background:#231a18a6;color:#fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);cursor:pointer}
.play svg{width:25px}
.stage-meta{position:absolute;left:22px;bottom:20px;color:#fff;display:grid;gap:7px}
.stage-meta b{font-size:17px}
.stage-meta span{font:10px ui-monospace,monospace;color:#ffffffb3}

/* ===== Scene Ribbon ===== */
.scene-ribbon{position:sticky;bottom:0;display:flex;align-items:center;gap:12px;height:84px;padding:10px 13px 10px 20px;margin:18px -6px 0;border:1px solid rgba(255,255,255,.8);border-radius:24px;background:#fafafcd4;-webkit-backdrop-filter:blur(28px);backdrop-filter:blur(28px);box-shadow:0 14px 45px #1e24321a;z-index:4}
.app-shell.theme-dark .scene-ribbon{border-color:rgba(255,255,255,.06);background:rgba(16,19,24,.8)}
.ribbon-label{min-width:98px;display:grid;gap:5px}
.ribbon-label b{font-size:12px}
.ribbon-label span{font-size:9px;color:var(--muted)}
.ribbon-items{flex:1;display:flex;gap:8px;min-width:0}
.ribbon-items button{width:92px;height:58px;flex:0 1 92px;padding:0;overflow:hidden;position:relative;border:2px solid transparent;border-radius:12px;background:#eee;cursor:pointer}
.ribbon-items button.selected{border-color:var(--blue);box-shadow:0 0 0 2px #fff inset}
.ribbon-items img{width:100%;height:100%;object-fit:cover}
.ribbon-items span{position:absolute;left:5px;bottom:4px;color:#fff;background:#0000008c;border-radius:5px;padding:2px 4px;font-size:8px}
.ribbon-items .ribbon-add{border:1px dashed #c9c9ce;background:transparent;color:#9a9aa0}

/* ===== Queue Button ===== */
.queue-button{height:46px;border:1px solid var(--line);border-radius:13px;background:#fff;padding:0 16px;white-space:nowrap}
.queue-trigger-icon{position:relative}
.queue-trigger-icon .badge{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--brand);color:#fff;font-size:9px;font-weight:700;display:grid;place-items:center}

/* ===== Empty State ===== */
.empty-state{height:50vh;display:grid;place-items:center;align-content:center;color:var(--muted)}
.empty-state svg{width:40px;height:40px}
.empty-state h3{margin:15px 0 5px;color:var(--ink)}

/* ===== Library ===== */
.library-page{padding:35px 38px 80px;overflow:auto}
.library-filter{max-width:1440px;margin:28px auto 16px;display:flex;gap:6px}
.library-filter button{border:0;border-radius:12px;background:transparent;padding:8px 13px;color:var(--muted)}
.library-filter button.active{background:var(--ink);color:#fff}
.library-filter input{margin-left:auto;width:230px;border:1px solid var(--line);border-radius:13px;padding:0 13px;background:#fff}
.media-grid{max-width:1440px;margin:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.media-grid article{overflow:hidden;border-radius:22px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 25px #1e24320d}
.app-shell.theme-dark .media-grid article{background:var(--surface);border-color:var(--border)}
.media-grid .media-thumb{width:100%;aspect-ratio:16/9;display:block;background:#111;position:relative;overflow:hidden}
.media-grid .media-thumb img{width:100%;height:100%;object-fit:cover}
.media-grid article>div{display:grid;gap:5px;padding:13px 14px}
.media-grid b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
.media-grid span{color:var(--muted);font-size:9px}

/* ===== API Page ===== */
.api-page{padding:35px 38px 80px;overflow:auto;max-width:900px;margin:0 auto}
.eyebrow{color:var(--blue);font-weight:750;font-size:11px;letter-spacing:.13em}
.api-hero h1{font-size:26px;font-weight:800;margin:8px 0 6px}
.api-hero p{font-size:13px;color:var(--muted);line-height:1.6;max-width:600px}
.api-hero-actions{display:flex;gap:10px;margin-top:16px}
.api-hero-actions a{padding:9px 18px;border-radius:10px;border:1px solid var(--line);background:#fff;font-size:12px;font-weight:600}
.app-shell.theme-dark .api-hero-actions a{background:var(--surface);border-color:var(--border)}
.api-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:18px;margin-bottom:24px}
.app-shell.theme-dark .api-card{background:var(--surface);border-color:var(--border)}
.api-card code{display:block;margin:6px 0;padding:10px 14px;border-radius:8px;background:#f2f2f5;font:12px ui-monospace,monospace}
.app-shell.theme-dark .api-card code{background:var(--surface-soft)}
.api-endpoints{display:grid;gap:8px;margin-bottom:24px}
.api-endpoints>div{display:grid;grid-template-columns:60px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:#fff}
.app-shell.theme-dark .api-endpoints>div{background:var(--surface);border-color:var(--border)}
.api-endpoints b{font-size:10px;font-weight:700;padding:3px 8px;border-radius:6px;text-align:center}
.api-endpoints b.GET{background:rgba(55,213,176,.12);color:#1ba88c}
.api-endpoints b.POST{background:var(--brand-soft);color:var(--brand)}
.api-endpoints code{font:12px ui-monospace,monospace}
.api-endpoints span{font-size:11px;color:var(--muted)}
.api-section h2{font-size:16px;font-weight:700;margin-bottom:12px}
.api-console{border:1px solid var(--line);border-radius:12px;background:#1a1c20;color:#e0e2e6;padding:18px;overflow-x:auto;font:12px ui-monospace,"Cascadia Code",monospace;line-height:1.7;white-space:pre}
.api-console .keyword{color:#ff79c6}
.api-console .string{color:#f1fa8c}
.api-console .comment{color:#6272a4}

/* ===== Settings ===== */
.settings-page{padding:35px 38px 80px;overflow:auto;max-width:640px;margin:0 auto}
.settings-section{margin-bottom:24px}
.settings-section h2{font-size:16px;font-weight:700;margin-bottom:12px}
.settings-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:16px}
.app-shell.theme-dark .settings-card{background:var(--surface);border-color:var(--border)}
.theme-switcher,.language-switcher{display:flex;gap:6px}
.theme-switcher button,.language-switcher button{padding:8px 16px;border:1px solid var(--line);border-radius:10px;background:#fff;font-size:12px;font-weight:600;color:var(--muted)}
.app-shell.theme-dark .theme-switcher button,.app-shell.theme-dark .language-switcher button{background:var(--surface);border-color:var(--border)}
.theme-switcher button.active,.language-switcher button.active{border-color:var(--brand);color:var(--brand);background:var(--brand-soft)}

/* ===== Notice ===== */
.notice{position:fixed;left:50%;bottom:104px;transform:translate(-50%);padding:10px 15px;border-radius:18px;background:#18181ae6;color:#fff;font-size:11px;z-index:20;box-shadow:var(--shadow)}

/* ===== Mode Panel ===== */
.mode-panel{display:none}
.mode-panel.active{display:block}

/* ===== Scrollbar ===== */
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background:#c9cbd2;background-clip:padding-box}
.app-shell.theme-dark ::-webkit-scrollbar-thumb{background:#3c424c;background-clip:padding-box}

/* ===== Search Box ===== */
.search-box{display:flex;align-items:center;gap:6px;height:38px;border:1px solid var(--line);border-radius:12px;background:#fffc;padding:0 12px}
.app-shell.theme-dark .search-box{background:rgba(255,255,255,.06);border-color:var(--border)}
.search-box svg{width:17px;height:17px;color:var(--muted);flex-shrink:0}
.search-box input{border:0;background:transparent;outline:none;font-size:13px;width:200px;color:var(--ink)}
.app-shell.theme-dark .search-box input{color:var(--text)}

/* ===== Download Page (shared) ===== */
.download-page{overflow:auto;scrollbar-width:thin;min-height:0}

/* ===== Hero Banner ===== */
.dl-hero{margin:30px 34px 24px;border-radius:24px;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);padding:48px 44px;color:#fff;position:relative;overflow:hidden}
.dl-hero::after{content:"";position:absolute;right:-60px;top:-60px;width:280px;height:280px;border-radius:50%;background:rgba(255,255,255,.08)}
.dl-hero::before{content:"";position:absolute;right:120px;bottom:-80px;width:200px;height:200px;border-radius:50%;background:rgba(255,255,255,.06)}
.dl-hero-content{position:relative;z-index:1}
.dl-hero h1{font-size:clamp(28px,3vw,42px);margin:0 0 8px;letter-spacing:-.03em;font-weight:800}
.dl-hero p{margin:0 0 24px;font-size:15px;opacity:.85}
.dl-hero-stats{display:flex;gap:40px}
.dl-hero-stats>div{display:flex;flex-direction:column;gap:2px}
.dl-hero-stats b{font-size:24px;font-weight:800}
.dl-hero-stats span{font-size:12px;opacity:.75}

/* ===== Category Filter ===== */
.dl-filter{display:flex;gap:6px;flex-wrap:wrap;padding:0 34px;margin-bottom:20px}
.dl-filter button,.dl-filter a{border:0;border-radius:12px;background:transparent;padding:9px 18px;color:var(--muted);font-size:13px;font-weight:600;transition:.2s;text-decoration:none;cursor:pointer}
.dl-filter button:hover,.dl-filter a:hover{background:var(--surface-soft);color:var(--ink)}
.dl-filter button.active,.dl-filter a.active{background:var(--ink);color:#fff}
.app-shell.theme-dark .dl-filter button.active,.app-shell.theme-dark .dl-filter a.active{background:var(--brand);color:#fff}
.dl-filter-item{position:relative;display:flex;align-items:center}
.dl-filter-toggle{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-left:4px;border:0;border-radius:50%;background:transparent;color:#333;cursor:pointer;transition:.2s;padding:0;flex-shrink:0;font-size:10px;line-height:1}
.app-shell.theme-dark .dl-filter-toggle{color:#fff}
.dl-filter-toggle:hover{background:var(--brand-soft);color:var(--brand)}
.dl-filter-toggle.open{background:var(--brand);color:#fff}
.dl-filter-toggle.open{transform:rotate(180deg)}
.dl-filter-dropdown{display:none;position:absolute;top:calc(100% + 6px);left:0;z-index:30;min-width:160px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.12);padding:6px;flex-direction:column;gap:2px}
.app-shell.theme-dark .dl-filter-dropdown{background:var(--surface);border-color:var(--border);box-shadow:0 8px 28px rgba(0,0,0,.3)}
.dl-filter-dropdown a{display:block;padding:8px 14px;border-radius:8px;font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap;text-decoration:none;transition:.15s}
.dl-filter-dropdown a:hover{background:var(--surface-soft);color:var(--ink)}
.dl-filter-dropdown a.active{background:var(--brand);color:#fff}

/* ===== Home Featured Sections ===== */
.home-featured{display:flex;flex-direction:column;gap:28px;padding:0 34px;margin-bottom:28px}
.home-featured-section{display:flex;flex-direction:column;gap:14px}
.home-featured-header{display:flex;align-items:center;justify-content:space-between;padding:0 2px}
.home-featured-header h2{font-size:18px;font-weight:800;letter-spacing:-.01em}
.home-featured-more{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:var(--brand)}
.home-featured-more svg{width:16px;height:16px}
.home-featured .dl-grid{padding:0}

/* ===== Copy Toast ===== */
.copy-toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%) translateY(20px);background:var(--surface-raised);color:var(--text);padding:12px 24px;border-radius:12px;font-size:14px;font-weight:600;box-shadow:0 8px 30px rgba(0,0,0,.2);opacity:0;pointer-events:none;transition:all .3s ease;z-index:9999}
.copy-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ===== Software Grid ===== */
.dl-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;padding:0 34px}
.dl-grid-related{grid-template-columns:repeat(4,1fr);padding:0}
.dl-card{border-radius:20px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 25px #1e24320d;transition:transform .2s ease,box-shadow .2s ease;overflow:hidden}
.app-shell.theme-dark .dl-card{background:var(--surface);border-color:var(--border);box-shadow:0 8px 25px rgba(0,0,0,.15)}
.dl-card:hover{transform:translateY(-3px);box-shadow:0 16px 40px #1e24321a}
.dl-card-link{display:flex;flex-direction:column;height:100%;text-decoration:none;color:inherit}
.dl-card-icon{width:56px;height:56px;border-radius:16px;display:grid;place-items:center;flex-shrink:0;color:#fff;font-size:18px;font-weight:800;letter-spacing:-.02em}
.dl-card-icon-wrap{padding:18px 18px 0}
.dl-card-icon-img{width:100%;height:56px;border-radius:12px;overflow:hidden;background:var(--surface-soft)}
.dl-card-icon-img img{width:100%;height:100%;object-fit:cover;display:block}
.dl-card-icon-img span{display:none}
.dl-card-body{padding:18px 18px 16px;display:flex;flex-direction:column;gap:8px;flex:1}
.dl-card-body h3{font-size:15px;font-weight:700;margin:0;line-height:1.3}
.dl-card-desc{font-size:12px;color:var(--muted);line-height:1.6;margin:0;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dl-card-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:auto}
.dl-card-meta>span{font-size:11px;color:var(--text-muted)}
.dl-tag{display:inline-block;padding:3px 9px;border-radius:8px;background:var(--brand-soft);color:var(--brand);font-size:11px;font-weight:600}
.dl-card-actions{display:flex;gap:8px;margin-top:10px}

/* ===== Download Buttons ===== */
.dl-btn{flex:1;border:0;border-radius:12px;min-height:40px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:650;font-size:12px;cursor:pointer;transition:.2s;white-space:nowrap}
.dl-btn svg{width:16px;height:16px}
.dl-btn-cloud{background:var(--brand);color:#fff}
.dl-btn-cloud:hover{background:var(--brand-bright);transform:translateY(-1px)}
.dl-btn-local{background:var(--surface-soft);color:var(--ink);border:1px solid var(--line)}
.app-shell.theme-dark .dl-btn-local{background:var(--surface-soft);color:var(--text);border-color:var(--border)}
.dl-btn-local:hover{background:var(--border);transform:translateY(-1px)}
.dl-btn-lg{min-height:50px;font-size:14px;padding:0 24px;border-radius:14px}
.dl-btn-lg svg{width:18px;height:18px}

/* ===== Load More ===== */
.dl-load-more{display:flex;justify-content:center;padding:32px 0}
.dl-load-more button{border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px 40px;font-size:14px;font-weight:600;color:var(--ink);cursor:pointer;transition:.2s}
.app-shell.theme-dark .dl-load-more button{background:var(--surface);border-color:var(--border);color:var(--text)}
.dl-load-more button:hover{background:var(--surface-soft);transform:translateY(-1px)}

/* ===== Footer ===== */
.dl-footer{text-align:center;padding:30px 0 40px;border-top:1px solid var(--line);margin:20px 34px 0}
.dl-footer p{margin:4px 0;font-size:12px;color:var(--muted)}

/* ===== Detail Page ===== */
.detail-header{display:flex;justify-content:space-between;align-items:flex-start;gap:30px;padding:30px 34px 24px}
.detail-header-left{display:flex;gap:20px;align-items:flex-start}
.detail-icon-wrap{padding:0}
.detail-icon-wrap .dl-card-icon-img{width:80px;height:80px;border-radius:22px}
.detail-icon-wrap .dl-card-icon{width:80px;height:80px;border-radius:22px;font-size:28px}
.detail-title-area h1{font-size:28px;font-weight:800;margin:0 0 6px;letter-spacing:-.03em}
.detail-subtitle{font-size:14px;color:var(--muted);margin:0 0 14px}
.detail-badges{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.detail-badge{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--text-muted);font-weight:500}
.detail-badge svg{width:14px;height:14px;color:#f5a623}
.detail-download-area{display:flex;flex-direction:column;gap:12px;min-width:240px}
.detail-download-note{display:flex;flex-direction:column;gap:4px;text-align:center}
.detail-download-note span{font-size:11px;color:var(--muted)}

/* ===== Info Bar ===== */
.detail-info-bar{display:grid;grid-template-columns:repeat(6,1fr);gap:0;padding:0 34px;margin-bottom:24px}
.detail-info-item{display:flex;flex-direction:column;gap:4px;padding:14px 18px;border-left:1px solid var(--line)}
.detail-info-item:first-child{border-left:0}
.detail-info-label{font-size:11px;color:var(--muted)}
.detail-info-value{font-size:13px;font-weight:650;color:var(--ink)}
.app-shell.theme-dark .detail-info-value{color:var(--text)}

/* ===== Detail Sections ===== */
.detail-section{padding:0 34px;margin-bottom:32px}
.detail-section h2{font-size:20px;font-weight:800;margin:0 0 16px;letter-spacing:-.02em}

/* ===== Screenshots ===== */
.screenshot-carousel{position:relative;display:flex;align-items:center;gap:8px}
.screenshot-carousel .detail-screenshots{flex:1;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none;display:flex;gap:14px}
.screenshot-carousel .detail-screenshots::-webkit-scrollbar{display:none}
.screenshot-carousel .screenshot-item{flex:0 0 calc((100% - 42px) / 4);scroll-snap-align:start;border-radius:16px;overflow:hidden;border:1px solid var(--line);box-shadow:0 6px 20px #1e24320d}
.screenshot-carousel .screenshot-item img{width:100%;display:block;cursor:pointer;transition:transform .3s}
.screenshot-carousel .screenshot-item:hover img{transform:scale(1.03)}
.screenshot-nav{flex:0 0 auto;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--card);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;box-shadow:0 2px 8px #1e24320d;z-index:2}
.screenshot-nav:hover{background:var(--accent);color:#fff;border-color:var(--accent)}
.screenshot-nav:disabled{opacity:.3;cursor:not-allowed}
.screenshot-nav svg{width:20px;height:20px}

/* ===== Detail Content ===== */
.detail-content{font-size:14px;line-height:1.8;color:var(--ink)}
.app-shell.theme-dark .detail-content{color:var(--text)}
.detail-content p{margin:0 0 14px}
.detail-content h3{font-size:16px;font-weight:700;margin:24px 0 10px}
.detail-content ul,.detail-content ol{margin:0 0 14px;padding-left:22px}
.detail-content li{margin-bottom:6px}
.detail-content code{padding:2px 8px;border-radius:6px;background:var(--surface-soft);font:13px ui-monospace,monospace}

/* ===== Requirements ===== */
.detail-requirements{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.req-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:20px}
.app-shell.theme-dark .req-card{background:var(--surface);border-color:var(--border)}
.req-card h3{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;margin:0 0 12px}
.req-card h3 svg{width:18px;height:18px;color:var(--signal)}
.req-card ul{list-style:none;padding:0;margin:0}
.req-card li{font-size:13px;color:var(--muted);padding:5px 0;border-bottom:1px solid var(--line)}
.req-card li:last-child{border-bottom:0}

/* ===== Changelog ===== */
.detail-changelog{display:flex;flex-direction:column;gap:20px}
.changelog-item{border-left:3px solid var(--brand);padding:0 0 0 20px;position:relative}
.changelog-version{font-size:16px;font-weight:800;color:var(--ink)}
.app-shell.theme-dark .changelog-version{color:var(--text)}
.changelog-date{font-size:12px;color:var(--muted);margin-bottom:8px}
.changelog-item ul{margin:0;padding-left:18px}
.changelog-item li{font-size:13px;color:var(--muted);line-height:1.7}

/* ===== Download List ===== */
.detail-download-list{display:flex;flex-direction:column;gap:14px}
.detail-download-item{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border:1px solid var(--line);border-radius:16px;background:#fff}
.app-shell.theme-dark .detail-download-item{background:var(--surface);border-color:var(--border)}
.detail-download-info{display:flex;flex-direction:column;gap:4px}
.detail-download-info b{font-size:15px;font-weight:700}
.detail-download-info span{font-size:12px;color:var(--muted)}

/* ===== Related Mini Cards ===== */
.dl-card-mini .dl-card-body{padding:14px}
.dl-card-mini .dl-card-body h3{font-size:13px}
.dl-card-mini .dl-card-icon{width:44px;height:44px;border-radius:13px;font-size:15px}
.dl-card-mini .dl-card-icon-wrap{padding:0}
.dl-card-mini .dl-card-icon-img{width:44px;height:44px;border-radius:13px}
.dl-card-mini .dl-card-link{flex-direction:row;align-items:center;gap:12px;padding:14px}

/* ===== Responsive ===== */
@media(max-width:1200px){
  .dl-grid{grid-template-columns:repeat(2,1fr)}
  .article-grid{grid-template-columns:repeat(2,1fr)}
  .detail-info-bar{grid-template-columns:repeat(3,1fr)}
  .detail-info-item:nth-child(4){border-left:0}
}
@media(max-width:768px){
  .dl-grid{grid-template-columns:1fr}
  .article-grid{grid-template-columns:1fr}
  .dl-grid-related{grid-template-columns:repeat(2,1fr)}
  .detail-header{flex-direction:column}
  .detail-download-area{width:100%;flex-direction:row}
  .detail-info-bar{grid-template-columns:repeat(2,1fr)}
  .detail-info-item{border-left:0;border-top:1px solid var(--line)}
  .detail-requirements{grid-template-columns:1fr}
  .screenshot-carousel .screenshot-item{flex:0 0 calc((100% - 14px) / 2)}
  .search-box input{width:120px}
}

/* ===== Lightbox ===== */
.lightbox-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0);backdrop-filter:blur(0);visibility:hidden;transition:background .35s,backdrop-filter .35s,visibility .35s}
.lightbox-overlay.lightbox-open{background:rgba(0,0,0,.88);backdrop-filter:blur(12px);visibility:visible}
.lightbox-stage{position:relative;max-width:92vw;max-height:88vh;display:flex;align-items:center;justify-content:center}
.lightbox-img{max-width:92vw;max-height:88vh;border-radius:12px;box-shadow:0 24px 80px rgba(0,0,0,.5);opacity:0;transform:scale(.92);transition:opacity .3s,transform .3s}
.lightbox-img.lightbox-img-show{opacity:1;transform:scale(1)}
.lightbox-close{position:fixed;top:20px;right:20px;width:46px;height:46px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .2s;z-index:10001;backdrop-filter:blur(4px)}
.lightbox-close:hover{background:rgba(255,255,255,.25);transform:rotate(90deg)}
.lightbox-close svg{width:24px;height:24px}
.lightbox-nav{position:fixed;top:50%;transform:translateY(-50%);width:52px;height:52px;border:0;border-radius:50%;background:rgba(255,255,255,.1);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .2s;z-index:10001;backdrop-filter:blur(4px)}
.lightbox-nav:hover{background:rgba(255,255,255,.22)}
.lightbox-nav:active{transform:translateY(-50%) scale(.92)}
.lightbox-nav svg{width:28px;height:28px}
.lightbox-prev{left:20px}
.lightbox-next{right:20px}
.lightbox-counter{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);color:rgba(255,255,255,.7);font-size:14px;font-weight:600;letter-spacing:.05em;background:rgba(0,0,0,.3);padding:6px 18px;border-radius:20px;backdrop-filter:blur(4px);z-index:10001}
@media(max-width:640px){
  .lightbox-nav{width:40px;height:40px}
  .lightbox-nav svg{width:22px;height:22px}
  .lightbox-close{width:38px;height:38px}
  .lightbox-close svg{width:20px;height:20px}
  .lightbox-prev{left:10px}
  .lightbox-next{right:10px}
}

/* ===== Pagination ===== */
.dl-pagination{display:flex;justify-content:center;gap:8px;padding:30px 0}
.dl-pagination a{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:40px;padding:0 14px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:13px;font-weight:600;color:var(--ink);text-decoration:none;transition:.2s}
.app-shell.theme-dark .dl-pagination a{background:var(--surface);border-color:var(--border);color:var(--text)}
.dl-pagination a:hover{background:var(--surface-soft);transform:translateY(-1px)}
.dl-pagination a.active{background:var(--brand);color:#fff;border-color:var(--brand)}

/* ===== Empty State ===== */
.empty-state{padding:60px 20px;text-align:center;color:var(--muted)}
.empty-state h3{font-size:18px;margin:0 0 8px;color:var(--ink)}
.app-shell.theme-dark .empty-state h3{color:var(--text)}
.empty-state p{font-size:13px;margin:0}

/* ===== Ranking Page ===== */
.rank-list{display:flex;flex-direction:column;gap:10px}
.rank-item{display:flex;align-items:center;gap:16px;padding:16px 20px;border:1px solid var(--line);border-radius:16px;background:#fff;text-decoration:none;color:var(--ink);transition:.2s}
.app-shell.theme-dark .rank-item{background:var(--surface);border-color:var(--border)}
.rank-item:hover{transform:translateX(4px);box-shadow:var(--shadow)}
.rank-num{flex-shrink:0;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-size:16px;font-weight:800;color:var(--muted);background:var(--surface-soft)}
.rank-top1{background:#ffd700;color:#fff}
.rank-top2{background:#c0c0c0;color:#fff}
.rank-top3{background:#cd7f32;color:#fff}
.rank-icon{flex-shrink:0;width:52px;height:52px;border-radius:14px}
.rank-icon-wrap{padding:0;flex-shrink:0;width:52px}
.rank-icon-wrap .dl-card-icon-img{width:52px;height:52px;border-radius:14px}
.rank-icon-wrap .dl-card-icon{width:52px;height:52px;border-radius:14px}
.rank-info{flex:1;min-width:0}

/* ===== Article Page ===== */
.article-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;padding:0 34px 20px}
.article-card{border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden;transition:.2s;box-shadow:var(--shadow);padding:10px}
.app-shell.theme-dark .article-card{background:var(--surface);border-color:var(--border)}
.article-card:hover{transform:translateY(-4px);box-shadow:0 12px 32px rgba(0,0,0,.08)}
.article-card-link{text-decoration:none;color:inherit;display:block}
.article-cover{height:160px;overflow:hidden;border-radius:12px}
.article-cover img{width:100%;height:100%;object-fit:cover;transition:.3s;transform:scale(1.05)}
.article-card:hover .article-cover img{transform:scale(1.05)}
.article-body{padding:14px 8px 8px}
.article-body h3{font-size:16px;font-weight:700;margin:0 0 12px;color:var(--ink);line-height:1.4}
.app-shell.theme-dark .article-body h3{color:var(--text)}
.article-meta{display:flex;gap:10px;align-items:center;font-size:12px;color:var(--muted)}
.article-detail-cover{width:100%;height:192px;border-radius:12px;overflow:hidden;margin-bottom:20px}
.article-detail-cover img{width:100%;height:100%;object-fit:cover;display:block;transform:scale(1.05);border-radius:12px}

/* ===== Navigation Page ===== */
.nav-category-block{margin:0 34px 32px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:var(--shadow)}
.app-shell.theme-dark .nav-category-block{background:var(--surface);border-color:var(--border)}
.nav-category-title{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:800;margin:0 0 20px;color:var(--ink)}
.app-shell.theme-dark .nav-category-title{color:var(--text)}
.nav-category-icon{width:28px;height:28px;border-radius:6px}
.nav-sub-tabs{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}
.nav-sub-tab{padding:8px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);font-size:13px;font-weight:600;color:var(--ink);cursor:pointer;transition:.2s;text-decoration:none;display:inline-block}
.app-shell.theme-dark .nav-sub-tab{background:var(--surface);border-color:var(--border);color:var(--text)}
.nav-sub-tab:hover{background:var(--brand-soft);border-color:var(--brand)}
.nav-sub-tab.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.app-shell.theme-dark .nav-sub-tab.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.nav-links-container{position:relative}
.nav-links-section{display:none}
.nav-links-section.active{display:block}
.nav-empty{padding:40px;text-align:center;color:var(--muted)}
.nav-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.nav-card{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);text-decoration:none;color:var(--ink);transition:.2s}
.app-shell.theme-dark .nav-card{background:var(--surface);border-color:var(--border)}
.nav-card:hover{background:var(--brand-soft);border-color:var(--brand);transform:translateY(-2px)}
.nav-card-icon{flex-shrink:0;width:40px;height:40px;border-radius:10px;overflow:hidden}
.nav-card-icon img{width:100%;height:100%;object-fit:cover}
.nav-card-body{flex:1;min-width:0}
.nav-card-body h3{font-size:14px;font-weight:700;margin:0 0 4px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-shell.theme-dark .nav-card-body h3{color:var(--text)}
.nav-card-body p{font-size:12px;color:var(--muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ===== Copy Toast ===== */
.copy-toast{position:fixed;top:80px;left:50%;transform:translateX(-50%) translateY(-20px);background:var(--brand);color:#fff;padding:12px 28px;border-radius:12px;font-size:14px;font-weight:600;box-shadow:0 8px 28px rgba(0,0,0,.2);z-index:9999;opacity:0;pointer-events:none;transition:.3s}
.copy-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

.rank-info h3{font-size:15px;font-weight:700;margin:0 0 4px}
.rank-info .dl-card-desc{font-size:12px;margin:0 0 6px}
.rank-download-count{flex-shrink:0;text-align:center;padding-left:16px;border-left:1px solid var(--line)}
.rank-download-count b{display:block;font-size:20px;font-weight:800;color:var(--brand)}
.rank-download-count span{font-size:11px;color:var(--muted)}
@media(max-width:768px){
  .rank-item{flex-wrap:wrap}
  .rank-download-count{border-left:0;padding-left:0;width:100%;text-align:left;display:flex;align-items:center;gap:6px}
  .rank-download-count b{font-size:16px}
}

/* ===== Homepage ===== */
.home-hero{position:relative;padding:60px 34px 48px;border-radius:24px;overflow:hidden;margin-bottom:24px}
.home-hero-bg{position:absolute;inset:0;background:linear-gradient(135deg,#667eea 0%,#764ba2 50%,#5b6cc0 100%);opacity:.95}
.app-shell.theme-dark .home-hero-bg{background:linear-gradient(135deg,#2d3561 0%,#3d2b5f 50%,#2a3470 100%)}
.home-hero-content{position:relative;z-index:1;text-align:center;color:#fff}
.home-hero-content h1{font-size:clamp(32px,4vw,48px);margin:0 0 10px;letter-spacing:-.03em;font-weight:800}
.home-hero-content p{margin:0 0 28px;font-size:16px;opacity:.9}
.home-hero-stats{display:flex;justify-content:center;gap:48px;margin-bottom:32px}
.home-hero-stats>div{display:flex;flex-direction:column;gap:2px}
.home-hero-stats b{font-size:28px;font-weight:800}
.home-hero-stats span{font-size:13px;opacity:.8}
.home-hero-actions{display:flex;justify-content:center;gap:14px}
.home-btn-primary{display:inline-flex;align-items:center;gap:8px;padding:12px 28px;border-radius:14px;background:#fff;color:#667eea;font-size:14px;font-weight:700;text-decoration:none;transition:.2s}
.home-btn-primary:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.2)}
.home-btn-ghost{display:inline-flex;align-items:center;gap:8px;padding:12px 28px;border-radius:14px;background:rgba(255,255,255,.15);color:#fff;border:1px solid rgba(255,255,255,.3);font-size:14px;font-weight:600;text-decoration:none;transition:.2s}
.home-btn-ghost:hover{background:rgba(255,255,255,.25)}
.home-announcement{display:flex;align-items:center;gap:10px;padding:14px 20px;border-radius:14px;background:var(--surface-soft);border:1px solid var(--line);margin-bottom:24px;font-size:14px;color:var(--ink)}
.app-shell.theme-dark .home-announcement{background:var(--surface);border-color:var(--border)}
.home-announcement svg{width:18px;height:18px;color:var(--brand);flex-shrink:0}
.home-section{margin-bottom:36px;padding:0 34px}
.home-section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.home-section-header h2{font-size:20px;font-weight:800;display:flex;align-items:center;gap:8px;margin:0}
.home-section-header h2 svg{width:20px;height:20px;color:var(--brand)}
.home-section-more{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:var(--muted);text-decoration:none;transition:.2s}
.home-section-more:hover{color:var(--brand)}
.home-section-more svg{width:14px;height:14px}
.home-featured-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.home-featured-card{border-radius:18px;background:#fff;border:1px solid var(--line);box-shadow:0 6px 20px #1e24320d;transition:transform .2s,box-shadow .2s;overflow:hidden;padding:10px}
.app-shell.theme-dark .home-featured-card{background:var(--surface);border-color:var(--border);box-shadow:0 6px 20px rgba(0,0,0,.15)}
.home-featured-card:hover{transform:translateY(-4px);box-shadow:0 16px 40px #1e24321a}
.home-featured-link{display:flex;flex-direction:column;height:100%;text-decoration:none;color:inherit}
.home-featured-icon-wrap{padding:10px 10px 0}
.home-featured-icon-wrap .dl-card-icon-img{width:100%;height:80px;border-radius:12px;overflow:hidden;background:var(--surface-soft)}
.home-featured-icon-wrap .dl-card-icon-img img{width:100%;height:100%;object-fit:cover;display:block}
.home-featured-icon-wrap .dl-card-icon{width:100%;height:80px;border-radius:12px;font-size:22px}
.home-featured-info{padding:14px 12px 12px;flex:1}
.home-featured-info h3{font-size:16px;font-weight:700;margin:0 0 4px}
.home-featured-info p{font-size:13px;color:var(--muted);margin:0 0 8px}
.home-featured-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;font-size:11px;color:var(--muted)}
.home-featured-meta .dl-tag{font-size:11px}
.home-featured-actions{display:flex;gap:8px;padding:0 12px 12px}
.home-featured-actions .dl-btn{flex:1;justify-content:center;font-size:12px;padding:8px 12px}
.home-art-cover{height:192px;overflow:hidden;border-radius:12px !important;margin:0;padding:0}
.home-art-cover img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s;border-radius:12px;transform:scale(1.05)}
.home-featured-card:hover .home-art-cover img{transform:scale(1.05)}
.home-art-cover-placeholder{width:100%;height:100%;display:grid;place-items:center;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:28px;font-weight:800}
.home-cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:14px}
.home-cat-card{display:flex;flex-direction:column;align-items:center;gap:10px;padding:24px 12px;border-radius:16px;background:#fff;border:1px solid var(--line);text-decoration:none;color:var(--ink);transition:.2s}
.app-shell.theme-dark .home-cat-card{background:var(--surface);border-color:var(--border)}
.home-cat-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px #1e24321a;border-color:var(--brand)}
.home-cat-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;color:#fff;font-size:20px;font-weight:800}
.home-cat-name{font-size:13px;font-weight:600}
.home-rank-grid{display:flex;flex-direction:column;gap:10px}
.home-rank-item{display:flex;align-items:center;gap:16px;padding:14px 18px;border:1px solid var(--line);border-radius:14px;background:#fff;text-decoration:none;color:var(--ink);transition:.2s}
.app-shell.theme-dark .home-rank-item{background:var(--surface);border-color:var(--border)}
.home-rank-item:hover{transform:translateX(4px);box-shadow:var(--shadow)}
@media(max-width:768px){
  .home-hero{padding:40px 20px 32px}
  .home-hero-stats{gap:24px}
  .home-hero-stats b{font-size:22px}
  .home-featured-grid{grid-template-columns:1fr}
  .home-section{padding:0 20px}
  .home-cat-grid{grid-template-columns:repeat(3,1fr)}
}
