/* ========================================
   影视资源页面UI优化样式
   ======================================== */

/* 1. 全局分类标签栏样式 */
.category-tabs-wrapper {
    background: #f8f9fa;
    padding: 0.75rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0;
}

.category-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    min-width: 160px;
    font-size: 1rem;
    font-weight: 600;
    /* 降低饱和度的紫色 */
    color: #6b7280;
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.category-tab-btn:hover {
    color: #8b92d4;
    background-color: rgba(139, 146, 212, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 146, 212, 0.2);
}

.category-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #8b92d4 0%, #9fa5d5 100%);
    border-color: #8b92d4;
    box-shadow: 0 4px 16px rgba(139, 146, 212, 0.3);
    font-weight: 700;
}

.category-tab-btn i {
    font-size: 1.1rem;
}

/* 2. 每日热门资源容器优化 */
#dailyUpdate {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.25rem 1rem;
}

#dailyUpdate .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#dailyUpdate .card-body {
    background: transparent !important;
    padding: 0 !important;
}

/* 标题区域 */
.daily-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(139, 146, 212, 0.2);
}

.daily-header h4 {
    color: #374151;
    font-weight: 700;
    margin: 0;
}

.daily-header .fire-icon {
    color: #f59e0b;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}

.daily-header small {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 3. 网格布局 - 响应式1列/2列 */
.daily-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .daily-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* 4. 资源卡片样式 */
.resource-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(139, 146, 212, 0.1);
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 146, 212, 0.2);
    border-color: rgba(139, 146, 212, 0.3);
}

.resource-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 146, 212, 0.25);
}

/* 卡片标题 */
.resource-card-title {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0;
}

.resource-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.resource-title-text {
    flex: 1;
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.6;
    word-break: break-word;
}

/* 展开/收起图标 */
.resource-toggle-icon {
    color: #8b92d4;
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.resource-card.expanded .resource-toggle-icon {
    transform: rotate(180deg);
}

/* 5. 直接显示的按钮组 */
.resource-actions-direct {
    display: none;
    flex-direction: row;
    gap: 0.6rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(139, 146, 212, 0.15);
}

.resource-card.expanded .resource-actions-direct {
    display: flex;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 资源按钮 */
.resource-btn-direct {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #8b92d4 0%, #9fa5d5 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 146, 212, 0.25);
}

.resource-btn-direct:hover {
    background: linear-gradient(135deg, #7a81c3 0%, #8e94c4 100%);
    box-shadow: 0 4px 12px rgba(139, 146, 212, 0.35);
    transform: translateY(-2px);
}

.resource-btn-direct:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(139, 146, 212, 0.3);
}

.resource-btn-direct img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.resource-btn-direct span {
    white-space: nowrap;
}

/* 6. 加载和错误状态 */
.daily-loading,
.daily-error {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.daily-loading .spinner-border {
    color: #8b92d4;
}

.daily-error i {
    color: #f59e0b;
}

/* 7. 分页样式优化 */
.pagination-custom {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-custom .page-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(139, 146, 212, 0.2);
    background: #ffffff;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-custom .page-btn:hover {
    background: rgba(139, 146, 212, 0.1);
    border-color: #8b92d4;
    color: #8b92d4;
}

.pagination-custom .page-btn.active {
    background: linear-gradient(135deg, #8b92d4 0%, #9fa5d5 100%);
    color: #ffffff;
    border-color: #8b92d4;
    box-shadow: 0 2px 8px rgba(139, 146, 212, 0.3);
}

/* 8. 移动端优化 */
@media (max-width: 767px) {
    .category-tabs-wrapper {
        padding: 0.6rem 0;
        margin-bottom: 0.75rem;
    }
    
    .category-tab-btn {
        padding: 0.55rem 1.25rem;
        min-width: 130px;
        font-size: 0.9rem;
    }
    
    #dailyUpdate {
        padding: 1rem 0.75rem;
    }
    
    .daily-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        margin-bottom: 1rem;
        padding-bottom: 0.6rem;
    }
    
    .resource-card {
        padding: 0.85rem;
    }
    
    .resource-title-text {
        font-size: 1rem;
    }
    
    .daily-grid {
        gap: 0.75rem;
    }
}

/* 9. 隐藏原有的标签栏 */
.daily-tabs {
    display: none !important;
}

/* 10. 辅助文字样式 */
.text-secondary-custom {
    color: #9ca3af;
    font-size: 0.875rem;
}

.text-primary-custom {
    color: #1f2937;
    font-weight: 600;
}
