
/* 
    网站整体样式设置
    使用未来主义风格，结合深蓝色背景与霓虹色系点缀，营造科技感和未来感。
    主色调：深蓝色 (#0d47a1)
    辅色调：青蓝色 (#29b6f6)，紫红色 (#ab47bc)
    点缀色：亮橙色 (#ff9800)
    字体：Roboto, sans-serif
    响应式设计，适配320px至1920px宽度
*/

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #eceff1;
    background: linear-gradient(135deg, #0d47a1 70%, #29b6f6 25%, #ff9800 5%);
    overflow-x: hidden;
}

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 71, 161, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff9800;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ff9800;
}

/* 侧边导航栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 0 5px 5px 0;
    transition: transform 0.3s ease;
    z-index: 999;
}

.sidebar:hover {
    transform: translateY(-50%) translateX(10px);
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 1rem 0;
}

.sidebar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: #ff9800;
}

/* 主内容容器样式 */
.container {
    scroll-behavior: smooth;
    padding-top: 80px; /* 导航栏高度 */
}

.section {
    min-height: 100vh;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.section:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

/* 标题样式 */
h2, h3, h4 {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

/* 正文样式 */
p {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    max-width: 800px;
    text-align: justify;
    color: #cfd8dc;
}

/* 代码块样式 */
pre {
    background: #263238;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    width: 90%;
    max-width: 800px;
    margin: 1rem 0;
}

code {
    color: #ff9800;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

/* 图片样式 */
.image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

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

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

/* 提示信息样式 */
.promo {
    background: rgba(255, 152, 0, 0.8);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.2rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* 底部样式 */
footer {
    background: rgba(13, 71, 161, 0.9);
    padding: 2rem;
    text-align: center;
    color: #ffffff;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ff9800;
}

.footer-input, .footer-textarea {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #eceff1;
    transition: box-shadow 0.3s ease;
}

.footer-input:focus, .footer-textarea:focus {
    box-shadow: 0 0 10px #29b6f6;
}

.footer-button {
    background: #1e88e5;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 1rem;
}

.footer-button:hover {
    background: #1565c0;
    transform: scale(1.05);
}

/* 按钮样式 */
.button {
    background: #1e88e5;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 1rem;
}

.button:hover {
    background: #1565c0;
    transform: scale(1.05);
}

/* 渐变动画 */
@keyframes glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.background-animated {
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #1e3c72, #2a5298);
    background-size: 400% 400%;
    animation: glow 15s ease infinite;
}

/* 单页滚动对齐 */
.scroll-snap-container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

.scroll-snap-section {
    scroll-snap-align: start;
    height: 100vh;
}

/* 代码示例区块样式 */
.code-sample {
    background: #263238;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.code-sample code {
    color: #ff9800;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

