:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #00d4ff;
    --card-bg: rgba(255, 255, 255, 0.05);
}

body {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    /* 为粒子背景做准备 */
    z-index: 10;
    /* 确保文字在粒子上方 */
}

/* 故障风核心样式 */
.glitch {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0.05em 0 0 rgba(255, 0, 81, 0.75),
        -0.025em -0.05em 0 rgba(0, 255, 116, 0.75),
        0.025em 0.05em 0 rgba(0, 183, 255, 0.75);
    animation: glitch 500ms infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    /* 获取 HTML 中的 data-text 属性值 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    animation: glitch 650ms infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-0.025em, -0.0125em);
    color: #ff0051;
    /* 红色副本 */
}

.glitch::after {
    animation: glitch 300ms infinite;
    clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
    transform: translate(0.025em, 0.025em);
    color: #00fff2;
    /* 青色副本 */
}

/* 故障动画定义 */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 81, 0.75),
            -0.025em -0.05em 0 rgba(0, 255, 116, 0.75),
            0.025em 0.05em 0 rgba(0, 183, 255, 0.75);
    }

    14% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 81, 0.75),
            -0.025em -0.05em 0 rgba(0, 255, 116, 0.75),
            0.025em 0.05em 0 rgba(0, 183, 255, 0.75);
    }

    15% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 81, 0.75),
            0.025em 0.025em 0 rgba(0, 255, 116, 0.75),
            -0.05em -0.05em 0 rgba(0, 183, 255, 0.75);
    }

    49% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 81, 0.75),
            0.025em 0.025em 0 rgba(0, 255, 116, 0.75),
            -0.05em -0.05em 0 rgba(0, 183, 255, 0.75);
    }

    50% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 81, 0.75),
            0.05em 0 0 rgba(0, 255, 116, 0.75),
            0 -0.05em 0 rgba(0, 183, 255, 0.75);
    }

    99% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 81, 0.75),
            0.05em 0 0 rgba(0, 255, 116, 0.75),
            0 -0.05em 0 rgba(0, 183, 255, 0.75);
    }

    100% {
        text-shadow: -0.025em 0 0 rgba(255, 0, 81, 0.75),
            -0.025em -0.025em 0 rgba(0, 255, 116, 0.75),
            -0.025em -0.05em 0 rgba(0, 183, 255, 0.75);
    }
}

.nav-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1000px;
}

.nav-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    /* 磨砂玻璃效果 */
}

.nav-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

#tsparticles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    /* 保证在所有内容下面 */
    background-color: #0a0a0a;
    /* 确保背景色统一 */
}