﻿/* ==========================================================================
   NEXUS 次元社区 — 科幻视觉主题
   深空黑 #0a0a0f / 青蓝 #00f0ff / 紫罗兰 #7b2ffc
   ========================================================================== */

:root, html[data-mode="explore"] {
    /* EXPLORE MODE —— 深色科幻默认 */
    --bg: #0a0a0f;
    --bg-2: #0e0e16;
    --bg-3: #12121d;
    --cyan: #00f0ff;
    --violet: #7b2ffc;
    --violet-2: #a855f7;
    --text: #d7e3ea;
    --text-dim: #8b98a5;
    --text-strong: #ffffff;
    --border: rgba(0, 240, 255, 0.16);
    --glow-cyan: rgba(0, 240, 255, 0.08);
    --glow-violet: rgba(123, 47, 252, 0.14);
    --navbar-bg: rgba(10, 10, 15, 0.72);
    --navbar-bg-solid: rgba(10, 10, 15, 0.85);
    --panel-bg: rgba(14, 14, 22, 0.95);
    --font-tech: "Orbitron", "Rajdhani", "Microsoft YaHei", sans-serif;
    --font-body: "Rajdhani", "Segoe UI", "Microsoft YaHei", sans-serif;
    --navbar-h: 64px;
}

/* READ MODE —— 柔和护眼浅色（阅读舒适、去霓虹） */
html[data-mode="read"] {
    --bg: #f3efe7;
    --bg-2: #ece7dc;
    --bg-3: #e4ded0;
    --cyan: #1f7a8c;
    --violet: #6a4fa3;
    --violet-2: #8368bd;
    --text: #32363a;
    --text-dim: #6a6f74;
    --text-strong: #20232a;
    --border: rgba(60, 90, 100, 0.22);
    --glow-cyan: rgba(40, 130, 150, 0.10);
    --glow-violet: rgba(110, 80, 170, 0.10);
    --navbar-bg: rgba(247, 243, 235, 0.82);
    --navbar-bg-solid: rgba(247, 243, 235, 0.92);
    --panel-bg: rgba(255, 255, 252, 0.96);
    color-scheme: light;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

.font-tech { font-family: var(--font-tech); }

h1, h2, h3, h4, .brand-text { font-family: var(--font-tech); }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #7ff7ff; }

/* ---------------- 滚动条 ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--violet), var(--cyan));
    border-radius: 6px;
    border: 2px solid var(--bg);
}

::selection { background: rgba(0, 240, 255, 0.35); color: var(--text-strong); }

/* ==========================================================================
   背景层：Canvas 像素人物 + 鼠标光效
   ========================================================================== */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

/* ==========================================================================
   背景层说明：人物艺术层已移除，保留星空 Canvas
   ========================================================================== */

#cursor-glow {
    position: fixed;
    top: 0; left: 0;
    width: 420px; height: 420px;
    margin: -210px 0 0 -210px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0, 240, 255, 0.14) 0%,
        rgba(123, 47, 252, 0.10) 35%,
        transparent 70%);
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: screen;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.site-main { position: relative; z-index: 2; }
.site-footer { position: relative; z-index: 2; }

/* ==========================================================================
   导航栏
   ========================================================================== */
.site-navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    z-index: 1030;
}

.site-navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.07), 0 8px 30px rgba(0, 0, 0, 0.5);
    background: var(--navbar-bg-solid);
}

.brand-text {
    font-weight: 700;
    color: var(--text-strong);
    font-size: 1.25rem;
    letter-spacing: 0.08em;
}
.brand-mark { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }
.brand-dot {
    color: var(--violet-2);
    animation: blink 1.1s steps(1) infinite;
}
.brand-sub {
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 0.3em;
    margin-left: 8px;
    vertical-align: middle;
}
@keyframes blink { 50% { opacity: 0; } }

.site-navbar .nav-link {
    color: var(--text-dim);
    font-family: var(--font-tech);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    padding: 0.5rem 0.9rem;
    position: relative;
    transition: color 0.25s, text-shadow 0.25s;
}
.site-navbar .nav-link:hover {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}
.site-navbar .nav-link.active {
    color: var(--cyan);
}
.site-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.9rem; right: 0.9rem; bottom: 0.2rem;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    box-shadow: 0 0 8px var(--cyan);
}

.dropdown-menu {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: 0 0 20px var(--glow-cyan);
    border-radius: 10px;
    padding: 0.4rem;
}
.dropdown-item { color: var(--text); font-size: 0.95rem; border-radius: 6px; }
.dropdown-item:hover { background: rgba(0, 240, 255, 0.08); color: var(--cyan); }
.dropdown-divider { border-color: var(--border); }

