/* styles25.css 02*/

/* 字体优化：使用 OpenSans 字体（请将字体文件放置于 /fonts/ 下） */
@font-face {
    font-family: 'OpenSans';
    src: url('/fonts/OpenSans-Regular.woff2') format('woff2'),
         url('/fonts/OpenSans-Regular.woff') format('woff');
    font-display: swap;
  }
  
  /* CSS 变量（统一配色方案） */
  :root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --link-color: #0066cc;
    --header-bg: #f5f5f5;
    --header-text: #333333;
    --section-bg: #ffffff;
    --modal-bg: #fefefe;
    --modal-text: #000000;
    --border-color: #dddddd;
    --accent-color: #0066cc;
  }
  
  [data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --link-color: #bb86fc;
    --header-bg: #1e1e1e;
    --header-text: #e0e0e0;
    --section-bg: #1e1e1e;
    --modal-bg: #1e1e1e;
    --modal-text: #e0e0e0;
    --border-color: #444444;
    --accent-color: #bb86fc;
  }
  
  /* 全局基础设置 */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: 'OpenSans', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
  }
  
  /* 主题切换按钮 */
  .theme-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 1100;
  }
  
  .theme-toggle:hover {
    opacity: 0.9;
  }
  
  /* 页眉 */
  .header {
    background-color: var(--header-bg);
    padding: 20px;
  }
  
  .header-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .header-container h1 {
    margin: 0;
    font-size: 2em;
    color: var(--header-text);
  }
  
  .header-container p {
    margin: 10px 0 0;
  }
  
  /* 主体区域 */
  main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* 每个区块外层容器 */
  .content-section {
    margin-bottom: 40px;
    background-color: var(--section-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  /* 内部容器，控制标题与正文的对齐 */
  .content-section-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
  }
  
  .content-section-inner h2 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    font-size: 1.5em;
  }
  
  /* 文章内容 */
  .content {
    margin-top: 20px;
    text-align: justify;
  }
  
  .content p {
    margin: 1em 0;
    text-indent: 2em;
  }
  
  /* 表格（如有） */
  table {
    width: 100%;
    margin: 20px auto;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
  }
  
  td {
    padding: 10px;
    border: 1px solid var(--border-color);
  }
  
  /* 模态框 */
  .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
  }
  
  .modal-content {
    background-color: var(--modal-bg);
    color: var(--modal-text);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
  }
  
  .close {
    color: var(--text-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }
  
  .close:hover,
  .close:focus {
    color: var(--accent-color);
    text-decoration: none;
  }
  
  /* 图片（懒加载） */
  img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
  }
  
  /* 链接 */
  a {
    color: var(--link-color);
    text-decoration: none;
  }
  
  a:hover {
    text-decoration: underline;
  }
  
  /* 响应式设计 */
  @media (min-width: 768px) {
    main {
      padding: 30px;
    }
  
    .content-section-inner {
      padding: 30px;
    }
  }

  /* 基础优化 */
  .content-section {
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
  }
  
  .theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid var(--theme-border);
    background: var(--theme-bg);
    color: var(--theme-text);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
  }
  
  .theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  /* 移动端优化 */
  @media (max-width: 768px) {
    .header h1 {
      font-size: 1.5rem;
    }
    
    .link-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 0.5rem;
    }
    
    .modal-content {
      width: 90%;
      padding: 15px;
    }
  }
  
  /* 图片优化 */
  img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
  }