/* ============================================
   VIP资源下载中心 — 暗黑高端风格
   ============================================ */

body {
    background: #0e0e12;
}

.resource-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 80px;
    min-height: calc(100vh - 64px);
}

/* ===== Hero区域 ===== */
.resource-hero {
    margin-top: var(--header-height);
    background: linear-gradient(135deg, #0e0e12 0%, #1a1a2e 40%, #16213e 100%);
    padding: 40px 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.resource-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.resource-hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,154,86,0.15) 0%, transparent 70%);
    filter: blur(60px);
    top: -100px;
    right: -50px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.hero-content h1 .crown-icon {
    display: inline-block;
    background: linear-gradient(135deg, #ffc371, #ff9a56);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 8px;
    font-size: 24px;
}

.hero-content p {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 14px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a3d 100%);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.hero-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.hero-cta:hover::after {
    left: 100%;
}

.hero-cta:hover {
    box-shadow: 0 4px 20px rgba(255,154,86,0.4);
    transform: translateY(-1px);
    color: #fff;
}

.hero-stats {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.stat-item {
    text-align: center;
    padding: 0 14px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    align-self: center;
}

.stat-num {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffc371, #ff9a56);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
    display: block;
}

/* ===== 筛选栏 ===== */
.resource-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
    background: #131318;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 64px;
    z-index: 50;
    transition: box-shadow 0.2s;
}

.resource-filter.stuck {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.filter-categories {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-btn {
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.filter-btn:hover {
    color: #ffc371;
    border-color: rgba(255,154,86,0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff9a56, #ff6a3d);
    color: #fff;
    border-color: transparent;
}

.filter-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-search {
    display: flex;
    gap: 0;
}

.filter-search input {
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 13px;
    width: 180px;
    outline: none;
    transition: all 0.2s;
    background: rgba(255,255,255,0.04);
    color: #fff;
}

.filter-search input::placeholder {
    color: rgba(255,255,255,0.3);
}

.filter-search input:focus {
    border-color: rgba(255,154,86,0.4);
    width: 220px;
    background: rgba(255,255,255,0.06);
}

.filter-search button {
    padding: 7px 14px;
    border: 1px solid #ff9a56;
    background: linear-gradient(135deg, #ff9a56, #ff6a3d);
    color: #fff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
}

.filter-search button:hover {
    background: linear-gradient(135deg, #ff6a3d, #e55a2d);
}

/* VIP筛选按钮 */
.filter-vip-btn {
    padding: 7px 14px;
    border: 1px solid rgba(255,154,86,0.3);
    border-radius: 6px;
    background: rgba(255,154,86,0.08);
    color: #ffc371;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.filter-vip-btn:hover,
.filter-vip-btn.active {
    background: linear-gradient(135deg, #ff9a56, #ff6a3d);
    color: #fff;
    border-color: transparent;
}

/* ===== 区块标题 ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.section-count {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

/* ===== 资源卡片网格 ===== */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.resource-card {
    background: #16161c;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(255,255,255,0.06);
    opacity: 0;
    transform: translateY(16px);
    animation: cardFadeIn 0.4s forwards;
}

.resource-card:nth-child(1)  { animation-delay: 0.03s; }
.resource-card:nth-child(2)  { animation-delay: 0.06s; }
.resource-card:nth-child(3)  { animation-delay: 0.09s; }
.resource-card:nth-child(4)  { animation-delay: 0.12s; }
.resource-card:nth-child(5)  { animation-delay: 0.15s; }
.resource-card:nth-child(6)  { animation-delay: 0.18s; }
.resource-card:nth-child(7)  { animation-delay: 0.21s; }
.resource-card:nth-child(8)  { animation-delay: 0.24s; }
.resource-card:nth-child(9)  { animation-delay: 0.27s; }
.resource-card:nth-child(10) { animation-delay: 0.30s; }
.resource-card:nth-child(11) { animation-delay: 0.33s; }
.resource-card:nth-child(12) { animation-delay: 0.36s; }

@keyframes cardFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.resource-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,154,86,0.25);
    box-shadow: 0 8px 30px rgba(255,154,86,0.1);
}

/* 封面 */
.card-cover {
    position: relative;
    padding-top: 56.25%;
    background: rgba(255,255,255,0.03);
    overflow: hidden;
}

.card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.resource-card:hover .card-cover img {
    transform: scale(1.05);
}

.card-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
}

.card-cover-placeholder i {
    font-size: 40px;
    color: rgba(255,255,255,0.1);
}

/* 播放按钮覆盖层 */
.card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.2s;
}

.resource-card:hover .card-play-overlay {
    opacity: 1;
}

.card-play-overlay i {
    width: 44px;
    height: 44px;
    background: rgba(255,154,86,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255,154,86,0.4);
}

/* VIP徽章 */
.vip-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ffc371 0%, #ff9a56 100%);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    letter-spacing: 0.5px;
}

.vip-badge i {
    margin-right: 3px;
    font-size: 10px;
}

.free-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,161,214,0.9);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.file-type-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

/* 卡片信息区 */
.card-body {
    padding: 12px 14px 14px;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}

.resource-card:hover .card-title {
    color: #ffc371;
}

.card-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.card-info .file-size {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-info .download-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-info .upload-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.card-info .vip-tag {
    background: rgba(255,154,86,0.12);
    color: #ffc371;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.card-info .free-tag {
    background: rgba(0,161,214,0.12);
    color: #40a9ff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* 卡片底部操作栏 */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.card-actions .btn-download {
    flex: 1;
    padding: 6px 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.card-actions .btn-download:hover {
    border-color: #ffc371;
    color: #ffc371;
}

.card-actions .btn-download.vip {
    border-color: rgba(255,154,86,0.3);
    color: #ffc371;
    background: rgba(255,154,86,0.08);
}

.card-actions .btn-download.vip:hover {
    background: rgba(255,154,86,0.15);
}

.card-actions .btn-detail {
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.card-actions .btn-detail:hover {
    border-color: #ffc371;
    color: #ffc371;
}

/* ===== 空状态 ===== */
.resource-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: #16161c;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,0.1);
}

.resource-empty i {
    font-size: 56px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffc371, #ff9a56);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.resource-empty p {
    font-size: 15px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
}

.resource-empty .btn-vip-cta {
    padding: 10px 28px;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a3d 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.resource-empty .btn-vip-cta:hover {
    box-shadow: 0 4px 16px rgba(255,154,86,0.4);
    color: #fff;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 24px 0 8px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0 10px;
}

.pagination button:hover:not(:disabled) {
    border-color: #ffc371;
    color: #ffc371;
}

.pagination button.active {
    background: linear-gradient(135deg, #ff9a56, #ff6a3d);
    color: #fff;
    border-color: transparent;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination span {
    padding: 0 4px;
    color: rgba(255,255,255,0.2);
}

/* ===== 资源详情弹窗 ===== */
.resource-modal-content {
    max-width: 680px;
    width: 92%;
    border-radius: 12px;
    overflow: hidden;
    animation: modalSlideUp 0.25s ease-out;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
    background: #1a1a24;
    border: 1px solid rgba(255,255,255,0.08);
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.resource-detail {
    display: flex;
    gap: 24px;
}

.detail-cover {
    width: 240px;
    min-width: 240px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}

.detail-cover img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.detail-cover-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
}

.detail-cover-placeholder i {
    font-size: 48px;
    color: rgba(255,255,255,0.1);
}

.detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.detail-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.detail-vip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffc371;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    background: rgba(255,154,86,0.1);
    padding: 6px 14px;
    border-radius: 6px;
    width: fit-content;
    border: 1px solid rgba(255,154,86,0.2);
}

.detail-vip i { color: #ffc371; }

.detail-free {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #40a9ff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    background: rgba(0,161,214,0.08);
    padding: 6px 14px;
    border-radius: 6px;
    width: fit-content;
    border: 1px solid rgba(0,161,214,0.15);
}

.detail-free i { color: #40a9ff; }

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 14px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-meta i {
    width: 14px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 12px;
}

.detail-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-action-btn {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-action-btn:hover {
    border-color: #ffc371;
    color: #ffc371;
}

.detail-action-btn.active {
    border-color: #ffc371;
    color: #ffc371;
    background: rgba(255,154,86,0.08);
}

.detail-desc {
    margin-bottom: 18px;
    flex: 1;
}

.detail-desc h4 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid #ffc371;
}

.detail-desc p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    max-height: 100px;
    overflow-y: auto;
}

.btn-download-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 36px;
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a3d 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: fit-content;
}

.btn-download-large:hover {
    box-shadow: 0 4px 20px rgba(255,154,86,0.4);
    transform: translateY(-1px);
}

/* ===== 骨架屏 ===== */
.skeleton-card {
    background: #16161c;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

.skeleton-cover {
    padding-top: 56.25%;
    background: linear-gradient(110deg, #1a1a24 30%, #222230 50%, #1a1a24 70%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-body {
    padding: 12px 14px;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(110deg, #1a1a24 30%, #222230 50%, #1a1a24 70%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 8px;
}

.skeleton-line:last-child { width: 60%; margin-bottom: 0; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== 回到顶部 ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #16161c;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    transition: all 0.2s;
    z-index: 999;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    border-color: #ffc371;
    color: #ffc371;
}

/* ===== 进度条 ===== */
.page-progress {
    position: fixed;
    top: 64px;
    left: 0;
    height: 2px;
    background: linear-gradient(135deg, #ffc371, #ff9a56);
    z-index: 9999;
    transition: width 0.1s;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .resource-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .resource-page {
        padding: 0 12px 60px;
    }

    .resource-hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
        border-radius: 0;
    }

    .hero-content { padding-left: 0; }

    .hero-content h1 { font-size: 22px; }

    .hero-stats {
        margin-top: 16px;
        gap: 16px;
    }

    .stat-item { padding: 0 16px; }
    .stat-num { font-size: 26px; }

    .resource-filter {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        position: static;
    }

    .filter-search input { width: 100%; }
    .filter-search input:focus { width: 100%; }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .card-body { padding: 10px 12px 12px; }
    .card-title { font-size: 13px; }
    .card-info { font-size: 11px; }
    .card-actions { display: none; }

    .resource-detail { flex-direction: column; }
    .detail-cover { width: 100%; min-width: auto; }
    .btn-download-large { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card-cover-placeholder i { font-size: 28px; }
    .card-title { font-size: 12px; }
    .card-info .download-count { display: none; }
}
