/* 首页样式 */

/* 主要内容区域 */
.main-content {
    margin-top: 0;
    margin-bottom: 60px;
    padding: 16px;
    min-height: calc(100vh - 60px);
    background: linear-gradient(180deg, #F7FAFC 0%, #EDF2F7 100%);
}

/* 轮播图 */
.banner {
    width: 100%;
    height: 280px;
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
}

/* 隐藏轮播图上的标题 */
.banner::before {
    display: none !important;
}

.banner-title {
    display: none !important;
}

.banner-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: all 0.5s ease-in-out;
    transform: scale(1.05);
}

.banner-item.active {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-indicators {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    margin: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.indicator.active {
    width: 24px;
    border-radius: 4px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 搜索框 */
.search-box {
    position: relative;
    margin-top: 16px;
    margin-bottom: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-box:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.search-box input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 0;
    font-size: 15px;
    background: transparent;
    color: #2D3748;
}

.search-box input:focus {
    box-shadow: none;
    outline: none;
}

.search-box input::placeholder {
    color: #A0AEC0;
}

.search-box .search-btn {
    padding: 0 24px;
    border-radius: 0 16px 16px 0;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
    transition: all 0.3s ease;
}

.search-box .search-btn:hover {
    opacity: 0.95;
    transform: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-box .search-btn:active {
    transform: scale(0.98);
}

/* 分类区域 */
.category-section {
    margin-bottom: 28px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 20px;
    position: relative;
    padding-left: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 24px;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #667EEA, transparent);
    margin-left: 16px;
    opacity: 0.3;
}

.section-title span {
    font-size: 13px;
    font-weight: 400;
    color: #718096;
    margin-left: 8px;
}

.category-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
}

.category-list::-webkit-scrollbar {
    height: 6px;
}

.category-list::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 3px;
    margin: 0 16px;
}

.category-list::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #667EEA, #764BA2);
    border-radius: 3px;
}

.category-item {
    flex: 0 0 auto;
    width: 88px;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 4px;
    border-radius: 12px;
}

.category-item:hover {
    transform: translateY(-4px);
    background: rgba(102, 126, 234, 0.05);
}

.category-item:active {
    transform: translateY(-2px);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: white;
    font-size: 28px;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.35);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.category-feather-icon {
    width: 32px;
    height: 32px;
    fill: white;
    transition: all 0.3s ease;
}

.category-item:hover .category-icon {
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.category-name {
    font-size: 14px;
    color: #2D3748;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.3;
}

/* 课程区域 */
.course-section {
    margin-bottom: 32px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.course-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.course-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 16px;
    margin-bottom: 6px;
}

/* 课程卡片样式 */
.course-card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 0;
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

/* 课程头部样式 - 标题和价格一行显示 */
.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667EEA, #764BA2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.course-card:hover::before {
    transform: scaleX(1);
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.course-card:active {
    transform: translateY(-3px);
}

.course-card .course-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
    transition: transform 0.3s ease;
}

.course-card:hover .course-cover {
    transform: scale(1.05);
}

.course-card .course-info {
    padding: 16px;
    position: relative;
    z-index: 1;
}

.course-card .course-title {
    font-size: 15px;
    font-weight: 700;
    color: #2D3748;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
    transition: color 0.3s ease;
}

.course-card:hover .course-title {
    color: #667EEA;
}

.course-card .price {
    font-size: 18px;
    font-weight: 700;
    color: #667EEA;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.course-card:hover .price {
    color: #764BA2;
}

/* 课程标签 */
.course-tags {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.course-tag {
    background: rgba(255, 255, 255, 0.95);
    color: #667EEA;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #A0AEC0;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state .empty-text {
    font-size: 14px;
    margin-bottom: 20px;
}

/* 加载状态 */
.loading-state {
    padding: 40px 20px;
    text-align: center;
    color: #718096;
}

.loading-state .loading {
    margin: 0 auto 16px;
}

.loading-state .loading-text {
    font-size: 14px;
}

/* 搜索结果 */
.search-results {
    margin-top: 24px;
}

.search-results .result-count {
    font-size: 14px;
    color: #718096;
    margin-bottom: 16px;
}

/* 过滤标签 */
.filter-tags {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.filter-tags::-webkit-scrollbar {
    height: 4px;
}

.filter-tag {
    flex: 0 0 auto;
    padding: 8px 16px;
    margin-right: 12px;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    font-size: 13px;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tag.active {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    border-color: #667EEA;
}

.filter-tag:hover {
    background: #F7FAFC;
    border-color: #CBD5E0;
}

.filter-tag.active:hover {
    background: linear-gradient(135deg, #5A6FD8 0%, #6B428D 100%);
    opacity: 0.9;
}

/* 课程列表加载更多 */
.load-more {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px dashed #E2E8F0;
    border-radius: 12px;
    color: #667EEA;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.load-more:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: #667EEA;
}

.load-more.loading {
    background: #F7FAFC;
    border-color: #CBD5E0;
    color: #718096;
    cursor: not-allowed;
}

.load-more.loading:hover {
    background: #F7FAFC;
    border-color: #CBD5E0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 12px;
    }
    
    .banner {
        height: 200px;
    }
    
    .section-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .category-item {
        width: 70px;
        margin-right: 12px;
    }
    
    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .category-name {
        font-size: 12px;
    }
    
    .course-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .course-card .course-cover {
        height: 110px;
    }
    
    .course-card .course-info {
        padding: 10px;
    }
    
    .course-card .course-title {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .course-card .price {
        font-size: 14px;
    }
    
    .search-box input {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .search-box .search-btn {
        padding: 0 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .banner {
        height: 180px;
    }
    
    .course-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .course-card .course-cover {
        height: 160px;
    }
    
    .category-list {
        padding-bottom: 4px;
    }
    
    .category-item {
        width: 65px;
        margin-right: 10px;
    }
    
    .category-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .category-name {
        font-size: 11px;
    }
}

/* 骨架屏 */
.skeleton-banner {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .skeleton-banner {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .skeleton-banner {
        height: 180px;
    }
}

