
/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Roboto:wght@400;700&family=Orbitron:wght@400;700&display=swap');

/* 全局样式 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #000046, #1CB5E0);
    position: relative;
    overflow-x: hidden;
}

/* 动态粒子背景 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: move 10s infinite linear;
}

@keyframes move {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(100px);
        opacity: 0;
    }
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(169, 169, 169, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 10;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #a855f7;
}

/* 主标题样式 */
.header {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    background: linear-gradient(90deg, #7F00FF, #E100FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #a855f7, 0 0 20px #a855f7, 0 0 30px #a855f7;
    }
    to {
        text-shadow: 0 0 20px #e100ff, 0 0 30px #e100ff, 0 0 40px #e100ff;
    }
}

/* 主内容区域 */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 50px 20px;
    position: relative;
    z-index: 1;
}

.section {
    margin-bottom: 50px;
}

.section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #a855f7;
}

.section p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #f3f4f6;
}

.code-block {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
    font-family: 'Roboto Mono', monospace;
    color: #d1d5db;
}

.code-block code {
    display: block;
}

/* 磨砂玻璃卡片 */
.frosted-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.frosted-glass:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

/* 网格布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.grid-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, #7F00FF, #E100FF);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.button:hover {
    background: linear-gradient(45deg, #E100FF, #7F00FF);
    box-shadow: 0 0 10px #ffffff;
    transform: scale(1.05);
}

/* 示例数据展示区 */
.example-data {
    margin-top: 50px;
}

.example-data h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #38bdf8;
}

.example-data article {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.example-data pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

.example-data code {
    color: #f87171;
}

/* 底部样式 */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(169, 169, 169, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
}

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

@media (max-width: 1200px) {
    .main {
        padding: 80px 15px 40px 15px;
    }

    .section h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 1024px) {
    .navbar {
        padding: 10px 20px;
    }

    .section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }

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

    .frosted-glass {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .navbar a {
        margin-left: 10px;
        font-size: 0.9rem;
    }

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

    .section h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 320px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar a {
        margin-left: 0;
        margin-top: 10px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }
}

