
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a237e, #8e24aa, #388e3c);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: #ffffff;
}

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

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    color: #ff9800;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.8);
}

nav a {
    margin: 0 15px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #00e676;
}

/* 主要内容容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 20px 40px 20px;
}

/* 文章展示区 */
article {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

article h2, article h3, article h4 {
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
}

article pre {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

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

/* 示例数据展示 */
.sample-data {
    background-color: rgba(38, 50, 56, 0.8);
    padding: 20px;
    border-radius: 10px;
}

.sample-data h2 {
    color: #ff5722;
}

.sample-data ul {
    list-style: none;
    padding: 0;
}

.sample-data li {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
}

.sample-data li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #4caf50;
}

/* 图片样式 */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* 按钮样式 */
button {
    padding: 10px 20px;
    background-color: #2196f3;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #1976d2;
    z-index: -1;
    transition: width 0.3s ease;
    border-radius: 5px;
}

button:hover {
    color: #ffffff;
}

button:hover::before {
    width: 100%;
}

/* 视差滚动 */
.parallax {
    background-image: url('https://images.gptkong.com/demo/sample5.png');
    height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax {
        background-attachment: scroll;
    }
}

/* 粒子效果 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleAnimation 5s infinite;
}

@keyframes particleAnimation {
    0%, 100% { transform: translateY(-100vh); opacity: 0; }
    50% { transform: translateY(100vh); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1440px) {
    header .logo {
        font-size: 22px;
    }

    nav a {
        font-size: 14px;
    }

    button {
        padding: 8px 16px;
    }
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 80px 15px 30px 15px;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
    }

    nav a {
        margin: 5px 0;
    }
}

@media (max-width: 320px) {
    header .logo {
        font-size: 20px;
    }

    nav a {
        font-size: 12px;
    }

    .container {
        padding: 60px 10px 20px 10px;
    }
}

