/* ========================================
   应用资源下载站 - 前台样式（蓝白 / 桌面 + 移动）
   首页、解锁页、全部下载地址页统一使用
   ======================================== */

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --text: #111827;
    --text-2: #6b7280;
    --text-3: #9ca3af;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, .1);
    --top-row: #eff6ff;
    --shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 8px 24px rgba(17, 24, 39, .05);
    --nav-bg: rgba(255, 255, 255, .72);
}

html[data-theme="dark"] {
    --bg: #0f1115;
    --surface: #181b20;
    --text: #f3f4f6;
    --text-2: #9ca3af;
    --text-3: #6b7280;
    --border: #2b3038;
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, .15);
    --top-row: rgba(37, 99, 235, .18);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    --nav-bg: rgba(20, 22, 28, .72);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background .25s, color .25s;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; cursor: pointer; }

/* ============ 磨砂导航 ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 28px;
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}
.nav-logo svg { color: var(--accent); flex-shrink: 0; }
.nav-logo-img {
    width: auto;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}
html[data-theme="dark"] .nav-logo-img { filter: invert(1); }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav-links a {
    padding: 7px 14px;
    font-size: 14px;
    color: var(--text-2);
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-2);
    transition: background .15s, color .15s;
}
.nav-icon-btn:hover { background: var(--accent-soft); color: var(--text); }

.notice-bar {
    text-align: center;
    font-size: 13px;
    color: var(--text-2);
    background: var(--accent-soft);
    padding: 7px 16px;
}

/* ============ Hero ============ */
.hero {
    padding: 72px 24px 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.hero-title {
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.12;
    color: var(--text);
    background: linear-gradient(120deg, var(--text) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}
.hero-sub { font-size: 17px; color: var(--text-2); margin-bottom: 28px; }
.hero-search {
    position: relative;
    display: flex;
    align-items: center;
    height: 56px;
    max-width: 640px;
    margin: 0 auto;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow);
}
.hero-search-icon { flex-shrink: 0; color: var(--text-3); margin-left: 22px; }
.hero-search input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    padding: 0 22px;
}
.hero-search input::placeholder { color: var(--text-3); }

.hot-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.hot-tag-label { font-size: 14px; color: var(--text-3); }
.hot-tag {
    font-size: 13px;
    color: var(--text-2);
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    transition: all .15s;
}
.hot-tag:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ============ 分类胶囊 ============ */
.cat-capsules {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 24px 4px;
}
.capsule {
    font-size: 14px;
    color: var(--text-2);
    padding: 8px 22px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    transition: all .15s;
}
.capsule:hover { color: var(--text); border-color: var(--text-3); }
.capsule.active { background: #111827; color: #fff; border-color: #111827; }
html[data-theme="dark"] .capsule.active { background: #fff; color: #111827; border-color: #fff; }

/* ============ 通用区块 ============ */
.main { max-width: 1240px; margin: 0 auto; padding: 8px 24px 48px; }
.section { margin-top: 48px; }
.section-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 20px; }
.section-sub { font-size: 14px; font-weight: 400; color: var(--text-3); margin-left: 10px; }
.section-clear { margin-left: 12px; font-size: 12px; font-weight: 500; color: var(--accent); }
.section-clear:hover { text-decoration: underline; }

/* ============ 资源网格 ============ */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
@media (max-width: 1024px) { .resource-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .resource-grid { grid-template-columns: 1fr; } }
.resource-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.r-icon {
    width: 64px;
    height: 64px;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.r-icon img { width: 100%; height: 100%; object-fit: cover; }
.r-icon.no-icon::after { content: "APP"; font-size: 12px; color: var(--accent); font-weight: 700; }
.r-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.r-desc {
    font-size: 13.5px;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
    flex: 1;
}
.r-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.r-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 10px;
    border-radius: 999px;
}
.r-size, .r-date { font-size: 12.5px; color: var(--text-3); }
.r-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: all .15s;
}
.r-btn:hover { background: var(--accent); color: #fff; }
.r-btn.is-disabled { border-color: var(--border); color: var(--text-3); pointer-events: none; background: var(--bg); }

/* ============ 排行榜 ============ */
.top-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 13px 22px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.top-row:last-child { border-bottom: none; }
.top-row:hover { background: var(--accent-soft); }
.top-row.top-hot { background: var(--top-row); }
.top-no { width: 32px; font-size: 17px; font-weight: 700; color: var(--text-3); text-align: center; flex-shrink: 0; }
.top-row.top-hot .top-no { color: var(--accent); }
.top-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}
.top-icon img { width: 100%; height: 100%; object-fit: cover; }
.top-icon.no-icon::after { content: "APP"; font-size: 9px; color: var(--accent); font-weight: 700; }
.top-name { flex: 1; font-size: 15px; font-weight: 500; color: var(--text); }
.top-dl { font-size: 13px; color: var(--text-3); flex-shrink: 0; }

