* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    color: #e0e8f0;
    line-height: 1.6;
    padding-left: 200px;
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow-x: hidden;

    /* 深色科技渐变背景 */
    background: linear-gradient(135deg, #0a0e27 0%, #10143a 25%, #0d1b2a 50%, #1a1a3e 75%, #0a0e27 100%);
    background-size: 400% 400%;
    animation: bodyBgShift 20s ease infinite;
}

@keyframes bodyBgShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 粒子画布背景层 */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========= 酷炫科技风左侧导航栏 ========= */
nav {
    width: 200px;
    height: 100vh;
    padding: 2rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;

    /* 深色渐变背景 + 科技感星光点缀 */
    background: linear-gradient(160deg, #0a0e27 0%, #1a1a3e 40%, #0d1b2a 100%);
    background-size: 200% 200%;
    animation: bgShift 15s ease infinite;

    /* 右侧霓虹边框光效 */
    border-right: 1px solid rgba(100, 200, 255, 0.3);
    box-shadow:
        4px 0 30px rgba(0, 150, 255, 0.15),
        inset -2px 0 20px rgba(0, 150, 255, 0.05);
}

/* 背景渐变流动动画 */
@keyframes bgShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 星光粒子效果层 */
nav::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(100,200,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 40% 50%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(150,100,255,0.7), transparent),
        radial-gradient(1px 1px at 10% 80%, rgba(100,200,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 75% 45%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 30% 90%, rgba(150,100,255,0.6), transparent),
        radial-gradient(1px 1px at 90% 60%, rgba(100,200,255,0.5), transparent);
    pointer-events: none;
    z-index: 0;
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0%   { opacity: 0.6; }
    100% { opacity: 1; }
}

.nav-top {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* ===== Logo 渐变发光文字 ===== */
.logo {
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 50%, #ff006e 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoGlow 3s ease infinite;
    text-shadow: 0 0 30px rgba(0, 200, 255, 0.3);
    letter-spacing: 2px;
    position: relative;
}

@keyframes logoGlow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* Logo 下方装饰光条 */
.logo::after {
    content: "";
    display: block;
    width: 60%;
    height: 2px;
    margin: 12px auto 0;
    background: linear-gradient(90deg, transparent, #00d4ff, #7b2ff7, transparent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.6);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

/* ===== 导航链接 - 霓虹悬停效果 ===== */
.nav-links a {
    color: rgba(200, 220, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    position: relative;
    border: 1px solid transparent;
    overflow: hidden;
    letter-spacing: 1px;
}

/* 左侧流光指示器 */
.nav-links a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 70%;
    background: linear-gradient(180deg, #00d4ff, #7b2ff7);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.8);
    transition: transform 0.3s ease;
}

/* 背景渐变填充层 */
.nav-links a::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg,
        rgba(0, 200, 255, 0.08),
        rgba(123, 47, 247, 0.12),
        rgba(255, 0, 110, 0.08));
    transition: left 0.4s ease;
    z-index: -1;
}

.nav-links a:hover {
    color: #fff;
    border-color: rgba(0, 200, 255, 0.4);
    background: rgba(0, 150, 255, 0.08);
    box-shadow:
        0 0 20px rgba(0, 150, 255, 0.2),
        inset 0 0 20px rgba(0, 150, 255, 0.05);
    transform: translateX(4px);
    padding-left: 1.2rem;
}

.nav-links a:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-links a:hover::after {
    left: 0;
}

/* ===== 底部信息区 ===== */
.nav-footer {
    color: rgba(150, 180, 220, 0.65);
    text-align: center;
    font-size: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(100, 150, 255, 0.15);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    line-height: 1.8;
}

.nav-footer a {
    color: rgba(150, 200, 255, 0.7) !important;
    transition: color 0.3s ease;
}

.nav-footer a:hover {
    color: #00d4ff !important;
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.5);
}

/* ========= 主内容 ========= */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* 个人简介卡片 - 玻璃拟态效果 */
.profile {
    background: rgba(20, 30, 60, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(100, 180, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 100, 200, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.profile::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.08), transparent);
    transition: left 0.6s ease;
}

.profile:hover {
    border-color: rgba(0, 200, 255, 0.4);
    box-shadow:
        0 12px 40px rgba(0, 150, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 60px rgba(0, 150, 255, 0.1);
    transform: translateY(-4px);
}

.profile:hover::before {
    left: 100%;
}

.profile h2 {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    text-shadow: 0 0 30px rgba(0, 200, 255, 0.3);
}

.profile p {
    color: rgba(200, 220, 255, 0.8);
}

/* 普通文章卡片 - 玻璃拟态效果 */
.article-card {
    background: rgba(20, 30, 60, 0.35);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: 14px;
    border: 1px solid rgba(100, 180, 255, 0.15);
    box-shadow:
        0 4px 20px rgba(0, 80, 160, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.article-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, #7b2ff7, transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.article-card:hover {
    border-color: rgba(0, 200, 255, 0.35);
    box-shadow:
        0 8px 30px rgba(0, 120, 220, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 40px rgba(0, 150, 255, 0.08);
    transform: translateY(-6px);
}

.article-card:hover::after {
    transform: translateX(100%);
}

.article-card h3 {
    color: #e0f0ff;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.article-card:hover h3 {
    color: #00d4ff;
    text-shadow: 0 0 15px rgba(0, 200, 255, 0.4);
}

.article-card .date {
    color: rgba(150, 180, 220, 0.6);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-card p {
    color: rgba(200, 220, 255, 0.75);
    margin-bottom: 1rem;
}

.read-more {
    color: #00d4ff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
}

.read-more:hover {
    color: #7b2ff7;
    text-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
    transform: translateX(4px);
}

/* ========= 新增有用样式 ========= */
.github-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
    transition: all 0.3s ease;
}
.github-link:hover {
    color: #7b2ff7;
    text-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}

.section-title {
    margin-bottom: 1rem;
    font-size: 1.7rem;
    font-weight: 600;
    background: linear-gradient(135deg, #00d4ff, #7b2ff7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-left: 14px;
    margin-top: 0.5rem;
    position: relative;
    text-shadow: 0 0 20px rgba(0, 200, 255, 0.2);
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: linear-gradient(180deg, #00d4ff, #7b2ff7);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.6);
}

/* ========= 游戏页面 ========= */
.game-page .container {
    max-width: 960px;
    margin: 1.8rem 0;
    padding: 0 1.5rem;
}

.game-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.game-page .article-card {
    background: rgba(20, 30, 60, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 260px;
    height: 260px;
    padding: 30px 25px;
    border-radius: 14px;
    border: 1px solid rgba(100, 180, 255, 0.2);
    box-shadow:
        0 4px 20px rgba(0, 80, 160, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}
.game-page .article-card:hover {
    border-color: rgba(0, 200, 255, 0.5);
    box-shadow:
        0 12px 35px rgba(0, 150, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 50px rgba(0, 150, 255, 0.15);
    transform: translateY(-8px);
}

/* ========= 移动端适配：导航永远在左侧 ========= */
@media (max-width: 768px) {
    body {
        padding-left: 140px;
    }
    nav {
        width: 140px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        padding: 1.5rem 0.7rem;
    }
    .nav-top {
        flex-direction: column;
        gap: 2rem;
    }
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    .logo {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }
    .nav-links a {
        font-size: 0.8rem;
        padding: 0.6rem 0.6rem;
        letter-spacing: 0.5px;
    }
    .nav-links a:hover {
        transform: translateX(2px);
        padding-left: 0.8rem;
    }
    .nav-footer {
        display: block;
        font-size: 0.65rem;
    }
    .game-page .article-card {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 550px) {
    body {
        padding-left: 115px;
    }
    nav {
        width: 115px;
    }
    .logo {
        font-size: 0.95rem;
    }
    .nav-links a {
        font-size: 0.72rem;
        padding: 0.5rem 0.5rem;
    }
    .game-page .article-card {
        width: 100%;
        height: 240px;
    }
}