/**
 * 下载额度提升提示组件样式
 * 复用于 /bing、/spotlights、/arts 详情页下载区域
 */
.dlb-hint {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    margin-bottom: .875rem;
    padding: .75rem .875rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .08), rgba(59, 130, 246, .05));
    border: 1px solid rgba(99, 102, 241, .16);
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.dlb-hint::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .35) 45%, transparent 60%);
    transform: translateX(-120%);
    pointer-events: none;
}

.dlb-hint.dlb-hint-shine::before {
    animation: dlbShine 1.1s ease;
}

@keyframes dlbShine {
    to { transform: translateX(120%); }
}

/* 点赞/评论后数据变化时的即时反馈动效（无需刷新页面） */
.dlb-hint.dlb-hint-pulse {
    animation: dlbPulse .7s ease;
}

@keyframes dlbPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, .35); }
    40% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.dlb-hint.dlb-hint-pulse[data-state="success"] {
    animation-name: dlbPulseSuccess;
}

@keyframes dlbPulseSuccess {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .4); }
    40% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 数值增加时浮现的 "+1" 小提示 */
.dlb-pop {
    position: absolute;
    right: 0;
    top: -2px;
    font-size: .7rem;
    font-weight: 700;
    color: #10b981;
    pointer-events: none;
    animation: dlbPopFloat .9s ease forwards;
}

@keyframes dlbPopFloat {
    0% { opacity: 0; transform: translateY(4px) scale(.9); }
    25% { opacity: 1; transform: translateY(-2px) scale(1.05); }
    75% { opacity: 1; transform: translateY(-10px) scale(1); }
    100% { opacity: 0; transform: translateY(-16px) scale(1); }
}

.dlb-hint:hover {
    border-color: rgba(99, 102, 241, .32);
    box-shadow: 0 6px 18px -8px rgba(79, 70, 229, .35);
    transform: translateY(-1px);
}

.dlb-hint-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: #fff;
    font-size: 15px;
    box-shadow: 0 4px 10px -3px rgba(59, 130, 246, .55);
}

.dlb-hint-icon i {
    line-height: 1;
}

.dlb-hint-body {
    flex: 1 1 auto;
    min-width: 0;
    /* 为右上角固定定位的"?"按钮预留空间，避免文字/徽标被其遮挡 */
    padding-right: 1.75rem;
}

.dlb-hint-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem .5rem;
    font-size: .8125rem;
    line-height: 1.5;
    color: #3730a3;
}

.dlb-hint-main b {
    font-weight: 600;
    color: #4338ca;
}

.dlb-hint-text {
    color: #4338ca;
}

.dlb-hint-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 600;
    color: #2563eb !important;
    white-space: nowrap;
    text-decoration: none;
}

.dlb-hint-link:hover {
    text-decoration: underline;
}

.dlb-hint-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    background: rgba(16, 185, 129, .14);
    color: #059669;
    white-space: nowrap;
}

.dlb-hint[data-state="success"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, .1), rgba(52, 211, 153, .06));
    border-color: rgba(16, 185, 129, .25);
}

.dlb-hint[data-state="success"] .dlb-hint-icon {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 4px 10px -3px rgba(16, 185, 129, .55);
}

.dlb-hint[data-state="success"] .dlb-hint-main,
.dlb-hint[data-state="success"] .dlb-hint-text,
.dlb-hint[data-state="success"] b {
    color: #047857;
}

.dlb-hint-progress {
    margin-top: .5rem;
}

.dlb-progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(99, 102, 241, .14);
    overflow: hidden;
}

.dlb-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #3b82f6);
    transition: width .6s cubic-bezier(.22, .68, .48, 1.01);
}