.user-chip { display: flex; align-items: center; gap: 8px; }
.user-chip-name {
    font-family: var(--font-tech);
    font-size: 0.78rem;
    color: var(--text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   头像
   ========================================================================== */
.avatar {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
    box-shadow: 0 0 10px var(--glow-cyan);
}
.avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xs { width: 26px; height: 26px; }
.avatar-sm { width: 38px; height: 38px; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-xl { width: 140px; height: 140px; }

/* ==========================================================================
   按钮
   ========================================================================== */
.btn-neon {
    --bs-btn-color: #031018;
    background: linear-gradient(135deg, var(--cyan), #38bdf8 55%, var(--violet));
    border: none;
    color: #031018;
    font-family: var(--font-tech);
    font-weight: 700;
    letter-spacing: 0.1em;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 14px var(--glow-cyan), 0 4px 18px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s, box-shadow 0.3s, filter 0.3s;
}
.btn-neon:hover {
    color: #031018;
    transform: translateY(-2px);
    box-shadow: 0 0 26px rgba(0, 240, 255, 0.45), 0 6px 24px rgba(123, 47, 252, 0.35);
    filter: brightness(1.08);
}
.btn-neon:active { transform: translateY(0) scale(0.98); }

.btn-ghost {
    color: var(--cyan);
    border: 1px solid var(--border);
    background: rgba(0, 240, 255, 0.03);
    font-family: var(--font-tech);
    letter-spacing: 0.08em;
    border-radius: 8px;
    transition: all 0.25s;
}
.btn-ghost:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 16px var(--glow-cyan);
    transform: translateY(-1px);
}

.btn-danger-ghost {
    color: #ff6b81;
    border: 1px solid rgba(255, 107, 129, 0.35);
    background: rgba(255, 107, 129, 0.04);
    font-family: var(--font-tech);
    font-size: 0.8rem;
    border-radius: 8px;
    transition: all 0.25s;
}
.btn-danger-ghost:hover {
    background: rgba(255, 107, 129, 0.14);
    border-color: #ff6b81;
    color: #ff8fa1;
    box-shadow: 0 0 14px rgba(255, 107, 129, 0.25);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-section {
    min-height: 58vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: calc(var(--navbar-h) + 28px) 0 28px;
}
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 45% at 50% 0%, rgba(123, 47, 252, 0.14), transparent 70%),
        radial-gradient(ellipse 50% 40% at 85% 80%, rgba(0, 240, 255, 0.07), transparent 70%);
    pointer-events: none;
}
.hero-inner { max-width: 780px; }

.hero-kicker {
    color: var(--cyan);
    font-size: 0.72rem;
    letter-spacing: 0.32em;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
    margin-bottom: 12px;
}
.hero-kicker-bracket { color: var(--violet-2); }

.hero-title {
    font-size: clamp(1.7rem, 4.2vw, 3rem);
    font-weight: 900;
    color: var(--text-strong);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    line-height: 1.15;
}
.hero-title-static { color: var(--text-dim); }
.hero-title-type {
    background: linear-gradient(90deg, var(--cyan), var(--violet-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.35);
}
.typing-cursor {
    color: var(--cyan);
    text-shadow: 0 0 12px var(--cyan);
    animation: blink 0.9s steps(1) infinite;
}

.hero-sub {
    color: var(--text-dim);
    font-size: 1.02rem;
    margin-bottom: 24px;
    max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   通用区块
   ========================================================================== */
.section-block { padding: 28px 0 60px; position: relative; }

.page-head {
    padding: calc(var(--navbar-h) + 56px) 0 8px;
    position: relative;
}
.page-kicker {
    color: var(--violet-2);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    margin-bottom: 8px;
}
.page-title {
    color: var(--text-strong);
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.page-desc { color: var(--text-dim); }

.block-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
.block-title {
    color: var(--text-strong);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin: 0;
}
.block-tag {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
    margin-right: 10px;
    font-size: 0.9rem;
}
.block-more {
    color: var(--text-dim);
    font-family: var(--font-tech);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    transition: color 0.25s;
}
.block-more:hover { color: var(--cyan); }

.empty-state {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 42px 20px;
    text-align: center;
    color: var(--text-dim);
    background: rgba(0, 240, 255, 0.02);
}

/* ==========================================================================
   分区卡片
   ========================================================================== */
.section-card {
    --accent: var(--cyan);
    display: block;
    position: relative;
    background: linear-gradient(160deg, var(--bg-3), var(--bg-2) 70%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 30px 26px;
    height: 100%;
    color: var(--text);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
    box-shadow: 0 0 15px var(--glow-cyan), 0 10px 26px rgba(0, 0, 0, 0.35);
}
.section-card::before {
    content: "";
    position: absolute;
    top: -60%; right: -40%;
    width: 90%; height: 160%;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
    opacity: 0.6;
    transition: opacity 0.4s;
    pointer-events: none;
}
.section-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    box-shadow:
        0 0 26px color-mix(in srgb, var(--accent) 22%, transparent),
        0 14px 34px rgba(0, 0, 0, 0.5);
}
.section-card:hover::before { opacity: 1; }

/* 分区卡片代码标识（替代 emoji，如 [ANIME]/[GAME]，颜色跟随 --accent） */
.section-card-code {
    font-family: var(--font-tech);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent);
    text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent);
    margin-bottom: 12px;
    opacity: 0.9;
}
.section-card-name {
    color: var(--text-strong);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}
.section-card-desc {
    color: var(--text-dim);
    font-size: 0.92rem;
    min-height: 2.6em;
    margin-bottom: 14px;
}
.section-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}
.section-card-meta .font-tech { color: var(--accent); font-weight: 700; }
.section-card-arrow {
    transition: transform 0.3s;
    color: var(--accent);
}
.section-card:hover .section-card-arrow { transform: translateX(6px); }

.section-card-corner {
    position: absolute;
    top: 10px; right: 10px;
    width: 14px; height: 14px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}
.section-card:hover .section-card-corner { opacity: 1; transform: scale(1.15); }

/* ==========================================================================
   帖子卡片（首页网格）
   ========================================================================== */
.post-card {
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(165deg, var(--bg-3), var(--bg-2) 75%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px var(--glow-cyan), 0 10px 26px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.post-card:hover {
    transform: translateY(-6px);
    border-color: var(--border);
    box-shadow: 0 0 30px var(--glow-cyan), 0 16px 36px rgba(0, 0, 0, 0.5);
}
.post-card-link { color: inherit; display: block; height: 100%; }
.post-card-link:hover { color: inherit; }

.post-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0d0d16;
}
.post-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }
.thumb-count {
    position: absolute;
    right: 10px; bottom: 10px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--border);
    color: var(--cyan);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.post-card-body { padding: 16px 18px 14px; }
.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.badge-section {
    --accent: var(--cyan);
    display: inline-block;
    font-size: 0.7rem;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.08em;
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 15%, transparent);
    transition: box-shadow 0.3s, transform 0.3s;
}
a.badge-section:hover {
    box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent);
    transform: translateY(-1px);
}

