
/* 主体颜色变量设置 */
:root {
    --primary-color: #333333; /* 深灰色，用于传达专业感 */
    --accent-color: #32CD32;  /* 明亮绿色，用于突出关键交互点 */
    --background-color: #FFFFFF; /* 白色背景，提升页面清晰度 */
    --secondary-color: #87CEEB; /* 渐变起始色 */
    --tertiary-color: #4682B4; /* 渐变结束色 */
    --text-color: #0A2463; /* 文字主色 */
    --shadow-color: rgba(0, 0, 0, 0.1); /* 阴影颜色 */
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 体背景与字体设置 */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.navbar .logo {
    font-size: 1.5rem;
    color: var(--background-color);
    text-decoration: none;
}

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

.navbar ul li a {
    color: var(--background-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: var(--accent-color);
}

/* 英雄区样式 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--secondary-color), var(--tertiary-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: backgroundMove 10s infinite alternate;
    padding: 20px;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.gptkong.com/demo/sample1.png') center/cover no-repeat;
    opacity: 0.3;
    z-index: -1;
}

.hero h1 {
    color: var(--background-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 4px var(--shadow-color);
}

.hero p {
    color: var(--background-color);
    font-size: 1.2rem;
    max-width: 800px;
    text-align: center;
    margin-bottom: 30px;
}

.hero .cta-button {
    background-color: var(--accent-color);
    color: var(--background-color);
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 背景移动动画 */
@keyframes backgroundMove {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 100% 50%;
    }
}

/* 主内容区样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 100px 20px 40px 20px; /* 顶部预留导航栏空间 */
}

.card {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.card img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

.card h3 {
    margin-top: 15px;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card p {
    margin-top: 10px;
    font-size: 1rem;
    color: #555555;
}

/* 章节导航系统 */
.section-nav {
    position: fixed;
    top: 60px; /* 导航栏高度 */
    right: 20px;
    background-color: rgba(51, 51, 51, 0.9);
    padding: 10px;
    border-radius: 8px;
    z-index: 1000;
}

.section-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.section-nav ul li a:hover {
    color: var(--accent-color);
}

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

article h2, article h3 {
    color: var(--primary-color);
}

article h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

article h3 {
    font-size: 1.5rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

article p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #333333;
}

article pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

/* 折叠区域样式 */
.details-summary {
    background-color: #f1f1f1;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.details-summary:hover {
    background-color: #e2e2e2;
}

details summary {
    list-style: none;
    font-weight: bold;
}

/* CSS3代码示例样式 */
.code-example {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.code-example pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

/* 图像装饰效果 */
.decorative-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.decorative-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px var(--shadow-color);
}

/* 底部信息区域 */
.footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.footer .partners, .footer .legal, .footer .subscribe {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer .subscribe input {
    padding: 10px;
    border: none;
    border-radius: 4px;
}

.footer .subscribe button {
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: var(--accent-color);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.footer .subscribe button:hover {
    background-color: darkgreen;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }

    .section-nav {
        display: none;
    }

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

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* 隐藏水平滚动条 */
body {
    overflow-x: hidden;
}

/* 提示文本样式 */
.page-note {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1000;
}

/* 短链接样式 */
a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: var(--accent-color);
}

/* 按钮样式 */
button {
    font-family: 'Roboto', sans-serif;
}


