
/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 主题色彩 */
:root {
    --primary-color: #001f3f;
    --secondary-color: #111111;
    --accent-purple: #a55eea;
    --accent-cyan: #00d1b2;
    --text-color: #ffffff;
    --card-bg: #1e1e1e;
    --button-bg: #6c5ce7;
    --button-hover: #a55eea;
    --font-family: 'Roboto Mono', monospace;
}

/* body样式 */
body {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.header {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-purple);
}

.header .nav {
    display: flex;
    gap: 15px;
}

.header .nav a {
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    padding: 5px 0;
}

.header .nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    left: 0;
    bottom: 0;
    transition: width 0.3s;
}

.header .nav a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .header .nav {
        display: none;
    }
    .header .toggle {
        display: block;
        cursor: pointer;
    }
}

.toggle {
    display: none;
}

/* 粒子背景动画 */
.particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,87,34,0.3), transparent);
    animation: aurora-move 15s linear infinite;
    z-index: -1;
}

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

/* 主内容区 */
.main {
    flex: 1;
    padding: 100px 20px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--accent-purple);
    text-align: center;
}

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

.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.5);
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 10px;
    color: var(--accent-cyan);
}

.card p {
    font-size: 0.95em;
}

/* 示例展示 */
.example-display {
    background-color: rgba(30, 30, 30, 0.9);
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
}

.example-display h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--accent-purple);
}

.example-display article {
    max-height: 600px;
    overflow-y: auto;
}

.example-display pre {
    background-color: #2e2e2e;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.example-display code {
    color: #50fa7b;
    font-family: 'Roboto Mono', monospace;
}

.example-display img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

/* 按钮样式 */
.button {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--button-bg);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: var(--button-hover);
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.button:active::before {
    width: 200px;
    height: 200px;
    opacity: 1;
}

@keyframes ripple {
    from {
        width: 0;
        height: 0;
        opacity: 1;
    }
    to {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-color);
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .main {
        padding: 80px 15px 15px 15px;
    }
}

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

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

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header .logo {
        font-size: 1.2em;
    }
    .section h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 320px) {
    .section h2 {
        font-size: 1.2em;
    }
    .button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

