/* ======================================== */
/* ================= 主页 ================= */
/* ======================================== */

/* ================= 核心变量 ================= */
:root {
    --bg-color: #112041;
    --bg-gradient: linear-gradient(180deg, #112041 0%, #0a1329 100%);
    --accent-red: #CA462F;
    --text-primary: #b0bbdc;
    --text-secondary: #6287ac;
    --text-emphsis: #7a95e4;
    --card-bg: rgba(98, 135, 172, 0.1);
    --card-border: rgba(98, 135, 172, 0.3);
    --font-serif: "Noto Serif SC", serif;
    --font-mono: "JetBrains Mono", monospace;
    --font-script: "Great Vibes", cursive;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a1329; }
::-webkit-scrollbar-thumb { background: var(--text-secondary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-red); }


/* ================= 基础重置 ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-serif);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.3s; }
a:hover { color: var(--accent-red); }

/* ================= 通用布局与排版 ================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

h2.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--accent-red);
    text-align: left;
    margin-bottom: 5rem;
    position: relative;
    letter-spacing: 0.1em;
    z-index: 1;
}

h2.section-title::after {
    content: attr(data-en);
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-script);
    font-size: clamp(4rem, 8vw, 8rem);
    color: rgba(98, 135, 172, 0.15);
    line-height: 1;
    z-index: -1;
    pointer-events: none;
    white-space: nowrap;
}

.text-content {
    font-size: 1.4rem;
    color: var(--text-secondary);
    text-align: left;
    max-width: 800px;
    margin: 0 0 3rem 0;
}

/* ================= 顶部导航栏 ================= */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 1rem 0;
    background: rgba(17, 32, 65, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease;
}

.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; font-size: 1.5rem; font-family: var(--font-mono); }
.logo span { color: var(--accent-red); }

.nav-links { display: flex; gap: 2rem; list-style: none; justify-content: flex-end;}
.nav-links a { position: relative; font-size: 1.3rem; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--accent-red); transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }

/* ================= 侧边栏 (目录与社交) ================= */
.sidebar-nav {
    position: fixed; left: 2rem; top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex; flex-direction: column; gap: 6rem;
    border-left: 1px solid rgba(98, 135, 172, 0.2);
    padding-left: 1.5rem;
}

.sidebar-marker {
    position: absolute; left: 10px; top: 0;
    width: 3px; height: 35px;
    background: var(--accent-red);
    border-radius: 2px;
    transition: top 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: none;
}

.sidebar-link {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    line-height: 1.5;
}

.sidebar-link:hover {
    opacity: 1; color: var(--text-primary);
    transform: translateX(7px);
    text-shadow: 0 8px 25px rgba(202, 70, 47, 0.8);
}
.sidebar-link.active {
    opacity: 1; color: var(--accent-red);
    font-weight: bold; transform: translateX(7px);
}

.sidebar-social {
    position: fixed; right: 2rem; top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex; flex-direction: column; gap: 2.5rem;
    border-right: 1px solid rgba(98, 135, 172, 0.2);
    padding-right: 1.5rem;
    align-items: flex-end;
}

.social-link {
    font-size: 2rem;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex; align-items: center;
}

.social-link:hover {
    opacity: 1; color: var(--accent-red);
    transform: translateX(-5px);
    text-shadow: 0 0 15px rgba(202, 70, 47, 0.6);
}

.social-link::before {
    content: attr(title);
    position: absolute; right: 140%;
    font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--accent-red);
    opacity: 0; transform: translateX(10px);
    transition: all 0.3s; pointer-events: none; white-space: nowrap;
}
.social-link:hover::before { opacity: 1; transform: translateX(0); }

/* 让微信图标作为定位的参考基准 */
.wechat-link {
    position: relative; 
}

/* 二维码的默认状态（隐藏并向右偏移一点点） */
.wechat-qr {
    position: absolute;
    right: 110%;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    height: 140px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    pointer-events: none;
}

/* 鼠标悬浮时显示二维码（向左滑动并完全不透明） */
.wechat-link:hover .wechat-qr {
    opacity: 1;
    visibility: visible;
    right: 140%;
}

