/* ===== 二梦资源社 · 全盘导航 · 视觉样式 ===== */
:root {
    --accent: #6a5cff;
    --accent2: #00c2ff;
    --bg: #f4f6fc;
    --card: #ffffff;
    --text: #1f2330;
    --muted: #8a90a2;
    --radius: 16px;
    --shadow-sm: 0 2px 10px rgba(31, 35, 48, .06);
    --shadow: 0 8px 26px rgba(31, 35, 48, .09);
    --shadow-lg: 0 18px 44px rgba(106, 92, 255, .24);
    --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    /* 极致清晰：字号、行高、字间距统一调优 */
    font-size: 15px;
    line-height: 1.65;
    letter-spacing: .2px;
    -webkit-font-smoothing: antialiased;
}

/* 全站默认过渡，操作行云流水 */
a, button, input, select, textarea, .card, .list-group-item, .badge {
    transition: all .22s var(--ease);
}

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky; top: 0; z-index: 60; margin-left: 224px;
    background: linear-gradient(120deg, #6a5cff, #00c2ff);
    box-shadow: 0 4px 22px rgba(106, 92, 255, .28);
    padding: .55rem 0;
    display: flex; align-items: center;
}
.topbar > * { margin-left: 8px; margin-right: 8px; }
.topbar .brand {
    color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .8px;
    text-decoration: none; white-space: nowrap;
}
.topbar .brand:hover { opacity: .9; }
/* 顶部居中的品牌字 */
.brand-center {
    position: absolute; left: 50%; top: 50%;
    transform: translate(calc(-50% - 112px), -50%);
    color: #fff; font-weight: 800; font-size: 1.18rem;
    letter-spacing: 2px; white-space: nowrap; pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
/* 右上角不显眼的齿轮（后台入口） */
.brand-gear {
    color: rgba(255, 255, 255, .55); font-size: 1.05rem; line-height: 1;
    text-decoration: none; transition: color .2s, transform .3s; flex: none;
    margin-left: 2px;
}
.brand-gear:hover { color: #fff; transform: rotate(60deg); }
/* 搜索框在桌面端自适应撑开，推到右侧 */
.search-wrap { flex: 0 1 auto; min-width: 0; margin-left: auto; }
/* 搜索图标：仅手机端显示，桌面端隐藏 */
.search-toggle { display: none; }
/* 汉堡按钮（手机显示） */
.menu-btn {
    display: none; width: 38px; height: 34px; line-height: 1;
    border: none; border-radius: 9px; background: rgba(255, 255, 255, .18);
    color: #fff; font-size: 1.15rem; cursor: pointer; flex: none;
}
.menu-btn:hover { background: rgba(255, 255, 255, .3); }

/* ---------- 左侧分类侧边栏 ---------- */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 224px; z-index: 70;
    background: #fff; border-right: 1px solid #eceefb;
    box-shadow: 2px 0 22px rgba(31, 35, 48, .06);
    display: flex; flex-direction: column;
    transition: transform .26s var(--ease);
}
.side-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.1rem .7rem;
    background: linear-gradient(120deg, #6a5cff, #00c2ff);
    color: #fff;
}
.side-title { font-weight: 700; letter-spacing: 1px; font-size: .95rem; }
.side-close {
    display: none; background: rgba(255, 255, 255, .2); border: none;
    color: #fff; width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
}
.side-nav { flex: 1; overflow-y: auto; padding: .6rem .55rem; }
.side-item {
    display: flex; align-items: center; gap: 10px;
    padding: .6rem .8rem; margin-bottom: 3px; border-radius: 11px;
    color: #4a4f60; text-decoration: none; font-weight: 600; font-size: .92rem;
    position: relative;
}
.side-item:hover { background: #f3f4fd; color: var(--accent); transform: translateX(2px); }
.side-item.active {
    background: linear-gradient(120deg, #6a5cff, #00c2ff); color: #fff;
    box-shadow: 0 6px 18px rgba(106, 92, 255, .3);
}
.side-ico { font-size: 1.05rem; font-style: normal; flex: none; }
.side-name { flex: 1; }
.side-num {
    font-size: .72rem; font-weight: 700; background: #eef0f8; color: #6b7080;
    border-radius: 999px; padding: 1px 8px; flex: none;
}
.side-item.active .side-num { background: rgba(255, 255, 255, .26); color: #fff; }
.side-foot {
    padding: .8rem 1rem; border-top: 1px solid #f1f2f7; text-align: center;
}
.side-foot a { color: var(--muted); font-size: .84rem; text-decoration: none; }
.side-foot a:hover { color: var(--accent); }
/* 主内容区（桌面给侧边栏让位） */
.content { margin-left: 224px; }
/* 手机遮罩 */
.side-mask {
    position: fixed; inset: 0; background: rgba(20, 22, 33, .45);
    z-index: 65; opacity: 0; pointer-events: none; transition: opacity .26s var(--ease);
}
.side-mask.show { opacity: 1; pointer-events: auto; }

/* ---------- 分类标签 ---------- */
.cat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.cat-pill {
    padding: .55rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
    background: #fff; color: var(--text); text-decoration: none;
    box-shadow: var(--shadow-sm); border: 1px solid rgba(106, 92, 255, .08);
}
.cat-pill:hover {
    transform: translateY(-3px); color: var(--accent);
    box-shadow: 0 8px 20px rgba(106, 92, 255, .18);
}
.cat-pill.active {
    background: linear-gradient(120deg, #6a5cff, #00c2ff); color: #fff;
    box-shadow: 0 8px 22px rgba(106, 92, 255, .38);
    transform: translateY(-2px);
}
.sub-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sub-pill {
    padding: .38rem .95rem; border-radius: 999px; font-size: .9rem;
    background: #eef0f8; color: #5b6070; text-decoration: none;
}
.sub-pill:hover { background: #e3e6f7; color: var(--accent); transform: translateY(-2px); }
.sub-pill.active {
    background: linear-gradient(120deg, #6a5cff, #00c2ff); color: #fff;
    box-shadow: 0 5px 14px rgba(106, 92, 255, .3);
}
.sub-row-3 .sub-pill.sm { padding: .3rem .8rem; font-size: .84rem; background: #f2f3f9; }

/* ---------- 影视 / 动漫：卡片模式（优化版） ---------- */
.res-card {
    border: none; border-radius: 14px; overflow: hidden; background: var(--card);
    box-shadow: 0 2px 12px rgba(31, 35, 48, .08);
    position: relative;
    transition: transform .35s cubic-bezier(.25, .46, .45, .94),
                box-shadow .35s cubic-bezier(.25, .46, .45, .94);
}
.res-card::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: 14px;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(106, 92, 255, 0), rgba(0, 194, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background .35s ease;
}
.res-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(106, 92, 255, .28),
                0 8px 20px rgba(31, 35, 48, .12);
}
.res-card:hover::after {
    background: linear-gradient(135deg, rgba(106, 92, 255, .6), rgba(0, 194, 255, .6));
}

/* 封面容器 */
.cover-wrap {
    position: relative; overflow: hidden;
    height: auto; aspect-ratio: 2 / 3;
    background: #eef0f7;
}
.card-cover {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .6s cubic-bezier(.25, .46, .45, .94), filter .3s ease;
}
.res-card:hover .card-cover {
    transform: scale(1.12);
    filter: brightness(1.05);
}

/* 封面底部渐变遮罩 —— 常驻，提升标题可读性 */
.cover-wrap::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 60%;
    background: linear-gradient(180deg,
        rgba(31, 35, 48, 0) 0%,
        rgba(31, 35, 48, .15) 40%,
        rgba(31, 35, 48, .7) 100%);
    pointer-events: none;
    transition: opacity .3s ease;
}
.res-card:hover .cover-wrap::after {
    opacity: .9;
}

/* 悬停遮罩 —— 播放按钮 + 查看详情 */
.cover-mask {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(106, 92, 255, .1) 0%, rgba(31, 35, 48, .6) 100%);
    opacity: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px;
    transition: opacity .35s ease;
    z-index: 5;
}
.res-card:hover .cover-mask { opacity: 1; }

/* 播放按钮 */
.play-btn {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    transform: scale(.6) translateY(10px);
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
    color: #6a5cff;
}
.res-card:hover .play-btn {
    transform: scale(1) translateY(0);
    transition-delay: .05s;
}
.play-btn:hover {
    background: #fff;
    transform: scale(1.1) !important;
}

/* 查看详情文字 */
.cover-mask .mask-text {
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(6px);
    transition: all .35s ease;
    transition-delay: .1s;
}
.res-card:hover .mask-text {
    opacity: .9;
    transform: translateY(0);
}

/* 自动占位封面 —— 更精致的渐变 + 装饰 */
.card-cover.ph {
    display: flex; flex-direction: column; gap: 8px;
    align-items: center; justify-content: center; color: #fff;
    font-weight: 800; letter-spacing: 2px; text-align: center; padding: 0 14px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    position: relative;
    overflow: hidden;
}
.card-cover.ph::before {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.25) 0%, transparent 50%);
    pointer-events: none;
}
.card-cover.ph::after {
    content: "";
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: .5;
    pointer-events: none;
}
.card-cover.ph .ph-text {
    font-size: 1.3rem;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}
.card-cover.ph .ph-sub {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: 3px;
    opacity: .75;
    text-shadow: none;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
}
.res-card:hover .card-cover.ph { transform: scale(1.05); }

/* 卡片角标容器 */
.card-badges {
    position: absolute; top: 8px; left: 8px; right: 8px;
    display: flex; justify-content: space-between; align-items: flex-start;
    z-index: 10;
    pointer-events: none;
}
.card-badges-left, .card-badges-right {
    display: flex; flex-direction: column; gap: 6px;
}
.card-badges-right { align-items: flex-end; }

/* 新片角标 */
.new-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(255, 71, 87, .4);
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 3px 10px rgba(255, 71, 87, .4); }
    50% { box-shadow: 0 3px 16px rgba(255, 71, 87, .6); }
}

/* HD/4K 画质角标 */
.quality-badge {
    background: rgba(20, 22, 33, .7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .15);
}

/* 卡片内容区 */
.card-body {
    padding: .6rem .7rem .65rem;
    position: relative;
    z-index: 2;
}
/* 片名：优化排版，最多两行 */
.card-title {
    font-size: .86rem;
    line-height: 1.4;
    margin: 0;
    font-weight: 600;
    color: var(--text);
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color .25s ease;
}
.res-card:hover .card-title {
    color: var(--accent);
}

/* 卡片副标题（年份/类型） */
.card-subtitle {
    font-size: .72rem;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.card-subtitle .dot {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--muted);
    opacity: .5;
}

/* 卡片底部信息行 */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f8;
}
.card-footer .pan-tag-sm {
    font-size: .64rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    color: #fff;
    letter-spacing: .3px;
}
.card-footer .more-icon {
    font-size: .75rem;
    color: var(--muted);
    opacity: .7;
    transition: all .25s ease;
}
.res-card:hover .more-icon {
    opacity: 1;
    color: var(--accent);
    transform: translateX(2px);
}

