/* 全局样式 */
* {
    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 {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

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

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

.btn-outline:hover {
    background-color: #4CAF50;
    color: white;
}

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

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

.logo h1 {
    font-size: 24px;
    color: #4CAF50;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 30px;
}

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

.nav-links a:hover {
    color: #4CAF50;
}

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

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

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 120px 0 80px;
    margin-top: 70px;
}

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

.hero-content {
    flex: 1;
}

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

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

.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-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: #333;
}

/* 课程分类 */
.categories {
    padding: 80px 0;
    background-color: white;
}

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

.category-card {
    background-color: #f9f9f9;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

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

.category-card i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-card p {
    color: #666;
}

/* 特色课程 */
.courses {
    padding: 80px 0;
    background-color: #f5f5f5;
}

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

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

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

.course-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-info {
    padding: 20px;
}

.course-category {
    background-color: #e8f5e8;
    color: #4CAF50;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 10px;
}

.course-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.course-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

.rating {
    color: #ff9800;
    font-weight: 500;
}

.students {
    color: #666;
}

.course-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: #f44336;
}

.original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.view-all {
    text-align: center;
}

/* 学习资源 */
.resources {
    padding: 80px 0;
    background-color: white;
}

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

.resource-card {
    background-color: #f9f9f9;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

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

.resource-icon {
    width: 80px;
    height: 80px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.resource-icon i {
    font-size: 32px;
}

.resource-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.resource-card p {
    color: #666;
}

/* 用户评价 */
.testimonials {
    padding: 80px 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 2px 10px rgba(0, 0, 0, 0.08);
}

.testimonial-rating {
    color: #ff9800;
    margin-bottom: 20px;
    font-size: 18px;
}

.testimonial-card p {
    margin-bottom: 30px;
    line-height: 1.6;
    color: #666;
}

.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-weight: 600;
    margin-bottom: 5px;
}

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

/* 注册区域 */
.signup {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    padding: 80px 0;
    color: white;
}

.signup-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.signup-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.signup-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.signup-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.signup-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
}

.signup-form button {
    white-space: nowrap;
}

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

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

.footer-column h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #4CAF50;
}

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

.footer-column p {
    margin-bottom: 20px;
    opacity: 0.8;
}

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

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

.footer-column ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-column ul li a:hover {
    opacity: 1;
    color: #4CAF50;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #4CAF50;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .menu-toggle {
        display: block;
    }

    .auth-buttons {
        display: none;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 36px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .signup-form {
        flex-direction: column;
    }

    .section-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}