.dlb-hint[data-state="success"] .dlb-progress-bar {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.dlb-progress-label {
    margin-top: .3rem;
    font-size: .75rem;
    color: #6366f1;
}

.dlb-hint[data-state="success"] .dlb-progress-label {
    color: #059669;
}

/* 独立定位到卡片右上角，脱离 flex 文档流：
 * 1) 避免随文本换行/异步渲染而移动位置，位置始终固定，便于用户瞄准点击；
 * 2) 用 ::before 向外扩展实际热区（视觉大小不变），达到更易点击的最小触控尺寸。 */
.dlb-hint-more {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(99, 102, 241, .14);
    color: #4f46e5 !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease;
}

.dlb-hint-more::before {
    content: '';
    position: absolute;
    inset: -10px;
}

.dlb-hint-more:hover {
    background: rgba(99, 102, 241, .24);
    transform: scale(1.08);
}

.dlb-hint-more:active {
    transform: scale(.92);
}

/* 骨架屏加载态 */
.dlb-skel {
    display: inline-block;
    width: 100%;
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(99, 102, 241, .12) 25%, rgba(99, 102, 241, .24) 37%, rgba(99, 102, 241, .12) 63%);
    background-size: 400% 100%;
    animation: dlbSkeleton 1.4s ease infinite;
}

@keyframes dlbSkeleton {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* 暗色模式 */
.nice-dark-mode .dlb-hint {
    background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(59, 130, 246, .08));
    border-color: rgba(129, 140, 248, .28);
}

.nice-dark-mode .dlb-hint-main,
.nice-dark-mode .dlb-hint-text {
    color: #c7d2fe;
}

.nice-dark-mode .dlb-hint-main b {
    color: #e0e7ff;
}

.nice-dark-mode .dlb-hint-link {
    color: #93c5fd !important;
}

.nice-dark-mode .dlb-hint-badge {
    background: rgba(16, 185, 129, .18);
    color: #6ee7b7;
}

.nice-dark-mode .dlb-hint[data-state="success"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, .16), rgba(52, 211, 153, .08));
    border-color: rgba(52, 211, 153, .3);
}

.nice-dark-mode .dlb-hint[data-state="success"] .dlb-hint-main,
.nice-dark-mode .dlb-hint[data-state="success"] .dlb-hint-text,
.nice-dark-mode .dlb-hint[data-state="success"] b {
    color: #a7f3d0;
}

.nice-dark-mode .dlb-progress-track {
    background: rgba(129, 140, 248, .2);
}

.nice-dark-mode .dlb-hint-more {
    background: rgba(129, 140, 248, .2);
    color: #c7d2fe !important;
}

@media (max-width: 480px) {
    .dlb-hint {
        padding: .625rem .75rem;
    }
    .dlb-hint-main {
        font-size: .78rem;
    }
}

/* ==========================================================================
 * "全部权限" 说明弹窗（.popu-user-access 触发，见 download-bonus-hint.js）
 * ========================================================================== */
.dlb-access {
    text-align: left;
}

.dlb-access-head {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.1rem;
}

.dlb-access-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 22px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(59, 130, 246, .1));
}

.dlb-access-head-text {
    flex: 1 1 auto;
    min-width: 0;
}

.dlb-access-title {
    margin: 0 0 .2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #18181b;
}

.dlb-access-sub {
    margin: 0;
    font-size: .8125rem;
    color: #71717a;
    line-height: 1.5;
}

.dlb-access-current {
    text-align: center;
    padding: 1rem .5rem 1.1rem;
    margin-bottom: 1.1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, .08), rgba(52, 211, 153, .05));
    border: 1px solid rgba(16, 185, 129, .18);
}

.dlb-access-current-num {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #059669;
}

.dlb-access-current-num span {
    margin-left: .25rem;
    font-size: .8125rem;
    font-weight: 600;
    color: #10b981;
}

.dlb-access-current-sub {
    margin-top: .25rem;
    font-size: .75rem;
    color: #059669;
}

.dlb-access-current-label {
    margin-top: .35rem;
    font-size: .75rem;
    color: #6b7280;
}