/* 提取码小标签 */
.code-chip {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 10;
    background: rgba(20, 22, 33, .7);
    color: #fff;
    backdrop-filter: blur(4px);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 3px 8px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, .12);
}
.code-chip b { color: #ffe27a; }
.card-code b { color: var(--accent); letter-spacing: .5px; }

/* 卡片入场动画 */
.res-item {
    animation: cardFadeIn .5s ease backwards;
}
.res-item:nth-child(1) { animation-delay: .02s; }
.res-item:nth-child(2) { animation-delay: .06s; }
.res-item:nth-child(3) { animation-delay: .10s; }
.res-item:nth-child(4) { animation-delay: .14s; }
.res-item:nth-child(5) { animation-delay: .18s; }
.res-item:nth-child(6) { animation-delay: .22s; }
.res-item:nth-child(7) { animation-delay: .26s; }
.res-item:nth-child(8) { animation-delay: .30s; }
.res-item:nth-child(9) { animation-delay: .34s; }
.res-item:nth-child(10) { animation-delay: .38s; }
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- 网盘标识 ---------- */
.pan-tag {
    position: absolute; top: 8px; left: 8px; z-index: 3;
    color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .5px;
    padding: 3px 9px; border-radius: 7px;
    box-shadow: 0 4px 12px rgba(31, 35, 48, .25);
    backdrop-filter: blur(4px);
}
.pan-tag i {
    font-style: normal; opacity: .85; margin-left: 2px;
    background: rgba(255, 255, 255, .25); border-radius: 4px; padding: 0 3px;
}
/* 多网盘来源：一排彩色网盘按钮 */
.pan-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pan-btn {
    flex: 1 1 auto; min-width: 62px;
    color: #fff; font-size: .78rem; font-weight: 700; text-align: center;
    padding: .42rem .5rem; border-radius: 9px; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    box-shadow: 0 4px 12px rgba(31, 35, 48, .16);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s;
    white-space: nowrap;
}
.pan-btn em {
    font-style: normal; font-size: .66rem; font-weight: 600;
    background: rgba(255, 255, 255, .22); border-radius: 4px; padding: 1px 4px;
}
.pan-btn:hover {
    color: #fff; transform: translateY(-2px); filter: brightness(1.08);
    box-shadow: 0 8px 20px rgba(31, 35, 48, .24);
}
.pan-btn:active { transform: translateY(0); }
.pan-btn.sm {
    flex: 0 0 auto; min-width: 0; font-size: .72rem;
    padding: .3rem .6rem; border-radius: 7px; box-shadow: none;
}
.pan-btn.sm:hover { box-shadow: 0 5px 14px rgba(31, 35, 48, .22); }
/* 网盘筛选行 */
.pan-row { align-items: center; flex-wrap: wrap; }
.pan-label {
    font-size: .78rem; font-weight: 700; color: var(--muted);
    margin-right: 2px; letter-spacing: 1px;
}
.pan-pill { display: inline-flex; align-items: center; gap: 5px; }
.pan-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none;
}
.sub-pill.active .pan-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
/* 后台网盘分布 */
.pan-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pan-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f6f7fd; border: 1px solid #eceefb;
    padding: 7px 13px; border-radius: 999px; font-size: .84rem; font-weight: 600;
}
/* 后台：资源条目下的网盘来源小标签 */
.pan-mini {
    display: inline-flex; align-items: center; gap: 4px;
    color: #fff; font-size: .72rem; font-weight: 600;
    padding: 3px 6px 3px 9px; border-radius: 7px;
}
.pan-mini .x {
    background: rgba(255, 255, 255, .22); border: none; color: #fff;
    width: 16px; height: 16px; line-height: 1; border-radius: 50%;
    font-size: .8rem; cursor: pointer; padding: 0; opacity: .85;
}
.pan-mini .x:hover { background: rgba(255, 255, 255, .45); opacity: 1; }