/* 置顶徽标 */
.pin-badge {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #ffc24b;
    border: 1px solid rgba(255, 194, 75, 0.5);
    background: rgba(255, 194, 75, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(255, 194, 75, 0.2);
    flex-shrink: 0;
}

.post-card-title {
    color: var(--text-strong);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-excerpt {
    color: var(--text-dim);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}
.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
}
.post-card-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}
.post-card-author:hover { color: var(--cyan); }
.post-card-stats { display: inline-flex; gap: 12px; font-size: 0.78rem; }

/* ==========================================================================
   帖子列表（feed）
   ========================================================================== */
.filter-bar { padding: 6px 0; }
.filter-chip {
    --chip-accent: var(--cyan);
    display: inline-block;
    font-family: var(--font-tech);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 6px 14px;
    transition: all 0.25s;
    background: rgba(255, 255, 255, 0.02);
}
.filter-chip:hover {
    color: var(--chip-accent);
    border-color: color-mix(in srgb, var(--chip-accent) 50%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--chip-accent) 20%, transparent);
}
.filter-chip.active {
    color: #031018;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    border-color: transparent;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
    font-weight: 700;
}

.feed-item {
    border-radius: 14px;
    background: linear-gradient(165deg, var(--bg-3), var(--bg-2) 80%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px var(--glow-cyan), 0 8px 22px rgba(0, 0, 0, 0.35);
    margin-bottom: 18px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
.feed-item:hover {
    transform: translateY(-3px);
    border-color: var(--border);
    box-shadow: 0 0 26px var(--glow-cyan), 0 12px 30px rgba(0, 0, 0, 0.45);
}
.feed-main { display: flex; gap: 18px; padding: 14px; color: inherit; }
.feed-main:hover { color: inherit; }
.feed-thumb {
    width: 150px; height: 104px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #0d0d16;
}
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed-body { flex: 1; min-width: 0; }
.feed-meta {
    display: flex; gap: 12px; align-items: center;
    font-size: 0.7rem; color: var(--text-dim);
    margin-bottom: 6px;
}
.feed-title {
    color: var(--text-strong);
    font-size: 1.12rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.feed-excerpt {
    color: var(--text-dim);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}
.feed-footer {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.82rem; color: var(--text-dim);
}

@media (max-width: 576px) {
    .feed-main { flex-direction: column; }
    .feed-thumb { width: 100%; height: 150px; }
}

/* ==========================================================================
   帖子详情
   ========================================================================== */
.detail-wrap { padding-top: calc(var(--navbar-h) + 30px); }

.detail-card, .comment-card, .form-card {
    background: linear-gradient(170deg, var(--bg-3), var(--bg-2) 80%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow: 0 0 15px var(--glow-cyan), 0 12px 30px rgba(0, 0, 0, 0.4);
    padding: 30px 32px;
    margin-bottom: 32px;
}

.detail-meta {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    font-size: 0.75rem; color: var(--text-dim);
    margin-bottom: 12px;
}
.detail-title {
    color: var(--text-strong);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.35;
    margin-bottom: 18px;
}
.detail-author {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 24px;
}
.detail-stats { color: var(--text-dim); font-size: 0.8rem; display: inline-flex; gap: 14px; }
.detail-actions { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }

.staff-tag {
    font-size: 0.62rem;
    color: var(--violet-2);
    border: 1px solid rgba(168, 85, 247, 0.5);
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.1em;
    background: rgba(123, 47, 252, 0.1);
}

/* 富文本正文 */
.rich-text { color: var(--text); line-height: 1.85; font-size: 1.05rem; }
.rich-text h2, .rich-text h3 {
    color: var(--cyan);
    margin: 1.4em 0 0.5em;
    letter-spacing: 0.05em;
}
.rich-text h2 { font-size: 1.4rem; border-left: 3px solid var(--cyan); padding-left: 12px; }
.rich-text h3 { font-size: 1.15rem; }
.rich-text p { margin-bottom: 1em; }
.rich-text a { border-bottom: 1px dashed var(--cyan); }
.rich-text blockquote {
    border-left: 3px solid var(--violet);
    background: rgba(123, 47, 252, 0.07);
    padding: 10px 16px;
    border-radius: 0 10px 10px 0;
    color: var(--text-dim);
    margin: 1em 0;
}
.rich-text code {
    background: rgba(0, 240, 255, 0.08);
    color: #7ff7ff;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.9em;
}
.rich-text pre {
    background: #0b0b13;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    overflow-x: auto;
}
.rich-text pre code { background: none; padding: 0; color: #c9f9ff; }
.rich-text ul, .rich-text ol { padding-left: 1.4em; margin-bottom: 1em; }
.rich-text li { margin-bottom: 0.3em; }
.rich-text img { max-width: 100%; border-radius: 10px; }

/* 图片画廊 */
.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 26px;
}
.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 1.6rem;
    background: rgba(10, 10, 15, 0.55);
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}
.gallery-item:hover .gallery-zoom { opacity: 1; }

/* 灯箱（全屏查看原图） */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(5, 5, 10, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(6px);
}
.lightbox-overlay.open { display: flex; animation: fadeIn 0.25s; }
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 84vh;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.2);
}
.lightbox-close {
    position: absolute;
    top: 18px; right: 24px;
    background: none;
    border: 1px solid var(--border);
    color: var(--cyan);
    font-size: 1.4rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    transition: all 0.25s;
}
.lightbox-close:hover { background: rgba(0, 240, 255, 0.12); box-shadow: 0 0 16px var(--glow-cyan); }
.lightbox-caption {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-dim);
    font-family: var(--font-tech);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   评论
   ========================================================================== */
.comment-form textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-radius: 10px;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.comment-form textarea:focus {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--cyan);
    color: var(--text);
    box-shadow: 0 0 14px var(--glow-cyan);
}

