
/* 全局样式设置，确保页面在不同设备上具有良好的响应性和一致的视觉效果 */
/* 设置盒模型为 border-box，便于布局控制 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 页面整体背景采用蓝紫渐变，营造现代科技感 */
body {
    font-family: 'Merriweather', serif;
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    color: #333;
    line-height: 1.6;
    padding: 20px;
    /* 响应式布局，避免水平滚动 */
    overflow-x: hidden;
}

/* 顶部导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 10px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* 导航菜单样式 */
.navbar .menu {
    display: flex;
    gap: 20px;
}

.navbar .menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.navbar .menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #007BFF;
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.navbar .menu a:hover {
    color: #0056b3;
}

.navbar .menu a:hover::after {
    width: 100%;
}

/* 汉堡菜单图标样式，仅在移动设备显示 */
.navbar .hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.navbar .hamburger div {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* 移动设备下的导航菜单 */
@media (max-width: 768px) {
    .navbar .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 8px 8px;
    }
    
    .navbar .menu.active {
        display: flex;
    }
    
    .navbar .hamburger {
        display: flex;
    }
}

/* 主横幅样式 */
.hero-banner {
    width: 100%;
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample1.png') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 0 20px;
    border-radius: 12px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    position: relative;
    margin-top: 80px;
}

.hero-banner::after {
    content: '这是一个网页样式设计参考';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 123, 255, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* 横幅文字样式 */
.hero-banner h1 {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInDown 2s ease-out;
}

.hero-banner p {
    font-family: 'Merriweather', serif;
    font-size: 1.5em;
    max-width: 600px;
    animation: fadeInUp 2s ease-out;
}

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

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

/* 模块化布局容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 单个模块样式 */
.module {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    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 8px 12px rgba(0, 0, 0, 0.2);
}

/* 图片样式 */
.module img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

article h2 {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 2em;
    margin-bottom: 20px;
    color: #007BFF;
}

article h3 {
    font-size: 1.5em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #28a745;
}

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

/* 代码块样式 */
article pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
    border-left: 4px solid #17a2b8;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: #dc3545;
    font-size: 0.95em;
}

/* 数据可视化图表样式 */
.chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 300px;
    padding: 20px;
    background: rgba(240, 248, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bar {
    width: 50px;
    background: #17a2b8;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease, background 0.3s ease;
}

.bar:hover {
    background: #117a8b;
}

.bar[data-value="70"] {
    height: 70%;
}

.bar[data-value="50"] {
    height: 50%;
}

.bar[data-value="90"] {
    height: 90%;
}

.bar[data-value="60"] {
    height: 60%;
}

/* 搜索栏样式 */
.search-bar {
    position: relative;
    max-width: 400px;
    margin: 20px auto;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ccc;
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    border-color: #007BFF;
    outline: none;
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #007BFF;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.search-bar button:hover {
    color: #0056b3;
}

/* 下载区样式 */
.download-section {
    padding: 40px 20px;
    background: rgba(241, 241, 241, 0.9);
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.download-section h2 {
    font-family: 'Roboto', sans-serif;
    margin-bottom: 20px;
    color: #ffc107;
}

.download-section form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.download-section input[type="email"] {
    padding: 10px 15px;
    border: 2px solid #ccc;
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.download-section input[type="email"]:focus {
    border-color: #007BFF;
    outline: none;
}

.download-section button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #28a745, #218838);
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.download-section button:hover {
    background: linear-gradient(45deg, #218838, #28a745);
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
    margin-top: 40px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-banner h1 {
        font-size: 2em;
    }
    
    .hero-banner p {
        font-size: 1em;
    }
    
    .container {
        padding: 20px 10px;
    }
    
    .navbar {
        padding: 10px 20px;
    }
}

