:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-light: #60a5fa;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e6edf7;
    --card: #ffffff;
    --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
    font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: #eef4ff;
    background-image:
        radial-gradient(900px 500px at 12% -8%, rgba(59, 130, 246, .28), transparent 60%),
        radial-gradient(800px 480px at 92% 4%, rgba(14, 165, 233, .22), transparent 62%),
        linear-gradient(180deg, #0b1e46 0%, #16336e 26%, #eef4ff 26%, #eef4ff 100%);
    min-height: 100vh;
    padding-bottom: 60px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }

/* ---------- 头部 ---------- */
.hero { padding: 46px 0 34px; color: #fff; }
.hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.logo {
    width: 40px; height: 40px; border-radius: 12px; flex: 0 0 40px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .45);
}
.logo svg { width: 22px; height: 22px; }
.hero-top .name { font-size: 16px; font-weight: 600; letter-spacing: .3px; opacity: .95; }
.hero h1 { font-size: 30px; line-height: 1.25; margin: 0 0 8px; font-weight: 700; letter-spacing: -.5px; }
.hero p { margin: 0; color: rgba(226, 236, 255, .78); font-size: 14px; }

/* ---------- 搜索 ---------- */
.searchbar { margin-top: 22px; display: flex; gap: 10px; max-width: 460px; }
.searchbar input {
    flex: 1; padding: 12px 16px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12); color: #fff; font-size: 14px; outline: none;
    backdrop-filter: blur(8px);
}
.searchbar input::placeholder { color: rgba(226, 236, 255, .6); }
.searchbar input:focus { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .18); }
.searchbar button {
    padding: 0 20px; border-radius: 11px; border: 0; cursor: pointer; font-size: 14px;
    background: #fff; color: var(--brand-dark); font-weight: 600;
}

/* ---------- 公告 ---------- */
.notice {
    background: #fff; border: 1px solid #dbe7fb; border-left: 4px solid var(--brand);
    border-radius: 12px; padding: 12px 16px; font-size: 13.5px; color: #33507d;
    margin: -8px 0 22px; white-space: pre-wrap;
}

/* ---------- 列表 ---------- */
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.list-head h2 { font-size: 16px; margin: 0; font-weight: 600; }
.list-head span { font-size: 12.5px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.file-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px; text-decoration: none; color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: 0 2px 6px rgba(16, 42, 90, .04);
}
.file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(16, 42, 90, .12);
    border-color: #c7ddfb;
}

.ficon {
    width: 50px; height: 50px; flex: 0 0 50px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; letter-spacing: .3px; color: #fff;
    text-transform: uppercase;
}
.ficon.img { background: linear-gradient(135deg, #f472b6, #db2777); }
.ficon.zip { background: linear-gradient(135deg, #fbbf24, #d97706); }
.ficon.doc { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.ficon.media { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.ficon.code { background: linear-gradient(135deg, #34d399, #059669); }
.ficon.app { background: linear-gradient(135deg, #94a3b8, #475569); }
.ficon.file { background: linear-gradient(135deg, #818cf8, #4f46e5); }

.fbody { min-width: 0; flex: 1; }
.fname {
    font-size: 14.5px; font-weight: 600; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all;
}
.fmeta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: #cbd5e1; }
.badge {
    font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: #eff6ff; color: var(--brand);
    border: 1px solid #dbeafe;
}
.badge.lock { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }

.farrow { color: #c3d3ea; flex: 0 0 auto; }

.empty {
    background: #fff; border: 1px dashed #cfdcef; border-radius: var(--radius);
    padding: 56px 20px; text-align: center; color: var(--muted); font-size: 14px;
}

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin: 28px 0 0; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 38px; height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #fff; border: 1px solid var(--line); color: #3b5578;
    text-decoration: none; font-size: 13.5px;
}
.pager .on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

/* ---------- 详情页 ---------- */
.detail {
    max-width: 560px; margin: 0 auto; background: #fff; border-radius: 20px;
    padding: 34px 30px 30px; box-shadow: 0 24px 60px rgba(11, 30, 70, .22);
    text-align: center;
}
.detail .bigicon {
    width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    font-size: 15px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.detail h1 { font-size: 19px; margin: 0 0 10px; word-break: break-all; line-height: 1.45; }
.metas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }

.pwd-box { margin: 0 0 18px; text-align: left; }
.pwd-box label { font-size: 12.5px; color: #475569; display: block; margin-bottom: 6px; }
.pwd-box input {
    width: 100%; padding: 12px 14px; border: 1px solid #dbe4f0; border-radius: 10px;
    font-size: 14px; outline: none; background: #fbfcfe;
}
.pwd-box input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.btn-main {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; border: 0; border-radius: 11px; cursor: pointer;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    font-size: 15px; font-weight: 600; text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .32);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-main:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(37, 99, 235, .4); }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
    background: none; border: 1px solid #dbe4f0; color: #475569;
    padding: 9px 18px; border-radius: 9px; font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { border-color: #b9cdea; color: var(--brand); }

.err-box {
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    padding: 10px 14px; border-radius: 9px; font-size: 13.5px; margin-bottom: 16px;
}
.hint { font-size: 12px; color: #94a3b8; margin-top: 16px; line-height: 1.7; }

.back { display: inline-block; margin-bottom: 16px; color: #fff; text-decoration: none; font-size: 13.5px; opacity: .8; }
.back:hover { opacity: 1; }

footer.site {
    text-align: center; color: #8fa4c2; font-size: 12.5px; margin-top: 44px; padding-top: 20px;
    border-top: 1px solid rgba(15, 42, 90, .08);
}

@media (max-width: 720px) {
    .grid { grid-template-columns: 1fr; }
    .hero { padding: 30px 0 26px; }
    .hero h1 { font-size: 23px; }
    .detail { padding: 26px 20px 24px; border-radius: 16px; }
    .searchbar { max-width: none; }
}

/* ---------- 合集（发布页）区块 ---------- */
.packs { margin-bottom: 30px; }
.packs .ficon.zip { background: linear-gradient(135deg, #38bdf8, #6366f1); }
