@import url('https://fonts.googleapis.com/css2?family=Exo:wght@300;400;500;600;700&family=Roboto+Mono:wght@300;400;500;700&display=swap');

/* ===== 重置与基础 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-red: #ff0000;
  --c-purple: #8b00ff;
  --c-dark: #261717;
  --c-dark2: #1a0e0e;
  --c-dark3: #0f0808;
  --c-glass-bg: rgba(255,255,255,0.08);
  --c-glass-border: rgba(255,255,255,0.15);
  --c-glass-hover: rgba(255,255,255,0.14);
  --c-text: #f0e8e8;
  --c-text-muted: rgba(240,232,232,0.6);
  --c-accent: #ff3333;
  --nav-h: 64px;
  --top-bar-h: 36px;
  --radius: 4px;
  --blur: blur(15px);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Exo', 'Roboto Mono', system-ui, -apple-system, sans-serif;
  background-color: var(--c-dark3);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(139,0,255,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(255,0,0,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(38,23,23,0.95) 0%, var(--c-dark3) 100%);
  background-attachment: fixed;
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: var(--nav-h);
}

div[id] {
  scroll-margin-top: calc(var(--top-bar-h) + var(--nav-h) + 12px);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-red);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover, a:focus {
  color: #ff6666;
}
a:focus-visible {
  outline: 2px solid var(--c-purple);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== 公告条 ===== */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--top-bar-h);
  z-index: 200;
  background: linear-gradient(90deg, var(--c-red) 0%, var(--c-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  overflow: hidden;
}
.top-bar-text {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 全屏遮罩菜单 ===== */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(15,8,8,0.96);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.overlay-menu.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.overlay-close {
  position: absolute;
  top: calc(var(--top-bar-h) + 16px);
  right: 1.5rem;
  background: none;
  border: 1px solid var(--c-glass-border);
  color: var(--c-text);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.overlay-close:hover {
  background: rgba(255,0,0,0.2);
  color: #fff;
}
.overlay-brand {
  margin-bottom: 1rem;
}
.overlay-brand .brand-text {
  font-family: 'Exo', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-red), var(--c-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.overlay-brand .brand-logo {
  max-height: 60px;
  width: auto;
}

/* 导航结构：aside > nav > ul > li > a */
.overlay-aside {
  width: 100%;
  max-width: 420px;
  padding: 0 1.5rem;
}
.overlay-aside nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.overlay-aside nav ul li a {
  display: block;
  padding: 0.9rem 1.5rem;
  font-family: 'Exo', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--c-text);
  border-radius: var(--radius);
  border-bottom: 1px solid rgba(255,0,0,0.15);
  background: var(--c-glass-bg);
  border-left: 3px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition), padding-left var(--transition);
}
.overlay-aside nav ul li a:hover,
.overlay-aside nav ul li a:focus {
  background: var(--c-glass-hover);
  border-left-color: var(--c-red);
  color: #fff;
  padding-left: 2rem;
}
.overlay-aside nav ul li:last-child a {
  border-bottom: none;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  margin-top: var(--top-bar-h);
  min-height: 45vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 3rem 2rem;
  background: transparent;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(139,0,255,0.18) 0%, rgba(255,0,0,0.12) 100%);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.hero-media {
  flex: 0 0 auto;
  max-width: 42%;
}
.hero-media .hero-img {
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(255,0,0,0.3), 0 0 0 1px var(--c-glass-border);
}
.hero-copy {
  flex: 1 1 auto;
  text-align: center;
}
.hero-h1 {
  font-family: 'Exo', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, var(--c-red) 50%, var(--c-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: inline-block;
  padding: 0.7rem 2.2rem;
  background: linear-gradient(135deg, var(--c-red), var(--c-purple));
  color: #fff;
  font-family: 'Exo', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.15);
  min-height: 44px;
  line-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  box-shadow: 0 4px 20px rgba(255,0,0,0.4);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.hero-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,0,0,0.55);
  opacity: 0.92;
}

/* 斜切色带 */
.hero-slash {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--c-dark3);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 3;
}

/* ===== 主正文容器 ===== */
/* 结构：main > article.wrap > div > section */
.site-main {
  position: relative;
  z-index: 10;
}
.site-main .wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.site-main .wrap > .content-section {
  width: 100%;
}
.site-main .wrap > .content-section > .content-article {
  width: 100%;
}

