* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* 主要内容区域 */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.page-title {
    text-align: center;
    font-size: 36px;
    color: #333;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

/* 课程列表 */
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.course-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
    display: block;
}

.course-info {
    padding: 20px;
}

.course-title {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.course-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.course-price {
    font-size: 24px;
    color: #e74c3c;
    font-weight: bold;
}

.course-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s;
}

.course-btn:hover {
    opacity: 0.9;
}

/* 课程详情页 */
.course-detail {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.detail-image {
    flex: 0 0 400px;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.detail-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: #f8f9fa;
    display: block;
}

.detail-content {
    flex: 1;
    min-width: 300px;
}

.detail-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
}

.detail-price {
    font-size: 36px;
    color: #e74c3c;
    font-weight: bold;
    margin: 20px 0;
}

.detail-desc {
    color: #666;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.detail-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-info-item {
    margin-bottom: 10px;
    font-size: 16px;
}

.detail-info-item strong {
    color: #333;
    margin-right: 10px;
}

/* 购买表单 */
.order-form {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.submit-btn:hover {
    opacity: 0.9;
}

/* 侧边在线客服 */
.customer-service {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 999;
}

.service-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
    position: relative;
}

.service-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.service-btn::before {
    content: '💬';
    font-size: 28px;
}

.service-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    padding: 20px;
    display: none;
    animation: slideUp 0.3s ease;
}

.service-panel.show {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.service-panel-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.service-close {
    width: 30px;
    height: 30px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.service-close:hover {
    background: #e0e0e0;
    color: #333;
}

.service-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.service-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.service-icon.qq {
    background: #12b7f5;
    color: white;
}

.service-icon.wechat {
    background: #07c160;
    color: white;
}

.service-icon.phone {
    background: #667eea;
    color: white;
}

.service-info {
    flex: 1;
}

.service-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.service-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.service-tip {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.back-to-top:hover {
    opacity: 0.9;
    transform: translateY(-3px);
}

.back-to-top.show {
    display: flex;
}

/* 底部样式 */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.beian {
    font-size: 14px;
    color: #95a5a6;
}

.beian a {
    color: #95a5a6;
    text-decoration: none;
}

.beian a:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        justify-content: center;
    }

    .page-title {
        font-size: 28px;
    }

    .course-list {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
    }

    .detail-image {
        flex: 1 1 100%;
    }

    .order-form {
        padding: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .customer-service {
        right: 15px;
        bottom: 90px;
    }

    .service-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .service-panel {
        width: 280px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .page-title {
        font-size: 24px;
    }

    .course-card {
        margin: 0 auto;
    }

    .course-detail {
        padding: 20px;
    }

    .detail-title {
        font-size: 24px;
    }
}
