:root {
    --bg-dark: #050509;
    --text-light: #fff;
    --primary-glow: #00f2fe;
    --card-bg: rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Consolas', 'Monaco', monospace;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-glow);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 999;
    transform: translate(-50%, -50%);
    display: none;
}

/* --- 修复后的中间框 --- */
.container {
    z-index: 10;
    position: relative;
    width: 85%;
    max-width: 600px;
    padding: 50px 20px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: transform 0.1s ease, border-color 0.4s;
}

/* 霓虹发光背衬 */
.container::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #ff0057, #00f2fe, #ff0057, #00f2fe);
    background-size: 400%;
    z-index: -1;
    border-radius: 20px;
    filter: blur(10px);
    opacity: 0; /* 默认隐藏 */
    transition: opacity 0.5s;
}

/* 鼠标移入框时，显示发光颜色并开始旋转动画 */
.container:hover::before {
    opacity: 0.6;
    animation: neonRotate 20s linear infinite;
}

.container:hover {
    border-color: var(--primary-glow);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
}

@keyframes neonRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- 打字与导航样式 --- */
.typing-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.title {
    font-size: clamp(1.2rem, 5vw, 2.2rem);
    color: var(--primary-glow);
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid var(--primary-glow);
    width: 0;
    animation: typing 3s steps(20) forwards, blink 0.8s step-end infinite;
}

@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink { from, to { border-color: transparent; } 50% { border-color: var(--primary-glow); } }

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 1s ease forwards 3.2s;
}

@keyframes fadeIn { to { opacity: 1; } }

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: 0.3s;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--primary-glow);
    border-color: var(--primary-glow);
}

@media (max-width: 600px) {
    .nav-links { flex-direction: column; }
    .nav-link { width: 100%; }
}