/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* 淡灰色背景 */
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between; /* 左右分布 */
    align-items: center;
    padding: 1rem 2rem;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /*position: sticky; /* 使导航栏固定在顶部 */*/
    top: 0;
    z-index: 100;
}

/* Logo 样式 */
.logo {
    display: flex;
    align-items: center;
    gap: 10px; /* Logo图片和文字之间的间距 */
}

.logo-img {
    height: 40px; /* 调整Logo高度 */
    width: auto; /* 保持宽高比 */
}

.logo-text {
    font-size: 24px; /* 1.5rem = 24px (假设默认字体大小为16px) */
    font-weight: bold;
    background: linear-gradient(45deg, #3498db, #2ecc71); /* 应用渐变色 */
    -webkit-background-clip: text; /* 背景色裁剪为文字形状 */
    -webkit-text-fill-color: transparent; /* 文字填充色设为透明 */
    /* 标准属性 (如果浏览器支持) */
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #34495e;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #3498db; /* 鼠标悬停时链接变色 */
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px; /* 适当调整宽度 */
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* 单独的讲义部分 */
.lectures-section {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem; /* 与下面的表格保持间距 */
}

.lectures-section h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2c3e50; /* 使用讲义颜色 */
}

.lectures-list {
    list-style: none;
}

.lectures-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.lectures-item:last-child {
    border-bottom: none; /* 移除最后一个项目的边框 */
}

.lectures-link {
    text-decoration: none;
    color: #2980b9;
    font-weight: 500;
    font-size: 1.1rem;
    display: block;
    transition: color 0.2s ease;
}

.lectures-link:hover {
    color: #e74c3c; /* 链接悬停颜色 */
    text-decoration: underline;
}

.lectures-desc {
    margin-top: 0.3rem;
    color: #7f8c8d;
    font-size: 0.95rem;
}
/* 当周课程高亮部分 */
.current-week-section {
    background-color: #e3f2fd; /* 淡蓝色背景 */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2196f3; /* 左侧强调色 */
    text-align: center; /* 添加此行以使所有内容居中 */
}

.current-week-section h2 {
    font-size: 1.6rem;
    color: #1976d2; /* 强调色 */
    margin-bottom: 1rem;
    /* text-align: center; 如果父元素已设置 text-align: center，则此行非必需 */
}

.current-week-resources {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    gap: 1.5rem; /* 项目间距 */
    justify-content: center; /* 添加此行以在主轴（flex-direction 默认为 row）上居中对齐子项 */
}

.current-week-resource {
    flex: 1; /* 尽可能平均分布 */
    min-width: 200px; /* 最小宽度 */
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center; /* 添加此行以使资源块内的内容居中 */
}

.current-week-resource h3 {
    font-size: 1.2rem;
    color: #424242;
    margin-bottom: 0.5rem;
    /* text-align: center; 如果父元素已设置 text-align: center，则此行非必需 */
}

.current-week-resource a {
    text-decoration: none;
    color: #2980b9;
    font-weight: 500;
    font-size: 1rem;
    display: block;
    transition: color 0.2s ease;
    /* text-align: center; 如果父元素已设置 text-align: center，则此行非必需 */
}

.current-week-resource a:hover {
    color: #e74c3c; /* 链接悬停颜色 */
    text-decoration: underline;
}
/* 资源表格样式 - 美化版 - 恢复配色 */
.resources-table {
    width: 100%;
    border-collapse: collapse; /* 合并边框 */
    background-color: #ffffff;
    /* 增大圆角弧度 */
    border-radius: 16px; /* 从 8px 增加到 16px */
    box-shadow: 0 6px 12px rgba(0,0,0,0.08); /* 增强阴影效果 */
    overflow: hidden; /* 确保圆角生效 */
    margin-bottom: 2rem; /* 与下方内容保持间距 */
}

.resources-table th,
.resources-table td {
    border: 1px solid #dee2e6; /* 使用标准灰色边框 */
    padding: 1.2rem 1rem; /* 增加单元格内边距 */
    text-align: center; /* 内容水平居中 */
    vertical-align: middle; /* 内容垂直居中 */
}

.resources-table th {
    /* 恢复之前的配色方案，使用更明确的标题颜色 */
    font-size: 1.2rem; /* 增大文字 */
    font-weight: 600; /* 加粗 */
    padding: 1.4rem 1rem; /* 增加表头垂直内边距 */
    color: white; /* 白色文字 */
}

.resources-table th:nth-child(1) { /* PPT列标题 */
    background-color: #3498db; /* 蓝色 */
}
.resources-table th:nth-child(2) { /* 作业列标题 */
    background-color: #27ae60; /* 绿色 */
}
.resources-table th:nth-child(3) { /* 解答列标题 */
    background-color: #ec7063; /* 红色 */
}

.resources-table tr:nth-child(even) {
    background-color: #f8f9fa; /* 恢复之前的浅灰色 */
}

.resources-table tr:hover {
    background-color: #eaf2f8; /* 恢复之前的悬停色 */
}

.resources-table .resource-link {
    text-decoration: none;
    color: #2980b9; /* 恢复之前的链接颜色 */
    font-weight: 500;
    font-size: 1.05rem;
    display: inline-block; /* 使其可以设置宽高和居中 */
    transition: color 0.2s ease;
}

.resources-table .resource-link:hover {
    color: #e74c3c; /* 恢复之前的悬停颜色 */
    text-decoration: underline;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}