/* 课程网站样式文件 */

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

:root {
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background: #ffffff;
    --background-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

/* 导航栏 */
.header {
    background: var(--background);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: var(--background-light);
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,80 1000,100 0,100"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 课程网格 */
.courses-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

/* 课程卡片 */
.course-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
    border-color: var(--primary-color);
}

.course-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.course-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.course-duration {
    background: var(--background-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* 统计区域 */
.stats-section {
    background: var(--background-light);
    padding: 3rem 2rem;
    margin: 3rem 0;
    border-radius: var(--border-radius);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* 页脚 */
.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeInUp 0.6s ease-out;
}

.course-card:nth-child(2) {
    animation-delay: 0.1s;
}

.course-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 辅助类 */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}


/* ==== 最优化方法导论页面美化CSS ==== */

/* 整体页面样式 */
body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 0;
    padding: 0;
}

/* 主容器 */
#main {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 主标题样式 */
.page-title,
h1:first-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    border-bottom: none;
}

/* 导航菜单美化 */
.main-navigation,
nav,
.menu {
    background: white;
    border-bottom: 2px solid #e9ecef;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-navigation ul,
.menu ul,
nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.main-navigation li,
.menu li,
nav li {
    margin: 0;
    padding: 0;
}

.main-navigation a,
.menu a,
nav a {
    display: block;
    padding: 20px 30px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

.main-navigation a:hover,
.menu a:hover,
nav a:hover {
    color: #667eea;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.main-navigation a.active::after,
.menu a.active::after,
nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* 内容区域 */
.article,
.page,
.content {
    padding: 40px;
    background: white;
}
/* 标题样式改进 */
h1 {
    color: #2c3e50;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 700;
}
h2 {
    color: #667eea;
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
    padding-left: 15px;
    /* 去掉左边的竖线 */
    /* border-left: 4px solid #667eea; */
    font-weight: 600;
}
h3 {
    color: #764ba2;
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
    font-weight: 600;
}
/* 列表美化 */
ul {
    margin: 15px 0;
    padding-left: 0;
    list-style: none;
}

/* 确保所有列表都去掉圆点 */
ul, ol {
    list-style-type: none;
    list-style: none;
}

/* 针对嵌套列表也去掉圆点 */
ul ul, ol ol, ul ol, ol ul {
    list-style-type: none;
    list-style: none;
}
li {
    background: #f8f9fa;
    margin: 8px 0;
    padding: 12px 20px;
    /* 去掉左边的竖线 */
    /* border-left: 4px solid #667eea; */
    border-radius: 8px; /* 调整为完整的圆角 */
    transition: all 0.3s ease;
}
li:hover {
    background: #e3f2fd;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}
/* 链接样式 */
a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
a:hover {
    color: #764ba2;
    text-decoration: underline;
}
/* 段落间距 */
p {
    margin: 15px 0;
    line-height: 1.7;
    color: #555;
}
/* 强调文字 */
strong {
    color: #2c3e50;
    font-weight: 600;
}
/* 分隔线美化 */
hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 30px 0;
    border-radius: 2px;
}
/* 卡片式内容区块 */
.content-section {
    background: #fdfdfd;
    padding: 25px;
    margin: 20px 0;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}
.content-section:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
/* 响应式设计 */
@media (max-width: 768px) {
    #main {
        margin: 10px;
        border-radius: 10px;
    }
    
    .page-title,
    h1:first-child {
        font-size: 2rem;
        padding: 30px 15px;
    }
    
    .main-navigation ul,
    .menu ul,
    nav ul {
        flex-direction: column;
    }
    
    .main-navigation a,
    .menu a,
    nav a {
        padding: 15px 20px;
        text-align: center;
    }
    
    .article,
    .page,
    .content {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
}
/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.content,
.article,
.page {
    animation: fadeIn 0.6s ease-out;
}
/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
}
.nav-open, .nav-close, .menu-toggle {
    display: none !important;
}

* {
    list-style: none !important;
    list-style-type: none !important;
}

/* 方案一：限制标题区域宽度与内容区域一致 */
.page-title,
.header-banner,
.course-header {
    max-width: 1200px; /* 与内容区域保持一致的最大宽度 */
    margin: 0 auto; /* 居中显示 */
    padding: 60px 40px; /* 调整内边距 */
}

.teacher-photo {
  width: 200px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.teacher-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: 20px;  /* 整个区域往右缩一点 */
}
