@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

/* ── 变量 ── */
:root {
  --c-bg: #0d0d0d;
  --c-purple: #8000ff;
  --c-magenta: #ff00ff;
  --c-text: #e0d0ff;
  --c-dim: #7a6a8a;
  --c-surface: #140a1e;
  --c-border: #2a0a3a;
  --c-glow-p: rgba(128,0,255,0.55);
  --c-glow-m: rgba(255,0,255,0.45);
  --font-hand: 'Kalam', 'Patrick Hand', cursive;
  --font-mono: 'Courier New', Courier, monospace;
  --bar-h: 56px;
  --sidebar-w: 220px;
  --content-max: 820px;
  --radius: 0;
}

/* ── 重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-hand);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--bar-h) + 16px);
}
a { color: var(--c-purple); text-decoration: none; transition: color .2s, text-shadow .2s; }
a:hover { color: var(--c-magenta); text-shadow: 0 0 8px var(--c-glow-m); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, button { font-family: inherit; }

/* ── 扫描线 ── */
.scanlines {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0.18) 4px
  );
}

/* ── HUD 角落装饰 ── */
.hud-corner {
  position: fixed; width: 28px; height: 28px; z-index: 100; pointer-events: none;
}
.hud-tl { top: 10px; left: 10px;
  border-top: 2px solid var(--c-purple); border-left: 2px solid var(--c-purple);
  box-shadow: -2px -2px 8px var(--c-glow-p);
}
.hud-tr { top: 10px; right: 10px;
  border-top: 2px solid var(--c-magenta); border-right: 2px solid var(--c-magenta);
  box-shadow: 2px -2px 8px var(--c-glow-m);
}

/* ── Glitch 动画 ── */
@keyframes glitch-skew {
  0%   { transform: skewX(0deg); }
  10%  { transform: skewX(-3deg); }
  20%  { transform: skewX(2deg); }
  30%  { transform: skewX(0deg); }
  80%  { transform: skewX(0deg); }
  90%  { transform: skewX(1deg); }
  100% { transform: skewX(0deg); }
}
@keyframes glitch-clip1 {
  0%   { clip-path: inset(0 0 95% 0); transform: translate(-3px,0); }
  20%  { clip-path: inset(30% 0 60% 0); transform: translate(3px,0); }
  40%  { clip-path: inset(60% 0 20% 0); transform: translate(-2px,0); }
  60%  { clip-path: inset(80% 0 5% 0);  transform: translate(2px,0); }
  80%  { clip-path: inset(10% 0 80% 0); transform: translate(-1px,0); }
  100% { clip-path: inset(0 0 95% 0);   transform: translate(0,0); }
}
@keyframes glitch-clip2 {
  0%   { clip-path: inset(50% 0 30% 0); transform: translate(3px,0); }
  25%  { clip-path: inset(10% 0 70% 0); transform: translate(-3px,0); }
  50%  { clip-path: inset(70% 0 10% 0); transform: translate(2px,0); }
  75%  { clip-path: inset(20% 0 60% 0); transform: translate(-2px,0); }
  100% { clip-path: inset(50% 0 30% 0); transform: translate(0,0); }
}
@keyframes terminal-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.glitch {
  position: relative;
  animation: glitch-skew 4s infinite linear;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  width: 100%; overflow: hidden;
}
.glitch::before {
  color: var(--c-magenta);
  animation: glitch-clip1 3s infinite steps(1);
  text-shadow: 2px 0 var(--c-magenta);
}
.glitch::after {
  color: var(--c-purple);
  animation: glitch-clip2 4s infinite steps(1);
  text-shadow: -2px 0 var(--c-purple);
}

/* ── 侧边导航（结构抽签：aside>nav>ul>li>a）── */
.sidebar {
  display: none;
}

