
/* 全局样式设置 */
:root {
    --primary-color: #0f0c29;
    --secondary-color: #302b63;
    --accent-color: #6a11cb;
    --text-color: #ffffff;
    --line-art-color: #ff9a8d;
    --grid-gap: 20px;
    --transition-speed: 0.3s;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), #24243e);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 标题与副标题样式 */
h1, h2, h3 {
    font-weight: bold;
    text-align: center;
    margin: 2rem 0;
}

h1 {
    font-size: 3rem;
    letter-spacing: 2px;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
}

h3 {
    font-size: 2rem;
    color: #ff9a8d;
}

/* 容器布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--grid-gap);
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 图片装饰 */
.image-decor {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed) ease-in-out;
}

.image-decor:hover {
    transform: scale(1.05);
}

/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

article p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

article pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 1rem;
    margin: 1rem 0;
}

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

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-in-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.line-art {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 2s ease-in-out forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* 按钮样式 */
button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    font-size: 1rem;
}

button:hover {
    background-color: #53009a;
}

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

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

    article {
        padding: 15px;
    }
}

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

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.6rem;
    }

    article p {
        font-size: 1rem;
    }
}

/* 提示样式 */
.tip {
    text-align: center;
    font-size: 1.2rem;
    color: #ff9a8d;
    margin-top: 20px;
}

