/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #4361ee;
    color: white;
}

.btn-primary:hover {
    background-color: #3a0ca3;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: #4361ee;
    border: 2px solid #4361ee;
}

.btn-outline:hover {
    background-color: #4361ee;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* 导航栏 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    color: #4361ee;
}

.logo i {
    margin-right: 10px;
    font-size: 28px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #4361ee;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 100px 0;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #212529;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #6c757d;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 通用部分样式 */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #212529;
}

.section-header p {
    font-size: 18px;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* 课程分类 */
.courses-section {
    padding: 100px 0;
    background-color: white;
}

.course-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: #f8f9fa;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-icon {
    width: 80px;
    height: 80px;
    background-color: #4361ee;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #212529;
}

.category-card p {
    color: #6c757d;
}

/* 精选课程 */
.featured-courses {
    padding: 100px 0;
    background-color: #f5f5f5;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.course-image {
    position: relative;
    height: 200px;
    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-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4361ee;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.course-content {
    padding: 20px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.course-category {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.course-rating {
    color: #ffc107;
    font-weight: 600;
}

.course-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #212529;
}

.course-card p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-price {
    font-size: 20px;
    font-weight: 700;
    color: #4361ee;
}

/* 平台特色 */
.features-section {
    padding: 100px 0;
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: #4361ee;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #212529;
}

.feature-card p {
    color: #6c757d;
}

/* 学生评价 */
.testimonials-section {
    padding: 100px 0;
    background-color: #f5f5f5;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.testimonial-rating {
    color: #ffc107;
    margin-bottom: 20px;
}

.testimonial-card p {
    color: #6c757d;
    margin-bottom: 30px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 5px;
}

.author-info p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* 联系我们 */
.contact-section {
    padding: 100px 0;
    background-color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #212529;
}

.contact-info p {
    color: #6c757d;
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #6c757d;
}

.contact-item i {
    color: #4361ee;
    font-size: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #f8f9fa;
    color: #4361ee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #4361ee;
    color: white;
    transform: translateY(-3px);
}

.contact-form h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #212529;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #212529;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

/* 页脚 */
footer {
    background-color: #212529;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    max-width: 250px;
}

.footer-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.footer-logo i {
    margin-right: 10px;
    font-size: 28px;
}

.footer-logo p {
    color: #adb5bd;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4361ee;
}

.footer-bottom {
    border-top: 1px solid #343a40;
    padding-top: 30px;
    text-align: center;
    color: #adb5bd;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .courses-section,
    .featured-courses,
    .features-section,
    .testimonials-section,
    .contact-section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar .container {
        padding: 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .course-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-logo {
        max-width: 100%;
    }
}