
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 设置全局字体 */
    background: linear-gradient(135deg, #a5d6a7 70%, #81c784 25%, #4caf50 5%); /* 背景使用线性渐变 */
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 头部导航栏样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8); /* 半透明背景 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
    z-index: 1000;
    transition: background 0.3s ease; /* 背景过渡效果 */
    padding: 15px 30px;
}

.header:hover {
    background: rgba(255, 255, 255, 1); /* 悬停时背景变为不透明 */
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #2e7d32;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #1b5e20; /* 悬停时颜色变化 */
}

/* 主视觉区样式 */
.main-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
    background-size: cover;
    position: relative;
    margin-top: 70px; /* 避免被固定导航栏遮挡 */
    overflow: hidden;
}

.main-visual::after {
    content: "这是一个网页样式设计参考"; /* 显著位置提示 */
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(46, 125, 50, 0.7);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 18px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* 阴影效果 */
}

/* 内容区样式 */
.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 60px;
    background: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
}

.content article {
    max-width: 800px;
    min-width: 500px; /* 保证每个板块宽度不低于500px */
    margin: 0 auto;
}

.content h2, .content h3 {
    color: #2e7d32;
    margin-bottom: 20px;
}

.content h2 {
    font-size: 24px;
}

.content h3 {
    font-size: 20px;
}

.content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content code {
    background: #e0f2f1;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

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

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

/* 卡片式设计 */
.card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* 折叠面板样式 */
.panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.panel.open {
    max-height: 500px;
}

.panel-toggle {
    cursor: pointer;
    color: #2e7d32;
    margin-bottom: 10px;
    display: inline-block;
}

/* 代码块样式 */
pre code {
    position: relative;
    padding-top: 25px;
}

pre code::before {
    content: "代码示例";
    position: absolute;
    top: 0;
    left: 0;
    background: #2e7d32;
    color: #ffffff;
    padding: 5px 10px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    font-size: 14px;
}

/* 底部信息区样式 */
.footer {
    background: #2e7d32;
    color: #ffffff;
    padding: 40px 60px;
}

.footer-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.footer-table th, .footer-table td {
    border: 1px solid #ffffff;
    text-align: left;
    padding: 8px;
    font-size: 16px;
}

.social-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    margin-right: 5px;
    border-radius: 50%;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 20px;
    }

    .nav-links a {
        margin: 0 10px;
        font-size: 14px;
    }

    .main-visual::after {
        font-size: 16px;
        padding: 8px 16px;
    }

    .content {
        padding: 20px 30px;
    }

    .footer {
        padding: 20px 30px;
    }

    .footer-table th, .footer-table td {
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 悬停动画 */
button:hover, .nav-links a:hover, .card:hover {
    /* 已在各自的类中设置 */
}

/* 其他装饰元素 */
.decorative-line {
    height: 2px;
    background: linear-gradient(90deg, rgba(46,125,50,1) 0%, rgba(76,175,80,1) 100%);
    margin: 20px 0;
}

/* 段落分块 */
.section {
    margin-bottom: 40px;
}

/* 遮罩层 */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}


