
/* 引入Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Open+Sans:wght@400;600&family=Roboto:wght@400;700&display=swap');

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #4A90E2, #673AB7);
    color: #FFFFFF;
    overflow-x: hidden;
}

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

header {
    text-align: center;
    padding: 50px 0;
    font-family: 'Orbitron', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

header p {
    font-size: 1.2em;
    line-height: 1.6;
}

main {
    display: flex;
    flex-wrap: wrap;
    margin-top: 40px;
}

.article-section, .gallery-section {
    flex: 1 1 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

@media(min-width: 768px) {
    .article-section, .gallery-section {
        flex: 1 1 48%;
    }
}

.article-section h2, .gallery-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.article-section p, .gallery-section p {
    font-size: 1em;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Roboto', monospace;
    margin: 20px 0;
}

code {
    color: #FFD700;
    font-family: 'Roboto', monospace;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    background: #FFD700;
    color: #673AB7;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    text-decoration: none;
}

.button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery img {
    width: calc(33.333% - 10px);
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

@media(max-width: 480px) {
    .gallery img {
        width: calc(50% - 10px);
    }
}

@media(max-width: 320px) {
    .gallery img {
        width: 100%;
    }
}

.footer {
    text-align: center;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    margin-top: 40px;
}

.footer p {
    font-size: 1em;
    color: #FFD700;
}

.code-preview {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-preview code {
    display: block;
    color: #C5C8C6;
}

.code-preview .highlight {
    color: #F8F8F2;
}

/* 动画效果 */
@keyframes pulse {
    0% { stroke-opacity: 1; }
    50% { stroke-opacity: 0.5; }
    100% { stroke-opacity: 1; }
}

svg {
    fill: none;
    stroke: #FFD700;
    stroke-width: 2;
    animation: pulse 2s infinite;
}

.button-link {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    background: #FFD700;
    color: #673AB7;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.button-link:hover {
    background: #FFEA00;
    box-shadow: 0 0 10px rgba(255, 234, 0, 0.8);
}

/* 滚动动画 */
.scroll-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.scroll-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 确保自适应布局 */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