/* ── 底部固定导航栏 ── */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bar-h);
  background: rgba(13,13,13,0.96);
  border-top: 1px solid var(--c-purple);
  box-shadow: 0 -2px 20px var(--c-glow-p);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  z-index: 500;
  gap: 8px;
}
.ham-btn {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px; min-height: 40px; min-width: 40px; justify-content: center;
}
.ham-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--c-purple);
  box-shadow: 0 0 6px var(--c-glow-p);
  transition: transform .3s, opacity .3s;
}
.ham-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham-btn.is-open span:nth-child(2) { opacity: 0; }
.ham-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.brand-center {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: .85rem;
  color: var(--c-magenta);
  text-shadow: 0 0 10px var(--c-glow-m);
  text-align: center;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-center:hover { color: var(--c-purple); text-shadow: 0 0 10px var(--c-glow-p); }

.bar-search {
  display: flex; align-items: center;
}
.bar-search input {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  padding: 6px 10px;
  font-size: .8rem;
  font-family: var(--font-mono);
  outline: none;
  width: 130px;
  min-height: 40px;
  transition: border-color .2s, box-shadow .2s;
}
.bar-search input:focus {
  border-color: var(--c-purple);
  box-shadow: 0 0 8px var(--c-glow-p);
}

/* ── 全屏遮罩菜单 ── */
.overlay-menu {
  position: fixed; inset: 0;
  background: rgba(13,13,13,0.97);
  border: 1px solid var(--c-purple);
  z-index: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.overlay-menu.is-open {
  opacity: 1; pointer-events: auto;
}
.overlay-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: 1px solid var(--c-magenta);
  color: var(--c-magenta); font-size: 1.2rem;
  padding: 8px 14px; cursor: pointer;
  min-height: 40px;
  transition: background .2s;
}
.overlay-close:hover { background: var(--c-magenta); color: var(--c-bg); }

.overlay-nav ul {
  display: flex; flex-direction: column; gap: 8px; text-align: center;
}
.overlay-nav li a {
  display: block;
  font-size: 1.1rem;
  font-family: var(--font-hand);
  color: var(--c-text);
  padding: 10px 24px;
  border: 1px solid transparent;
  transition: border-color .2s, color .2s, text-shadow .2s;
  min-height: 40px; line-height: 1.4;
}
.overlay-nav li a:hover,
.overlay-nav li a.nav-active {
  color: var(--c-magenta);
  border-color: var(--c-magenta);
  text-shadow: 0 0 10px var(--c-glow-m);
}

/* ── 布局外框 ── */
.layout-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 16px;
}

/* ── 面包屑 ── */
.breadcrumb {
  font-size: .85rem;
  font-family: var(--font-mono);
  color: var(--c-dim);
  margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--c-dim); }
.breadcrumb a:hover { color: var(--c-magenta); }
.breadcrumb span { color: var(--c-purple); }

/* ── 文章网格 ── */
.article-grid,
.about-grid,
.privacy-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── 文章侧边栏（结构抽签内容左侧）── */
.art-aside,
.about-aside,
.privacy-aside {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 20px 16px;
  box-shadow: inset 0 0 20px rgba(128,0,255,0.06);
}

.aside-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--c-purple);
  text-transform: uppercase;
  letter-spacing: .12em;
  display: block;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 8px;
}

.art-aside nav ul li a,
.about-aside nav ul li a,
.privacy-aside nav ul li a {
  display: block;
  padding: 8px 6px;
  font-size: .9rem;
  color: var(--c-dim);
  border-left: 2px solid transparent;
  transition: border-color .2s, color .2s;
  min-height: 40px; line-height: 1.3;
}
.art-aside nav ul li a:hover,
.about-aside nav ul li a:hover,
.privacy-aside nav ul li a:hover {
  color: var(--c-magenta);
  border-left-color: var(--c-magenta);
}

.aside-extra {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}
.aside-quick li a {
  display: block;
  padding: 6px 0;
  font-size: .85rem;
  color: var(--c-dim);
  min-height: 36px; line-height: 1.4;
}
.aside-quick li a:hover { color: var(--c-purple); }

/* ── eyebrow / small ── */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--c-magenta);
  text-shadow: 0 0 6px var(--c-glow-m);
  margin-bottom: 4px;
}

/* ── 文章 header ── */
.art-header {
  margin-bottom: 28px;
}
.art-meta, .art-meta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 12px;
}
.art-date {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--c-dim);
  padding: 3px 8px;
  border: 1px solid var(--c-border);
}
.art-h1 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--c-text);
  text-shadow: 0 0 16px var(--c-glow-p), 0 0 40px rgba(128,0,255,0.3);
  line-height: 1.3;
  margin-bottom: 8px;
}

.art-hero {
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--c-border);
}
.art-hero-img {
  width: 100%; height: auto;
  filter: saturate(1.2) contrast(1.05);
  transition: transform .4s;
}
.art-hero-img:hover { transform: scale(1.02); }