.dlb-access-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1rem;
}

.dlb-access-card {
    padding: .75rem .8rem .85rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #eef0f3;
}

.dlb-access-card-head {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .55rem;
    font-size: .8125rem;
    font-weight: 700;
    color: #27272a;
}

.dlb-access-card-icon {
    font-size: 15px;
    line-height: 1;
}

.dlb-access-card-name {
    flex: 1 1 auto;
}

.dlb-access-tag {
    flex: 0 0 auto;
    padding: .05rem .4rem;
    border-radius: 999px;
    font-size: .625rem;
    font-weight: 600;
    color: #4f46e5;
    background: rgba(99, 102, 241, .12);
    white-space: nowrap;
}

.dlb-access-tag.dlb-tag-perm {
    color: #059669;
    background: rgba(16, 185, 129, .14);
}

.dlb-access-card-desc {
    margin: 0;
    font-size: .75rem;
    line-height: 1.6;
    color: #71717a;
}

.dlb-rule-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.dlb-rule-row {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .75rem;
    color: #52525b;
}

.dlb-rule-row.dlb-rule-empty {
    color: #a1a1aa;
    font-style: italic;
}

.dlb-rule-badge {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e4e4e7;
    color: #71717a;
    font-size: .6875rem;
    font-weight: 700;
}

.dlb-rule-row.is-done .dlb-rule-badge {
    background: #10b981;
    color: #fff;
}

.dlb-rule-row.is-done .dlb-rule-text {
    color: #18181b;
    font-weight: 600;
}

.dlb-rule-text {
    flex: 1 1 auto;
    min-width: 0;
}

.dlb-rule-text b {
    font-weight: 700;
}

.dlb-rule-reward {
    flex: 0 0 auto;
    font-weight: 700;
    color: #4338ca;
    white-space: nowrap;
}

.dlb-rule-row.is-done .dlb-rule-reward {
    color: #059669;
}

.dlb-access-footer {
    text-align: center;
    padding: .55rem .75rem;
    border-radius: 10px;
    font-size: .75rem;
    color: #6366f1;
    background: rgba(99, 102, 241, .08);
}

.dlb-access-footer b {
    font-weight: 700;
}

.dlb-access-footer-success {
    color: #059669;
    background: rgba(16, 185, 129, .1);
    font-weight: 600;
}

.dlb-access-cta {
    display: block;
    text-align: center;
    margin-top: .25rem;
    padding: .6rem 1rem;
    border-radius: 10px;
    font-size: .8125rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    transition: opacity .2s ease, transform .2s ease;
}

.dlb-access-cta:hover {
    opacity: .9;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .dlb-access-cards {
        grid-template-columns: 1fr;
    }
}

/* 暗色模式 */
.nice-dark-mode .dlb-access-title {
    color: #f4f4f5;
}

.nice-dark-mode .dlb-access-sub,
.nice-dark-mode .dlb-access-current-label {
    color: #a1a1aa;
}

.nice-dark-mode .dlb-access-card {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .08);
}

.nice-dark-mode .dlb-access-card-head {
    color: #e4e4e7;
}

.nice-dark-mode .dlb-access-card-desc {
    color: #a1a1aa;
}

.nice-dark-mode .dlb-rule-row {
    color: #a1a1aa;
}

.nice-dark-mode .dlb-rule-row.is-done .dlb-rule-text {
    color: #f4f4f5;
}

.nice-dark-mode .dlb-rule-badge {
    background: rgba(255, 255, 255, .12);
    color: #d4d4d8;
}

.nice-dark-mode .dlb-access-current {
    background: linear-gradient(135deg, rgba(16, 185, 129, .14), rgba(52, 211, 153, .08));
    border-color: rgba(52, 211, 153, .28);
}

.nice-dark-mode .dlb-access-footer {
    background: rgba(99, 102, 241, .16);
}
