
/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础字体和背景 */
body {
    background: linear-gradient(135deg, #000046, #1cb5e0);
    color: #ffffff;
    font-family: 'Roboto Mono', monospace;
    line-height: 1.6;
    padding: 20px;
}

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

/* 标题样式 */
h1, h2, h3 {
    color: #00f5ff;
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    animation: fadeIn 2s ease-in-out;
}

h2 {
    font-size: 2em;
    margin-top: 40px;
    text-decoration: underline;
}

h3 {
    font-size: 1.5em;
    margin-top: 30px;
}

/* 段落样式 */
p {
    margin-bottom: 20px;
    padding: 0 10px;
    text-align: justify;
    animation: fadeInText 2s ease-in-out;
}

/* 代码块样式 */
pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

code {
    color: #00ffea;
    font-size: 1em;
}

/* 按钮和链接 */
a {
    color: #ff00c1;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ff00c1;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 图片样式 */
img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    margin: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* 文章区块 */
.article-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 代码示例 */
.code-example {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-example code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 图片画廊 */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery img {
    margin: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 1200px) {
    .gallery {
        flex-direction: row;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 10px;
    }

    .article-section {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.2em;
    }

    .gallery img {
        max-width: 45%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.3em;
    }

    h3 {
        font-size: 1em;
    }

    .gallery img {
        max-width: 100%;
    }
}

@media (max-width: 320px) {
    body {
        padding: 5px;
    }

    h1 {
        font-size: 1.2em;
    }

    .article-section {
        padding: 10px;
    }
}

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* 提示样式 */
.notice {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-left: 5px solid #ff00c1;
    margin-bottom: 30px;
    border-radius: 5px;
    font-style: italic;
    text-align: center;
}