/* ================= 序言 (Hero) ================= */
#preface {
    min-height: 80vh;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: visible;
}

.hero-content {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
    align-items: center; z-index: 2; position: relative; width: 100%; overflow: visible;
}

.hero-text { position: relative; }

.hero-name {
    font-size: clamp(1rem, 5vw, 3rem);
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-text h1 {
    font-size: clamp(1rem, 10vw, 8rem);
    line-height: 1.2;
    color: var(--accent-red);
    margin-bottom: 2rem;
    position: relative; z-index: 2;
}

.hero-decoration {
    position: absolute;
    font-family: var(--font-script);
    color: rgba(98, 135, 172, 0.2);
    font-size: clamp(3rem, 12vw, 9rem);
    line-height: 1;
    z-index: -1;
    top: 70%; left: 50%;
    transform: translate(-50%, -60%);
    width: 100%; text-align: center;
    pointer-events: none; white-space: nowrap;
}

.hero-poem {
    font-size: 1.2rem;
    color: var(--text-secondary);
    border-left: 2px solid var(--accent-red);
    padding-left: 1.5rem;
    font-style: italic;
    position: relative; z-index: 2;
    min-height: 9rem;
    display: flex; flex-direction: column; justify-content: flex-start;
}

.typing-cursor::after {
    content: '_'; color: var(--accent-red);
    animation: blink 1s infinite; margin-left: 5px;
}

#OpeningImage {
    font-family: "VT323", monospace;
    font-size: 17.5px; line-height: 14px;
    font-weight: bold; color: var(--accent-red);
    white-space: pre; overflow: hidden;
    position: relative; z-index: 2;
    display: flex; justify-content: center; align-items: center;
    width: 100%; height: 100%;
    opacity: 0.8; padding: 50px;
    --ding-scale: 1.0;
}

/* ================= 回忆 (Memory) ================= */
#memory { position: relative; padding: 6rem 0 0 0; background: transparent; }

.memory-focus-container {
    position: relative; width: 100%; height: auto; overflow: hidden;
}

