
/* 
整体页面样式设计
主色调：深灰色 #212121
辅助色：亮蓝色 #2196F3，浅绿色 #8BC34A
点缀色：橙色 #FF9800
*/

/* 设置全局字体和背景 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;
    background-color: #212121; /* 深灰色背景 */
    color: #ffffff;
    line-height: 1.6;
}

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

.navbar .logo {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5em;
    color: #ffffff;
    text-decoration: none;
}

.navbar .nav-links {
    display: flex;
    gap: 20px;
}

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

.navbar .nav-links a:hover {
    color: #2196F3; /* 亮蓝色悬停效果 */
}

/* 主视觉区样式 */
.hero {
    height: 80vh;
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    position: relative;
    padding: 0 20px;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33, 150, 243, 0.5); /* 亮蓝色滤镜 */
    pointer-events: none;
}

.hero h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 3em;
    color: #ffffff;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease forwards;
}

.hero p {
    font-size: 1.2em;
    max-width: 800px;
    color: #ffffff;
    animation: fadeInUp 1s ease forwards 0.5s;
}

/* 渐变动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 内容区样式 */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 100px 30px 50px 30px; /* 顶部留出导航栏空间 */
    background-color: #2c2c2c; /* 深灰色背景 */
}

/* 文章样式 */
article {
    grid-column: span 8;
    background-color: #292929;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

article h2, article h3, article h4 {
    font-family: 'Roboto', sans-serif;
    color: #2196F3; /* 亮蓝色标题 */
}

article p {
    font-family: 'Lato', sans-serif;
    color: #e0e0e0;
    margin-bottom: 15px;
}

article pre {
    background-color: #1e1e1e;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    margin-bottom: 20px;
}

article code {
    color: #ff9800; /* 橙色代码高亮 */
    font-family: 'Courier New', Courier, monospace;
}

article pre code::before {
    content: "CSS3代码示例";
    display: block;
    font-size: 0.9em;
    color: #8bc34a; /* 浅绿色 */
    margin-bottom: 5px;
}

/* 图片样式 */
.img-gallery {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.img-gallery img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 提示信息样式 */
.prompt-message {
    grid-column: span 12;
    background-color: #ff9800; /* 橙色 */
    color: #212121;
    text-align: center;
    padding: 20px;
    border-radius: 5px;
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(8, 1fr);
    }
    article, .img-gallery {
        grid-column: span 8;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(4, 1fr);
    }
    article, .img-gallery {
        grid-column: span 4;
    }
}

@media (max-width: 480px) {
    .navbar .nav-links {
        display: none;
    }
    .navbar .menu-icon {
        display: block;
    }
    .container {
        grid-template-columns: repeat(2, 1fr);
        padding: 80px 15px 30px 15px;
    }
    article, .img-gallery {
        grid-column: span 2;
    }
    .hero h1 {
        font-size: 2em;
    }
    .hero p {
        font-size: 1em;
    }
}

/* 代码块样式 */
.code-snippet {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    overflow: auto;
}

.code-snippet code {
    color: #8bc34a;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

/* 底部样式 */
.footer {
    background-color: #212121;
    color: #e0e0e0;
    padding: 40px 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.footer a {
    color: #2196F3;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer .social-links {
    display: flex;
    gap: 10px;
}

.footer .social-links img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.footer .social-links img:hover {
    transform: scale(1.2);
}

.footer .legal {
    width: 100%;
    text-align: center;
    font-size: 0.8em;
    margin-top: 20px;
}

/* 按钮样式 */
.button {
    background-color: #2196F3;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

.button:hover {
    background-color: #8bc34a;
    transform: scale(1.05);
}

/* 交互动效 */
.animate-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.3);
}


