
/* 全局样式设置 */
/* 设置页面的基本背景和字体 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #2A5298, #1E3C72); /* 主色调渐变背景 */
    color: #ffffff;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    line-height: 1.6;
}

/* 引入jQuery进行交互 */
@import url('https://www.gptkong.com/static/js/jquery.js');

/* 固定顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

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

.navbar a:hover {
    color: #FF7E5F; /* 点缀色悬停效果 */
}

/* 主内容区块样式 */
.section {
    padding: 100px 50px;
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.section:nth-child(even) {
    background: rgba(255, 255, 255, 0.1); /* 辅色背景 */
    border-radius: 15px;
    margin: 20px 0;
}

.section:nth-child(odd) {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    margin: 20px 0;
}

.section img {
    width: 320px;
    height: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.section .content {
    flex: 1 1 45%;
    padding: 20px;
}

.section .content h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #FFA500; /* 点缀色 */
}

.section .content p {
    font-size: 16px;
    margin-bottom: 10px;
    color: #ffffff;
}

.section .content pre {
    background: #1E3C72;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-top: 20px;
}

.section .content pre code {
    color: #FFD700;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(45deg, #FF7E5F, #FEB47B);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    font-size: 16px;
}

.btn-primary:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #FEB47B, #FF7E5F);
}

/* 渐变线条作为分隔元素 */
.divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #FFA500, #32CD32);
    margin: 50px 0;
    border: none;
}

/* 图片悬浮效果 */
.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.image-grid img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid img:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* 留白与组块 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 高级CSS3特性 */
button {
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    background: #32CD32;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

button:hover {
    background: #28a745;
    transform: translateY(-5px);
}

/* 页脚样式 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px 50px;
    text-align: center;
    color: #ffffff;
    font-size: 14px;
}

.footer a {
    color: #32CD32;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

/* 偏移布局与重叠 */
.overlap {
    position: relative;
    z-index: 1;
}

.overlap::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 100%;
    height: 100%;
    border: 2px solid #FFA500;
    border-radius: 15px;
    z-index: -1;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .section .content {
        flex: 1 1 100%;
        text-align: center;
    }
    
    .navbar {
        flex-direction: column;
    }
    
    .navbar a {
        margin: 10px 0;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 20px;
    }
    
    .navbar {
        padding: 15px 20px;
    }
    
    .navbar a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .section {
        flex-direction: column;
    }
    
    .section img {
        max-width: 100%;
        height: auto;
    }
    
    .section .content h2 {
        font-size: 20px;
    }
    
    .section .content p {
        font-size: 14px;
    }
}

/* 渐变背景与阴影 */
.header {
    background: linear-gradient(135deg, #1E3C72, #2A5298);
    padding: 60px 0;
    text-align: center;
    color: #ffffff;
    position: relative;
}

.header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.header p {
    font-size: 18px;
    color: #FFD700;
}

.header::after {
    content: '这是一个网页样式设计参考';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: #FFA500;
}

/* 动画与过渡效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 1s ease-out forwards;
    opacity: 0;
}

/* 导航章节样式 */
.nav-chapters {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 10px 0 0 10px;
    z-index: 1000;
}

.nav-chapters a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 10px 0;
    padding: 5px 10px;
    transition: background 0.3s ease;
    font-size: 14px;
}

.nav-chapters a:hover {
    background: #32CD32;
    border-radius: 5px 0 0 5px;
}

/* 反馈按钮样式 */
.feedback-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #32CD32;
    color: #ffffff;
    border: none;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.feedback-button:hover {
    background: #28a745;
    transform: rotate(360deg);
}

/* 高级动画示例 */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* 侧边导航隐藏与显示 */
.sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    padding: 60px 20px;
    transition: left 0.3s ease;
    z-index: 999;
}

.sidebar.active {
    left: 0;
}

.sidebar a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin: 20px 0;
    font-size: 18px;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #FFA500;
}

/* 侧边导航切换按钮 */
.toggle-sidebar {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #FFA500;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.3s ease;
}

.toggle-sidebar:hover {
    background: #FF7E5F;
}

/* 遮罩层样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 998;
}

.overlay.active {
    display: block;
}

/* 表单按钮样式 */
.form-button {
    background: #32CD32;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 16px;
}

.form-button:hover {
    background: #28a745;
}

/* 图标按钮样式 */
.icon-button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ffffff;
    font-size: 20px;
    transition: color 0.3s ease;
}

.icon-button:hover {
    color: #FFD700;
}

/* 数据可视化模块 */
.chart-container {
    width: 100%;
    height: 400px;
    background: linear-gradient(to bottom, #2A5298, #1E3C72);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
}

.chart-container:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

/* 可自定义视图的按钮 */
.view-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
}

.view-switcher button {
    background: #FFA500;
    color: #ffffff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    margin-left: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 14px;
}

.view-switcher button:hover {
    background: #FF7E5F;
}