.mask-top {
    top: 0;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.mask-bottom {
    bottom: 0; position: fixed; height: 35vh;
    -webkit-mask-image: linear-gradient(to top, black 60%, transparent 100%);
    mask-image: linear-gradient(to top, black 60%, transparent 100%);
}

.memory-stream {
    position: relative; max-width: 900px;
    margin: 0 auto; padding-bottom: 10vh; z-index: 1;
}

.memory-row {
    display: flex; gap: 3rem; padding: 4rem 2rem;
    opacity: 0.4; align-items: center; perspective: 1000px;
    transition: opacity 0.2s, transform 0.2s, filter 0.2s;
}

.memory-date {
    font-family: var(--font-mono); color: var(--accent-red);
    font-size: 1.2rem; font-weight: bold;
    min-width: 80px; text-align: right;
    text-shadow: 0 0 10px rgba(202, 70, 47, 0.3);
}

.memory-card {
    flex: 1; display: flex; align-items: center;
    background: transparent; border: none;
    overflow: visible; box-shadow: none;
}

.memory-card img {
    width: 220px; height: 160px; object-fit: cover;
    border-radius: 8px; filter: grayscale(30%);
    border: 4px solid #fff;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative; z-index: 1;
}

.memory-text {
    padding: 0 0 0 2rem;
    display: flex; flex-direction: column; justify-content: center;
    transition: transform 0.2s;
    position: relative; z-index: 2;
}

.memory-text h3 {
    margin: 0 0 0.8rem 0; font-size: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.memory-text p {
    margin: 0; font-size: 1rem; color: var(--text-primary);
    line-height: 1.8; text-shadow: 0 1px 5px rgba(0,0,0,0.8);
}

/* ================= 创作 (Creation) ================= */
#creation {
    padding: 6rem 0;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    perspective: 1000px;
}

.creation-category {
    text-align: left; padding: 0 1rem; margin-bottom: 2rem;
    border-left: 2px solid var(--accent-red); padding-left: 1.5rem;
}
.cat-title {
    font-family: var(--font-mono); font-size: 1.6rem;
    color: #fff; margin-bottom: 0.5rem; letter-spacing: 2px;
}
.cat-desc {
    color: var(--text-secondary); font-size: 1.2rem;
    line-height: 1.6; font-family: var(--font-serif);
}

.holo-grid {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 2rem; padding: 0 1rem;
}

.holo-card {
    position: relative; height: 340px;
    flex: 0 1 300px;
    min-width: 240px; max-width: 320px; width: 100%;
    transform-style: preserve-3d; transform: perspective(1000px);
    cursor: pointer; opacity: 0;
}

.holo-inner {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 32, 65, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px; overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.holo-card:hover .holo-inner {
    border-color: var(--accent-red);
    box-shadow: 0 15px 40px rgba(202, 70, 47, 0.25);
}
.holo-card[data-color="#2fca46"]:hover .holo-inner {
    border-color: #2fca46; box-shadow: 0 15px 40px rgba(47, 202, 70, 0.25);
}
.holo-card[data-color="#6287ac"]:hover .holo-inner {
    border-color: #6287ac; box-shadow: 0 15px 40px rgba(98, 135, 172, 0.25);
}

.holo-image {
    width: 100%; height: 55%;
    background-size: cover; background-position: center;
    filter: grayscale(100%); transition: filter 0.5s;
    position: relative; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.holo-image.icon-mode {
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}
.holo-card:hover .holo-image { filter: grayscale(0%); }

.holo-content {
    padding: 1.2rem; color: #fff; transform: translateZ(20px);
}
.holo-tag {
    display: inline-block; padding: 2px 6px;
    border: 1px solid var(--accent-red); color: var(--accent-red);
    font-family: var(--font-mono); font-size: 0.65rem;
    margin-bottom: 0.5rem; letter-spacing: 1px;
}
.holo-content h3 { font-size: 1.2rem; margin: 0 0 0.4rem 0; line-height: 1.3; }
.holo-content p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; }

.holo-glare {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0; mix-blend-mode: overlay; pointer-events: none;
    transition: opacity 0.3s; z-index: 10;
}

.holo-grid.visible .holo-card {
    animation: holoProject 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

/* ================= 影像 (Gallery) ================= */
#gallery { padding: 6rem 0; }
#gallery .text-content { opacity: 0.8; }

#photo-wall {
    column-count: 4; column-gap: 1.5rem;
    display: block; padding: 10px;
}

.gallery-item {
    position: relative; break-inside: avoid;
    margin-bottom: 1.8rem; width: 100%;
    border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0,0,0,0.2); overflow: hidden;
    cursor: zoom-in; z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease, border-color 0.4s ease;
}

.gallery-item img {
    width: 100%; height: auto; display: block;
    transition: filter 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.1) !important; z-index: 100;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.gallery-item:hover img { filter: brightness(1.1); }

/* ================= 灯箱 (Lightbox) ================= */
.lightbox-overlay {
    position: fixed; z-index: 9999; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(17, 32, 65, 0.95);
    backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.lightbox-overlay.active { opacity: 1; visibility: visible; }

.lightbox-content {
    position: relative; max-width: 95%; max-height: 95%;
    display: flex; flex-direction: column; align-items: center;
    transform: scale(0.9); transition: transform 0.3s ease;
}
.lightbox-overlay.active .lightbox-content { transform: scale(1); }

#lightbox-img {
    max-width: 100%; max-height: 80vh;
    object-fit: contain; border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute; top: 20px; right: 40px;
    color: #fff; font-size: 3rem; font-weight: bold;
    cursor: pointer; transition: color 0.3s; z-index: 10001;
}
.close-lightbox:hover { color: var(--accent-red); }

.download-link {
    display: inline-block; margin-top: 1.5rem; padding: 10px 30px;
    background: var(--accent-red); color: #fff;
    font-family: var(--font-mono); font-weight: bold;
    border-radius: 50px; letter-spacing: 1px;
    transition: all 0.3s; border: 2px solid var(--accent-red);
    flex-shrink: 0;
}
.download-link:hover {
    background: transparent; color: var(--accent-red);
    box-shadow: 0 0 20px rgba(202, 70, 47, 0.5);
}
.download-link i { margin-right: 8px; }

/* ================= 结语 (Epilogue) ================= */
#epilogue { padding: 8rem 0 6rem; position: relative; background: transparent; }

.epilogue-wrapper { max-width: 700px; margin: 0; text-align: left; }

.epilogue-text { margin: 4rem 0; }
.epilogue-text p {
    font-size: 1.4rem; line-height: 1.8;
    color: var(--text-primary); margin-bottom: 2rem;
    font-family: var(--font-serif); opacity: 0.9;
}

.epilogue-footer {
    display: flex; justify-content: flex-start; gap: 3rem;
    margin-top: 5rem; padding-top: 2rem;
    border-top: 1px dashed rgba(98, 135, 172, 0.3);
}

.sign-block { display: flex; flex-direction: column; gap: 0.5rem; }
.sign-block .label {
    font-family: var(--font-mono); font-size: 0.7rem;
    color: var(--text-secondary); opacity: 0.6; letter-spacing: 1px;
}
.sign-block .value {
    font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent-red);
}