.login-hint {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    color: var(--text-dim);
    background: rgba(0, 240, 255, 0.02);
}
.login-hint a { color: var(--cyan); font-weight: 600; }

.comment-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.comment-item:last-child { border-bottom: none; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 4px;
}
.comment-author { color: var(--cyan); font-weight: 600; font-size: 0.95rem; }
.comment-author:hover { text-shadow: 0 0 10px rgba(0, 240, 255, 0.6); }
.comment-time { color: var(--text-dim); font-size: 0.7rem; }
.comment-del {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.72rem;
    transition: color 0.2s;
    padding: 0;
}
.comment-del:hover { color: #ff6b81; }
.comment-content {
    color: var(--text);
    margin: 0;
    white-space: pre-line;
    word-break: break-word;
}

/* ==========================================================================
   表单（通用 + 发帖）
   ========================================================================== */
.form-card { max-width: 900px; margin-inline: auto; }

.form-label {
    color: var(--cyan);
    font-family: var(--font-tech);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
}

.form-control, .form-select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-radius: 10px;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--cyan);
    color: var(--text);
    box-shadow: 0 0 16px var(--glow-cyan);
}
.form-control::placeholder { color: #5b6a78; }
.form-select option { background: var(--bg-2); color: var(--text); }
.form-text { color: var(--text-dim); font-size: 0.82rem; }

/* Quill 编辑器 */
#quill-editor { margin-bottom: 44px; }
.ql-toolbar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px 10px 0 0;
}
.ql-container {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px;
    font-family: var(--font-body);
    font-size: 1.02rem;
    min-height: 260px;
    background: rgba(255, 255, 255, 0.02);
}
.ql-container.ql-snow { border-color: rgba(255, 255, 255, 0.1); }
.ql-editor { min-height: 260px; color: var(--text); }
.ql-editor.ql-blank::before { color: #5b6a78; font-style: normal; }
.ql-snow .ql-stroke { stroke: var(--text-dim); }
.ql-snow .ql-fill { fill: var(--text-dim); }
.ql-snow .ql-picker { color: var(--text-dim); }
.ql-snow .ql-picker-options { background: var(--bg-2); border: 1px solid var(--border); }
.ql-snow .ql-tooltip { background: var(--bg-2); border: 1px solid var(--border); color: var(--text); box-shadow: 0 0 20px var(--glow-cyan); }

/* 图片预览 */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.image-preview-grid img {
    width: 100%; aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 0 10px var(--glow-cyan);
}

/* ==========================================================================
   登录 / 注册 / 编辑资料
   ========================================================================== */
.auth-wrap {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: calc(var(--navbar-h) + 40px) 0 60px;
}
.auth-card {
    max-width: 460px;
    margin: 0 auto;
    background: linear-gradient(170deg, var(--bg-3), var(--bg-2) 80%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 38px 36px;
    box-shadow: 0 0 15px var(--glow-cyan), 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}
.auth-card::before {
    content: "";
    position: absolute;
    top: -1px; left: 12%; right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
    border-radius: 2px;
}
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-logo { color: var(--text-strong); font-size: 1.3rem; letter-spacing: 0.12em; margin-bottom: 14px; }
.auth-title { color: var(--text-strong); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.1em; }
.auth-sub {
    color: var(--violet-2);
    font-family: var(--font-tech);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    margin-top: 6px;
}
.auth-alt {
    text-align: center;
    margin-top: 22px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ==========================================================================
   个人主页
   ========================================================================== */
.profile-card {
    display: flex;
    gap: 40px;
    background: linear-gradient(170deg, var(--bg-3), var(--bg-2) 80%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 44px 40px;
    box-shadow: 0 0 15px var(--glow-cyan), 0 20px 50px rgba(0, 0, 0, 0.45);
}
.profile-left {
    width: 260px;
    flex-shrink: 0;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding-right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-name { color: var(--text-strong); font-size: 1.5rem; font-weight: 700; margin: 18px 0 2px; }
.profile-username { color: var(--text-dim); font-size: 0.8rem; letter-spacing: 0.08em; }
.profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 18px;
    color: var(--text-dim);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}
.stat-num { color: var(--cyan); font-size: 1.15rem; display: block; text-shadow: 0 0 10px var(--glow-cyan); }
.profile-right { flex: 1; min-width: 0; }
.profile-post {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.015);
    transition: border-color 0.25s, box-shadow 0.25s;
}
.profile-post:hover { border-color: var(--border); box-shadow: 0 0 12px var(--glow-cyan); }
.profile-post-title { color: var(--text); font-weight: 600; font-size: 1rem; display: block; }
.profile-post-title:hover { color: var(--cyan); }
.profile-post-meta {
    display: flex; gap: 12px; align-items: center;
    color: var(--text-dim); font-size: 0.7rem; margin-top: 6px;
}
@media (max-width: 768px) {
    .profile-card { flex-direction: column; }
    .profile-left { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.06); padding-right: 0; padding-bottom: 24px; }
}

/* ==========================================================================
   分页
   ========================================================================== */
.scifi-pagination { margin-top: 34px; }
.scifi-pagination .page-link {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-dim);
    margin: 0 4px;
    border-radius: 8px !important;
    min-width: 40px;
    text-align: center;
    transition: all 0.25s;
}
.scifi-pagination .page-link:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 12px var(--glow-cyan);
}
.scifi-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    border-color: transparent;
    color: #031018;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
}
.scifi-pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.02);
    color: #3a4653;
}

