.poster-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}
.placeholder-poster {
    background: #e9ecef;
}
/* 桌面端每行展示 5 个资源（覆盖卡片 col-md-3 的 25% 列宽为 20%），资源列表页与未登录首页共用 */
@media (min-width: 768px) {
    .resource-list-5 > .col-md-3 { flex: 0 0 20%; max-width: 20%; }
}
.resource-card {
    transition: transform .15s ease-in-out;
}
.resource-card:hover {
    transform: translateY(-4px);
}
.cursor-title-tip {
    position: fixed;
    z-index: 1080;
    max-width: 360px;
    padding: .25rem .5rem;
    background: #000;
    color: #fff;
    font-size: .75rem;
    border-radius: .25rem;
    pointer-events: none;
    white-space: normal;
    word-break: break-all;
}
/* 首页公告滚动条：高度由后台配置，经 --notice-height 变量注入 */
.notice-bar {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-radius: .5rem;
    color: #fff;
    height: var(--notice-height, 32px);
    margin-top: -24px;
}
.notice-label {
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(120, 53, 15, .35);
    color: #fff7ed;
    font-weight: 600;
    border-radius: .5rem 0 0 .5rem;
}
.notice-viewport {
    height: 100%;
    line-height: var(--notice-height, 32px);
}
.notice-track {
    display: inline-flex;
    width: max-content;
    white-space: nowrap;
    animation: notice-scroll 40s linear infinite;
}
.notice-bar:hover .notice-track {
    animation-play-state: paused;
}
.notice-item {
    color: #fff8e1;
    font-size: .9rem;
}
.notice-sep {
    color: rgba(255, 255, 255, .75);
    font-size: .7rem;
    margin: 0 18px;
    vertical-align: 1px;
}
/* 单份内容跑马灯：从视口右侧外滚入，横穿后从左侧滚出再循环；
   --notice-start 由 JS 按视口实际宽度设置 */
