
/* 全局样式 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #0A0A0A;
    color: #F5F5F5;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-family: 'CustomHandwrittenFont', cursive;
    text-align: center;
    background: linear-gradient(to right, #657DEB, #C792EA);
    -webkit-background-clip: text;
    color: transparent;
}

p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

a {
    color: #4FC3F7;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #81C784;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 背景与渐变效果 */
.background {
    background-color: #0A0A0A;
    position: relative;
    overflow: hidden;
}

.gradient-section {
    background: linear-gradient(135deg, #657DEB, #C792EA, #4FC3F7, #81C784);
    background-size: 300% 300%;
    animation: gradientAnimation 8s ease infinite;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 布局与分区块设计 */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 40px;
}

.section:nth-child(even) {
    background-color: #1E1E1E;
}

.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
}

/* 图片与装饰 */
.image-box {
    width: 320px;
    height: 320px;
    margin: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 动画与交互 */
.hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-effect:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* 代码块样式 */
code {
    background-color: #1E1E1E;
    color: #C792EA;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

pre code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 15px;
    margin-bottom: 20px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    p {
        font-size: 0.9rem;
    }

    .section {
        padding: 20px;
    }
}

/* 提示信息 */
.tip {
    font-size: 0.9rem;
    color: #CCCCCC;
    text-align: center;
    margin-top: 20px;
}

/* 隐藏式侧边栏 */
.sidebar {
    width: 250px;
    height: 100%;
    position: fixed;
    top: 0;
    left: -250px;
    background-color: #1E1E1E;
    transition: left 0.3s ease;
    z-index: 1000;
}

.sidebar.open {
    left: 0;
}

/* 全屏搜索框 */
.search-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
    z-index: 1001;
}

.search-box.active {
    visibility: visible;
    opacity: 1;
}