/* ==========================================================================
   消息提示
   ========================================================================== */
.toast-stack {
    position: fixed;
    top: calc(var(--navbar-h) + 12px);
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
}
.scifi-alert {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    color: var(--text);
    box-shadow: 0 0 20px var(--glow-cyan), 0 12px 30px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.scifi-alert.alert-success { border-color: rgba(0, 240, 255, 0.4); }
.scifi-alert.alert-danger { border-color: rgba(255, 107, 129, 0.45); }
.scifi-alert.alert-warning { border-color: rgba(255, 200, 87, 0.4); }
.alert-icon { color: var(--cyan); margin-right: 6px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(8, 8, 12, 0.6);
    backdrop-filter: blur(8px);
    color: var(--text-dim);
}

/* ==========================================================================
   入场动画（微交互）
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.3, 1),
                transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}


/* ==========================================================================
   NEXUS 2.0 — EXPLORE / READ 双模式 + Personal Terminal
   ========================================================================== */

/* ---------- 模式分段开关（当前模式高亮） ---------- */
.mode-switch {
    position: relative;
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
    font-family: var(--font-tech);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.25s, box-shadow 0.25s;
}
.mode-switch:hover { border-color: var(--cyan); box-shadow: 0 0 12px var(--glow-cyan); }
.ms-opt {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    color: var(--text-dim);
    transition: color 0.25s;
}
.ms-thumb {
    position: absolute;
    top: 3px; bottom: 3px;
    width: calc(50% - 3px);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    box-shadow: 0 0 10px var(--glow-cyan);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}
html[data-mode="explore"] .ms-thumb { left: 3px; }
html[data-mode="read"] .ms-thumb { left: 3px; transform: translateX(100%); }
html[data-mode="explore"] .ms-opt.ms-explore,
html[data-mode="read"] .ms-opt.ms-read {
    color: #031018;
    font-weight: 700;
}

/* ---------- READ MODE 补充修正（星空弱化 / 输入控件 / 阴影收敛） ---------- */
html[data-mode="read"] #bg-canvas { display: none; }
html[data-mode="read"] #cursor-glow { display: none; }
html[data-mode="read"] .hero-section::before { opacity: 0.4; }
html[data-mode="read"] .site-navbar .nav-link.active::after { background: linear-gradient(90deg, var(--cyan), transparent); }
html[data-mode="read"] .form-control,
html[data-mode="read"] .form-select,
html[data-mode="read"] .ql-container { background: rgba(255, 255, 255, 0.55); color: var(--text); }
html[data-mode="read"] .ql-editor.ql-blank::before { color: #9a9588; }
html[data-mode="read"] .detail-card,
html[data-mode="read"] .comment-card,
html[data-mode="read"] .form-card,
html[data-mode="read"] .feed-item,
html[data-mode="read"] .post-card,
html[data-mode="read"] .section-card { box-shadow: 0 2px 10px rgba(60, 70, 75, 0.08); }
html[data-mode="read"] .btn-neon { box-shadow: 0 2px 8px rgba(60, 110, 120, 0.18); }

/* ---------- NEXUS 2.0 Hero：左介绍 + 右 Glass Terminal ---------- */
.nexus-hero {
    padding-top: calc(var(--navbar-h) + 26px);
    min-height: 62vh;
    display: flex;
    align-items: center;
}
.hero-intro { max-width: 620px; }
.hero-tagline {
    color: var(--text-dim);
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 520px;
    letter-spacing: 0.02em;
}
.hero-identity {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.identity-name {
    font-family: var(--font-tech);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--text-strong);
    text-shadow: 0 0 24px var(--glow-cyan);
}
html[data-mode="read"] .identity-name { text-shadow: none; }
.identity-role {
    color: var(--violet-2);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

/* ---------- Glass Personal Terminal ---------- */
.terminal-card {
    position: relative;
    font-family: var(--font-tech);
    border-radius: 18px;
    padding: 18px 20px 20px;
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    box-shadow: 0 0 26px var(--glow-cyan), inset 0 0 30px rgba(0, 240, 255, 0.03);
    color: var(--text);
    letter-spacing: 0.02em;
    overflow: hidden;
}
html[data-mode="read"] .terminal-card { background: rgba(255, 255, 252, 0.62); box-shadow: 0 4px 18px rgba(60, 70, 75, 0.10); }
.terminal-card::before {
    content: "";
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.7;
}
.term-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.term-title {
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--text-strong);
}
.term-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    color: var(--cyan);
}
.term-live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
}
.term-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 7px;
    font-size: 0.76rem;
}
.term-k {
    color: var(--text-dim);
    letter-spacing: 0.16em;
    min-width: 96px;
    flex-shrink: 0;
}
.term-v {
    color: var(--text);
    letter-spacing: 0.06em;
    overflow: hidden;
    text-overflow: ellipsis;
}
.term-activity {
    list-style: none;
    margin: 4px 0 12px;
    padding: 0;
}
.term-activity li {
    font-size: 0.8rem;
    padding: 3px 0;
    color: var(--text);
}
.term-activity .t-arrow { color: var(--cyan); margin-right: 8px; }
.term-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px;
}
.term-stat {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 4px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
}
html[data-mode="read"] .term-stat { background: rgba(255, 255, 252, 0.5); }
.term-stat-num {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cyan);
    line-height: 1.1;
}
.term-stat-label {
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    margin-top: 2px;
    display: block;
}
.term-sync {
    margin-top: 12px;
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}