/* ============ 最新更新 ============ */
.update-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--text-3) transparent;
}
.update-strip::-webkit-scrollbar { height: 6px; }
.update-strip::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 3px; }
.update-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 180px;
    transition: border-color .15s, transform .15s;
}
.update-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.u-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}
.u-icon img { width: 100%; height: 100%; object-fit: cover; }
.u-icon.no-icon::after { content: "APP"; font-size: 10px; color: var(--accent); font-weight: 700; }
.u-info { display: flex; flex-direction: column; min-width: 0; }
.u-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ============ 页脚（仅免责声明） ============ */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 24px;
    padding: 28px 24px 20px;
}
.footer-disclaimer {
    max-width: 960px;
    margin: 0 auto;
    padding: 18px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.footer-disclaimer h5 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.footer-disclaimer p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text-2);
}
.footer-disclaimer p + p { margin-top: 6px; }
.footer-bottom {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    padding-top: 16px;
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.8;
}

/* ============ 空态 ============ */
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); font-size: 15px; }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--text-3); }
.empty-actions { margin-top: 18px; }

/* ============ 应用弹窗 ============ */
.app-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.app-modal-mask[hidden] { display: none; }
.app-modal {
    width: 100%;
    max-width: 320px;
    background: var(--surface);
    border-radius: 18px;
    padding: 30px 22px 18px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
    animation: modalIn .22s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.modal-icon img { width: 100%; height: 100%; object-fit: cover; }
.modal-icon.no-icon::after { content: "APP"; font-size: 13px; color: var(--accent); }
.modal-name { font-size: 19px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.modal-meta { font-size: 13px; color: var(--text-2); margin-bottom: 22px; }
.modal-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff8a00, #ff5e1a);
    color: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(255, 94, 26, .35);
    transition: transform .15s, opacity .15s;
}
.modal-btn:active { transform: scale(.97); opacity: .9; }
.modal-btn-main { font-size: 16px; font-weight: 700; }
.modal-btn-sub { font-size: 11px; opacity: .9; margin-top: 2px; }
.modal-cancel {
    display: block;
    width: 100%;
    margin-top: 14px;
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    padding: 8px;
    cursor: pointer;
}

/* ============ 首页领取提示弹窗 ============ */
.welcome-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 26px 24px 20px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
    text-align: left;
    animation: modalIn .22s ease-out;
}
.welcome-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-2);
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.welcome-close:hover { background: var(--border); color: var(--text); }
.welcome-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}
.welcome-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.welcome-tip {
    padding: 11px 13px;
    background: #fff8e9;
    border: 1px solid #efd9a8;
    border-radius: 10px;
    color: #8a5f1f;
    font-size: 12.5px;
    line-height: 1.7;
}
.welcome-tip strong { display: block; font-size: 13.5px; color: #8a4b0f; margin-bottom: 2px; }
.welcome-body { margin: 14px 0 16px; }
.welcome-body p { font-size: 13px; line-height: 1.9; color: var(--text-2); }
.welcome-body p + p { margin-top: 7px; }
.welcome-body strong { color: var(--text); }
.welcome-safe {
    padding: 8px 10px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #15803d !important;
    font-size: 12px !important;
}
.welcome-dismiss {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 6px;
    border: 0;
    background: transparent;
    color: var(--text-3);
    font-size: 13px;
    cursor: pointer;
}
.welcome-dismiss:hover { color: var(--text-2); }
html[data-theme="dark"] .welcome-tip {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .32);
    color: #fbbf24;
}
html[data-theme="dark"] .welcome-tip strong { color: #fcd34d; }
html[data-theme="dark"] .welcome-safe {
    background: rgba(22, 163, 74, .12);
    border-color: rgba(22, 163, 74, .32);
    color: #4ade80 !important;
}

/* ============ Toast ============ */
#toast {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    background: rgba(17, 24, 39, .88);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    z-index: 1200;
    max-width: 80%;
    text-align: center;
    transition: opacity .3s;
    pointer-events: none;
    opacity: 0;
}