/* ── 正文 ── */
.art-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
}
.art-body h2 {
  font-size: 1.35rem;
  color: var(--c-magenta);
  text-shadow: 0 0 10px var(--c-glow-m);
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.art-body h3 {
  font-size: 1.1rem;
  color: var(--c-purple);
  text-shadow: 0 0 8px var(--c-glow-p);
  margin: 20px 0 8px;
}
.art-body p { margin-bottom: 14px; }
.art-body ul, .art-body ol {
  margin: 0 0 14px 18px;
}
.art-body ul { list-style: disc; }
.art-body ol { list-style: decimal; }
.art-body li { margin-bottom: 6px; }
.art-body a { color: var(--c-magenta); text-decoration: underline; text-underline-offset: 3px; }
.art-body a:hover { color: var(--c-purple); }
.art-body strong { color: var(--c-magenta); font-weight: 700; }
.art-body code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--c-surface);
  padding: 2px 6px;
  border: 1px solid var(--c-border);
  color: var(--c-purple);
}
.art-body blockquote {
  border-left: 3px solid var(--c-purple);
  padding: 10px 16px;
  margin: 16px 0;
  background: var(--c-surface);
  color: var(--c-dim);
}

/* ── 文章底部更多链接 ── */
.art-footer-links {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
}
.art-footer-links h2 {
  font-size: 1.1rem;
  color: var(--c-purple);
  margin: 6px 0 12px;
}
.more-links li {
  margin-bottom: 8px;
}
.more-links li a {
  color: var(--c-dim);
  font-size: .92rem;
  border-left: 2px solid var(--c-border);
  padding-left: 10px;
  display: block;
  transition: color .2s, border-color .2s;
  min-height: 36px; line-height: 1.4; padding-top: 4px;
}
.more-links li a:hover {
  color: var(--c-magenta);
  border-left-color: var(--c-magenta);
}

/* ── 首页 Hero ── */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 40px;
  border: 1px solid var(--c-border);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(128,0,255,0.35) 0%, rgba(13,13,13,0.7) 50%, rgba(255,0,255,0.2) 100%);
  z-index: 2;
}
.hero-slash {
  position: absolute;
  top: 0; left: 50%;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, var(--c-magenta), var(--c-purple));
  transform: skewX(-8deg);
  box-shadow: 0 0 18px var(--c-glow-m), 0 0 40px var(--c-glow-p);
  z-index: 3;
}
.hero-media {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.6) brightness(0.7) contrast(1.1);
}
.hero-img-1 { transform: translateY(-4%); }
.hero-img-2 { transform: translateY(4%); }

.hero-copy {
  position: relative; z-index: 4;
  text-align: center;
  padding: 32px 20px;
  max-width: 640px;
}
.hero-h1 {
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 24px var(--c-glow-p), 0 0 60px var(--c-glow-m);
  margin-bottom: 12px;
  line-height: 1.25;
}
.hero-sub {
  font-size: 1rem;
  color: var(--c-text);
  margin-bottom: 20px;
  line-height: 1.6;
}
.hero-btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--c-purple);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 0 20px var(--c-glow-p);
  transition: background .2s, box-shadow .2s, transform .2s;
  min-height: 44px; line-height: 1.3;
}
.hero-btn:hover {
  background: var(--c-magenta);
  box-shadow: 0 0 30px var(--c-glow-m);
  transform: translateY(-2px);
  color: #fff;
  text-shadow: none;
}

/* ── 首页内容区 ── */
.home-content {
  margin-bottom: 40px;
  font-size: 1rem;
  line-height: 1.8;
}
.home-content h2 {
  font-size: 1.3rem;
  color: var(--c-magenta);
  text-shadow: 0 0 8px var(--c-glow-m);
  margin: 24px 0 10px;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 6px;
}
.home-content p { margin-bottom: 14px; }
.home-content a { color: var(--c-magenta); text-decoration: underline; }

/* ── 首页索引表格（结构抽签：table>tbody>tr>td）── */
.home-index {
  margin-top: 8px;
}
.home-index h2 {
  font-size: 1.25rem;
  color: var(--c-purple);
  text-shadow: 0 0 10px var(--c-glow-p);
  margin: 6px 0 16px;
}
.index-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.index-table tbody tr {
  border-bottom: 1px solid var(--c-border);
  transition: background .2s;
}
.index-table tbody tr:hover {
  background: rgba(128,0,255,0.07);
}
.index-table td {
  padding: 12px 10px;
  vertical-align: top;
}
.tbl-title {
  font-weight: 700;
  min-width: 160px;
}
.tbl-title a {
  color: var(--c-text);
  transition: color .2s;
}
.tbl-title a:hover { color: var(--c-magenta); text-shadow: 0 0 8px var(--c-glow-m); }
.tbl-desc {
  color: var(--c-dim);
  line-height: 1.5;
}
.tbl-date {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--c-dim);
  white-space: nowrap;
}