/* ---------- Terminal 视觉细节增强 ---------- */
.terminal-card {
    font-family: var(--font-tech);
    padding: 20px 22px 22px;
    background: linear-gradient(170deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02) 60%);
    border: 1px solid rgba(0, 240, 255, 0.16);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), 0 0 24px var(--glow-cyan);
}
html[data-mode="read"] .terminal-card {
    background: rgba(255, 255, 252, 0.72);
    border: 1px solid rgba(60, 90, 100, 0.22);
    box-shadow: 0 4px 18px rgba(60, 70, 75, 0.10);
}
/* 终端数据用等宽字体（mono 质感） */
.term-v, .term-stat-num, .term-sync,
.term-activity li {
    font-family: "Consolas", ui-monospace, "SFMono-Regular", monospace;
}
.term-v { letter-spacing: 0.02em; }
.term-row { margin-bottom: 8px; }
/* CURRENT ACTIVITY / STATISTICS 小节标题 */
.term-sec {
    font-size: 0.6rem;
    letter-spacing: 0.26em;
    color: var(--text-dim);
    margin: 14px 0 6px;
}
/* LIVE 状态灯：3.5s 极缓呼吸（低频，不刺眼） */
@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.term-live-dot { animation: live-pulse 3.5s ease-in-out infinite; }
/* activity 行 hover 微亮（可选交互感） */
.term-activity li .t-arrow { color: var(--cyan); }
.term-stat-num { font-size: 1.3rem; }

/* ==========================================================================
   READ MODE —— 详情页阅读排版（正文列宽 / 行距 / 字号）
   ========================================================================== */
html[data-mode="read"] .detail-wrap .container { max-width: 900px; }
html[data-mode="read"] .detail-card {
    padding: 40px 48px;
    box-shadow: 0 2px 14px rgba(60, 70, 75, 0.08);
}
html[data-mode="read"] .detail-title {
    font-size: 2rem;
    letter-spacing: 0.02em;
    line-height: 1.5;
}
html[data-mode="read"] .rich-text {
    font-size: 1.12rem;
    line-height: 2.05;
    letter-spacing: 0.01em;
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #33383d;
}
html[data-mode="read"] .rich-text h2 {
    font-size: 1.45rem;
    border-left-color: var(--cyan);
}
html[data-mode="read"] .rich-text h3 { font-size: 1.2rem; }
html[data-mode="read"] .rich-text blockquote {
    background: rgba(106, 79, 163, 0.07);
    border-left-color: var(--violet);
}
html[data-mode="read"] .rich-text code {
    background: rgba(31, 122, 140, 0.09);
    color: #14555f;
}
html[data-mode="read"] .rich-text pre {
    background: #fbfaf6;
    border-color: rgba(60, 90, 100, 0.16);
}
html[data-mode="read"] .rich-text pre code { color: #3a3f44; }
html[data-mode="read"] .detail-meta,
html[data-mode="read"] .detail-stats { color: var(--text-dim); }
html[data-mode="read"] .gallery-item { border-color: rgba(60, 90, 100, 0.16); }


/* ==========================================================================
   SECTION MATRIX 2.0 —— spacing / typography / hierarchy / hover / responsive
   ========================================================================== */

/* 卡片：HUD 安全区 padding（底部给 SIGNAL 信息留白）+ 统一 300ms 过渡 */
.section-card {
    padding: 30px 26px 36px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}
/* 层级：code → name → desc → meta 节奏收紧 */
.section-card-code { font-size: 0.68rem; margin-bottom: 10px; letter-spacing: 0.32em; opacity: 0.78; }
.section-card-name { margin-bottom: 7px; letter-spacing: 0.08em; }
.section-card-desc { line-height: 1.65; margin-bottom: 16px; }
.section-card-meta {
    border-top: 1px solid var(--border);
    padding-top: 13px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

/* --- Hover 1: 轻微上浮（<= 350ms，无夸张缩放） --- */
.section-card:hover { transform: translateY(-5px); }
/* --- Hover 2: border glow（沿用 --accent） --- */
.section-card:hover {
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    box-shadow:
        0 0 24px color-mix(in srgb, var(--accent) 26%, transparent),
        0 12px 30px rgba(0, 0, 0, 0.45);
}

/* --- Hover 3: HUD corner 动画（左上 ::after + 右上 .corner 旋转） --- */
.section-card::after {
    content: "";
    position: absolute;
    top: 10px; left: 10px;
    width: 13px; height: 13px;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
    pointer-events: none;
}
.section-card:hover::after {
    opacity: 0.9;
    transform: scale(1);
}
.section-card-corner {
    top: 10px; right: 10px;
    width: 13px; height: 13px;
    opacity: 0.35;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                box-shadow 0.3s ease;
}
.section-card:hover .section-card-corner {
    opacity: 1;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* --- Hover 4: subtle gradient movement（光斑缓慢漂移） --- */
.section-card::before {
    transition: opacity 0.4s ease, transform 0.9s ease;
}
.section-card:hover::before {
    opacity: 1;
    transform: translate(7%, 5%) scale(1.05);
}

/* --- Hover 5: SIGNAL information 出现（箭头淡出） --- */
.section-card-signal {
    position: absolute;
    right: 14px; bottom: 10px;
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease 0.05s, transform 0.3s ease;
    pointer-events: none;
}
html[data-mode="read"] .section-card-signal { text-shadow: none; }
.section-card:hover .section-card-signal { opacity: 0.9; transform: none; }
.section-card-arrow { transition: opacity 0.25s ease, transform 0.3s; }
.section-card:hover .section-card-arrow { opacity: 0; transform: translateX(0); }

/* --- Responsive --- */
@media (max-width: 575.98px) {
    .section-card { padding: 22px 18px 30px; }
    .section-card-desc { min-height: 0; font-size: 0.88rem; }
    .section-card-signal { display: none; }
}
@media (max-width: 991.98px) {
    .section-card-desc { min-height: 0; }
}


/* ==========================================================================
   04 NEXUS STAR MAP —— 兴趣星图（SVG + CSS + JS）
   ========================================================================== */
.star-map-section { padding-bottom: 40px; }
.star-map-section #star-map-hint {
    font-size: 0.72rem; letter-spacing: 0.24em;
    color: var(--text-dim); cursor: default;
}
#star-map-stage {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(ellipse 70% 55% at 50% 42%,
            rgba(0, 240, 255, 0.05), transparent 70%),
        linear-gradient(180deg, var(--bg-2), var(--bg-3));
    overflow: hidden;
    min-height: 460px;
}
html[data-mode="read"] #star-map-stage {
    background:
        radial-gradient(ellipse 70% 55% at 50% 42%, rgba(60, 150, 165, 0.08), transparent 70%),
        linear-gradient(180deg, #ece7dc, #e4ded0);
}
#star-map-canvas { width: 100%; height: 460px; }
#star-map-canvas svg { display: block; width: 100%; height: 100%; }

