* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 24px;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
    opacity: 0.8;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 主要内容 */
.main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* 轮播图样式 */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}



.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.indicator.active {
    background: white;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* 资讯区域 */
.news-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #8b5cf6;
}

.section-header h2 {
    color: #1e293b;
    font-size: 28px;
    font-weight: 600;
}

.more-link {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.more-link:hover {
    color: #7c3aed;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.news-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    color: #1e293b;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.news-content p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #94a3b8;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 底部 */
.footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .hero-carousel {
        height: 250px;
    }
    

    
    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}/* 资讯占位符样
式 */
.news-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    border-radius: 8px;
}

.news-item a {
    text-decoration: none;
    color: inherit;
}

.news-item h3 a:hover {
    color: #8b5cf6;
}/* 课
程专栏样式 */
.courses-section {
    margin-bottom: 60px;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 16px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.course-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.course-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.course-badge.free {
    background: #10b981;
}

.course-badge.discount {
    background: #ef4444;
}

.course-content {
    padding: 20px;
}

.course-title {
    margin-bottom: 12px;
}

.course-title a {
    color: #1e293b;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-title a:hover {
    color: #8b5cf6;
}

.course-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #64748b;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.course-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-current {
    color: #ef4444;
    font-size: 18px;
    font-weight: 700;
}

.price-original {
    color: #94a3b8;
    font-size: 14px;
    text-decoration: line-through;
}

.price-free {
    color: #10b981;
    font-size: 16px;
    font-weight: 600;
}

.btn-enroll {
    background: #8b5cf6;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-enroll:hover {
    background: #7c3aed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .course-image {
        height: 160px;
    }
    
    .course-content {
        padding: 16px;
    }
    
    .course-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .btn-enroll {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 8px;
    }
}/* 课程分类导航样
式 */
.course-categories-nav {
    margin-bottom: 30px;
}

.categories-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-link {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.category-link:hover {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.category-link:first-child {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

.category-link:first-child:hover {
    background: #7c3aed;
    border-color: #7c3aed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .categories-list {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .category-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}