.pan-chip b { color: var(--accent); font-size: .95rem; }
.pan-chip em { font-style: normal; font-size: .72rem; color: var(--muted); font-weight: 500; }

.card-body { padding: .42rem .55rem .48rem; }
/* 片名：允许换行完整显示，最多两行 */
.card-title {
    font-size: .88rem; line-height: 1.35; margin: 0; font-weight: 600; color: var(--text);
    white-space: normal; overflow: hidden; text-overflow: clip;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
/* 提取码小标签：绝对定位在封面底部，不增加卡片高度 */
.code-chip {
    position: absolute; right: 6px; bottom: 6px; z-index: 3;
    background: rgba(20, 22, 33, .62); color: #fff; backdrop-filter: blur(2px);
    font-size: .62rem; font-weight: 600; letter-spacing: .5px;
    padding: 2px 7px; border-radius: 7px;
}
.code-chip b { color: #ffe27a; }
.card-code b { color: var(--accent); letter-spacing: .5px; }
.btn-go {
    background: linear-gradient(120deg, #6a5cff, #00c2ff); border: none; color: #fff;
    border-radius: 10px; font-weight: 600; font-size: .86rem; padding: .5rem 0;
    box-shadow: 0 4px 12px rgba(106, 92, 255, .25);
}
.btn-go:hover {
    color: #fff; transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(106, 92, 255, .38);
    filter: brightness(1.05);
}
.btn-go:active { transform: translateY(0); }

/* ---------- 资料 / 瑜伽：列表模式 ---------- */
.list-clean {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); background: #fff;
}
.li-res {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; border: none; border-bottom: 1px solid #f1f2f7;
    padding: .85rem 1.1rem; position: relative; background: transparent;
    color: var(--text); transition: background .2s, padding-left .2s;
}
.li-res:last-child { border-bottom: none; }
.li-info { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; overflow: hidden; }
.li-info .fw-medium {
    min-width: 0; flex: 1; line-height: 1.45;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden;
}
.li-res .pan-tag.sm { flex: none; position: static; top: auto; left: auto; }
/* 悬停：左侧色条 + 背景微亮 */
.li-res::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #6a5cff, #00c2ff);
    transform: scaleY(0); transform-origin: center;
}
.li-res:hover { background: #fafbff; padding-left: 1.35rem; }
.li-res:hover::before { transform: scaleY(1); }
.badge.bg-soft {
    background: #eef0fb; color: var(--accent);
    font-weight: 600; font-size: .76rem; padding: .35em .7em; border-radius: 7px;
}
.list-clean .fw-medium { font-weight: 600; font-size: .95rem; }

/* ---------- 求片留言区 ---------- */
.wish-card {
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.wish-head {
    padding: .8rem 1.15rem; font-weight: 700; font-size: .95rem; color: #fff;
    background: linear-gradient(120deg, #6a5cff, #00c2ff);
}
.wish-body { padding: 1.1rem; }
.wish-tip { font-size: .86rem; color: #5b6070; margin-bottom: .9rem; }
.wish-list .list-group-item { border-color: #f1f2f7; padding: .8rem 1.15rem; }
.wish-list .list-group-item:hover { background: #fafbff; }
.wish-name { font-size: .9rem; }
.wish-text { font-size: .92rem; margin-top: .3rem; color: var(--text); }
.wish-reply {
    margin-top: .4rem; font-size: .82rem; color: #0a7a5a;
    background: #eafaf4; border-radius: 8px; padding: .35rem .6rem;
}
.wish-status {
    font-size: .68rem; font-weight: 700; border-radius: 6px;
    padding: 1px 7px; margin-left: 6px; vertical-align: middle;
}
.st-wait { background: #fff2e0; color: #b26a00; }
.st-done { background: #e6f7ef; color: #0a7a5a; }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 66px 0; color: var(--muted); }
.empty-state .empty-emoji { font-size: 3.2rem; margin-bottom: .6rem; }

/* ---------- 分页（可折叠） ---------- */
.pager {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px; margin-top: 1.6rem;
}
.pager-bar {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; width: 100%;
}
.pager .pg-info {
    width: 100%; text-align: center;
    color: var(--muted); font-size: .82rem;
    margin: 0;
}
.pg-main {
    display: flex; align-items: center; gap: 6px;
}
.pg-btn {
    min-width: 38px; text-align: center; padding: 7px 11px; border-radius: 10px;
    font-size: .88rem; font-weight: 600; text-decoration: none; color: #4a4f60;
    background: #fff; border: 1px solid #e6e8f2; transition: all .2s ease;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.pg-btn:hover:not(.disabled):not(.active) {
    border-color: #6a5cff; color: #6a5cff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(106, 92, 255, .2);
}
.pg-btn:active:not(.disabled):not(.active) {
    transform: translateY(0);
}
.pg-btn.active {
    background: linear-gradient(120deg, #6a5cff, #00c2ff); color: #fff; border-color: transparent;
}
.pg-btn.disabled { opacity: .45; pointer-events: none; cursor: not-allowed; }

/* 切换按钮（展开/收起页码） */
.pg-toggle {
    min-width: 100px;
    gap: 6px;
    background: linear-gradient(135deg, #f5f3ff, #eefaff);
    border-color: #d9d2ff;
    color: #6a5cff;
    font-weight: 700;
}
.pg-toggle:hover:not(.disabled) {
    background: linear-gradient(135deg, #ece8ff, #e0f4ff);
    border-color: #6a5cff;
    color: #6a5cff;
}
.pg-toggle-icon {
    font-size: .7rem;
    transition: transform .3s ease;
    display: inline-block;
}
.pg-toggle[aria-expanded="true"] .pg-toggle-icon {
    transform: rotate(180deg);
}

/* 展开的页码区域 */
.pg-pages {
    width: 100%;
    overflow: hidden;
    animation: pgFadeIn .3s ease;
}
.pg-pages[hidden] {
    display: none;
}
@keyframes pgFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}
.pg-pages-inner {
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: 5px;
    padding: 12px;
    background: #fafbff;
    border-radius: 14px;
    border: 1px solid #ececf5;
}
.pg-pages-inner .pg-btn {
    min-width: 34px;
    padding: 5px 8px;
    font-size: .82rem;
    border-radius: 8px;
    background: #fff;
}

/* 触屏设备：分页横向滚动 */
@media (hover: none) {
    .pg-pages-inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        scroll-snap-type: x proximity;
    }
    .pg-pages-inner::-webkit-scrollbar { display: none; }
    .pg-pages-inner .pg-btn {
        flex: 0 0 auto;
        scroll-snap-align: center;
    }
}

/* ---------- 后台 ---------- */
.admin-card { border-radius: var(--radius); box-shadow: var(--shadow); border: none; overflow: hidden; }
.admin-card .card-header {
    background: linear-gradient(120deg, #6a5cff, #00c2ff); color: #fff;
    border: none; font-weight: 600; font-size: .95rem; padding: .75rem 1.1rem;
}
.form-label { font-weight: 600; font-size: .88rem; color: #4a4f60; }
.form-control, .form-select {
    border-radius: 10px; border: 1px solid #e6e8f2; padding: .55rem .8rem; font-size: .92rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(106, 92, 255, .14);
}
.btn { border-radius: 10px; font-weight: 600; }
.btn:hover { transform: translateY(-1px); }

/* 数据总览：统计卡 */
.stat-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 1.05rem 1.15rem;
    box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 46px; height: 46px; border-radius: 13px; flex: none;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    box-shadow: 0 6px 16px rgba(31, 35, 48, .12);
}
.stat-num { font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.stat-label { font-size: .82rem; color: var(--muted); font-weight: 600; }

/* 分类统计条 */
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-name { width: 92px; flex: none; font-size: .86rem; font-weight: 600; }
.bar-name em {
    font-style: normal; font-size: .68rem; color: var(--muted);
    font-weight: 500; margin-left: 4px;
}
.bar-track {
    flex: 1; height: 12px; background: #f0f1f7;
    border-radius: 999px; overflow: hidden;
}
.bar-fill {
    height: 100%; border-radius: 999px; min-width: 3px;
    animation: barIn .7s var(--ease);
}
@keyframes barIn { from { width: 0 !important; } }
.bar-val { width: 30px; text-align: right; font-weight: 700; font-size: .88rem; color: var(--accent); }

/* 最新动态 */
.feed .list-group-item { padding: .7rem 1.1rem; }
.feed .list-group-item:hover { background: #fafbff; }
.feed-title {
    font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; max-width: 78%;
}
.feed-path { font-size: .74rem; color: var(--muted); }

/* ==========================================================================
   移动端适配：字体 / 图片整体收紧，触屏更好点
   ========================================================================== */

/* ---------- 安全区域适配（刘海屏 / 灵动岛 / 底部横条） ---------- */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* ---------- 触屏：优化点击反馈 ---------- */
@media (hover: none) {
    .res-card:active {
        transform: scale(.96);
        transition: transform .15s ease;
    }
    .res-card:hover .card-cover,
    .res-card:hover .card-cover.ph { transform: none; }
    .cat-pill:active, .sub-pill:active, .stat-card:active, .btn:active {
        transform: scale(.96);
    }
    .list-clean .list-group-item:active { padding-left: 1.2rem; }
    .cover-mask { display: none; }
    /* 移除悬停发光边框，改用点击缩放反馈 */
    .res-card:hover::after { background: none; }
    .res-card:hover {
        transform: none;
        box-shadow: 0 2px 12px rgba(31, 35, 48, .08);
    }
}
a, button, .cat-pill, .sub-pill, .pan-btn, .res-card { -webkit-tap-highlight-color: transparent; }

/* ---------- 底部导航栏（仅移动端显示） ---------- */
.bottom-nav {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0, 0, 0, .06);
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    transition: transform .3s ease;
}
.bottom-nav.hidden {
    transform: translateY(100%);
}
.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 58px;
    max-width: 600px;
    margin: 0 auto;
}
.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    color: var(--muted);
    text-decoration: none;
    font-size: .62rem;
    font-weight: 600;
    transition: color .2s ease, transform .15s ease;
    position: relative;
}
.bnav-item:active {
    transform: scale(.92);
}
.bnav-item.active {
    color: var(--accent);
}
.bnav-icon {
    font-size: 1.2rem;
    line-height: 1;
}
.bnav-item.active .bnav-icon {
    transform: translateY(-1px);
}
/* 中间凸起按钮 */
.bnav-center {
    position: relative;
}
.bnav-center .bnav-fab {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 6px 16px rgba(106, 92, 255, .4);
    transition: transform .15s ease, box-shadow .2s ease;
}
.bnav-center .bnav-fab:active {
    transform: translateX(-50%) scale(.92);
    box-shadow: 0 3px 10px rgba(106, 92, 255, .3);
}
.bnav-center .bnav-label {
    margin-top: 32px;
}

/* ---------- 平板 ---------- */
/* ---------- 手机 / 平板：侧边栏收起，汉堡展开 ---------- */
@media (max-width: 992px) {
    .search-wrap { max-width: none; }
    .cover-wrap { height: auto; aspect-ratio: 3 / 4; }
    /* 侧边栏默认隐藏 */
    .topbar { margin-left: 0; padding: .5rem 0; flex-wrap: wrap; }
    .topbar > * { margin-left: 6px; margin-right: 6px; }
    .menu-btn { display: block; }
    .sidebar { transform: translateX(-100%); width: 252px; box-shadow: 6px 0 30px rgba(31, 35, 48, .2); }
    .sidebar.open { transform: translateX(0); }
    .side-close { display: block; }
    .content { margin-left: 0; }
    .topbar .brand { font-size: 1rem; }
    .brand-center { position: static; flex: 1 1 auto; transform: none; text-align: center; z-index: auto; font-size: 1rem; letter-spacing: 1px; }
    /* 手机端：搜索框收起为图标，顶栏只占一行 */
    .search-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 34px; height: 34px; border: none; border-radius: 9px;
        background: rgba(255, 255, 255, .18); color: #fff; font-size: 1rem;
        cursor: pointer; flex: none;
    }
    .search-toggle:active { background: rgba(255, 255, 255, .32); }
    .brand-gear { margin-left: auto; }
    .search-wrap { display: none; flex: 1 1 100%; max-width: 100%; order: 5; margin: 6px 0 0; }
    .search-wrap.show { display: block; }
    .search-wrap .form-control { padding: .45rem 1rem; font-size: .88rem; }
}

/* ---------- 手机 ---------- */
@media (max-width: 768px) {
    body { font-size: 14px; line-height: 1.6; }
    .container, .navbar > .container { padding-left: 12px; padding-right: 12px; }
    main.container { margin-top: .8rem !important; margin-bottom: calc(80px + var(--safe-bottom)) !important; }

    /* 顶栏适配安全区域 */
    .topbar {
        padding-top: calc(.5rem + var(--safe-top)) !important;
        padding-left: calc(.5rem + var(--safe-left)) !important;
        padding-right: calc(.5rem + var(--safe-right)) !important;
    }

    /* 导航：品牌一行，搜索框独占第二行 */
    .main-nav { padding: .5rem 0; }
    .main-nav > .container { flex-wrap: wrap; row-gap: 8px; }
    .main-nav .navbar-brand { font-size: 1rem; letter-spacing: .3px; }
    .search-wrap { order: 3; flex: 1 1 100%; max-width: 100%; margin: 2px 0 0; }
    .search-wrap .form-control { padding: .45rem 1rem; font-size: .88rem; }
    .main-nav .btn { padding: .3rem .7rem; font-size: .78rem; margin-left: auto !important; }

    /* 分类行：改为横向滑动，不占多行 */
    .cat-row, .sub-row, .pan-row {
        flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
        scrollbar-width: none; padding-bottom: 2px;
        scroll-snap-type: x proximity;
    }
    .cat-row::-webkit-scrollbar, .sub-row::-webkit-scrollbar,
    .pan-row::-webkit-scrollbar { display: none; }
    .cat-pill, .sub-pill, .pan-pill, .pan-label {
        flex: 0 0 auto; white-space: nowrap;
        scroll-snap-align: start;
    }
    .cat-pill { padding: .48rem 1.1rem; font-size: .86rem; min-height: 36px; }
    .sub-pill { padding: .34rem .85rem; font-size: .8rem; min-height: 30px; }
    .sub-row-3 .sub-pill.sm { padding: .3rem .75rem; font-size: .76rem; }
    .cat-row { gap: 8px; margin-bottom: 10px; }
    .sub-row { gap: 6px; margin-bottom: 9px; }
    /* 分类行两端留白提示可滑动 */
    .cat-row::before, .sub-row::before,
    .cat-row::after, .sub-row::after {
        content: ""; flex: 0 0 4px;
    }

    /* 卡片：一行 3 个，封面竖版海报比例，整体更紧凑 */
    .res-card { border-radius: 11px; }
    .cover-wrap { height: auto; aspect-ratio: 2 / 3; }
    .cover-wrap .card-cover, .cover-wrap .card-cover.ph { height: 100%; width: 100%; }
    .card-cover.ph .ph-text { font-size: .95rem; letter-spacing: .5px; }
    .card-cover.ph .ph-sub { font-size: .55rem; letter-spacing: 1.5px; }
    .card-body { padding: .4rem .48rem .48rem; }
    /* 片名：允许换行完整显示，最多两行（与参考布局一致） */
    .card-title {
        font-size: .74rem; line-height: 1.32; margin: 0; font-weight: 600;
        white-space: normal; overflow: hidden; text-overflow: clip;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
        min-height: 1.98rem;
    }
    .card-code { font-size: .7rem; padding: .25rem .45rem; margin-bottom: .45rem; gap: 2px 8px; }
    /* 卡片网格：手机端 3 列，缩小子项间距以控制封面宽度 */
    .row-cols-3 { --bs-gutter-x: .5rem; --bs-gutter-y: .55rem; }
    .row-cols-3 > * > .res-card { margin: 0; }
    .btn-go { font-size: .8rem; padding: .42rem 0; border-radius: 9px; }
    .pan-tag { font-size: .64rem; padding: 2px 7px; top: 6px; left: 6px; }
    .pan-btns { gap: 5px; }
    .pan-btn { font-size: .72rem; padding: .36rem .35rem; min-width: 50px; border-radius: 8px; min-height: 36px; }
    .pan-btn em { font-size: .6rem; padding: 0 3px; }

    /* 卡片底部信息 */
    .card-subtitle {
        font-size: .64rem;
        margin-top: 3px;
    }
    .card-footer {
        margin-top: 6px;
        padding-top: 6px;
    }
    .card-footer .pan-tag-sm {
        font-size: .6rem;
        padding: 2px 6px;
        border-radius: 4px;
    }
    .card-footer .more-icon {
        font-size: .7rem;
    }

    /* 列表模式：路径 + 标题在左，夸克标签在最右 */
    .li-res { padding: .68rem .85rem; gap: 8px; min-height: 54px; }
    .li-res .fw-medium { font-size: .88rem; line-height: 1.45; }
    .pan-tag.sm { font-size: .64rem; padding: 2px 7px; }

    .empty-state { padding: 42px 0; }
    .empty-state .empty-emoji { font-size: 2.4rem; }

    /* 分页：移动端优化 */
    .pager { margin-top: 1rem; gap: 8px; }
    .pg-btn {
        min-width: 36px;
        min-height: 38px;
        padding: 6px 10px;
        font-size: .82rem;
        border-radius: 9px;
    }
    .pg-toggle {
        min-width: 90px;
        font-size: .8rem;
    }
    .pg-pages-inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        padding: 10px;
        gap: 6px;
    }
    .pg-pages-inner::-webkit-scrollbar { display: none; }
    .pg-pages-inner .pg-btn {
        flex: 0 0 auto;
        min-width: 38px;
        min-height: 38px;
    }

    /* 底部导航栏显示 */
    .bottom-nav { display: block; }

    /* 详情页底部按钮优化 */
    .pan-btns .btn {
        min-height: 44px;
        font-size: .88rem;
    }

    /* 后台 */
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: .8rem .85rem; gap: 10px; border-radius: 13px; min-height: 78px; }
    .stat-icon { width: 38px; height: 38px; border-radius: 11px; font-size: 1.05rem; }
    .stat-num { font-size: 1.35rem; }
    .stat-label { font-size: .74rem; }
    .admin-card .card-header { font-size: .88rem; padding: .65rem .9rem; }
    .form-label { font-size: .82rem; }
    .form-control, .form-select { font-size: .88rem; padding: .6rem .7rem; border-radius: 9px; min-height: 42px; }
    .bar-name { width: 72px; font-size: .8rem; }
    .bar-name em { display: none; }
    .pan-chip { font-size: .76rem; padding: 5px 10px; min-height: 32px; }
    .pan-mini { font-size: .68rem; padding: 2px 5px 2px 7px; }
    .feed-title { max-width: 100%; font-size: .84rem; }
    .feed .list-group-item { padding: .65rem .9rem; min-height: 52px; }

    /* 角标移动端优化 */
    .new-badge { font-size: .58rem; padding: 2px 6px; }
    .quality-badge { font-size: .56rem; padding: 2px 6px; }
    .rate-badge { font-size: .62rem; padding: 2px 6px; }
    .code-chip { font-size: .58rem; padding: 2px 7px; }
    .card-badges { top: 6px; left: 6px; right: 6px; }

    /* 搜索结果提示 */
    .page-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    .page-title { font-size: 1rem; }
    .breadcrumb { font-size: .78rem; }

    /* 详情页：图片自适应 */
    .detail-cover {
        max-width: 140px;
    }
    .detail-info h2 { font-size: 1.1rem; }
    .detail-meta { font-size: .82rem; }
    .detail-desc { font-size: .88rem; line-height: 1.7; }
}

/* ---------- 大屏：6 列卡片 ---------- */
@media (min-width: 1200px) {
    .row-cols-xl-6 > * {
        flex: 0 0 auto;
        width: 16.66666667%;
    }
    .g-lg-4 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
}

/* ---------- 小屏手机 ---------- */
@media (max-width: 400px) {
    body { font-size: 13px; }
    .cover-wrap { aspect-ratio: 2 / 3; }   /* 竖版海报，保持一行 3 个 */
    .card-title { font-size: .7rem; min-height: 1.85rem; }
    .card-subtitle { font-size: .6rem; margin-top: 2px; }
    .card-footer { margin-top: 5px; padding-top: 5px; }
    .card-footer .pan-tag-sm { font-size: .56rem; padding: 2px 5px; }
    .play-btn { width: 42px; height: 42px; font-size: 1rem; }
    .pan-btn { min-width: 42px; font-size: .68rem; min-height: 34px; }
    .stat-grid { gap: 8px; }
    .stat-num { font-size: 1.15rem; }
    .row-cols-3 > * { flex: 0 0 auto; width: 33.3333%; }   /* 小屏同样一行 3 个 */
    .new-badge { font-size: .52rem; padding: 1px 5px; }
    .quality-badge { font-size: .5rem; padding: 1px 4px; }
    .rate-badge { font-size: .58rem; padding: 1px 5px; }
    .code-chip { font-size: .54rem; padding: 2px 6px; bottom: 5px; right: 5px; }
    .bottom-nav-inner { height: 54px; }
    .bnav-item { font-size: .58rem; }
    .bnav-icon { font-size: 1.1rem; }
    .bnav-center .bnav-fab { width: 46px; height: 46px; font-size: 1.2rem; top: -16px; }
    .bnav-center .bnav-label { margin-top: 28px; }
}

/* ---------- 横屏手机适配 ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .bottom-nav { display: none; }
    main.container { margin-bottom: 1.5rem !important; }
}

/* ---------- 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    .res-card, .card-cover, .cover-mask, .play-btn, .mask-text,
    .cat-pill, .sub-pill, .btn, .res-item {
        transition: none !important;
        animation: none !important;
    }
    .res-item { animation: none !important; opacity: 1 !important; transform: none !important; }
    .new-badge { animation: none !important; }
}

/* ---------- 深色模式支持 ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141620;
        --card: #1e2030;
        --text: #e4e6ef;
        --muted: #8b8fa3;
        --border: #2a2d40;
    }
    body { background: var(--bg); color: var(--text); }
    .bottom-nav {
        background: rgba(20, 22, 32, .92);
        border-top-color: rgba(255, 255, 255, .06);
    }
    .res-card { background: var(--card); }
    .card-footer { border-top-color: rgba(255, 255, 255, .06); }
    .cover-wrap { background: #2a2d40; }
    .form-control, .form-select {
        background: #2a2d40;
        border-color: var(--border);
        color: var(--text);
    }
    .list-group-item {
        background: var(--card);
        border-color: var(--border);
        color: var(--text);
    }
    .cat-pill {
        background: var(--card);
        border-color: var(--border);
        color: var(--text);
    }
    .cat-pill.active {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
    }
    .sub-pill {
        background: var(--card);
        border-color: var(--border);
        color: var(--muted);
    }
    .sub-pill.active { color: var(--accent); border-color: var(--accent); }
    .pagination .page-link {
        background: var(--card);
        border-color: var(--border);
        color: var(--text);
    }
    .pagination .page-item.active .page-link {
        background: var(--accent);
        border-color: var(--accent);
    }
}

/* ---------- 主页公告 / 社群入口 ---------- */
.site-announce {
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(120deg, #fff7e6, #ffe9c7);
    color: #8a5a00; border: 1px solid #ffd591; border-radius: 12px;
    padding: .6rem .9rem; margin-bottom: 1rem; font-size: .92rem;
}
.site-announce .ann-text { flex: 1; }
.site-announce .ann-close {
    border: none; background: transparent; color: #b5791a;
    font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 4px;
}
.site-announce .ann-close:hover { color: #8a5a00; }

.site-groups { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2rem; }
.group-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: .55rem 1.1rem; border-radius: 999px; text-decoration: none;
    font-weight: 700; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.group-btn.qq { background: linear-gradient(120deg, #12b7f5, #0a8fd0); }
.group-btn.quark { background: linear-gradient(120deg, #6a5cff, #00c2ff); }
.group-btn:hover { opacity: .92; color: #fff; }

/* 侧边栏里的社群入口（放在分类栏目最下面） */
.side-item.social-item {
    margin-top: 6px; padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

/* 后台全站资源搜索结果 */
.gs-item { padding: .5rem .65rem; border-bottom: 1px solid #f1f2f7; }
.gs-item:last-child { border-bottom: none; }
.gs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gs-info { min-width: 0; flex: 1; }
.gs-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.gs-move { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed #eef0f8; }
.gs-move .form-select-sm { width: auto; min-width: 120px; }
.gs-title { font-weight: 600; font-size: .9rem; line-height: 1.3; }

/* ===== 后台"已有资源"按栏目分组 ===== */
.res-group { padding: .25rem .25rem 0; border-bottom: 1px solid #f1f2f7; }
.res-group:last-child { border-bottom: none; }
.res-group-head {
    display: flex; align-items: center; gap: 8px;
    padding: .65rem .85rem .5rem; font-weight: 700; font-size: 1.02rem; color: #2c2f3a;
}
.res-group-head .rg-ico { font-size: 1.15rem; }
.res-group-head .rg-name { flex: 1; }
.rg-num {
    font-size: .78rem; font-weight: 700; background: #eef0f8; color: #6b7080;
    border-radius: 999px; padding: 1px 9px; flex: none;
}
.res-subhead {
    display: flex; align-items: center; gap: 6px;
    padding: .4rem .9rem; font-size: .86rem; font-weight: 600; color: var(--accent, #6a5cff);
    background: linear-gradient(90deg, rgba(106,92,255,.07), rgba(0,194,255,.04));
    border-left: 3px solid var(--accent, #6a5cff);
}
.res-subhead .rg-num.sm { background: rgba(106,92,255,.14); color: #6a5cff; }
/* 二级目录：可点击展开 / 收起 */
.res-subhead { cursor: pointer; user-select: none; transition: filter .15s; }
.res-subhead:hover { filter: brightness(.97); }
.res-subhead .sub-caret {
    display: inline-block; font-size: .78rem; line-height: 1;
    transition: transform .18s ease; transform-origin: center;
}
.res-subhead.collapsed .sub-caret { transform: rotate(-90deg); }
.res-subhead.collapsed + .res-sub-list { display: none; }

/* ===== 后台"已有资源"横向标签页 ===== */
.res-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: .75rem .9rem .55rem; border-bottom: 1px solid #f1f2f7; }
.res-tab {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid #e6e8f2; background: #fafbff; color: #4a4f60;
    padding: .35rem .75rem; border-radius: 999px; font-size: .86rem; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.res-tab:hover { border-color: #c9cdf5; color: #6a5cff; }
.res-tab.active { background: linear-gradient(120deg,#6a5cff,#00c2ff); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(106,92,255,.25); }
.res-tab .rt-ico { font-size: 1rem; }
.res-tab .rg-num.sm { background: rgba(106,92,255,.14); color: #6a5cff; }
.res-tab.active .rg-num.sm { background: rgba(255,255,255,.28); color: #fff; }
.res-tab-pane { padding: .25rem .25rem 0; }

/* ===== 二级分类行收起状态（点击已激活分类切换） ===== */
#catRows.collapsed { display: none; }

/* ===== 后台"已有资源"移动分类面板 ===== */
.res-move-panel {
    display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
    margin-top: .55rem; padding-top: .55rem;
    border-top: 1px dashed #e6e8f2;
}

/* ===== 评分角标 ===== */
.rate-badge {
    position: absolute; top: 8px; right: 8px; z-index: 4;
    background: rgba(20, 22, 33, .68); color: #ffd84d;
    font-size: .72rem; font-weight: 700; letter-spacing: .3px;
    padding: 3px 8px; border-radius: 7px;
    backdrop-filter: blur(2px);
    display: inline-flex; align-items: center; gap: 2px;
}
.rt-badge {
    display: inline-block; margin-left: 6px;
    background: linear-gradient(120deg,#ffb700,#ff7e2a); color: #fff;
    font-size: .72rem; font-weight: 700; letter-spacing: .3px;
    padding: 1px 7px; border-radius: 7px; vertical-align: 2px;
}
