/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 2rem;
    margin-bottom: 15px;
}

.price {
    color: #ffd700;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-bonus {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #ff6b6b;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* 说明区域 */
.intro-section {
    background: white;
    padding: 60px 20px;
}

.intro-box {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%; /* 确保宽度一致 */
    box-sizing: border-box; /* 包含padding在宽度内 */
}

.intro-box h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}

.explanation-item {
    margin-bottom: 40px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.explanation-item h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.answer-box {
    line-height: 1.8;
}

.answer-box p {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.answer-box .wrong {
    color: #e74c3c;
    font-weight: bold;
}

.answer-box .right {
    color: #27ae60;
    font-weight: bold;
}

.answer-box .warning {
    color: #f39c12;
    font-weight: 500;
}

.answer-box .reason {
    color: #7f8c8d;
    font-style: italic;
}

.answer-box ul {
    margin: 15px 0 15px 30px;
}

.answer-box ul li {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.answer-box strong {
    color: #667eea;
    font-weight: 600;
}

.final-message {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
    border: 2px solid #667eea;
}

.final-message p {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.final-message strong {
    color: #667eea;
    font-weight: 600;
}

/* 课程区域 */
.courses-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 50px;
    font-weight: bold;
}

.course-category {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: visible; /* 改为visible，让内容可以完整显示 */
    transition: all 0.3s ease;
    position: relative; /* 确保定位上下文 */
    z-index: 1; /* 确保层级正确 */
}

.course-category:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.category-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    border-radius: 15px 15px 0 0; /* 顶部圆角，当内容展开时 */
}

.category-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.category-header.active .toggle-icon {
    transform: rotate(180deg);
}

.category-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: white; /* 确保展开内容有白色背景 */
    box-sizing: border-box; /* 确保padding包含在高度计算中 */
    display: block; /* 确保是块级元素 */
    width: 100%; /* 确保宽度完整 */
}

.category-content.active {
    padding: 25px 30px 30px 30px !important; /* 底部增加更多内边距 */
    max-height: 5000px !important; /* 足够大的后备值，JavaScript会动态设置实际值 */
    overflow: visible !important; /* 展开时允许内容正常显示 */
    background: white !important; /* 确保展开内容有白色背景 */
    border-radius: 0 0 15px 15px; /* 底部圆角匹配父容器 */
    min-height: fit-content !important; /* 确保内容高度足够 */
    display: block !important; /* 确保显示 */
    height: auto !important; /* 允许高度自适应 */
}

.course-list {
    list-style: none;
    margin: 0;
    background: white; /* 确保列表有白色背景 */
}

.course-list li {
    padding: 12px 0;
    padding-left: 25px;
    position: relative;
    font-size: 1.05rem;
    border-bottom: 1px solid #eee;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
}

.course-list li:last-child {
    border-bottom: none;
    margin-bottom: 0; /* 确保最后一个项目没有额外边距 */
    padding-bottom: 0; /* 确保最后一个项目底部没有额外内边距 */
}

.course-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* 软件区域 */
.software-section {
    background: white;
    padding: 60px 20px;
}

.section-subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.software-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.software-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.software-item h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.software-item .size {
    color: #667eea;
    font-weight: bold;
    font-size: 0.95rem;
}

.software-item .note {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

/* CTA区域 */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.cta-button.primary {
    background: #ff6b6b;
    padding: 18px 50px;
    font-size: 1.3rem;
}

.cta-button.secondary {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    padding: 18px 50px;
    font-size: 1.3rem;
}

.cta-button.secondary:hover {
    background: rgba(255,255,255,0.3);
}

.cta-note {
    font-size: 1rem;
    opacity: 0.9;
    font-style: italic;
}

/* 按钮涟漪效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .price {
        font-size: 2rem;
    }
    
    .intro-box {
        padding: 25px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-header h3 {
        font-size: 1.2rem;
    }
    
    .category-content.active {
        padding: 20px 15px 25px 15px; /* 移动端也增加底部内边距 */
    }
    
    .course-list li {
        padding-left: 20px;
        font-size: 1rem;
    }
    
    .software-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-section h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 20px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .price {
        font-size: 1.5rem;
    }
    
    .intro-box {
        padding: 20px;
    }
    
    .explanation-item {
        padding: 20px;
    }
}

