/* 全局重置与基础样式 */
:root {
    --bg-color: #000000;
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --accent-red: #cc0000;
    --font-serif: "Songti SC", "Noto Serif SC", "SimSun", serif;
    --font-mono: "Consolas", "Monaco", "Courier New", monospace;
    --sidebar-width: 300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: var(--accent-red);
    color: #000;
}

html, body {
    height: 100%;
    scroll-behavior: smooth;
    cursor: crosshair;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-serif);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 0;
    left: calc(var(--sidebar-width) * -1);
    width: var(--sidebar-width);
    height: 100vh;
    background-color: #0a0a0a;
    border-right: 1px solid #333;
    transition: left 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1000;
    padding: 100px 40px;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    left: 0;
}

/* 切换按钮 */
.sidebar-toggle {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1001;
    background: transparent;
    border: 1px solid var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    gap: 6px;
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    border-color: var(--accent-red);
}

.sidebar-toggle:hover span {
    background-color: var(--accent-red);
}

.sidebar-toggle.active {
    border-color: var(--accent-red);
}

.sidebar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.sidebar-toggle.active span:nth-child(2) { opacity: 0; }
.sidebar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* 侧边栏导航 */
.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 4rem;
    text-transform: uppercase; /* 恢复为全大写 */
}

.nav-links { list-style: none; }
.nav-links li { margin-bottom: 1rem; }
.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: var(--accent-red);
    text-decoration: line-through;
}

/* 主内容区域 */
main {
    transition: margin-left 0.4s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-left: 1px solid #111;
    border-right: 1px solid #111;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* 顶部标题区 */
.header-section {
    text-align: center;
    padding: 100px 20px 60px;
    width: 100%;
}

.site-title {
    font-size: 3.5rem;
    font-weight: bold;
    letter-spacing: 5px;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px rgba(255,255,255,0.3);
}

.site-subtitle {
    font-family: var(--font-mono);
    color: var(--accent-red);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 4rem;
}

/* 装饰性分割线 */
.divider-symbol {
    font-size: 2rem;
    color: var(--accent-red);
    margin: 2rem 0;
    opacity: 0.8;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 10px var(--accent-red); }
    100% { transform: scale(1); opacity: 0.8; }
}

/* 标语 */
.mantra {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4rem;
    letter-spacing: 2px;
    text-align: center;
}

.mantra p {
    margin-bottom: 1rem;
}

/* 核心图片展示区 */
.hero-image-container {
    width: 300px;
    height: 400px;
    border: 1px solid #333;
    padding: 10px;
    margin: 0 auto 4rem;
    transition: border-color 0.3s;
}

.hero-image {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    /* 使用灰色占位图 */
    background-image: linear-gradient(45deg, #1a1a1a 25%, #222 25%, #222 50%, #1a1a1a 50%, #1a1a1a 75%, #222 75%, #222 100%);
    background-size: 20px 20px;
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.3s;
    position: relative;
    overflow: hidden;
}

.hero-image-container:hover {
    border-color: var(--accent-red);
}

.hero-image-container:hover .hero-image {
    filter: grayscale(0%) contrast(1.5) sepia(50%) hue-rotate(-50deg);
}

/* 底部链接区 */
.links-section {
    width: 100%;
    max-width: 600px;
    border-top: 1px solid #222;
    padding-top: 3rem;
    margin-bottom: 6rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.link-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.link-en {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 0.3s;
}

.link-cn {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-serif);
}

.link-item:hover .link-en {
    color: var(--accent-red);
    background-color: #111;
}

.link-item:hover .link-cn {
    color: var(--accent-red);
}

/* 页脚 */
footer {
    padding-bottom: 4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #444;
    text-align: center;
    letter-spacing: 1px;
}

/* Glitch 故障文字效果类 */
.glitch {
    position: relative;
    color: white;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 30px, 0); }
    20% { clip: rect(60px, 9999px, 80px, 0); }
    40% { clip: rect(20px, 9999px, 90px, 0); }
    60% { clip: rect(80px, 9999px, 10px, 0); }
    80% { clip: rect(40px, 9999px, 50px, 0); }
    100% { clip: rect(100px, 9999px, 120px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(80px, 9999px, 100px, 0); }
    20% { clip: rect(10px, 9999px, 30px, 0); }
    40% { clip: rect(50px, 9999px, 60px, 0); }
    60% { clip: rect(20px, 9999px, 40px, 0); }
    80% { clip: rect(90px, 9999px, 100px, 0); }
    100% { clip: rect(30px, 9999px, 10px, 0); }
}

/* 响应式 */
@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .header-section { padding-top: 80px; }
    .hero-image-container { width: 80%; height: auto; aspect-ratio: 3/4; }
}
