
/* 基础样式重置，确保不同浏览器下的一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 设置全局字体和背景 */
body {
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体，提高可读性 */
    font-size: 16px; /* 正文字号设为16px，兼顾可读性与美观 */
    line-height: 1.6;
    color: #FFFFFF; /* 文字颜色设为白色，适应深色背景 */
    background: linear-gradient(135deg, #12263F, #4A5568); /* 主色调渐变背景，传递专业与科技感 */
    overflow-x: hidden; /* 禁止出现横向滚动条 */
}
/* 链接样式，内部链接添加nofollow */
a {
    color: #34C759; /* 辅助色绿色，用于链接 */
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #FFA500; /* 点缀色橙色，悬停时颜色变化 */
}
/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(18, 38, 63, 0.9); /* 半透明背景，增加层次感 */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFA500; /* 点缀色用于Logo */
}
.navbar .menu {
    display: flex;
    gap: 20px;
}
.navbar .menu a {
    font-size: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.navbar .menu a:hover {
    color: #34C759;
    transform: scale(1.05);
}
/* 主视觉区样式 */
.hero {
    position: relative;
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample1.png') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
}
.hero::after {
    content: "这是一个网页样式设计参考"; /* 显著提示 */
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 165, 0, 0.8); /* 点缀色背景 */
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
}
/* 主视觉内容 */
.hero-content {
    position: relative;
    z-index: 1;
}
.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease-out forwards;
}
.hero-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 内容区块样式 */
.section {
    padding: 80px 30px;
    background: #1E2A38; /* 深色背景，区分不同区块 */
    position: relative;
}
.section:nth-child(even) {
    background: #2C3E50; /* 交替背景色，增加层次感 */
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
}
.section-title {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #FFA500; /* 点缀色用于标题 */
}
.section-content {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.card {
    background: #1E2A38;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.card img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.card img:hover {
    transform: scale(1.05);
}
.card h3 {
    margin-top: 15px;
    font-size: 1.5rem;
    color: #34C759; /* 辅助色用于子标题 */
}
.card p {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.5;
    color: #ECF0F1;
}
/* 网格系统样式 */
.grid-24 {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 20px;
}
.col-span-6 {
    grid-column: span 6;
}
.col-span-12 {
    grid-column: span 12;
}
.col-span-24 {
    grid-column: span 24;
}
/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(12, 1fr);
    }
    .col-span-6 {
        grid-column: span 12;
    }
    .col-span-12 {
        grid-column: span 12;
    }
}
@media (max-width: 768px) {
    .navbar .menu {
        display: none;
        flex-direction: column;
        background: rgba(18, 38, 63, 0.95);
        position: absolute;
        top: 60px;
        right: 30px;
        width: 200px;
        padding: 20px;
        border-radius: 5px;
    }
    .navbar .menu.active {
        display: flex;
    }
    .section {
        padding: 60px 20px;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .section-title h2 {
        font-size: 1.8rem;
    }
}
/* 菜单按钮样式 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.menu-toggle span {
    height: 3px;
    width: 25px;
    background: #FFFFFF;
    margin-bottom: 5px;
    border-radius: 2px;
}
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
}
/* 按钮样式 */
.btn-primary {
    background-color: #FFA500; /* 点缀色 */
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    color: #FFFFFF;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover {
    background-color: #FF8C00;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}
/* 图片展示样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.image-gallery img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    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.4);
}
/* 文章内容样式 */
.article-content {
    background: #1E2A38;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.article-content h2 {
    font-size: 2rem;
    color: #FFA500;
    margin-bottom: 20px;
}
.article-content h3 {
    font-size: 1.5rem;
    color: #34C759;
    margin-top: 30px;
    margin-bottom: 10px;
}
.article-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #ECF0F1;
    margin-bottom: 20px;
}
.article-content pre {
    background: #2C3E50;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}
.article-content code {
    color: #FFA500;
    font-family: 'Courier New', Courier, monospace;
}
/* 底部信息区样式 */
.footer {
    background: rgba(18, 38, 63, 0.9);
    padding: 30px 0;
    text-align: center;
    color: #FFFFFF;
}
.footer a {
    color: #34C759;
    margin: 0 10px;
    font-size: 0.9rem;
}
.footer a:hover {
    color: #FFA500;
}
/* 光影效果 */
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 38, 63, 0.5);
    backdrop-filter: blur(5px);
}
@keyframes light-move {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.background-overlay {
    animation: light-move 10s linear infinite;
}
/* CSS3代码示例样式 */
.code-example {
    background: #2C3E50;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.code-example pre {
    margin: 0;
}
.code-example code {
    color: #FFA500;
    font-family: 'Courier New', Courier, monospace;
}
/* 动态效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

