
/* 全局样式设置，应用流式布局与响应式设计 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1E88E5, #03A9F4); /* 主色调深蓝与明亮蓝的渐变背景 */
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite; /* 背景色渐变动画 */
    color: #ffffff;
}

/* 背景色渐变动画关键帧 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 设置容器的最大宽度与内边距 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 顶部导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 136, 229, 0.8); /* 半透明深蓝背景 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(30, 136, 229, 0.95); /* 滚动时略微加深背景 */
}

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

.navbar a:hover {
    color: #FFC400; /* 点缀色金色，吸引视线 */
}

/* 主要标题样式 */
.header-title {
    margin-top: 80px; /* 避免被固定导航栏遮挡 */
    text-align: center;
    font-size: 2.5em;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* 增强立体感 */
}

/* 图片样式，圆角、阴影与悬停效果 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.image-gallery img {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 主要内容区域样式 */
.content {
    background: rgba(255, 255, 255, 0.1); /* 半透明背景，增加层次感 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* 文章标题样式 */
.content h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #FFC400; /* 点缀色作为强调 */
}

.content h3 {
    font-size: 1.5em;
    margin-top: 20px;
    color: #ffffff;
}

.content p {
    font-size: 16px;
    line-height: 1.6;
    color: #f0f0f0;
}

/* 代码块样式，区别于正文 */
.content pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

.content code {
    color: #FFC400;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
}

/* 按钮样式，拟物化设计 */
.button {
    background: #FFC400;
    border: none;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(255, 196, 0, 0.3);
    color: #1E88E5;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.button:hover {
    background: #FFA000;
    box-shadow: 0 8px 20px rgba(255, 196, 0, 0.5);
    transform: translateY(-3px);
}

/* 提示信息样式 */
.prompt {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-left: 5px solid #FFC400;
    margin: 20px 0;
    border-radius: 5px;
    font-size: 18px;
    color: #ffffff;
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(30, 136, 229, 0.3);
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.active, .collapsible:hover {
    background-color: rgba(30, 136, 229, 0.6);
}

.content-collapsible {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.content-collapsible p {
    color: #f0f0f0;
}

/* 响应式设计，针对不同屏幕宽度调整布局 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: 3fr 1fr;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 2em;
    }

    .content h2 {
        font-size: 1.8em;
    }

    .content h3 {
        font-size: 1.3em;
    }

    .content p {
        font-size: 14px;
    }

    .button {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* 样式优化，确保无水平滚动条 */
html, body {
    overflow-x: hidden;
}

/* 添加微交互与动画效果 */
.card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 定义按钮的过渡效果 */
.button-transition {
    transition: background 0.3s, transform 0.3s;
}

.button-transition:hover {
    background: #03A9F4;
    transform: scale(1.05);
}

/* 定义高亮文本 */
.highlight {
    color: #FFC400;
    font-weight: bold;
}

/* 定义装饰性的科技感线条 */
.tech-line {
    height: 2px;
    background: linear-gradient(90deg, #FFC400, #1E88E5);
    margin: 20px 0;
    border: none;
}

/* 定义响应式图片布局 */
.responsive-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* 定义复杂的3D变换效果 */
.threeD-transform {
    perspective: 1000px;
}

.threeD-transform .inner {
    transform: rotateY(20deg);
    transition: transform 0.5s;
}

.threeD-transform:hover .inner {
    transform: rotateY(0deg);
}

/* 定义幻灯片动画 */
.slideshow {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
}

.slideshow img {
    width: 100%;
    display: none;
}

.slideshow img.active {
    display: block;
    animation: fadeIn 2s;
}

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