/* ========================================
   瀛︾涓婚棰滆壊
   ======================================== */

/* ========================================
   缂╃暐鍥剧綉鏍煎搷搴斿紡鏍峰紡锛堝吋瀹硅€佹祻瑙堝櫒锛?   鍝嶅簲寮忓垪鏁帮紙涓庡乏渚ц彍鍗?200px鏂偣鍚屾锛?   >1500px: 5鍒? 1200-1500px: 4鍒? 993-1200px: 5鍒? 769-992px: 4鍒? 鈮?68px: 3鍒? 鈮?80px: 2鍒?   鍗＄墖姣斾緥 4:3锛堟í鍚戯級
   ======================================== */
/* 瓒呭ぇ灞忓箷 >1500px锛?鍒楋紙鑿滃崟鏄剧ず锛?*/
@media (min-width: 1501px) {
    .thumbnail-card {
        width: calc(20% - 8px);
        /* flexbox鍥為€€锛?鍒?*/
    }
}

@supports (display: grid) {
    @media (min-width: 1501px) {

        .thumbnail-grid,
        .thumbnail-panel .thumbnail-grid {
            grid-template-columns: repeat(5, 1fr);
            grid-auto-rows: auto;
        }

        .thumbnail-card {
            width: auto;
            height: auto;
        }
    }
}

/* 澶у睆骞?1200-1500px锛?鍒楋紙鑿滃崟鏄剧ず锛?*/
@media (min-width: 1201px) and (max-width: 1500px) {
    .thumbnail-card {
        width: calc(25% - 8px);
        /* flexbox鍥為€€锛?鍒?*/
    }
}

@supports (display: grid) {
    @media (min-width: 1201px) and (max-width: 1500px) {

        .thumbnail-grid,
        .thumbnail-panel .thumbnail-grid {
            grid-template-columns: repeat(4, 1fr);
            grid-auto-rows: auto;
        }

        .thumbnail-card {
            width: auto;
            height: auto;
        }
    }
}

/* 涓瓑灞忓箷 993-1200px锛?鍒楋紙鑿滃崟闅愯棌锛岀┖闂村ぇ锛?*/
@media (min-width: 993px) and (max-width: 1200px) {
    .thumbnail-card {
        width: calc(20% - 8px);
        /* flexbox鍥為€€锛?鍒?*/
    }
}

@supports (display: grid) {
    @media (min-width: 993px) and (max-width: 1200px) {

        .thumbnail-grid,
        .thumbnail-panel .thumbnail-grid {
            grid-template-columns: repeat(5, 1fr);
            grid-auto-rows: auto;
        }

        .thumbnail-card {
            width: auto;
            height: auto;
        }
    }
}

/* 骞虫澘璁惧 769-992px锛?鍒?*/
@media (min-width: 769px) and (max-width: 992px) {
    .thumbnail-card {
        width: calc(25% - 8px);
        /* flexbox鍥為€€锛?鍒?*/
    }
}

@supports (display: grid) {
    @media (min-width: 769px) and (max-width: 992px) {

        .thumbnail-grid,
        .thumbnail-panel .thumbnail-grid {
            grid-template-columns: repeat(4, 1fr);
            grid-auto-rows: auto;
        }

        .thumbnail-card {
            width: auto;
            height: auto;
        }
    }
}

/* 灏忓钩鏉?澶ф墜鏈猴細3鍒?*/
@media (max-width: 768px) {

    .thumbnail-grid,
    .thumbnail-panel .thumbnail-grid {
        gap: 6px;
        padding: 6px;
    }

    .thumbnail-card {
        width: calc(33.333% - 6px);
        /* flexbox鍥為€€锛?鍒?*/
    }
}

@supports (display: grid) {
    @media (max-width: 768px) {

        .thumbnail-grid,
        .thumbnail-panel .thumbnail-grid {
            grid-template-columns: repeat(3, 1fr);
            grid-auto-rows: auto;
        }

        .thumbnail-card {
            width: auto;
            height: auto;
        }
    }
}

/* 鎵嬫満璁惧锛?鍒楁洿绱у噾 */
@media (max-width: 480px) {

    .thumbnail-grid,
    .thumbnail-panel .thumbnail-grid {
        gap: 5px;
        padding: 5px;
    }

    .thumbnail-card {
        width: calc(50% - 5px);
        /* flexbox鍥為€€锛?鍒?*/
    }
}

@supports (display: grid) {
    @media (max-width: 480px) {

        .thumbnail-grid,
        .thumbnail-panel .thumbnail-grid {
            grid-template-columns: repeat(2, 1fr);
            grid-auto-rows: auto;
        }

        .thumbnail-card {
            width: auto;
            height: auto;
        }
    }
}

