
/* 基本重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体和背景 */
body {
    font-family: 'Roboto', sans-serif; /* 使用无衬线字体，保持现代感 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 深蓝色渐变背景，营造科技氛围 */
    color: #ffffff; /* 文字颜色为白色，确保可读性 */
    line-height: 1.6;
    padding-top: 60px; /* 避免内容被固定导航栏遮挡 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9); /* 半透明背景，科技感强 */
    padding: 10px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 细微阴影，增加层次感 */
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
    position: relative;
}

.navbar a:hover {
    color: #ff7f50; /* 橙色点缀，吸引注意力 */
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar .menu {
    display: flex;
}

/* 主视觉区域样式 */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center/cover;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(32, 58, 67, 0.6); /* 半透明覆盖层，增强文本可读性 */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* 文字阴影，增强立体感 */
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

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

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

/* 模块化布局样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 每个模块不小于500px宽度 */
    gap: 40px;
    padding: 60px 20px;
}

.module {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

.module img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

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

.module h2 {
    font-size: 1.8rem;
    margin: 20px 0 10px;
    color: #ffffff;
}

.module p {
    font-size: 1rem;
    color: #e0e0e0;
}

/* 文章内容样式 */
article {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2, article h3 {
    color: #ff7f50;
    margin-bottom: 15px;
}

article p {
    margin-bottom: 20px;
    color: #e0e0e0;
}

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

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

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

article pre code {
    display: block;
    overflow: visible; /* 防止 ::before 被遮挡 */
}

/* 提示文字样式 */
.highlight {
    background: rgba(255, 127, 80, 0.2);
    padding: 10px;
    border-left: 4px solid #ff7f50;
    margin-bottom: 20px;
}

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

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

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

/* 提示文字 */
.reference-note {
    text-align: center;
    font-size: 1.2rem;
    margin: 40px 0;
    color: #ff7f50;
    font-weight: bold;
}

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

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

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

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

    article {
        padding: 20px 10px;
    }
}

/* 动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.navbar a {
    animation: fadeIn 1s ease-in-out;
}

.hero-content {
    animation: fadeIn 2s ease-in-out;
}

