
/* 基础样式定义 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #FFFFFF;
    background: linear-gradient(to bottom, #121C33, #000000);
    overflow-x: hidden;
}

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

h1, h2, h3 {
    font-weight: bold;
    color: #8E2DE2;
}

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

a:hover {
    color: #4A00E0;
}

/* 首屏沉浸式设计 */
.header {
    background: linear-gradient(to right, #4A00E0, #8E2DE2);
    padding: 50px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 10%, transparent 10.01%);
    animation: particle-motion 10s linear infinite;
    transform: rotate(45deg);
}

@keyframes particle-motion {
    0% { transform: translateX(-50%) translateY(0) rotate(45deg); }
    100% { transform: translateX(-50%) translateY(-100%) rotate(45deg); }
}

.header-title {
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.header-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.header-button {
    background-color: #00FFB8;
    color: #000000;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.header-button:hover {
    background-color: #8E2DE2;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 模块化内容布局 */
.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

.grid-item {
    flex: 1 1 calc(33.33% - 20px);
    background: linear-gradient(to bottom, #121C33, #000000);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
}

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

.grid-item-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #8E2DE2;
}

.grid-item-content {
    font-size: 0.9rem;
}

/* 示例文章展示区域 */
.article-section {
    background: linear-gradient(to bottom, #121C33, #000000);
    padding: 40px 20px;
    margin-top: 40px;
    border-radius: 10px;
}

.article-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
}

.article-body {
    font-size: 1rem;
    line-height: 1.8;
}

.article-code {
    background: #1E1E1E;
    color: #00FFB8;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid-item {
        flex: 1 1 calc(50% - 20px);
    }

    .header-title {
        font-size: 2rem;
    }

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

@media (max-width: 480px) {
    .grid-item {
        flex: 1 1 100%;
    }

    .header-title {
        font-size: 1.5rem;
    }

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