@keyframes notice-scroll {
    from { transform: translateX(var(--notice-start, 100vw)); }
    to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
    .notice-track { animation: none; transform: none; }
}
.pan-link-item {
    word-break: break-all;
}
.hero-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: .5rem;
    color: #fff;
}
.bounty-badge {
    font-size: .85rem;
}
/* 详情页操作行：所有按钮/下拉框与收藏按钮等高 */
.resource-actions .btn,
.resource-actions .form-select {
    height: 38px;
}
.resource-actions .btn {
    white-space: nowrap;
    flex-shrink: 0;
}
/* 详情页网盘分组：展开时箭头朝上（基于 aria-expanded，避免加载闪烁） */
.pan-type-toggle .bi-chevron-down {
    transition: transform .2s ease-in-out;
}
.pan-type-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}
/* 网盘链接存在待处理提醒：整行淡红背景，链接文字置灰（仍可点击） */
.link-row-pending {
    background-color: #f8d7da;
}
.link-row-pending a {
    color: #6c757d;
}
.link-row-pending a:hover {
    color: #495057;
}
/* 我的收藏：桌面端每行5个资源卡片 */
@media (min-width: 768px) {
    .fav-col-md {
        width: 20%;
    }
}
/* 浏览历史下拉：悬停触发（仅 .history-dropdown，不影响其他点击触发的 dropdown） */
.history-dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}
.history-dropdown .dropdown-menu {
    display: none;
}
/* 彩虹ID：用户名彩虹流光渐变特效（金色主调 / 红色主调） */
@keyframes rainbow-flow {
    to {
        background-position: 200% center;
    }
}
.rainbow-id-gold,
.rainbow-id-red,
.rainbow-id-purple,
.rainbow-id-mars,
.rainbow-id-pink,
.rainbow-id-lightgreen,
.rainbow-id-smokered,
.rainbow-id-ultramarine,
.rainbow-id-aqua {
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-flow 4s linear infinite;
    font-weight: 700;
}
.rainbow-id-gold {
    background-image: linear-gradient(90deg, #b8860b, #ffd700, #fff3b0, #ff9d2e, #f5d020, #b8860b, #ffd700, #fff3b0, #b8860b);
}
.rainbow-id-red {
    background-image: linear-gradient(90deg, #c0392b, #ff4d4d, #ff8a5c, #ff2d78, #e74c3c, #ff6b3d, #ff4d4d, #c0392b);
}
.rainbow-id-purple {
    background-image: linear-gradient(90deg, #7b2ff7, #b06bff, #d78cff, #8a2be2, #c77dff, #9d4edd, #b06bff, #7b2ff7);
}
.rainbow-id-mars {
    background-image: linear-gradient(90deg, #008c8c, #2ec4b6, #7fd8d8, #046d6d, #17a398, #0fa3a3, #2ec4b6, #008c8c);
}
.rainbow-id-pink {
    background-image: linear-gradient(90deg, #ff6eb4, #ff9ecb, #ffd3e8, #ff4d94, #f8a5d1, #ff7fc0, #ff9ecb, #ff6eb4);
}
.rainbow-id-lightgreen {
    background-image: linear-gradient(90deg, #7ed957, #a8e6a1, #d4f7d4, #5bbf5b, #8ee08e, #6ecf6e, #a8e6a1, #7ed957);
}
.rainbow-id-smokered {
    background-image: linear-gradient(90deg, #b56576, #d98c8c, #efc3c3, #a35d6a, #c1798a, #d98c92, #d98c8c, #b56576);
}
.rainbow-id-ultramarine {
    background-image: linear-gradient(90deg, #4166f5, #6a8dff, #9db8ff, #2f4fd0, #5577e8, #6a8dff, #9db8ff, #4166f5);
}
.rainbow-id-aqua {
    background-image: linear-gradient(90deg, #86cecb, #a8dad5, #c9efec, #5fb3a9, #79c9c0, #8fd6cf, #a8dad5, #86cecb);
}
/* 用户勋章列表：统一 2px 间距 */
.badge-gap {
    display: inline-flex;
    gap: 2px;
    align-items: center;
    vertical-align: middle;
    margin-left: 2px;
}
/* 资源卡片拥有者勋章行：独立一行，数量多时自动换行不被截断 */
.badge-line {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}
/* 资源卡片内勋章行：最多显示 4 枚，超出隐藏 */
.card-body .badge-line {
    flex-wrap: nowrap;
    overflow: hidden;
    position: relative;
    max-height: 18px;
}
/* flex 子项收缩必需（Bootstrap 无此工具类）：我的发布列表行/详情页评论区的 text-truncate 标题依赖其防止溢出内容区 */
.min-w-0 { min-width: 0; }
/* 万花筒勋章图标：紫罗兰单色 / 炫彩渐变（渐变字需 background-clip:text，作用于字体图标 <i>） */
.text-gem-violet { color: #8b5cf6; }
.text-gem-rainbow {
    background: linear-gradient(90deg, #ff5f6d, #ffc371, #47cf73, #4d9de0, #b06ab3, #ff5f6d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
/* 常驻滚动条槽位：内容高度在视口临界（如管理后台展开/收起「商城管理」菜单）时，竖向滚动条的出现/消失
   不再挤占内容宽度，避免整页左右抖动；移动端等覆盖式滚动条场景不占位，无副作用 */
html {
    scrollbar-gutter: stable;
}
/* 管理后台侧边栏二级子菜单层级标识：项前向右箭头（配合 ps-4 缩进突出层级；继承文字色，选中态自动变深蓝） */
.list-group-item.shop-sub-link::before,
.list-group-item.resource-sub-link::before,
.list-group-item.wanted-sub-link::before,
.list-group-item.reminder-sub-link::before,
.list-group-item.link-sub-link::before,
.list-group-item.fun-sub-link::before,
.list-group-item.email-sub-link::before,
.list-group-item.invite-sub-link::before,
.list-group-item.user-sub-link::before {
    font-family: 'bootstrap-icons';
    content: '\f285';  /* bi-chevron-right */
    font-size: .75em;
    margin-right: .375rem;
    vertical-align: .1em;
}
/* 管理后台侧边栏二级子菜单选中态：淡蓝底 + 深蓝字（覆盖 Bootstrap 默认实色主蓝，变量方式防特异性不足） */
.list-group-item.shop-sub-link.active,
.list-group-item.resource-sub-link.active,
.list-group-item.wanted-sub-link.active,
.list-group-item.reminder-sub-link.active,
.list-group-item.link-sub-link.active,
.list-group-item.fun-sub-link.active,
.list-group-item.email-sub-link.active,
.list-group-item.invite-sub-link.active,
.list-group-item.user-sub-link.active {
    --bs-list-group-active-bg: #cfe2ff;
    --bs-list-group-active-color: #052c65;
    --bs-list-group-active-border-color: #b6d4fe;
}
