
/* 全局样式设定，包含字体、背景及基本布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif; /* 设定整体字体 */
    background: linear-gradient(135deg, #001f3f, #002147, #003366); /* 背景渐变 */
    color: #dddddd; /* 正文字体颜色 */
}

/* 响应式布局的容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 自适应网格 */
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 31, 63, 0.8); /* 半透明背景 */
    display: flex;
    justify-content: center;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5); /* 阴影效果 */
}

.navbar a {
    color: #ffffff; /* 链接颜色 */
    text-decoration: none;
    font-family: 'Futura', 'Helvetica', sans-serif; /* 字体 */
    margin: 0 15px;
    position: relative;
    font-size: 18px; /* 字号 */
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #00ffff; /* 点缀色 */
    left: 0;
    bottom: -5px;
    transition: width 0.3s;
}

.navbar a:hover::after {
    width: 100%; /* 悬停时动画效果 */
}

/* 首页头部样式 */
.home-header {
    position: relative;
    height: 80vh;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0, 31, 63, 0.5); /* 半透明覆盖层 */
}

.home-header h1 {
    position: relative;
    color: #ffffff;
    font-family: 'Futura', 'Helvetica', sans-serif;
    font-size: 48px;
    text-shadow: 2px 2px 10px rgba(0,255,255,0.7); /* 文字阴影 */
    z-index: 1;
    animation: fadeIn 2s ease-in-out; /* 淡入动画 */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 模块化卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
    border: 1px solid rgba(255, 255, 255, 0.2); /* 边框 */
    border-radius: 10px; /* 圆角 */
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s; /* 过渡效果 */
}

.card:hover {
    transform: translateY(-10px) scale(1.05); /* 悬停时上升和放大 */
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3); /* 阴影 */
}

.card img {
    max-width: 100%;
    border-radius: 10px; /* 图片圆角 */
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2); /* 图片阴影 */
    transition: transform 0.3s, box-shadow 0.3s; /* 图片过渡效果 */
}

.card img:hover {
    transform: scale(1.05); /* 图片悬停放大 */
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.4); /* 图片悬停阴影 */
}

/* 文章内容样式 */
article {
    background: rgba(0, 31, 63, 0.8); /* 文章背景 */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

article h2, article h3, article h4 {
    font-family: 'Futura', 'Helvetica', sans-serif;
    color: #ffffff;
    margin-top: 20px;
}

article p {
    font-size: 16px;
    line-height: 1.6;
    color: #dddddd;
}

article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

article table, article th, article td {
    border: 1px solid #00ffff; /* 表格边框颜色 */
}

article th, article td {
    padding: 10px;
    text-align: left;
    color: #ffffff;
}

article pre {
    background: #001f3f;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

article code {
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
}

/* 指示文字样式 */
.indicator {
    text-align: center;
    font-size: 18px;
    color: #ff69b4; /* 点缀色 */
    margin: 20px 0;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* CSS代码示例块样式 */
.code-example {
    background: #002147;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.code-example code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
}

/* 响应式图片样式 */
.responsive-img {
    max-width: 650px;
    width: 100%;
    border-radius: 10px; /* 圆角 */
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2); /* 阴影 */
    transition: transform 0.3s, box-shadow 0.3s;
}

.responsive-img:hover {
    transform: scale(1.05); /* 悬停放大 */
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.4); /* 范围阴影 */
}

/* 视觉过渡引导区样式 */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60vh;
    background: linear-gradient(135deg, #001f3f, #002147, #003366);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0, 31, 63, 0.5);
}

.hero-section h1 {
    position: relative;
    color: #ffffff;
    font-size: 36px;
    text-shadow: 2px 2px 10px rgba(0,255,255,0.7);
    z-index: 1;
    animation: slideIn 2s ease-out;
}

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

/* 折叠区域样式 */
.collapsible {
    background-color: #001f3f;
    color: #ffffff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background-color 0.3s;
    border-radius: 5px;
    margin: 10px 0;
}

.collapsible:hover {
    background-color: #002147;
}

.active, .collapsible:hover {
    background-color: #002147;
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: rgba(0, 31, 63, 0.8);
    border-radius: 5px;
}

.content p {
    color: #dddddd;
}

/* 维护无水平滚动条 */
body, html {
    overflow-x: hidden;
}

/* 强制内部链接添加rel="nofollow" */
a[rel="nofollow"] {
    /* 样式可根据需要调整 */
}

/* 调整导航栏在不同屏幕上的显示 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    .navbar a {
        margin: 10px 0;
    }
}

/* 确保容器宽度不小于500px */
@media (max-width: 500px) {
    .container {
        grid-template-columns: 1fr;
    }
}

/* 避免使用100vh确保内容完整可见 */
.section {
    padding: 60px 20px;
}

/* 视觉层级与引导区优化 */
.visual-guide {
    background: linear-gradient(135deg, #003366, #002147);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
    margin: 20px 0;
}

/* 代码块与正文样式区分 */
.code-block {
    background: #001f3f;
    padding: 20px;
    border-radius: 8px;
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
    overflow-x: auto;
}

/* 按钮样式 */
.button {
    background: #00ffff;
    border: none;
    padding: 15px 30px;
    color: #001f3f;
    font-size: 16px;
    border-radius: 5px;
    transition: box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
}

.button:hover {
    box-shadow: 0 0 10px #00ffff;
    transform: scale(1.1);
}

/* 页面底部样式 */
.footer {
    background: rgba(0, 31, 63, 0.9);
    color: #ffffff;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

