:root {
    /* —— 主题色通道（soso 固定蓝色系） —— */
    --pw-a-rgb: 37, 99, 235;
    --pw-a-deep-rgb: 29, 78, 216;
    --pw-a-mid-rgb: 59, 130, 246;
    --pw-a-light-rgb: 96, 165, 250;

    --pw-blue: rgb(var(--pw-a-rgb));
    --pw-blue-deep: rgb(var(--pw-a-deep-rgb));
    --pw-blue-soft: rgba(var(--pw-a-rgb), .12);
    --pw-sky: rgb(var(--pw-a-light-rgb));
    --pw-grad: linear-gradient(135deg, rgb(var(--pw-a-deep-rgb)) 0%, rgb(var(--pw-a-mid-rgb)) 55%, rgb(var(--pw-a-light-rgb)) 100%);

    /* —— 表面与文字色 —— */
    --pw-ink: #0f172a;
    --pw-gray: #64748b;
    --pw-mute: #94a3b8;
    --pw-line: #e2e8f0;
    --pw-bg: #f5f8fd;
    --pw-card: #ffffff;
    --pw-surface-2: #f8fafc;
    --pw-hover: #f1f5f9;
    --pw-topbar-bg: rgba(255, 255, 255, .86);
    --pw-glow: rgba(var(--pw-a-light-rgb), .18);
    --pw-veil: rgba(255, 255, 255, .68);

    /* —— 浅色悬停/信息底 + 错误语义色 —— */
    --pw-tint: #eff6ff;
    --pw-tint-2: #f8fbff;
    --pw-tint-3: #f5faff;
    --pw-danger: #dc2626;
    --pw-danger-text: #b91c1c;
    --pw-danger-line: #fca5a5;
    --pw-danger-bg: #fef2f2;
    --pw-danger-border: #fecaca;

    --pw-radius: 18px;
    --pw-shadow: 0 8px 30px rgba(var(--pw-a-rgb), .08);
    --pw-shadow-sm: 0 2px 10px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--pw-ink);
    background:
        radial-gradient(1200px 400px at 50% -120px, var(--pw-glow), transparent 70%),
        var(--pw-bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

[v-cloak] { display: none !important; }
.hidden { display: none !important; }

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }

.nav-item {
    flex-shrink: 0;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--pw-gray);
    background: var(--pw-surface-2);
    cursor: pointer;
    transition: all .2s;
    user-select: none;
}

.nav-item:hover { color: var(--pw-blue); background: var(--pw-blue-soft); }

.nav-item.nav-active {
    color: #fff;
    background: var(--pw-grad);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(var(--pw-a-rgb), .3);
}

/* 列表行 */
.resource-list ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; }

.resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    border-bottom: 1px dashed var(--pw-line);
    transition: background .15s;
}

.resource-item:hover { background: var(--pw-tint-2); border-radius: 8px; }

.number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--pw-mute);
}

.number-1 { background: linear-gradient(135deg, rgb(var(--pw-a-rgb)), rgb(var(--pw-a-deep-rgb))); }
.number-2 { background: linear-gradient(135deg, rgb(var(--pw-a-mid-rgb)), rgb(var(--pw-a-rgb))); }
.number-3 { background: linear-gradient(135deg, rgb(var(--pw-a-light-rgb)), rgb(var(--pw-a-mid-rgb))); }
.number-default { background: var(--pw-line); color: var(--pw-gray); }

.resource-item .title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    color: var(--pw-ink);
    transition: color .15s;
}

.resource-item .title:hover { color: var(--pw-blue); }

.resource-item .date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--pw-mute);
    background: var(--pw-surface-2);
    border-radius: 6px;
    padding: 2px 8px;
}

/* 图片模式（热搜榜单） */
.image-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.image-mode-grid .resource-item {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--pw-card);
    box-shadow: var(--pw-shadow-sm);
    transition: transform .2s, box-shadow .2s;
}

.image-mode-grid .resource-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(var(--pw-a-rgb), .16);
    background: var(--pw-card);
}

.resource-card-link { display: block; }

.resource-image-container {
    position: relative;
    aspect-ratio: 3 / 4;
    background: var(--pw-surface-2);
    overflow: hidden;
}

.resource-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder { position: absolute; inset: 0; }

.resource-number {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    border-radius: 9px;
}

.resource-content { padding: 10px 12px 12px; }

.resource-content .resource-title {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    color: var(--pw-mute);
}

.resource-ranking {
    color: var(--pw-blue);
    font-weight: 700;
    background: var(--pw-blue-soft);
    border-radius: 6px;
    padding: 1px 7px;
}

@keyframes pw-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.fade-in { animation: pw-fade-in .45s ease; }

