
/* 渐变极光背景与基础样式 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #8e44ad, #2980b9, #27ae60);
    background-size: 400% 400%;
    animation: gradientAnimation 10s ease infinite;
    color: #fff;
    line-height: 1.6;
}

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

/* 页面容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(255, 255, 255, 0.5);
    margin-top: 20px;
    margin-bottom: 10px;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

/* 段落与文字样式 */
p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 链接样式 */
a {
    color: #ff6f61;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff4d4d;
}

/* 代码块样式 */
pre {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 20px;
}

code {
    color: #ffcc00;
    font-family: 'Courier New', monospace;
}

/* 卡片布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
    padding: 15px;
    text-align: center;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.card:hover {
    transform: scale(1.05);
}

/* 图标样式 */
.icon {
    width: 40px;
    height: 40px;
    fill: #fff;
    margin: 10px auto;
    display: block;
}

/* 动画效果 */
.scroll-effect {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

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

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

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    p {
        font-size: 0.9rem;
    }

    .card {
        padding: 10px;
    }
}

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

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    p {
        font-size: 0.85rem;
    }
}

