
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* 主背景色渐变，传达科技感 */
    color: #ffffff; /* 全局文字颜色为白色，确保对比度 */
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7); /* 半透明背景，融入磨砂玻璃效果 */
    padding: 15px 0;
    z-index: 1000; /* 确保导航栏在最前 */
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.9); /* 滚动后背景加深 */
}

.navbar .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffa500; /* 强调色橙色，吸引注意 */
    text-decoration: none;
}

.navbar .nav-links a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: #ff8c00; /* 悬停时颜色变化 */
}

/* 主视觉部分样式 */
.hero-section {
    background: url('https://images.gptkong.com/demo/sample1.png') center center/cover no-repeat; /* 背景图片 */
    color: #fff;
    padding: 150px 0 100px 0;
    text-align: center;
    position: relative;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* 半透明覆盖层 */
    backdrop-filter: blur(5px); /* 磨砂玻璃效果 */
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-section p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.hero-section .cta-button {
    background-color: #ffa500;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    font-size: 1em;
}

.hero-section .cta-button:hover {
    background-color: #ff8c00;
    transform: scale(1.05);
}

/* 文章内容区样式 */
article {
    padding: 100px 20px 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); /* 立体阴影效果 */
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
}

article h2, article h3, article h4 {
    color: #ffa500; /* 主标题颜色为橙色 */
    margin-top: 40px;
    margin-bottom: 20px;
}

article h2 {
    font-size: 2em;
    border-bottom: 2px solid #ffa500;
    padding-bottom: 10px;
}

article h3 {
    font-size: 1.5em;
}

article p {
    font-size: 1em;
    line-height: 1.8;
    margin-bottom: 20px;
}

article pre {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    color: #ff8c00;
    font-family: 'Courier New', Courier, monospace;
}

article img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    margin: 20px 0;
}

article img:hover {
    transform: scale(1.05);
}

/* 模块化布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    padding: 40px 0;
}

.grid-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-10px);
}

/* 按钮与链接样式 */
.button {
    background-color: #ffa500;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.button:hover {
    background-color: #ff8c00;
}

/* 代码块样式 */
pre code {
    display: block;
    padding: 15px;
    background: rgba(0,0,0,0.7);
    border-radius: 5px;
    overflow: auto;
    position: relative;
}

pre code::before {
    content: "代码示例";
    position: absolute;
    top: -25px;
    left: 0;
    background: #ffa500;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px 5px 0 0;
    font-size: 0.9em;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #ffa500;
    color: #fff;
    padding: 10px 15px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2em;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #ff8c00;
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .nav-links a {
        margin-left: 10px;
        font-size: 0.9em;
    }

    .hero-section {
        padding: 100px 0 70px 0;
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1em;
        padding: 0 10px;
    }

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

    article {
        padding: 80px 10px 30px 10px;
    }
}

/* 提示文本样式 */
.reference-note {
    text-align: center;
    font-size: 1.2em;
    background: rgba(255, 165, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

