/* 定义颜色变量 */
:root {
    --primary-bg: #1a71d5;
    --secondary-bg: #c469f4;
    --button-bg-start: #8ae6f3;
    --button-bg-end: #e18af3;
    --button-hover-color: #d6e6f9;
    --link-color: #f9d89c;;
    --blockquote-bg-start: #6a4c9c;
    --blockquote-bg-end: #9b5de5;
    --blockquote-border: #1a71d5;
    --footer-text-color: rgba(255, 255, 255, 0.75);
    --footer-border-color: rgba(255, 255, 255, 0.18);
}

/* 全局(初始化) */
* {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: 'SourceCodeProRegular', monospace, Arial, sans-serif;
  font-weight: normal;
   font-style: normal;
  font-display: swap;
  box-sizing: border-box;
}

ul, ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #2b2d42;
    background: linear-gradient(to bottom right, var(--primary-bg), var(--secondary-bg));
    min-height: 100vh; /* 确保body至少和视口一样高 */
    background-size: cover; /* 覆盖整个区域 */
    padding-top: 90px;
}

html {
    scroll-behavior: smooth;
}

/* 按钮 */
button {
    position: relative;
    background: linear-gradient(to right, var(--button-bg-start), var(--button-bg-end));
    background-size: 0 2px; 
    background-position: bottom right; 
    background-repeat: repeat-y; 
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    margin: 10px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    font-weight: bold;
    transition: background-size 0.3s ease;
}

button:hover {
    background-size: 100% 2px; 
    background-position: bottom left; 
    color: var(--button-hover-color);
}

/* 链接 */
a {
    background: linear-gradient(to right, var(--button-bg-start), var(--button-bg-end)); 
    background-size: 0 2px; 
    background-position: bottom right; 
    background-repeat: no-repeat;
    text-decoration: none; 
    color: var(--link-color); 
    padding: 5px 10px; 
    border-radius: 5px; 
    transition: background-size 0.3s ease; 
}

a:hover {
    background-size: 100% 2px; 
    background-position: bottom left; 
    color: var(--link-color); 
}

/* 引用样式 */
blockquote {
    background: linear-gradient(to right, var(--blockquote-bg-start), var(--blockquote-bg-end)); 
    padding: 1rem;
    border-left: 4px solid var(--blockquote-border);
    color: #d6e6f9;
    margin: 1rem 0;
    font-style: italic;
    border-radius: 10px;
}

/* 页脚 */
footer {

            background-color: rgba(255, 255, 255, 0.2); 
        text-align: center;
        padding: 1rem;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: rgba(142, 142, 142, 0.19) 0px 6px 15px 0px;
        -webkit-box-shadow: rgba(142, 142, 142, 0.19) 0px 6px 15px 0px;
        color: rgba(255, 255, 255, 0.75);
}

/* 背景 */
        
        #canvas {
            position: fixed;
            left: 0;
            top: 0;
            z-index: -1;  /* 确保画布在内容下面 */
        }
/* 标题 */
h3 {
        font-size: 25px;
        font-weight: bold;
        margin: 10px 0;
    }
/* 图像 */
img {
    max-width: 100%; /* 最大宽度为100% */
    max-height: 100%; 
    width: auto;
    height: auto;
    display: block; 
    margin-bottom: 25px; 
    object-fit: contain;  
  }

aside{
    background-color: transparent;
    border: none;
}