/* ===== page.content 内部样式（div块） ===== */
.content-article div {
  background: var(--c-glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius);
  padding: 2rem 2rem 2rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  border-bottom: 3px solid var(--c-red);
  transition: background var(--transition), box-shadow var(--transition);
}
.content-article div:hover {
  background: rgba(255,255,255,0.11);
  box-shadow: 0 8px 40px rgba(139,0,255,0.18), 0 2px 8px rgba(0,0,0,0.3);
}
.content-article div:last-child {
  margin-bottom: 0;
}

/* 标题统一 */
.content-article h2,
.content-article h3 {
  font-family: 'Exo', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}
.content-article h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: #fff;
}
.content-article h2 > span {
  display: inline;
  background: linear-gradient(90deg, var(--c-red), var(--c-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.content-article h3 {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: rgba(240,232,232,0.9);
}
.content-article h3 > span {
  border-bottom: 2px solid var(--c-red);
  padding-bottom: 1px;
}
.content-article p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}
.content-article p:last-child {
  margin-bottom: 0;
}
.content-article ul, .content-article ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--c-text-muted);
}
.content-article li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.content-article a {
  color: var(--c-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-article a:hover {
  color: #ff6666;
}
.content-article strong, .content-article b {
  color: var(--c-text);
  font-weight: 600;
}
.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.content-article th {
  background: rgba(255,0,0,0.15);
  color: #fff;
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 2px solid var(--c-red);
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.content-article td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: var(--c-text-muted);
}
.content-article blockquote {
  border-left: 3px solid var(--c-purple);
  padding: 0.8rem 1.2rem;
  background: rgba(139,0,255,0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
  font-style: italic;
  color: rgba(240,232,232,0.75);
}
.content-article time {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

/* Q&A / details – ensure visibility */
.content-article details {
  margin-bottom: 0.8rem;
}
.content-article details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--c-text);
  padding: 0.5rem 0;
  list-style: none;
}

/* ===== 页脚 ===== */
/* 结构：footer 只放 p + small */
.site-footer {
  padding: 2.5rem 1.5rem 6rem;
  text-align: center;
  border-top: 1px solid var(--c-glass-border);
  background: rgba(15,8,8,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand {
  font-family: 'Exo', sans-serif;
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--c-red), var(--c-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.site-footer small {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: var(--c-text-muted);
  letter-spacing: 0.05em;
}

/* ===== 底部固定导航条 ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 300;
  background: rgba(38,23,23,0.88);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--c-glass-border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}
.bottom-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.bottom-brand-row {
  display: flex;
  align-items: center;
}
.bottom-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  min-height: 44px;
}
.bottom-logo-link .brand-text {
  font-family: 'Exo', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-red), var(--c-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bottom-logo-link .brand-logo {
  max-height: 38px;
  width: auto;
}

/* 汉堡按钮 */
.hamburger-btn {
  background: var(--c-glass-bg);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius);
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
  flex-shrink: 0;
}
.hamburger-btn:hover {
  background: rgba(255,0,0,0.2);
}
.ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: background var(--transition);
}
.hamburger-btn:hover .ham-line {
  background: #fff;
}

/* ===== 品牌文字通用 ===== */
.brand-text {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
}

/* ===== 动效（prefers-reduced-motion 下关闭） ===== */
@media (prefers-reduced-motion: no-preference) {
  .content-article div {
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  }
  .content-article div:hover {
    transform: translateY(-2px);
  }
  .hero-cta {
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  }
  .overlay-menu {
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }
  .hero {
    padding: 2rem 1.25rem 3.5rem;
    min-height: 40vh;
  }
  .hero-inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .hero-media {
    max-width: 80%;
    margin: 0 auto;
  }
  .hero-copy {
    text-align: center;
  }
  .site-main .wrap {
    padding: 1.5rem 1rem;
  }
  .content-article div {
    padding: 1.5rem 1.25rem;
    margin-bottom: 1.5rem;
  }
  .overlay-aside {
    max-width: 100%;
    padding: 0 1rem;
  }
  .overlay-aside nav ul li a {
    font-size: 1.05rem;
    padding: 1rem 1.25rem;
  }
  .site-footer {
    padding: 2rem 1rem 5.5rem;
  }
  .bottom-bar-inner {
    padding: 0 1rem;
  }
}
@media (max-width: 480px) {
  .hero-h1 {
    font-size: 1.6rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
  .content-article h2 {
    font-size: 1.2rem;
  }
  .content-article div {
    padding: 1.2rem 1rem;
  }
  .footer-brand {
    font-size: 2rem;
  }
}
@media (min-width: 1024px) {
  .hero {
    min-height: 45vh;
    padding: 4rem 3rem 5rem;
  }
  .site-main .wrap {
    padding: 3rem 2rem;
  }
  .content-article div {
    padding: 2.5rem;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