/* ============ 实时下载播报 ============ */
.live-toast {
    position: fixed;
    top: 64px;
    left: 50%;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 360px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    color: var(--text-2);
    font-size: 12.5px;
    line-height: 1.5;
    opacity: 0;
    transform: translate(-50%, -12px);
    pointer-events: none;
    transition: opacity .25s, transform .25s;
}
.live-toast.show { opacity: 1; transform: translate(-50%, 0); }
body:has(.app-modal-mask:not([hidden])) .live-toast { opacity: 0 !important; }
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
    flex-shrink: 0;
}
.live-text { min-width: 0; }

@media (max-width: 600px) {
    .live-toast {
        top: 64px;
        left: 12px;
        right: 12px;
        max-width: none;
        justify-content: center;
        transform: translateY(-12px);
    }
    .live-toast.show { transform: none; }
}

/* ============ 详情页 ============ */
.detail-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 28px;
    margin-top: 28px;
    text-align: center;
}
.detail-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    overflow: hidden;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-icon.no-icon::after { content: "APP"; font-size: 14px; color: var(--accent); font-weight: 700; }
.detail-name { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.detail-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.detail-desc { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.detail-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; }
.detail-meta .meta-item { font-size: 13px; color: var(--text-2); }
.detail-meta .meta-item b { font-weight: 600; color: var(--text-3); margin-right: 4px; }

/* 面板 */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 26px;
    margin-top: 20px;
}
.panel-download { border-top: 3px solid #16a34a; }
.panel-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.panel-sub { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }

/* 步骤 */
.step { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.step:last-child { margin-bottom: 0; }
.step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.step-title { font-size: 14px; font-weight: 600; color: var(--text); }
.step-body { padding: 16px; }
.step-tip { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.step-tip b { color: var(--text); }
.step-guide {
    display: block;
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
    transition: border-color .15s;
}
.step-guide:hover { border-color: var(--border); }
.step-guide img { display: block; width: 100%; height: auto; }
.step-guide-note { margin-top: 7px; text-align: center; font-size: 11.5px; color: var(--text-3); line-height: 1.7; }

.copy-box {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 12px;
    word-break: break-word;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .15s, opacity .15s;
}
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-disabled { background: var(--border); color: var(--text-3); cursor: not-allowed; }
.btn-group { display: flex; gap: 12px; }
.btn-group .btn { flex: 1; }
.btn-douyin { background: #111827; color: #fff; }
.btn-douyin:hover { background: #1f2937; }
.btn-kuaishou { background: #ff5e1a; color: #fff; }
.btn-kuaishou:hover { background: #e85012; }
.btn-coral { background: #f2657a; color: #fff; }
.btn-coral:hover { background: #e04d63; }
.btn-lg { padding: 13px 24px; font-size: 15px; }

/* 截图上传 */
.upload-area { text-align: center; }
.upload-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.upload-grid.is-empty { display: block; }
.upload-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb .del {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: rgba(20, 24, 22, .62);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upload-trigger {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 1.5px dashed var(--border);
    background: var(--bg);
    color: var(--text-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 19px;
}
.upload-trigger small { font-size: 10px; }
.upload-trigger:hover { border-color: var(--accent); color: var(--accent); }
.upload-grid.is-empty .upload-trigger {
    width: 100%;
    height: 86px;
    aspect-ratio: auto;
    border-radius: 12px;
    flex-direction: row;
    gap: 6px;
    font-size: 16px;
}
.upload-grid.is-empty .upload-trigger small { font-size: 12px; }
.upload-hint { margin-bottom: 10px; font-size: 11px; color: var(--text-3); line-height: 1.7; }
.status-line { margin-top: 9px; font-size: 12px; text-align: center; color: var(--text-2); }
.status-line.err { color: #dc2626; }
.status-line.ok { color: #16a34a; }

/* 成功 / 下载地址 */
.download-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid #16a34a;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 26px;
    margin-top: 20px;
    text-align: center;
}
.download-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.download-title { font-size: 18px; font-weight: 700; color: var(--text); }
.download-sub { margin: 4px 0 16px; font-size: 13px; color: var(--text-2); }
.download-foot { margin-top: 10px; font-size: 12px; color: var(--text-3); line-height: 1.7; }
.refresh-tip {
    margin-top: 12px;
    padding: 8px 10px;
    background: #fff8e9;
    border: 1px solid #efd9a8;
    border-radius: 10px;
    color: #a06a1c;
    font-size: 11.5px;
    line-height: 1.7;
}
.missing-card {
    margin-top: 20px;
    padding: 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.missing-card h2 { font-size: 16px; margin-bottom: 6px; }
.missing-card p { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.inline-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: #fff8e9;
    border: 1px solid #efd9a8;
    border-radius: 10px;
    color: #7c5a1f;
    font-size: 12px;
    line-height: 1.75;
}

/* 全部下载地址页 */
.dl-head { text-align: center; padding: 34px 24px 8px; }
.dl-head h1 { font-size: 26px; font-weight: 700; color: var(--text); }
.dl-head p { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.dl-tools { max-width: 640px; margin: 18px auto 0; padding: 0 24px; }
.dl-tools .hero-search { height: 48px; max-width: none; }
.dl-tools .hero-search input { font-size: 14px; }
.dl-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dl-chips .capsule { padding: 6px 16px; font-size: 13px; }
.dl-grid { margin-top: 24px; }
.dl-count { text-align: center; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.dl-card[hidden] { display: none; }

/* ============ 移动端 ============ */
@media (max-width: 820px) {
    .nav-links { display: none; }
    .navbar { padding: 0 16px; }
}

@media (max-width: 640px) {
    .navbar { padding: 0 14px; gap: 10px; }
    .nav-links { display: none; }

    .hero { padding: 52px 18px 26px; }
    .hero-sub { margin-bottom: 22px; }
    .hot-tags { margin-top: 16px; }
    .main { padding: 4px 16px 40px; }
    .section { margin-top: 30px; }
    .section-title { font-size: 20px; margin-bottom: 13px; }

    .resource-grid { gap: 10px; }
    .resource-card {
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr) auto;
        grid-template-areas:
            "icon title btn"
            "icon desc  btn"
            "icon meta  btn";
        align-items: center;
        column-gap: 12px;
        row-gap: 1px;
        padding: 12px 14px;
        border-radius: 12px;
    }
    .r-icon { grid-area: icon; width: 56px; height: 56px; margin: 0; border-radius: 14px; }
    .r-title {
        grid-area: title;
        margin: 0;
        font-size: 15px;
        line-height: 1.5;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .r-desc { grid-area: desc; margin: 0; font-size: 12px; line-height: 1.55; -webkit-line-clamp: 2; }
    .r-meta { grid-area: meta; margin: 2px 0 0; gap: 6px; }
    .r-badge { font-size: 11px; padding: 1px 8px; }
    .r-size { font-size: 11px; }
    .r-date { display: none; }
    .r-btn { grid-area: btn; align-self: center; padding: 7px 15px; font-size: 12px; }

    .detail-hero { padding: 22px 18px; margin-top: 18px; }
    .panel { padding: 20px 16px; }
    .detail-meta { gap: 8px 14px; }
    .dl-head { padding: 24px 16px 4px; }
    .dl-head h1 { font-size: 22px; }
    .dl-tools { padding: 0 16px; }
    .upload-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 360px) {
    .resource-card { grid-template-columns: 48px minmax(0, 1fr) auto; }
    .r-icon { width: 48px; height: 48px; }
    .upload-grid { grid-template-columns: repeat(3, 1fr); }
}

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

/* 图片防右键/防拖拽/防长按（仅降低普通用户误存，无法阻止截图或开发者工具） */
img {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}