/* ================= 留言板 (Guestbook) ================= */
#guestbook { padding: 4rem 0; }

.terminal-window {
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid var(--text-secondary);
    border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    font-family: var(--font-mono); overflow: hidden;
    max-width: 800px; margin: 0 auto;
}

.terminal-header {
    background: rgba(255,255,255,0.05); padding: 10px 15px;
    display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.traffic-lights { display: flex; gap: 6px; margin-right: 15px; }
.traffic-lights span { width: 10px; height: 10px; border-radius: 50%; }
.traffic-lights .red { background: #ff5f56; }
.traffic-lights .yellow { background: #ffbd2e; }
.traffic-lights .green { background: #27c93f; }
.terminal-title { font-size: 0.8rem; color: var(--text-secondary); opacity: 0.7; }

.msg-counter { margin-left: 15px; opacity: 0.8; font-family: var(--font-mono); color: var(--text-secondary); }
#msg-count { color: var(--accent-red); font-weight: bold; }

.terminal-logs {
    padding: 1.5rem 2rem; min-height: 200px; max-height: 400px;
    overflow-y: auto; background: rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.log-entry {
    margin-bottom: 0.8rem; font-size: 0.9rem; line-height: 1.5;
    border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.5rem;
}
.log-time { color: var(--text-secondary); opacity: 0.5; margin-right: 8px; font-size: 0.8rem; }
.log-user { color: var(--accent-red); font-weight: bold; margin-right: 5px; }
.log-content { color: #b0bbdc; }

.terminal-body { padding: 2rem; }
.input-row { display: flex; gap: 2rem; margin-bottom: 1rem; }
.half-width { flex: 1; }

.input-group { display: flex; align-items: center; margin-bottom: 1rem; width: 100%; }
.input-group.textarea-row { align-items: flex-start; }
.input-group.textarea-row .prompt { margin-top: 8px; }

.prompt {
    color: var(--accent-red); font-weight: bold; margin-right: 15px;
    white-space: nowrap; min-width: 60px; text-align: right; flex-shrink: 0;
}

input, textarea {
    flex-grow: 1; background: transparent; border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-family: var(--font-mono);
    width: 100%; padding: 8px 5px; outline: none; transition: all 0.3s;
}
input:focus, textarea:focus {
    border-color: var(--accent-red); background: rgba(202, 70, 47, 0.1);
}
textarea { resize: vertical; min-height: 80px; margin-top: 5px; }

.centered-footer {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; margin-top: 2rem; gap: 1rem;
}

.cyber-btn {
    background: var(--accent-red); color: #fff;
    border: 1px solid var(--accent-red); padding: 8px 20px;
    font-family: var(--font-mono); cursor: pointer; transition: all 0.3s;
}
.cyber-btn.big-btn {
    width: 60%; max-width: 300px; padding: 12px 0;
    font-size: 1.1rem; letter-spacing: 2px;
    background: rgba(202, 70, 47, 0.1);
    box-shadow: 0 0 10px rgba(202, 70, 47, 0.2);
}
.cyber-btn.big-btn:hover {
    background: var(--accent-red); color: #fff;
    box-shadow: 0 0 30px rgba(202, 70, 47, 0.6); transform: translateY(-2px);
}
.center-status {
    height: 20px; font-size: 0.9rem; text-align: center;
    font-family: var(--font-mono); color: #ff5f56;
}

/* ================= 页脚与工具 ================= */
footer {
    text-align: center; padding: 4rem 0;
    color: var(--text-secondary); font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

#back-to-top {
    padding: 12px 40px; font-size: 1.2rem; margin-top: 3rem;
    background-color: var(--accent-red); color: #fff;
    border: 2px solid var(--accent-red); border-radius: 50px;
    font-family: var(--font-mono); font-weight: bold;
    cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(202, 70, 47, 0.3);
}
#back-to-top:hover {
    background-color: transparent; color: var(--accent-red);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(202, 70, 47, 0.5);
}

/* ================= 关键帧动画 ================= */
@keyframes blink {
    0%, 100% { opacity: 1; } 50% { opacity: 0; }
}

@keyframes holoProject {
    0% { opacity: 0; transform: translateY(150px) scaleY(0.1) scaleX(0.6); filter: brightness(3) contrast(2); }
    40% { opacity: 0.8; transform: translateY(-20px) scaleY(1.1) scaleX(1.05); filter: brightness(1.5); }
    70% { transform: translateY(5px) scale(0.98); filter: brightness(1.1); }
    100% { opacity: 1; transform: none; filter: none; }
}

.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* ================= 响应式适配 (通用) ================= */
@media (max-width: 1400px) {
    .sidebar-nav, .sidebar-social { display: none; }
}
@media (max-width: 1024px) {
    .nav-links { gap: 1rem; font-size: 0.8rem; }
}
@media (max-width: 900px) {
    #photo-wall { column-count: 2; }
}
@media (max-width: 600px) {
    #photo-wall { column-count: 1; }
}

/* ================= 移动端专属优化 (Max-width: 768px) ================= */
@media (max-width: 768px) {
    html { scroll-behavior: smooth; font-size: 12px; }

    body {padding-top: 4rem !important;}

    section { padding: 30px 0  !important;}

    h2.section-title {
        font-size: 3rem;
        margin-bottom: 2rem;
    }

    /* 导航栏适配：横向滚动菜单 */
    .navbar { padding: 0.8rem 0; }
    .nav-inner {
        display: grid; grid-template-columns: auto 1fr;
        align-items: center; gap: 15px; width: 94%; margin: 0 auto; 
    }
    .logo { font-size: 1.2rem; margin-right: 0; white-space: nowrap; line-height: 1; }
    .logo span { display: none; }

    .nav-links {
        display: flex; gap: 1.5rem; font-size: 1rem; padding-left: 0;  
        overflow-x: auto; white-space: nowrap; align-items: center;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, black 90%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links::after { content: ''; width: 0px;}
    .nav-links li { flex-shrink: 0; }

    /* 序言与Hero调整 */
    #preface { padding-top: 0; }
    .hero-content {
        height: auto; min-height: 90vh;
        display: flex; flex-direction: column; align-items: center;
        gap: 0; text-align: center;
    }
    .hero-text h1 { font-size: clamp(1rem, 18vw, 10rem); }
    .hero-name {font-size: 0; margin-bottom: 0;}

    .hero-name::before { content: "V-511";  font-size: clamp(1rem, 7vw, 3rem); }
    .hero-poem { border-left: none; padding-left: 0; margin-top: 1rem; font-size: 1。5rem; }
    .hero-decoration { font-size: 15vw; top: 60%; }

    #OpeningImage {
        margin-top: 0; transform-origin: top center;
        font-size: 10px; line-height: 8px; 
    }

    /* 回忆板块垂直排列 */
    .memory-card { flex-direction: column; align-items: flex-start; }
    .memory-text { padding: 0.5rem 0 0 0; }
    .memory-card img { width: 100%; }
    .memory-row { padding: 2rem 1rem; gap: 1rem; }
    .memory-date { font-size: 1rem; min-width: 60px; }
    .memory-text h3 { font-size: 1.4rem; margin-bottom: 0;}
    .memory-stream {padding-bottom: 30px;}

    /* 创作卡片：强制双列网格 */
    .holo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 5px; }
    .holo-card {
        flex: none; width: 100%; min-width: 0; max-width: none; height: 200px;
        transform: none !important;
    }
    .holo-inner { transform: none !important; }
    .holo-image.icon-mode { font-size: 2.5rem; }
    .holo-content { padding: 0.8rem; transform: none !important; }
    .holo-content h3 { font-size: 0.9rem; margin-bottom: 0.2rem; }
    .holo-content p { display: none; }
    .holo-tag { font-size: 0.6rem; padding: 1px 4px; margin-bottom: 0.3rem; }

    /* 影像墙：双列 */
    #photo-wall { column-count: 3 !important; column-gap: 10px; padding: 5px; }
    .gallery-item { margin-bottom: 10px; }

    /* 结语与留言板 */
    .epilogue-footer { flex-direction: column; gap: 1.5rem; }
    .input-row { flex-direction: column; gap: 0; }
    .half-width { margin-bottom: 1rem; }
    .prompt { min-width: 50px; margin-right: 10px; }
    .cyber-btn.big-btn { width: 100%; }
    .log-time {display: none;}
}


/* ======================================== */
/* ================= 文章 ================= */
/* ======================================== */

/* ================= 全局基础设置 ================= */
body {
    margin: 0; font-family: var(--font-serif); padding-top: 100px;
    background: var(--bg-color); background-image: var(--bg-gradient); background-attachment: fixed;
    color: var(--text-primary); transition: padding-top 0.3s ease;
    font-size: 16px; line-height: 1.8; overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a1329; }
::-webkit-scrollbar-thumb { background: var(--text-secondary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-red); }

/* ================= 标题与序言 ================= */
.article-header-container { max-width: 1400px; margin: 0 auto; padding: 40px 5% 0; }

.title {
    text-align: left; position: relative; color: var(--accent-red);
    font-size: 2.8rem; font-weight: 700; margin-bottom: 1rem;
    margin-left: 0; padding-left: 0; letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(202, 70, 47, 0.2); line-height: 1.3;
}
.title::before {
    content: '// ARTICLE'; display: block; font-family: var(--font-mono);
    font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 10px; opacity: 0.8;
}

.preface {
    line-height: 1.8; font-size: 1.2rem; color: var(--text-secondary);
    padding-bottom: 30px; padding-left: 0; margin-left: 0;
    border-bottom: 1px dashed var(--border-color); font-family: var(--font-serif); font-style: italic;
}

/* ================= 主布局容器 ================= */
.section {
    padding: 40px 5%; max-width: 1400px; margin: 0 auto;
    position: relative; display: flex; flex-direction: row; align-items: flex-start; gap: 40px;
}

.left { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.right {
    width: 300px; flex-shrink: 0; display: flex; flex-direction: column;
    position: sticky; top: 90px; height: fit-content; padding-bottom: 70px;
}

/* ================= 正文内容 ================= */
.text { font-size: 1.15rem; color: var(--text-primary); line-height: 2; }
.text .p { margin-bottom: 1.5rem; text-align: justify; }

/* 字体工具类 */
.text .s { font-size: 0.9rem; opacity: 0.9; }
.text .m { font-size: 1.15rem; }
.text .l { font-size: 1.5rem; font-weight: bold; color: #fff; }

/* 诗歌/引用块 */
.poem {
    white-space: pre-wrap; padding: 25px 30px; margin: 30px 0;
    border-left: 4px solid var(--accent-red); background: rgba(10, 15, 30, 0.6);
    color: #fff; font-family: var(--font-serif); font-size: 1.2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); border-radius: 0 4px 4px 0;
}

/* 强调与链接 */
u { text-decoration: none; border-bottom: 2px solid rgba(98, 135, 172, 0.5); padding-bottom: 2px; transition: border-color 0.3s; }
u:hover { border-bottom-color: var(--accent-red); }
em { font-style: normal; color: var(--text-emphsis); font-weight: bold; }

.textLink {
    text-decoration: none; color: var(--text-secondary); border-bottom: 1px dotted var(--text-secondary);
    transition: all 0.3s ease; padding-bottom: 1px;
}
.textLink:hover { color: var(--accent-red); border-bottom: 1px solid var(--accent-red); }

/* ================= 插图 ================= */
.illubox { padding: 30px 0; text-align: center; display: flex; flex-direction: column; align-items: center; }

.illustration, .illustration1 {
    max-width: 80%; max-height: 65vh; width: auto; height: auto;
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, filter 0.3s ease, border-color 0.3s ease; filter: brightness(0.9);
}
.illustration:hover, .illustration1:hover { transform: scale(1.02); filter: brightness(1.05); border-color: var(--accent-red); }

.illutext { margin-top: 15px; font-size: 0.9rem; font-family: var(--font-mono); color: var(--text-secondary); opacity: 0.8; }

/* ================= 落款 ================= */
.colophon {
    text-align: right; margin-top: 60px; padding-top: 20px;
    border-top: 1px solid var(--border-color); font-family: var(--font-mono);
    font-size: 0.9rem; color: var(--text-secondary); letter-spacing: 1px;
}

/* ================= 侧边栏 (Sidebar) ================= */
.random-articles { background: transparent; padding: 0; margin-top: 2rem; }

.random-articles h3 {
    font-size: 1.8rem; font-family: var(--font-mono); color: var(--text-secondary);
    margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px dashed var(--border-color);
    text-align: left; letter-spacing: 1px;
}
.random-articles h3::before { content: '# '; color: var(--accent-red); }

/* 推荐文章卡片 */
.random-article-item {
    background: var(--card-bg); border: 1px solid var(--border-color); border-left: 3px solid var(--text-secondary);
    border-radius: 4px; margin-bottom: 1rem; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden; backdrop-filter: blur(5px);
}
.random-article-item:hover {
    transform: translateX(-5px); background: rgba(17, 32, 65, 0.8);
    border-left-color: var(--accent-red); box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.random-article-item a { display: block; padding: 15px; text-decoration: none; color: inherit; }

.random-article-item h4 {
    margin: 0 0 10px 0; font-size: 1.05rem; font-family: var(--font-serif);
    color: var(--text-primary); line-height: 1.4; transition: color 0.3s;
}
.random-article-item:hover h4 { color: var(--accent-red); }

.random-article-meta {
    display: flex; justify-content: space-between; font-family: var(--font-mono);
    font-size: 0.75rem; color: var(--text-secondary); opacity: 0.8;
}
.random-article-meta span i { margin-right: 5px; color: var(--accent-red); }

/* 侧边栏小标题与文字 */
.sidebar-heading {
    font-size: 1.2rem; font-weight: bold; color: var(--text-primary);
    margin-top: 1.5rem; margin-bottom: 0.6rem; font-family: var(--font-mono);
    line-height: 1.4; letter-spacing: 0.5px; border-left: 3px solid var(--accent-red); padding-left: 10px;
}
.sidebar-heading:first-child { margin-top: 0; }

.right .text .s {
    font-family: var(--font-mono); font-size: 1.0rem; color: var(--text-primary);
    margin-bottom: 0.4rem; opacity: 0.8; line-height: 1.6;
}

/* ================= 响应式适配 ================= */
/* 平板尺寸 */
@media (max-width: 1024px) {
    .section { flex-direction: column; padding: 30px 5%; gap: 40px; }
    .left { width: 100%; }
    .right { width: 100%; position: static; }
    .random-articles .list-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
}

/* 手机尺寸 */
@media (max-width: 768px) {
    body { padding-top: 80px; }
    .title { font-size: 2rem; }
    .preface { font-size: 1rem; padding-bottom: 20px; }
    .text { font-size: 1.05rem; line-height: 1.8; }
    .poem { padding: 20px; font-size: 1.1rem; }
    .random-articles .list-container { grid-template-columns: 1fr; }
}