.layerBox .vname {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.layerBox .vbtn {
    margin-top: 14px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--pw-grad);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.layerBox .vbtn:hover { box-shadow: 0 6px 16px rgba(var(--pw-a-rgb), .3); }

/* 返回顶部 */
.global-backtop {
    position: fixed;
    right: 24px;
    bottom: 84px;
    z-index: 800;
    width: 42px;
    height: 42px;
    border: 1px solid var(--pw-line);
    border-radius: 50%;
    background: var(--pw-card);
    color: var(--pw-blue);
    box-shadow: var(--pw-shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .9;
    transition: all .22s cubic-bezier(.34, 1.56, .64, 1);
}

.global-backtop:active { transform: translateY(-1px) scale(.94); }

/* 密码弹窗 */
.password-tips {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13.5px;
    color: var(--pw-gray);
    background: var(--pw-tint-2);
    border: 1px solid var(--pw-blue-soft);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.password-error { color: var(--pw-danger); font-size: 13px; margin-top: -6px; }

/* 资源弹窗：默认头部为空白占位（自定义 .tr-head 在 body 内），直接隐藏 */
.dialogUrlBox .el-dialog__header { display: none; }
.dialogUrlBox .el-dialog__body { padding: 0; }
.dialogUrlBox {
    max-width: 92vw;
    border-radius: 14px;
    border: 1px solid #e4e7ed;
    box-shadow: 0 16px 48px rgba(15, 23, 42, .2);
    overflow: hidden;
    animation: tr-fade-in .22s ease-out;
}

@keyframes tr-fade-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.tr-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 10px;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
    border-bottom: 1px solid #ebeef5;
}

.tr-head-titles { flex: 1; min-width: 0; }
.tr-title { margin: 0; font-size: 16px; font-weight: 600; color: #303133; }
.tr-sub { margin: 2px 0 0; font-size: 12px; font-weight: 400; color: #909399; line-height: 1.4; }

.tr-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #909399;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}

.tr-close:hover { background: #f5f7fa; color: #303133; }

.tr-body {
    padding: 6px 16px 16px;
    color: #606266;
    font-size: 14px;
    line-height: 1.6;
}

.tr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 20px 12px 24px;
}

/* 全局弹窗遮罩毛玻璃：覆盖 Element Plus 默认纯黑遮罩，所有 el-dialog 生效 */
.el-overlay {
    background: rgba(15, 23, 42, .35);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
}

/* 自定义轻提示 toast：深色胶囊、底部居中（footer-app.js showMessage） */
#ss-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 86vw;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(20, 21, 26, .92);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    z-index: 2147483001;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
}

#ss-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.tr-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    border: 3px solid #ebeef5;
    border-top-color: #409eff;
    border-radius: 50%;
    animation: tr-spin .85s linear infinite;
}

@keyframes tr-spin { to { transform: rotate(360deg); } }

.tr-loading-text { margin: 0 0 8px; font-size: 16px; font-weight: 500; color: #303133; }
.tr-loading-meta { margin: 0; font-size: 13px; color: #909399; }

.tr-panel { text-align: center; }

.tr-hero {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    margin-bottom: 10px;
}

.tr-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e8f4ff 0%, #ecf5ff 100%);
    box-shadow: 0 3px 10px rgba(64, 158, 255, .15);
    position: relative;
}

.tr-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 46%;
    width: 9px;
    height: 15px;
    margin-left: -3px;
    margin-top: -8px;
    border: solid #409eff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.tr-hero-text { flex: 1; min-width: 0; }
.tr-ok { margin: 0 0 2px; font-size: 17px; font-weight: 600; color: #303133; letter-spacing: .02em; }

.tr-name {
    margin: 0;
    font-size: 13px;
    color: #909399;
    line-height: 1.45;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tr-share { margin-bottom: 10px; text-align: left; }

.tr-url-card {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 10px;
    border-left: 3px solid #409eff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
}

.tr-url-label { display: block; margin-bottom: 4px; font-size: 12px; color: #909399; }

.tr-url-link {
    font-size: 14px;
    line-height: 1.45;
    color: #409eff;
    text-decoration: none;
    word-break: break-all;
}

.tr-url-link:hover { text-decoration: underline; }

.tr-pwd {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 8px 12px;
    background: #ecf5ff;
    border-radius: 8px;
}

.tr-pwd-label { font-size: 13px; color: #606266; }

.tr-pwd-value {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .15em;
    color: #409eff;
}

.tr-expiry { margin: 0; text-align: center; font-size: 11px; color: #909399; line-height: 1.45; }
.tr-expiry-icon { margin-right: 4px; }

.tr-qr {
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fa;
    border: 1px solid #ebeef5;
}

.tr-qr-lead { margin: 0 0 4px; font-size: 14px; font-weight: 500; color: #303133; }
.tr-qr-brand { color: #409eff; }
.tr-panel--quark .tr-qr-brand { color: #0066ff; }
.tr-panel--baidu .tr-qr-brand { color: #2932e1; }
.tr-panel--xunlei .tr-qr-brand { color: #3b82f6; }
.tr-qr-tips { margin: 0 0 8px; font-size: 12px; color: #909399; line-height: 1.45; }

.tr-qr-box {
    display: inline-block;
    min-width: 160px;
    min-height: 160px;
    box-sizing: border-box;
    padding: 6px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
    line-height: 0;
}

.tr-qr-box canvas {
    display: block;
    width: 148px !important;
    height: 148px !important;
}

/* 弹窗底部操作栏：复制链接 / 打开链接 / 关闭 */
.tr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0 16px 16px;
    margin-top: 2px;
}

.rdf-btn {
    flex: 1 1 auto;
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    background: #fff;
    color: #606266;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .2s, color .2s, background .2s;
}

.rdf-btn:hover { border-color: #409eff; color: #409eff; background: #ecf5ff; }

.rdf-btn.rdf-copy {
    border: none;
    background: linear-gradient(135deg, #409eff 0%, #337ecc 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(64, 158, 255, .28);
}

.rdf-btn.rdf-copy:hover {
    border: none;
    background: linear-gradient(135deg, #409eff 0%, #337ecc 100%);
    color: #fff;
    filter: brightness(1.05);
}

.resource-dialog-error {
    background: var(--pw-danger-bg);
    border: 1px solid var(--pw-danger-border);
    border-radius: 10px;
    padding: 12px 14px;
}

.resource-dialog-error-title { color: var(--pw-danger); font-weight: 700; font-size: 14px; }
.resource-dialog-error-text { color: var(--pw-danger-text); font-size: 13px; margin-top: 4px; }

/* 网盘目录树 */
.pan-tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 4px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.pan-tree-row:hover { background: var(--pw-tint); }
.pan-tree-toggle { width: 14px; font-size: 10px; color: var(--pw-mute); transition: transform .15s; }
.pan-tree-toggle.open { transform: rotate(90deg); }
.pan-tree-toggle.hidden { visibility: hidden; }
.pan-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pan-tree-size { flex-shrink: 0; font-size: 12px; color: var(--pw-mute); }

.ss-ann-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    box-sizing: border-box;
    padding: 16px;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
}

.ss-ann-sheet {
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 520px);
    max-width: calc(100vw - 32px);
    max-height: min(88vh, 640px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .22);
    animation: ss-ann-in .22s ease-out;
}

@keyframes ss-ann-in {
    from { transform: scale(.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ss-ann-head {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 24px 18px;
    background: linear-gradient(180deg, #e8f3ff, #f7fbff 45%, #fff);
    border-bottom: 1px solid #ebeef5;
}

.ss-ann-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 0 12px;
    border-radius: 50%;
    background: linear-gradient(145deg, #409eff, #2d7dd2);
    font-size: 26px;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(64, 158, 255, .35);
}

.ss-ann-title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    color: #303133;
}

.ss-ann-desc {
    margin: 8px 0 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #909399;
}

.ss-ann-body {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.75;
    color: #606266;
    text-align: left;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-height: min(50vh, 380px);
}

.ss-ann-body p { margin: 0 0 12px; }
.ss-ann-body p:last-child { margin-bottom: 0; }
.ss-ann-body strong, .ss-ann-body b { font-weight: 600; }
.ss-ann-body a { color: #409eff; text-decoration: underline; }
.ss-ann-body img { max-width: 100%; height: auto; border-radius: 8px; }
.ss-ann-body table { max-width: 100%; display: block; overflow-x: auto; }

.ss-ann-foot {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid #ebeef5;
    background: #fafbfc;
}

.ss-ann-btn-secondary,
.ss-ann-btn-primary {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    min-width: 88px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: all .2s;
}

.ss-ann-btn-secondary {
    border: 1px solid #dcdfe6;
    background: #fff;
    color: #606266;
}

.ss-ann-btn-secondary:hover { border-color: #c0c4cc; color: #303133; }

.ss-ann-btn-primary {
    border: none;
    background: linear-gradient(135deg, #409eff, #337ecc);
    color: #fff;
    box-shadow: 0 4px 12px rgba(64, 158, 255, .28);
}

.ss-ann-btn-primary:hover { filter: brightness(1.05); }

@media (max-width: 768px) {
    .ss-ann-modal { padding: 12px; }
    .ss-ann-sheet { width: 100%; max-width: 100%; max-height: min(92vh, 640px); }
    .ss-ann-body { padding: 14px 16px; font-size: 14px; line-height: 1.7; }
    .ss-ann-foot { flex-direction: column-reverse; align-items: stretch; padding: 12px 14px 14px; }
    .ss-ann-foot .ss-ann-btn-primary,
    .ss-ann-foot .ss-ann-btn-secondary { width: 100%; min-width: 0; }
}

@media screen and (max-width: 768px) {
    .resource-list ul { grid-template-columns: 1fr; }

    .global-backtop { right: 16px; bottom: 70px; }

    /* 转存结果弹窗：手机端收紧内容区与按钮栏的间距 */
    .tr-body { padding-bottom: 6px; }
    .tr-actions { margin-top: 0; }
}
