
/* 页面全局样式 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #FFFFFF;
    background: linear-gradient(135deg, #0F0C29, #302B63, #24243E);
    background-size: 300% 300%;
    animation: gradient-bg 15s ease infinite;
    overflow-x: hidden;
}

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

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
}

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

a:hover {
    color: #FFA500;
}

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

/* 首屏设计 */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    animation: float-effect 20s linear infinite;
    z-index: 1;
}

@keyframes float-effect {
    0% { transform: rotate(0deg) translate(-20%, -20%); }
    100% { transform: rotate(360deg) translate(-20%, -20%); }
}

.hero-title {
    font-size: 4rem;
    z-index: 2;
    position: relative;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-top: 10px;
    z-index: 2;
    position: relative;
}

/* 图文并茂布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.grid-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.grid-item:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.2);
}

.grid-item img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* 示例文章排版 */
.article-container {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.article-container pre {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00FF00;
}

/* 滚动动画 */
.scroll-animation {
    opacity: 1;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .container {
        padding: 10px;
    }
}