/* ========== 鍙鍖栬祫婧愭搷浣滄楠ゆ寚寮?========== */
.resources-guide-entry {
    min-height: 32px;
    height: 32px;
    margin: 0;
    padding: 0 11px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.resources-guide-entry:hover {
    border-color: #bfdbfe;
    color: #2563eb;
    background: #eff6ff;
}

.resources-guide-entry:focus-visible,
.resource-guide-close:focus-visible,
.resource-guide-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
}

.resources-bundle-purchase-entry {
    min-height: 32px;
    height: 32px;
    margin: 0;
    padding: 0 11px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.resources-bundle-purchase-entry:hover {
    border-color: #fbbf24;
    background: #fef3c7;
}

.resources-bundle-purchase-entry.is-download {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.resources-bundle-purchase-entry.is-download:hover {
    border-color: #93c5fd;
    background: #dbeafe;
}

.resources-bundle-purchase-entry:disabled {
    cursor: wait;
    opacity: 0.82;
}

.resources-bundle-entry-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    font-size: 11px;
    line-height: 1.2;
}

.resources-bundle-entry-count[hidden] {
    display: none;
}

.resources-bundle-purchase-entry:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}
.resources-custom-animation-entry {
    min-height: 32px;
    height: 32px;
    margin: 0;
    padding: 0 11px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
    color: #15803d;
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.resources-custom-animation-entry:hover {
    border-color: #86efac;
    background: #dcfce7;
}

.resources-custom-animation-entry:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

.resources-guide-target {
    outline: 2px solid #f59e0b;
    outline-offset: 3px;
}

.resource-guide-focus {
    position: fixed;
    z-index: 10020;
    pointer-events: none;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    box-shadow:
        0 0 0 9999px rgba(15, 23, 42, 0.66),
        0 0 0 6px rgba(251, 191, 36, 0.18),
        0 16px 42px rgba(15, 23, 42, 0.26);
    transition: left 0.22s ease, top 0.22s ease, width 0.22s ease, height 0.22s ease;
}

.resource-guide-popover {
    position: fixed;
    z-index: 10030;
    padding: 16px;
    color: #172033;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.32);
    line-height: 1.6;
}

.resource-guide-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.resource-guide-close:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #111827;
}

.resource-guide-kicker {
    padding-right: 28px;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
}

.resource-guide-progress {
    height: 5px;
    margin: 8px 0 12px;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: 999px;
}

.resource-guide-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #f59e0b);
    border-radius: inherit;
    transition: width 0.2s ease;
}

.resource-guide-popover h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: 0;
}

.resource-guide-popover p {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

.resource-guide-status {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 12px;
    padding: 9px 10px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.08);
    color: #92400e;
    font-size: 13px;
    line-height: 1.5;
}

.resource-guide-status i {
    margin-top: 2px;
    color: #d97706;
}

.resource-guide-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.resource-guide-btn {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.resource-guide-btn:hover:not(:disabled) {
    border-color: #2563eb;
    color: #1d4ed8;
}

.resource-guide-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.resource-guide-btn.primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.resource-guide-btn.primary:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #ffffff;
}

.resource-guide-btn.ghost {
    border-color: transparent;
    color: #64748b;
}

.resource-guide-btn.ghost:hover {
    background: #f8fafc;
    color: #334155;
}

.resource-guide-btn.locate {
    border-color: rgba(245, 158, 11, 0.5);
    color: #b45309;
}

.resource-guide-btn.locate:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
    color: #92400e;
}

@media (max-width: 640px) {
    .resources-guide-entry,
    .resources-bundle-purchase-entry,
    .resources-custom-animation-entry {
        min-width: 44px;
        min-height: 44px;
        height: 44px;
        padding: 7px 9px;
    }

    .resources-guide-entry span,
    .resources-bundle-purchase-entry .resources-bundle-entry-label,
    .resources-custom-animation-entry span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
        border: 0;
    }

    .resources-bundle-purchase-entry .resources-bundle-entry-count:not([hidden]) {
        display: inline-flex;
        min-width: 30px;
        padding: 2px 5px;
        font-size: 10px;
    }

    .resource-guide-focus {
        border-radius: 6px;
    }

    .resource-guide-popover {
        padding: 14px;
    }

    .resource-guide-close {
        top: 4px;
        right: 4px;
        width: 44px;
        height: 44px;
    }

    .resource-guide-kicker {
        padding-right: 44px;
    }

    .resource-guide-actions {
        justify-content: stretch;
    }

    .resource-guide-btn {
        flex: 1 1 auto;
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .resources-guide-entry,
    .resources-bundle-purchase-entry,
    .resources-custom-animation-entry,
    .resource-guide-focus,
    .resource-guide-progress span {
        transition: none;
    }
}
