/* ==========================================================================
   share.css —— 文件分享（免登录下载区）· 镜音铃二次元风格
   配色：应援黄 #FFD93B / 樱花粉 #FF8FC0 / 瞳色青 #4FC3C7 / 奶油白 #FFFDF6
   壁纸：沿用站点默认镜音铃壁纸（横屏 bg1.webp / 竖屏 bg2.webp）
   ========================================================================== */

:root {
    color-scheme: light;
    --sh-gold:      #FFD93B;
    --sh-gold-deep: #B4800A;
    --sh-pink:      #FF8FC0;
    --sh-teal:      #4FC3C7;
    --sh-cream:     #FFFDF6;
    --sh-ink:       #4A3B27;
    --sh-ink-2:     #7A6852;
    --sh-ink-3:     #9A8B72;
    --sh-line:      #FFE9A8;
    --sh-glass:     rgba(255, 253, 246, .92);
    --sh-glass-2:   rgba(255, 253, 246, .76);
    --sh-radius:    20px;
    --sh-radius-sm: 12px;
    --sh-shadow:    0 10px 30px rgba(196, 154, 40, .18);
    --sh-focus:     #0F7A7E;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --sh-ink:       #F7EFDC;
        --sh-ink-2:     #D8CDB6;
        --sh-ink-3:     #AC9E86;
        --sh-line:      #6E5B3A;
        --sh-glass:     rgba(38, 34, 27, .92);
        --sh-glass-2:   rgba(48, 43, 34, .80);
        --sh-shadow:    0 12px 34px rgba(0, 0, 0, .38);
        --sh-focus:     #7FE3D6;
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
.pv-body, body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: var(--sh-ink);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-color: var(--sh-cream);
    background-image: url('/bg2.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
@media (min-aspect-ratio: 1/1) {
    body { background-image: url('/bg1.webp'); }
}
/* 奶油薄纱 + 星星点阵 */
body::before, body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
body::before {
    background:
        radial-gradient(1100px 560px at 12% -12%, rgba(255, 233, 150, .42), transparent 62%),
        radial-gradient(820px 480px at 96% 4%, rgba(255, 183, 214, .34), transparent 62%),
        linear-gradient(180deg, rgba(255, 253, 244, .52), rgba(255, 245, 214, .70));
}
body::after {
    opacity: .42;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.95) 1.5px, transparent 1.6px),
        radial-gradient(circle, rgba(255,217,59,.7) 1.2px, transparent 1.3px);
    background-size: 128px 128px, 196px 196px;
    background-position: 0 0, 64px 92px;
}
@media (prefers-color-scheme: dark) {
    body::before {
        background:
            radial-gradient(1000px 520px at 12% -12%, rgba(120, 88, 20, .24), transparent 62%),
            linear-gradient(180deg, rgba(20, 18, 14, .72), rgba(20, 18, 14, .88));
    }
    body::after { opacity: .22; }
}
body > * { position: relative; z-index: 1; }

:focus-visible { outline: 3px solid var(--sh-focus); outline-offset: 2px; }

.sh-wrap { max-width: 1000px; margin: 0 auto; padding: 18px 14px 30px; }