/* ── About ── */
.about-header {
  padding: 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-purple);
  margin-bottom: 0;
}
.about-badge {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--c-purple);
  margin-bottom: 8px;
}
.about-sub {
  font-size: .95rem;
  color: var(--c-dim);
  margin-top: 8px;
  line-height: 1.6;
}
.about-body { margin-top: 4px; }
.about-nav-list li { margin-bottom: 8px; }
.about-nav-list li a {
  color: var(--c-dim);
  border-left: 2px solid var(--c-border);
  padding-left: 10px;
  display: block;
  transition: color .2s, border-color .2s;
  min-height: 36px; line-height: 1.5; padding-top: 4px;
}
.about-nav-list li a:hover { color: var(--c-magenta); border-left-color: var(--c-magenta); }
.about-links h2 {
  font-size: 1.1rem;
  color: var(--c-purple);
  margin: 6px 0 12px;
}

/* ── Privacy ── */
.privacy-badge {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--c-magenta);
  margin-bottom: 8px;
}
.privacy-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--c-border);
}
.privacy-links li { margin-bottom: 8px; }
.privacy-links li a {
  color: var(--c-dim);
  border-left: 2px solid var(--c-border);
  padding-left: 10px;
  display: block;
  min-height: 36px; line-height: 1.5; padding-top: 4px;
  transition: color .2s, border-color .2s;
}
.privacy-links li a:hover { color: var(--c-magenta); border-left-color: var(--c-magenta); }
.privacy-nav h2 {
  font-size: 1.1rem;
  color: var(--c-purple);
  margin: 6px 0 12px;
}

/* ── 页脚 ── */
.site-footer {
  background: var(--c-surface);
  border-top: 2px solid var(--c-purple);
  box-shadow: 0 -4px 24px var(--c-glow-p);
  padding: 40px 20px calc(var(--bar-h) + 40px);
  margin-top: 60px;
}
.footer-cta {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(135deg, rgba(128,0,255,0.15), rgba(255,0,255,0.08));
  border: 1px solid var(--c-border);
  margin-bottom: 36px;
}
.footer-cta-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-text);
  text-shadow: 0 0 12px var(--c-glow-p);
  margin-bottom: 14px;
}
.footer-cta-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--c-magenta);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 0 16px var(--c-glow-m);
  min-height: 44px; line-height: 1.3;
  transition: background .2s, transform .2s;
}
.footer-cta-btn:hover {
  background: var(--c-purple);
  box-shadow: 0 0 20px var(--c-glow-p);
  transform: translateY(-2px);
  color: #fff; text-shadow: none;
}

/* 页脚三栏 dl（结构抽签）*/
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.footer-cols dl dt {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--c-purple);
  text-shadow: 0 0 6px var(--c-glow-p);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.footer-cols dl dd {
  margin-bottom: 6px;
}
.footer-cols dl dd a {
  font-size: .85rem;
  color: var(--c-dim);
  transition: color .2s;
  display: block;
  min-height: 28px; line-height: 1.5;
}
.footer-cols dl dd a:hover {
  color: var(--c-magenta);
}

.footer-bottom {
  text-align: center;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--c-dim);
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}

/* ── 滚动揭示 ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── prefers-reduced-motion ── */
@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; }
}

/* ── 桌面断点 ── */
@media (min-width: 768px) {
  .article-grid,
  .about-grid,
  .privacy-grid {
    flex-direction: row;
    align-items: flex-start;
  }
  .art-aside,
  .about-aside,
  .privacy-aside {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
  }
  .article-grid main,
  .about-grid main,
  .privacy-grid main {
    flex: 1;
    min-width: 0;
  }

  .index-table .tbl-desc { display: table-cell; }

  .bottom-bar {
    padding: 0 28px;
  }
  .bar-search input {
    width: 200px;
  }
  .brand-center {
    font-size: 1rem;
  }
}

@media (min-width: 1024px) {
  .layout-wrap {
    padding: 32px 32px 24px;
  }
  .hero {
    min-height: 45vh;
  }
  .footer-cols {
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .index-table .tbl-desc { display: none; }
  .footer-cols {
    grid-template-columns: 1fr;
  }
  .hero-h1 { font-size: 1.4rem; }
  .bar-search input { width: 100px; }
}