/* 星图连接线 */
.smap-edge {
    stroke: var(--text-dim);
    stroke-opacity: 0.22;
    stroke-width: 1;
    transition: stroke 0.25s ease, stroke-opacity 0.3s ease;
}
html[data-mode="read"] .smap-edge { stroke: #8b8678; }
.smap-stage:hover .smap-edge { stroke-opacity: 0.08; }
.smap-stage:hover .smap-star:not(:hover):not(.active) { opacity: 0.32; }

/* 星尘粒子 */
.smap-dust { fill: var(--text-dim); opacity: 0.3; }

/* 节点 */
.smap-star {
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.smap-core {
    fill: var(--accent, #00f0ff);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1),
                opacity 0.25s ease;
    transform-box: fill-box;
    transform-origin: center;
}
.smap-halo {
    fill: color-mix(in srgb, var(--accent, #00f0ff) 22%, transparent);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    transform-box: fill-box;
    transform-origin: center;
}
.smap-star:hover .smap-core,
.smap-star.active .smap-core {
    transform: scale(1.28);
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent, #00f0ff));
}
.smap-star:hover .smap-halo,
.smap-star.active .smap-halo {
    opacity: 1;
    transform: scale(1.15);
}
/* 其他节点变暗 */
.smap-stage:hover .smap-star:not(:hover):not(.active) { opacity: 0.32; }

/* 节点标签 */
.smap-label {
    fill: var(--text-dim);
    font-family: var(--font-tech);
    font-size: 13px;
    letter-spacing: 0.14em;
    pointer-events: none;
    transition: fill 0.3s ease;
}
html[data-mode="read"] .smap-label { fill: #55524a; }
.smap-star:hover .smap-label,
.smap-star.active .smap-label { fill: var(--accent, #00f0ff); }
.smap-label.sub { font-size: 10px; letter-spacing: 0.22em; fill: var(--text-dim); opacity: 0.7; }

/* 环绕轨道 + 粒子（hover / active 显现） */
.smap-orbit {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 0.35s ease;
}
.smap-star:hover .smap-orbit,
.smap-star.active .smap-orbit { opacity: 1; }
.smap-orbit-ring {
    fill: none;
    stroke: color-mix(in srgb, var(--accent, #00f0ff) 45%, transparent);
    stroke-width: 0.8;
    stroke-dasharray: 2 5;
    transform-box: fill-box;
    transform-origin: center;
}
.smap-orbit-dot {
    fill: var(--accent, #00f0ff);
    opacity: 0.9;
}
.smap-star:hover .smap-orbit-ring,
.smap-star.active .smap-orbit-ring {
    animation: smap-spin 14s linear infinite;
}
.smap-orbit .smap-orbiter { transform-box: fill-box; transform-origin: center; }
.smap-star:hover .smap-orbiter,
.smap-star.active .smap-orbiter {
    animation: smap-spin 5.5s linear infinite;
}
@keyframes smap-spin { to { transform: rotate(360deg); } }

/* 信息面板 */
.star-panel {
    position: absolute;
    right: 14px; top: 14px;
    width: 248px;
    padding: 16px 18px 14px;
    border-radius: 14px;
    background: rgba(10, 12, 18, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 22px var(--glow-cyan);
    font-family: var(--font-tech);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
    z-index: 5;
}
html[data-mode="read"] .star-panel {
    background: rgba(255, 255, 252, 0.94);
    box-shadow: 0 4px 18px rgba(60, 70, 75, 0.12);
}
.star-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.star-panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent, #00f0ff);
    margin-bottom: 2px;
}
.star-panel-subtitle {
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 10px;
    line-height: 1.7;
}
.star-panel-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.star-chip {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 8px;
}
.star-panel-signals {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}
.star-panel-signals b { color: var(--cyan); }
.star-explore {
    display: block;
    text-align: center;
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    color: #031018;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    border-radius: 8px;
    padding: 8px 0;
    font-weight: 700;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
html[data-mode="read"] .star-explore { color: #fff; }
.star-explore:hover {
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
    transform: translateY(-1px);
    color: #031018;
}
.star-panel-close {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1;
    padding: 4px;
}
.star-panel-close:hover { color: #ff6b81; }

/* 移动端：面板改为底部 + 星图增高 */
@media (max-width: 767.98px) {
    #star-map-canvas, #star-map-stage { min-height: 0; }
    #star-map-stage { min-height: 400px; }
    #star-map-canvas { height: 400px; }
    .star-panel {
        left: 12px; right: 12px; top: auto; bottom: 10px;
        width: auto;
    }
}


/* ==========================================================================
   分区矩阵 · 居中布局（首页 04 卡片）—— 居中对称、间距加大、点阵留白
   ========================================================================== */
.section-matrix {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: clamp(20px, 3.4vw, 44px);
    padding: 18px 0 6px;
}
.section-matrix::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1.5px);
    background-size: 30px 30px;
    opacity: 0.4;
    -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 50%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 78% 72% at 50% 50%, #000 40%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}
html[data-mode="read"] .section-matrix::before {
    background-image: radial-gradient(circle, rgba(70, 100, 110, 0.28) 1px, transparent 1.5px);
}
.section-matrix > .section-card {
    position: relative;
    z-index: 1;
    width: min(330px, 100%);
    height: auto;
    margin: 0;
}
@media (max-width: 767.98px) {
    .section-matrix { gap: 18px; }
}


/* ==========================================================================
   Sticky Footer —— footer 始终贴页面最底部（含内容不足视口的页面）
   ========================================================================== */
html { height: 100%; }
body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}
.site-main { flex: 1 0 auto; width: 100%; }
.site-footer { flex-shrink: 0; width: 100%; }


/* ==========================================================================
   STAR MAP 2.0 —— 粒子点链连线 / 去除聚焦黑框 / 英文标签
   ========================================================================== */
/* 连线：实线 → 粒子点状链接 */
.smap-edge {
    stroke-dasharray: 2 9;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-opacity: 0.45;
}
.smap-edge.smap-edge-on { animation: smap-flow 1s linear infinite; }
@keyframes smap-flow { to { stroke-dashoffset: -22; } }

/* 点击后不再出现浏览器黑色矩形 outline；键盘聚焦改用主题色虚线 */
.smap-star { outline: none; -webkit-tap-highlight-color: transparent; }
.smap-star:focus-visible {
    outline: 1px dashed var(--accent, #00f0ff);
    outline-offset: 5px;
    border-radius: 50%;
}

/* 星图文字不可选中，避免点选出现黑底选区 */
#star-map-canvas svg,
.smap-label { user-select: none; -webkit-user-select: none; }

/* 英文长标签排版 */
.smap-label { font-size: 12px; letter-spacing: 0.1em; }
.smap-label.sub { display: none; }


/* ==========================================================================
   STAR MAP 3.0 —— 交互粒子层 + Hacker 折线引导
   ========================================================================== */
#star-dust {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.9;
}
html[data-mode="read"] #star-dust { opacity: 0.16; }

/* Hacker 拐线 */
.smap-link {
    fill: none;
    stroke: var(--cyan, #00f0ff);
    stroke-width: 1.5;
    stroke-dasharray: 4 5;
    opacity: 0.85;
    pointer-events: none;
}
html[data-mode="read"] .smap-link { stroke: #1f7a8c; }
.smap-link-node {
    fill: var(--bg-2);
    stroke: var(--cyan, #00f0ff);
    stroke-width: 1.2;
}
html[data-mode="read"] .smap-link-node { stroke: #1f7a8c; }
.smap-link-head {
    fill: var(--cyan, #00f0ff);
    filter: drop-shadow(0 0 4px var(--cyan, #00f0ff));
}
html[data-mode="read"] .smap-link-head { fill: #1f7a8c; }

/* 面板左上接口点 */
.star-panel .panel-port {
    position: absolute;
    left: -7px;
    top: 40px;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--cyan, #00f0ff);
    border: 2px solid var(--bg-2);
    box-shadow: 0 0 10px var(--cyan, #00f0ff);
    transform: rotate(45deg);
}
html[data-mode="read"] .star-panel .panel-port { background: #1f7a8c; border-color: #fff; }


/* ==========================================================================
   READ MODE —— 按钮护眼浅绿（浏览帖子 / 发帖 / ALL / 星图 EXPLORE / 模式开关）
   ========================================================================== */
html[data-mode="read"] .btn-neon {
    background: linear-gradient(135deg, #aee29a, #7cc576);
    color: #17351f;
    box-shadow: 0 1px 6px rgba(90, 150, 100, 0.22);
    border: 1px solid rgba(120, 180, 130, 0.35);
}
html[data-mode="read"] .btn-neon:hover {
    color: #17351f;
    background: linear-gradient(135deg, #b8e8a6, #86cf80);
    box-shadow: 0 0 14px rgba(110, 170, 120, 0.35);
}
html[data-mode="read"] .filter-chip.active {
    background: linear-gradient(135deg, #aee29a, #7cc576);
    color: #17351f;
    box-shadow: 0 1px 6px rgba(90, 150, 100, 0.25);
}
html[data-mode="read"] .star-explore {
    background: linear-gradient(135deg, #aee29a, #7cc576);
    color: #17351f;
}
html[data-mode="read"] .star-explore:hover { color: #17351f; }
/* 阅读模式下切换开关滑块同样用护眼绿 */
html[data-mode="read"] .ms-thumb {
    background: linear-gradient(135deg, #aee29a, #7cc576);
    box-shadow: 0 1px 6px rgba(90, 150, 100, 0.3);
}
html[data-mode="read"] .ms-opt.ms-read { color: #17351f; }


/* ---------- 页脚备案信息 ---------- */
.footer-beian {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 0 14px;
    font-size: 0.78rem;
    color: var(--text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
html[data-mode="read"] .footer-beian { border-top-color: rgba(60, 90, 100, 0.14); }
.footer-beian a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.25s;
}
.footer-beian a:hover { color: var(--cyan); }
.beian-icon { width: 16px; height: auto; display: inline-block; }
.beian-sep { width: 1px; height: 12px; background: var(--border); }

