
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif; /* 使用无衬线字体 */
    background: linear-gradient(135deg, #2c3e50, #4ca1af); /* 主色调渐变背景 */
    color: #ffffff; /* 文字颜色为白色 */
    line-height: 1.6;
}

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.8); /* 半透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

nav .logo {
    font-size: 1.5em;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #00c9ff; /* 悬停时颜色变化 */
}

/* 主内容区 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 每个板块最小宽度500px */
    gap: 40px;
    padding: 120px 40px 40px 40px; /* 顶部留出导航栏空间 */
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.1); /* 玻璃拟态效果 */
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 20px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.02); /* 悬停放大效果 */
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

/* 文章样式 */
article {
    max-width: 800px;
    margin: 0 auto;
}

h2, h3, h4 {
    color: #ffffff;
}

h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
}

p {
    font-size: 1em;
    margin-bottom: 15px;
}

/* 代码块样式 */
pre {
    background: rgba(0, 201, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    overflow: auto;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    color: #00c9ff;
    position: relative;
}

pre code::before {
    content: "代码示例";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffffff;
}

/* 图片样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.image-gallery img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: rgba(0, 201, 255, 0.2);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* 按钮样式 */
.button {
    background: linear-gradient(to right, #00c9ff, #92fe9d);
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.button:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #92fe9d, #00c9ff);
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 120px 20px 20px 20px;
    }

    .image-gallery img {
        width: 100%;
        height: auto;
    }
}

/* 动画效果 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.background {
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

/* 提示信息样式 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 165, 0, 0.9); /* 点缀色 */
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    font-size: 0.9em;
    z-index: 1001;
    animation: fadeInOut 5s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