/* 导航栏 */
/* Logo容器样式 */
        .logo-container {
            position: fixed;
            top: 20px;
            left: 20px;
            z-index: 1000;
            display: flex;
            align-items: center;
            cursor: pointer;
        }
        
        .logo {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            opacity: 0.7;
            transition: opacity 0.3s ease;
            object-fit: cover;
        }
        
        .logo:hover {
            opacity: 1;
        }
        
        .logo-text {
            color: rgba(0, 0, 0, 0.7);
            font-weight: bold;
            white-space: nowrap;
            overflow: hidden;
            width: 0;
            transition: width 0.3s ease, margin-left 0.3s ease;
            margin-left: 0;
        }
        
        .logo-container:hover .logo-text {
            width: 120px;
            margin-left: 10px;
        }
        
        /* 导航菜单样式 */
        nav.dropdown-menu {
            position: fixed;
            top: 72px; /* Logo高度 + 上下边距 */
            left: 20px;
            background-color: rgba(0, 0, 0, 0.7);
            border-radius: 5px;
            overflow: hidden;
            max-height: 0;
            transition: max-height 0.5s ease;
            z-index: 999;
            min-width: 0;
            width: auto;
            transition: max-height 0.5s ease, min-width 0.3s ease 0.1s;
        }
        
        /* 菜单激活时与Logo+文字同宽 */
        nav.dropdown-menu.active {
            max-height: 500px;
            min-width: calc(32px + 10px + 120px); /* logo宽度 + 间距 + 文字宽度 */
        }
        
        .menu-items {
            padding: 10px 0;
            list-style: none;
            min-width: 100%;
        }
        
        .menu-item {
            display: block;
            padding: 10px 20px;
            color: white;
            opacity: 0;
            transform: translateX(20px);
            transition: opacity 0.3s ease, transform 0.3s ease;
            cursor: pointer;
            white-space: nowrap;
            text-decoration: none;
        }
        
        nav.dropdown-menu.active .menu-item {
            opacity: 1;
            transform: translateX(0);
        }
        
        /* 为每个菜单项添加延迟动画 */
        nav.dropdown-menu.active .menu-item:nth-child(1) {
            transition-delay: 0.1s;
        }
        
        nav.dropdown-menu.active .menu-item:nth-child(2) {
            transition-delay: 0.2s;
        }
        
        nav.dropdown-menu.active .menu-item:nth-child(3) {
            transition-delay: 0.3s;
        }
        
        nav.dropdown-menu.active .menu-item:nth-child(4) {
            transition-delay: 0.4s;
        }
        
        .menu-item:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }
        
        /* 内容区域 */
        .content {
            padding: 80px 40px 40px;
            max-width: 1200px;
            margin: 0 auto;
        }
/* 正文段落样式 */
        main{
            margin: 20px;
        }

        
            header {

            background-color: rgba(255, 255, 255, 0.2); 
        text-align: center;
        padding: 1rem;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: rgba(142, 142, 142, 0.19) 0px 6px 15px 0px;
        -webkit-box-shadow: rgba(142, 142, 142, 0.19) 0px 6px 15px 0px;
        color: rgba(255, 255, 255, 0.75);
            }
            
            
/*打字机*/
#text {
            border-right: 2px solid blue; 
            display: inline-block;
            padding-right: 1px;
            white-space: nowrap;
            min-height: 2px; 
            overflow: hidden;
            animation: blink 0.8s infinite step-end;
        }

        @keyframes blink {
            50% {
                border-color: transparent;
            }
        }



/* 设置 main 的最大宽度为 100%，并保持水平居中 */
.main {
  max-width: 1200px; /* 允许 main 容器自适应宽度 */
  width: 100%; /* 确保容器宽度跟随屏幕宽度变化 */
  margin: 0 auto; /* 横向居中 */
  display: flex; /* 使用 flexbox 布局 */
  gap: 0px; /* 给元素之间加点间隙 */
  box-sizing: border-box; /* 包括内边距和边框在内 */
  padding: 0px; /* 侧边留出一点边距 */
  align-items: flex-start; /* 垂直方向上对齐 */
}

article {
    float: left;
  width: 70%;
}

aside {
    float: left;
  width: 30%;
}




/* 屏幕较小时，main 中的元素上下排列 */
@media (max-width: 767px) {
  .main {
    flex-direction: column; /* 垂直排列 */
    align-items: center; /* 使内容居中 */
  }

  aside {
    width: 100%; /* 侧边栏在小屏幕上宽度自适应 */
    max-width: none; /* 取消最大宽度 */
    min-width: 0; /* 取消最小宽度 */
  }
  article{
    width: 100%;
  }

}

/*表格*/
        .table-container {
            width: 100%;
            overflow-x: auto; /* 添加水平滚动条 */
            margin: 20px 0;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0);
            border-radius: 10px;
            backdrop-filter: blur(10px); /* 强化毛玻璃效果 */
            -webkit-backdrop-filter: blur(10px);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            min-width: 600px; /* 设置表格最小宽度 */
            white-space: nowrap; /* 防止单元格内容换行 */
        }

        th, td {
            background-color: rgba(255, 255, 255, 0.25); /* 更柔和的背景 */
            backdrop-filter: blur(6px); /* 强化毛玻璃效果 */
            -webkit-backdrop-filter: blur(6px);
            border: none; /* 去掉边框 */
            color: rgba(196, 105, 244, 0.85);
            padding: 12px 15px;
            text-align: left;
            transition: all 0.3s ease;
        }

        th {
            background-color: rgba(255, 255, 255, 0.5); /* 提高表头透明度 */
            backdrop-filter: blur(8px);
            color: rgba(26, 113, 213, 0.85);
            font-weight: bold;
        }

        tr:nth-child(even) {
            background-color: rgba(255, 255, 255, 0.1); /* 交替行的透明度 */
        }

        tr {
            transition: background-color 0.3s ease;
        }

        tr:hover {
            background-color: rgba(241, 241, 241, 0.4);
        }