/* 全局样式重置：所有元素使用border-box盒模型，确保padding和border不影响元素总宽度 */
    * {
      box-sizing: border-box;
    }
    body {
      margin: 0;
      font-family: "Helvetica Neue", sans-serif;
      background-image: url("../assets/slides/slide2.jpg");
      background-size: cover;
      background-attachment: fixed;
      background-position: center;
      color: #2a2a3c;
      line-height: 1.6;
    }

    /* 页面容器：固定宽度并水平居中，控制整体内容宽度 */
    .page-container {
      position: relative;
      width: 1200px; /* 固定宽度 */
      margin: 0 auto; /* 水平居中 */
    }

    /* 内容包裹容器：设置背景、边距、圆角和阴影，增强视觉层次感 */
    .content-wrapper {
      background-color: rgba(255, 255, 255, 0.92); /* 半透明白色背景 */
      width: 100%; /* 继承容器宽度 */
      margin: 2rem 0; /* 上下外边距 */
      padding: 2rem; /* 内边距 */
      border-radius: 16px; /* 圆角边框 */
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); /* 阴影效果 */
    }

    /* 页头样式：固定在顶部，包含网站名称和导航链接 */
    header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1rem 2rem;
      background-color: #2D3436;
      color: #e0e6f1;
      position: sticky;
      top: 0;
      z-index: 1000;
      box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

    header h1 {
      margin: 0;
      color: #E0E6F1;
      font-weight: 600;
      font-size: 1.8rem;
      letter-spacing: 1px;
    }

    header .logo {
      font-size: 18px;
      font-weight: bold;
    }

    nav a {
      color: #cfd9f3;
      text-decoration: none;
      margin-left: 1.6rem;
      font-weight: 500;
      font-size: 1rem;
      transition: color 0.25s ease;
    }

    nav a:hover {
      color: #66a6ff;
      text-decoration: underline;
    }

    /* 主内容区域样式 */
    main {
      padding: 2rem; /* 内边距 */
      width: 100%; /* 宽度100% */
    }

    /* 主标题样式 */
    h1 {
      font-weight: 700; /* 加粗 */
      font-size: 2rem; /* 字体大小 */
      margin-bottom: 1.5rem; /* 底部外边距 */
      border-bottom: 2px solid #2a3a62; /* 底部边框 */
      padding-bottom: 0.3rem; /* 底部内边距 */
    }

    /* 搜索容器样式 */
    .search-container {
      background-color: #f8f9fa; /* 浅灰色背景 */
      padding: 1.2rem; /* 内边距 */
      border-radius: 8px; /* 圆角 */
      margin-bottom: 1.5rem; /* 底部外边距 */
      border: 1px solid #e9ecef; /* 边框 */
    }

    /* 搜索框区域样式 */
    .search-box {
      display: flex; /* flex布局 */
      margin-bottom: 1rem; /* 底部外边距 */
      gap: 10px; /* 元素间距 */
    }

    /* 搜索输入框样式 */
    .search-input {
      flex: 1; /* 占据剩余空间 */
      padding: 0.8rem 1rem; /* 内边距 */
      border: 1px solid #ced4da; /* 边框 */
      border-radius: 6px; /* 圆角 */
      font-size: 1rem; /* 字体大小 */
      transition: border-color 0.2s; /* 边框颜色过渡 */
    }

    .search-input:focus {
      outline: none; /* 去除默认焦点轮廓 */
      border-color: #66a6ff; /* 焦点时边框颜色 */
      box-shadow: 0 0 0 3px rgba(102, 166, 255, 0.25); /* 焦点时阴影 */
    }

    /* 搜索按钮样式 */
    .search-btn {
      padding: 0.8rem 1.5rem; /* 内边距 */
      background-color: #457b9d; /* 背景色 */
      color: white; /* 文字颜色 */
      border: none; /* 无边框 */
      border-radius: 6px; /* 圆角 */
      cursor: pointer; /* 鼠标指针样式 */
      font-size: 1rem; /* 字体大小 */
      transition: background-color 0.2s; /* 背景色过渡 */
    }

    .search-btn:hover {
      background-color: #356380; /* 悬停时背景色 */
    }

    /* 筛选器样式 */
    .filters {
      margin-bottom: 1rem; /* 底部外边距 */
      display: none; /* 默认隐藏筛选条件 */
      user-select: none; /* 禁止选择筛选区域文本 */
    }
    
    .filters.expanded {
      display: block; /* 展开时显示 */
    }
    
    .filter-section {
      margin-bottom: 1rem; /* 筛选区块底部间距 */
    }
    
    .filter-title {
      font-weight: 600; /* 筛选标题加粗 */
      margin-bottom: 0.5rem; /* 底部间距 */
      color: #495057; /* 文字颜色 */
      font-size: 0.95rem; /* 字体大小 */
    }
    
    .tag-container {
      display: flex; /* flex布局 */
      flex-wrap: wrap; /* 自动换行 */
      gap: 8px; /* 标签间距 */
      margin-bottom: 10px; /* 底部间距 */
    }
    
    .filter-tag {
      padding: 4px 10px; /* 内边距 */
      border-radius: 4px; /* 圆角 */
      font-size: 0.85rem; /* 字体大小 */
      cursor: pointer; /* 鼠标指针 */
      transition: all 0.2s; /* 过渡效果 */
      background-color: #ffffff; /* 背景色 */
      border: 1px solid #ced4da; /* 边框 */
      color: #495057; /* 文字颜色 */
      user-select: none; /* 禁止选择标签文本 */
      min-width: 36px;
      text-align: center; /* 居中文本 */
    }
    
    .filter-tag:hover {
      background-color: #e9f5ff; /* 悬停背景色 */
      border-color: #b8daff; /* 悬停边框色 */
    }
    
    .filter-tag.selected {
      background-color: #1d4e89; /* 选中背景色 */
      color: white; /* 选中文字色 */
      border-color: #1d4e89; /* 选中边框色 */
    }
    
    /* 已选筛选条件区域 */
    .selected-filters {
      display: flex; /* flex布局 */
      flex-wrap: wrap; /* 自动换行 */
      gap: 8px; /* 标签间距 */
      margin: 10px 0; /* 上下间距 */
      padding: 10px; /* 内边距 */
      background-color: #edf2fa; /* 背景色 */
      border-radius: 6px; /* 圆角 */
    }
    
    .selected-tag {
      display: inline-flex; /* 行内flex布局 */
      align-items: center; /* 垂直居中 */
      padding: 4px 8px; /* 内边距 */
      background-color: #1d4e89; /* 背景色 */
      color: white; /* 文字色 */
      border-radius: 4px; /* 圆角 */
      font-size: 0.85rem; /* 字体大小 */
      user-select: none; /* 禁止选择文本 */
    }
    
    .remove-tag {
      margin-left: 6px; /* 左侧间距 */
      cursor: pointer; /* 鼠标指针 */
      font-weight: bold; /* 加粗 */
      font-size: 12px; /* 字体大小 */
    }
    
    /* 清除筛选按钮 */
    .clear-filters {
      color: #1d4e89; /* 文字色 */
      background: none; /* 无背景 */
      border: none; /* 无边框 */
      padding: 5px 0; /* 内边距 */
      cursor: pointer; /* 鼠标指针 */
      font-size: 0.9rem; /* 字体大小 */
      margin-top: 5px; /* 顶部间距 */
      user-select: none; /* 禁止选择文本 */
    }
    
    .clear-filters:hover {
      color: #ff6600; /* 悬停文字色 */
      text-decoration: underline; /* 下划线 */
    }

    /* 高级筛选按钮 */
    .advanced-filter-btn {
      color: #1d4e89; /* 文字色 */
      background: none; /* 无背景 */
      border: none; /* 无边框 */
      padding: 0.5rem 0; /* 内边距 */
      cursor: pointer; /* 鼠标指针 */
      font-size: 0.9rem; /* 字体大小 */
      display: flex; /* flex布局 */
      align-items: center; /* 垂直居中 */
      gap: 5px; /* 元素间距 */
      user-select: none; /* 禁止选择文本 */
    }

    .advanced-filter-btn:hover {
      color: #ff6600; /* 悬停文字色 */
    }

    /* 题目表格容器：允许水平滚动 */
    .problems-container {
      overflow-x: auto;
    }

    /* 题目表格样式 */
    .problems-table {
      width: 100%; /* 宽度100% */
      border-collapse: collapse; /* 合并边框 */
      margin-bottom: 1rem; /* 底部间距 */
    }

    /* 固定表格各列宽度比例 */
    .problems-table th:nth-child(1) { width: 8%; }   /* ID列宽度 */
    .problems-table th:nth-child(2) { width: 50%; }  /* 题目内容列宽度 */
    .problems-table th:nth-child(3) { width: 20%; }  /* 知识点列宽度 */
    .problems-table th:nth-child(4) { width: 15%; }  /* 来源与年份列宽度 */
    .problems-table th:nth-child(5) { width: 7%; }   /* 难度列宽度 */

    /* 表格单元格样式 */
    .problems-table th,
    .problems-table td {
      padding: 0.8rem 1rem; /* 内边距 */
      text-align: left; /* 左对齐 */
      border-bottom: 1px solid #e9ecef; /* 底部边框 */
      white-space: nowrap; /* 强制内容在一行显示 */
    }

    .problems-table th {
      background-color: #f1f3f5; /* 表头背景色 */
      font-weight: 600; /* 加粗 */
      color: #212529; /* 表头文字色 */
    }

    .problems-table tr:hover {
      background-color: #f8f9fa; /* 行悬停背景色 */
    }

    /* 题目ID样式 */
    .problem-id {
      color: #6c757d; /* 颜色 */
      font-family: monospace; /* 等宽字体 */
    }

    /* 题目内容链接样式 */
    .problem-content a {
      color: #1d4e89; /* 链接色 */
      text-decoration: none; /* 无下划线 */
      font-weight: 500; /* 加粗 */
      white-space: nowrap; /* 不换行 */
      overflow: hidden; /* 隐藏溢出内容 */
      text-overflow: ellipsis; /* 溢出显示省略号 */
      display: inline-block; /* 行内块级 */
      max-width: 100%; /* 最大宽度100% */
    }

    /* 难度标签样式 - 从绿到红渐变 */
    .difficulty {
      display: inline-block;
      padding: 0.2rem 0; /* 垂直方向内边距，水平方向由width控制 */
      width: 28px; /* 固定宽度，确保1-10等宽 */
      border-radius: 4px;
      font-size: 0.8rem;
      color: white;
      font-weight: 500;
      text-align: center; /* 文本居中 */
    }

    /* 难度1-10的颜色渐变 */
    .difficulty-1 { background-color: #4caf50; }  /* 绿色 */
    .difficulty-2 { background-color: #66bb6a; }
    .difficulty-3 { background-color: #81c784; }
    .difficulty-4 { background-color: #aed581; }
    .difficulty-5 { background-color: #dce775; }
    .difficulty-6 { background-color: #ffee58; }  /* 黄色 */
    .difficulty-7 { background-color: #ffca28; }
    .difficulty-8 { background-color: #ff9800; }
    .difficulty-9 { background-color: #fb8c00; }
    .difficulty-10 { background-color: #f44336; } /* 红色 */

    /* 知识点标签样式 */
    .knowledge-tags {
      flex-wrap: nowrap; /* 不换行 */
      overflow: hidden; /* 隐藏溢出 */
      text-overflow: ellipsis; /* 溢出省略号 */
    }
    
    .knowledge-tag {
      background-color: #e9f5ff; /* 背景色 */
      color: #1d4e89; /* 文字色 */
      padding: 2px 8px; /* 内边距 */
      border-radius: 4px; /* 圆角 */
      font-size: 0.8rem; /* 字体大小 */
      white-space: nowrap; /* 不换行 */
      display: inline-block; /* 行内块级 */
      margin-right: 5px; /* 右侧间距 */
      cursor: pointer; /* 鼠标指针 */
      transition: all 0.2s; /* 过渡效果 */
      user-select: none; /* 禁止选择文本 */
    }
    
    .knowledge-tag:hover {
      background-color: #d0e8ff; /* 悬停背景色 */
      transform: translateY(-1px); /* 上移效果 */
    }
    
    .knowledge-ellipsis {
      color: #1d4e89; /* 颜色 */
      align-self: center; /* 垂直居中 */
      font-size: 0.9rem; /* 字体大小 */
    }

    /* 分页样式 */
    .pagination {
      display: flex; /* flex布局 */
      justify-content: center; /* 水平居中 */
      align-items: center; /* 垂直居中 */
      gap: 0.5rem; /* 元素间距 */
      margin-top: 2rem; /* 顶部间距 */
    }

    .page-btn {
      padding: 0.5rem 1rem; /* 内边距 */
      border: 1px solid #dee2e6; /* 边框 */
      border-radius: 4px; /* 圆角 */
      background-color: white; /* 背景色 */
      color: #495057; /* 文字色 */
      cursor: pointer; /* 鼠标指针 */
      transition: all 0.2s; /* 过渡效果 */
      user-select: none; /* 禁止选择文本 */
    }

    .page-btn:hover {
      background-color: #e9ecef; /* 悬停背景色 */
      color: #1d4e89; /* 悬停文字色 */
    }

    .page-btn.active {
      background-color: #457b9d; /* 当前页背景色 */
      color: white; /* 当前页文字色 */
      border-color: #457b9d; /* 当前页边框色 */
    }

    .page-btn:disabled {
      opacity: 0.6; /* 禁用状态透明度 */
      cursor: not-allowed; /* 禁用鼠标指针 */
    }

    .page-info {
      color: #6c757d; /* 信息文字色 */
      font-size: 0.9rem; /* 字体大小 */
    }

    /* 页脚样式 */
    footer {
      background-color: #ffffff;
      color: #2a2a3c;
      text-align: center;
      padding: 2.4rem 1rem;
      font-size: 0.95rem;
      box-shadow: inset 0 1px 0 rgba(102, 166, 255, 0.15);
      user-select: none;
    }

    /* 小屏幕适配（小于1200px） */
    @media (max-width: 1200px) {
      /* 保持容器宽度为1200px，不随屏幕缩小 */
      .page-container {
        width: 1200px;
      }
    }

    /* 平板屏幕适配（小于768px） */
    @media (max-width: 768px) {
      nav a {
        margin-left: 12px; /* 导航链接间距减小 */
        font-size: 14px; /* 字体缩小 */
      }

      .logo {
        font-size: 16px; /* logo字体缩小 */
      }

      /* 隐藏知识点列 */
      .problems-table th:nth-child(3),
      .problems-table td:nth-child(3) {
        display: none;
      }
    }

    /* 手机屏幕适配（小于576px） */
    @media (max-width: 576px) {
      /* 隐藏来源与年份列 */
      .problems-table th:nth-child(4),
      .problems-table td:nth-child(4) {
        display: none;
      }

      .search-box {
        flex-direction: column; /* 搜索框垂直排列 */
      }

      .page-btn {
        padding: 0.3rem 0.7rem; /* 分页按钮内边距减小 */
        font-size: 0.9rem; /* 字体缩小 */
      }
    }