/* ---------------- 顶栏 ---------------- */
.sh-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 24px;
    margin-bottom: 16px;
    background: linear-gradient(140deg, var(--sh-gold) 0%, #FFC94D 58%, var(--sh-pink) 150%);
    border: 2px solid #FFFFFF;
    border-radius: 22px;
    box-shadow: 0 8px 22px rgba(245, 179, 1, .28);
}
.sh-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.sh-logo {
    flex: none;
    width: 52px; height: 52px;
    object-fit: contain;
    border-radius: 15px;
    background: rgba(255,255,255,.55);
}
.sh-brand-txt { min-width: 0; }
.sh-brand-txt h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #6B4E12;
    text-shadow: 0 1px 0 rgba(255,255,255,.55);
}
.sh-brand-txt p { margin: 2px 0 0; font-size: 12px; color: #8A6208; }
.sh-stat { display: flex; align-items: center; gap: 15px; flex: none; }
.sh-stat-cell { text-align: center; min-width: 56px; }
.sh-stat-cell b {
    display: block;
    font-size: 19px;
    line-height: 1.2;
    color: #6B4E12;
    font-weight: 800;
}
.sh-stat-cell span { font-size: 11px; color: #8A6208; }
.sh-stat-sep { width: 1px; height: 30px; background: rgba(107,78,18,.28); }

/* ---------------- 工具条 ---------------- */
.sh-toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.sh-search, .sh-sort {
    background: var(--sh-glass);
    border: 2px solid var(--sh-line);
    border-radius: 14px;
    box-shadow: var(--sh-shadow);
}
.sh-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
}
.sh-search > span { font-size: 15px; opacity: .8; }
.sh-search input {
    flex: 1; min-width: 0;
    border: 0; outline: 0;
    background: transparent;
    color: var(--sh-ink);
    font: inherit; font-size: 13.5px;
}
.sh-search input::placeholder { color: var(--sh-ink-3); }
.sh-search button {
    flex: none; border: 0; background: transparent;
    color: var(--sh-ink-3); font-size: 15px; cursor: pointer; padding: 4px;
}
.sh-sort {
    flex: none;
    display: flex; align-items: center; gap: 8px;
    height: 46px; padding: 0 12px;
    font-size: 12.5px; color: var(--sh-ink-3);
}
.sh-sort select {
    border: 0; outline: 0; background: transparent;
    color: var(--sh-ink); font: inherit; font-weight: 800; cursor: pointer;
}

/* ---------------- 分类 ---------------- */
.sh-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sh-cat {
    padding: 7px 14px;
    border: 2px solid var(--sh-line);
    border-radius: 999px;
    background: var(--sh-glass-2);
    color: var(--sh-ink-2);
    font: inherit; font-size: 12.5px; font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.sh-cat span { opacity: .62; font-weight: 700; margin-left: 3px; }
.sh-cat:hover { border-color: var(--sh-gold); color: var(--sh-ink); }
.sh-cat.on {
    background: linear-gradient(140deg, #FFE985, var(--sh-gold));
    border-color: #E9C84E;
    color: #5A3E00;
}

/* ---------------- 文件卡片 ---------------- */
.sh-list { display: flex; flex-direction: column; gap: 11px; }
.sh-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    background: var(--sh-glass);
    border: 2px solid var(--sh-line);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-shadow);
    backdrop-filter: blur(8px);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sh-card:hover {
    transform: translateY(-2px);
    border-color: var(--sh-gold);
    box-shadow: 0 6px 16px rgba(196, 154, 40, .22), 0 16px 38px rgba(196, 154, 40, .18);
}

/* 缩略图 / 文件图标 */
.sh-thumb {
    width: 62px; height: 62px;
    border-radius: 14px;
    overflow: hidden;
    display: grid; place-items: center;
    background: linear-gradient(140deg, #FFF6D6, #FFE9F3);
    border: 1px solid var(--sh-line);
}
.sh-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sh-file-ico {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    color: #8A6208; font-size: 11px; font-weight: 900; letter-spacing: .3px;
}
.sh-file-ico span { text-align: center; line-height: 1.1; word-break: break-all; }
.sh-ext-pdf   { background: #FDE8E6; color: #B0362C; }
.sh-ext-zip, .sh-ext-rar, .sh-ext-7z { background: #EFE7FB; color: #6C41A8; }
.sh-ext-doc, .sh-ext-docx, .sh-ext-xls, .sh-ext-xlsx, .sh-ext-ppt, .sh-ext-pptx {
    background: #E5EFFB; color: #22599A;
}
.sh-ext-mp3, .sh-ext-flac, .sh-ext-wav { background: #FFF0DE; color: #9C5B0F; }
.sh-ext-mp4, .sh-ext-mkv, .sh-ext-webm { background: #FCE7F0; color: #A12960; }
.sh-ext-exe, .sh-ext-msi, .sh-ext-apk { background: #E6F5E3; color: #356E29; }

.sh-body { min-width: 0; }
.sh-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--sh-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.sh-tag {
    flex: none;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(79,195,199,.14);
    border: 1px solid rgba(79,195,199,.4);
    color: #2A7A7E;
    font-size: 11px; font-weight: 800;
}
.sh-desc {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--sh-ink-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sh-meta {
    display: flex; align-items: center; gap: 7px;
    margin-top: 4px; font-size: 11.5px; color: var(--sh-ink-3);
}
.sh-dot { opacity: .5; }

.sh-acts { display: flex; gap: 7px; flex: none; }
.sh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    height: 36px; padding: 0 14px;
    border-radius: 999px;
    border: 2px solid var(--sh-line);
    background: var(--sh-glass-2);
    color: var(--sh-ink-2);
    font: inherit; font-size: 12.5px; font-weight: 800;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: filter .18s ease, transform .18s ease;
}
.sh-btn:hover { filter: brightness(1.04); }
.sh-btn:active { transform: scale(.97); }
.sh-btn-main {
    background: linear-gradient(140deg, #FFE985, var(--sh-gold));
    border-color: #E9C84E;
    color: #5A3E00;
}
.sh-btn-preview {
    background: linear-gradient(140deg, #D9FBFA, #B9EFF0);
    border-color: #7FD4D8;
    color: #22696D;
}
.sh-btn-copy { width: 38px; padding: 0; font-size: 14px; }

/* ---------------- 下载进度条 ---------------- */
.sh-dl {
    position: relative;
    overflow: hidden;
    min-width: 92px;
    flex-direction: column;
    gap: 2px;
    padding: 4px 12px 6px;
    height: auto;
    line-height: 1.15;
}
.sh-dl-label { white-space: nowrap; }
.sh-dl-bar {
    display: block;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(90, 62, 0, .16);
    overflow: hidden;
}
.sh-dl-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #7FD4D8, #4FC3C7);
    transition: width .12s linear;
}
.sh-dl-pct {
    display: none;
    font-size: 10px;
    font-weight: 700;
    color: #6B4A00;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.sh-dl.busy .sh-dl-pct,
.sh-dl.finished .sh-dl-pct,
.sh-dl.error .sh-dl-pct { display: block; }
.sh-dl.busy  .sh-dl-bar i { background: linear-gradient(90deg, #7FD4D8, #4FC3C7); }
.sh-dl.finished .sh-dl-bar i { background: linear-gradient(90deg, #8CE0B0, #4CAF7D); }
.sh-dl.error   .sh-dl-bar i { background: linear-gradient(90deg, #FFB3A7, #E5735F); }
.sh-dl.finished { border-color: #7FD4D8; }
.sh-dl.busy { cursor: progress; }

/* ---------------- 空状态 ---------------- */
.sh-empty, .sh-none {
    padding: 48px 20px;
    text-align: center;
    background: var(--sh-glass);
    border: 2px dashed var(--sh-line);
    border-radius: var(--sh-radius);
    color: var(--sh-ink-3);
}
.sh-empty-ico { font-size: 42px; opacity: .85; }
.sh-empty p { margin: 8px 0 2px; font-size: 15px; font-weight: 800; color: var(--sh-ink-2); }
.sh-none { margin-top: 12px; }

/* ---------------- 手机端 ---------------- */
@media (max-width: 720px) {
    .sh-wrap { padding: 10px 10px 24px; }
    .sh-head { padding: 14px 16px; align-items: flex-start; }
    .sh-logo { width: 44px; height: 44px; border-radius: 12px; }
    .sh-brand-txt h1 { font-size: 18px; }
    .sh-stat { gap: 10px; }
    .sh-stat-cell b { font-size: 16px; }
    .sh-toolbar { flex-wrap: wrap; }
    .sh-search { flex: 1 1 100%; }
    .sh-sort { flex: 1 1 100%; justify-content: space-between; }
    .sh-card {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 12px; padding: 13px;
    }
    .sh-thumb { width: 50px; height: 50px; border-radius: 11px; }
    .sh-acts { grid-column: 1 / -1; }
    .sh-btn-main { flex: 1; }
}

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