/* ==================== 课程列表页样式 ==================== */

.refined-course-page {
    background: #f5f7fb;
    animation: fadeIn 0.25s ease-out;
    will-change: opacity;
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: calc(100vh - 200px);
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.refined-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

/* ==================== 筛选区域 ==================== */

.refined-filters {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.filter-group {
    display: flex;
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 600;
    font-size: 14px;
    color: #1e2a3a;
    min-width: 75px;
    flex-shrink: 0;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: #f1f5f9;
    border-radius: 40px;
    font-size: 13px;
    color: #3b4e66;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #fee2e1;
    color: #fc3930;
}

.filter-btn.active {
    background: #fc3930;
    color: #fff;
    box-shadow: 0 2px 6px rgba(252, 57, 48, 0.2);
}

/* ==================== 课程网格 ==================== */

.course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

/* ==================== 课程卡片 ==================== */

.course-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.course-card:hover {
    transform: translateY(-4px);
    border-color: #e2e8f0;
    box-shadow: 0 12px 20px -12px rgba(0, 0, 0, 0.1);
}

.card-link {
    text-decoration: none;
    display: block;
}

.card-media {
    position: relative;
    background: #f0f2f5;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.course-card:hover .card-media img {
    transform: scale(1.05);
}

.card-content {
    padding: 14px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2a44;
    margin: 0 0 10px 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    min-height: 44px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.level-tag-inline {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 500;
    color: #3b4e66;
}

.interest {
    font-size: 12px;
    color: #7e8aa2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==================== 响应式适配 ==================== */

/* 平板 (1024px - 1200px) */
@media screen and (max-width: 1200px) {
    .course-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* 平板竖屏 (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .refined-container {
        padding: 0 16px;
    }
    
    .refined-filters {
        padding: 20px;
        margin-bottom: 24px;
    }
    
    .filter-label {
        margin-bottom: 8px;
    }
    
    .filter-group {
        align-items: flex-start;
    }
    
    .filter-options {
        width: 100%;
    }
    
    .filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* 手机横屏 (576px - 768px) */
@media screen and (max-width: 768px) {
    .refined-course-page {
        padding: 20px;
    }
    
    .refined-container {
        padding: 0 12px;
    }
    
    .refined-filters {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 20px;
    }
    
    .filter-group {
        margin-bottom: 16px;
    }
    
    .filter-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .filter-btn {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .course-grid {
        gap: 14px;
        margin-bottom: 24px;
    }
    
    .card-content {
        padding: 12px;
    }
    
    .card-title {
        font-size: 14px;
        min-height: 40px;
        margin-bottom: 8px;
    }
    
    .level-tag-inline {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .interest {
        font-size: 11px;
    }
}

/* 手机竖屏 (375px - 576px) */
@media screen and (max-width: 576px) {
    .filter-label{
		min-width: 55px!important;
	}
	.refined-course-page {
        padding: 15px;
    }
    
    .refined-container {
        padding: 0 8px;
    }
    
    .refined-filters {
        padding: 14px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    
    .filter-group {
        margin-bottom: 14px;
    }
    
    .filter-label {
        font-size: 12px;
    }
    
    .filter-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card-content {
        padding: 12px;
    }
    
    .card-title {
        font-size: 15px;
        min-height: auto;
    }
    
    .card-footer {
        margin-top: 4px;
    }
    
    .level-tag-inline {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .interest {
        font-size: 12px;
    }
}

/* 超小屏 (≤ 375px) */
@media screen and (max-width: 375px) {
    
    .refined-container {
        padding: 0 6px;
    }
    
    .refined-filters {
        padding: 12px;
        border-radius: 12px;
    }
    
    .filter-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    .level-tag-inline {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .interest {
        font-size: 11px;
    }
}

/* ==================== 课程详情页样式（独立作用域） ==================== */

.page-course-detail .course-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
}

.page-course-detail .course-card-inner {
    display: flex;
    gap: 40px;
    padding: 24px;
    flex-wrap: wrap;
}

.page-course-detail .course-fengm {
    flex: 0 0 280px;
    max-width: 280px;
}

.page-course-detail .cover-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-course-detail .cover-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.page-course-detail .course-info {
    flex: 1;
    min-width: 200px;
}

/* 课程详情页响应式 */
@media screen and (max-width: 992px) {
    .page-course-detail .course-fengm {
        flex: 0 0 240px;
        max-width: 240px;
    }
    .page-course-detail .course-card-inner {
        padding: 20px;
        gap: 24px;
    }
}

@media screen and (max-width: 768px) {
    .page-course-detail .course-fengm {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .page-course-detail .course-info {
        flex: 0 0 100%;
    }
    .page-course-detail .course-card-inner {
        padding: 16px;
        gap: 16px;
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .page-course-detail .course-card-inner {
        padding: 12px;
    }
}