@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ── 变量 ── */
:root {
  --c-red: #ff0000;
  --c-pink: #ff1493;
  --c-dark: #261717;
  --c-dark2: #1a0f0f;
  --c-dark3: #0e0808;
  --c-surface: rgba(38,23,23,0.85);
  --c-surface2: rgba(50,28,28,0.7);
  --c-border: rgba(255,0,0,0.18);
  --c-border2: rgba(255,20,147,0.22);
  --c-text: #f5e8e8;
  --c-text2: #c9a8a8;
  --c-text3: #8a5f5f;
  --ff-head: 'Bebas Neue', 'Arial Narrow', Arial, sans-serif;
  --ff-body: 'Source Sans 3', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --nav-h: 68px;
  --sidebar-w: 220px;
  --radius-card: 28px;
  --radius-btn: 50px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── 重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--c-dark3);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 16px);
  overflow-x: hidden;
}
a { color: var(--c-pink); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-red); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ── Aurora 背景 ── */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
.a1 {
  width: 70vw; height: 70vw;
  top: -20vw; left: -10vw;
  background: radial-gradient(ellipse at center, #ff0000 0%, transparent 70%);
  animation: drift1 10s ease-in-out infinite alternate;
}
.a2 {
  width: 60vw; height: 60vw;
  top: 10vw; right: -15vw;
  background: radial-gradient(ellipse at center, #ff1493 0%, transparent 70%);
  animation: drift2 12s ease-in-out infinite alternate;
  opacity: 0.45;
}
.a3 {
  width: 50vw; height: 50vw;
  bottom: 5vh; left: 20vw;
  background: radial-gradient(ellipse at center, #7b0000 0%, transparent 70%);
  animation: drift3 9s ease-in-out infinite alternate;
  opacity: 0.35;
}
@keyframes drift1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(5vw, 8vh) scale(1.12); }
}
@keyframes drift2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-6vw, 5vh) scale(1.08); }
}
@keyframes drift3 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(4vw,-6vh) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-layer { animation: none; }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,0,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,0,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── 底部固定药丸导航 ── */
.site-header {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 10px 16px 10px;
  background: linear-gradient(to top, rgba(14,8,8,0.98) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pill-nav {
  display: flex;
  justify-content: center;
}
.pill-nav > p {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(38,23,23,0.9);
  border: 1px solid var(--c-border2);
  border-radius: var(--radius-btn);
  padding: 6px 8px;
  box-shadow: 0 0 20px rgba(255,0,0,0.15), 0 4px 24px rgba(0,0,0,0.5);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px;
  width: 100%;
}
.pill-nav > p > a {
  color: var(--c-text2);
  font-family: var(--ff-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  line-height: 1.2;
}
.pill-nav > p > a:first-child {
  font-weight: 700;
  color: var(--c-text);
  font-family: var(--ff-head);
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.pill-nav > p > a:last-child {
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(255,0,0,0.4);
}
.pill-nav > p > a:hover,
.pill-nav > p > a[aria-current="page"] {
  background: rgba(255,0,0,0.18);
  color: #fff;
  box-shadow: 0 0 10px rgba(255,20,147,0.3);
}
.pill-nav > p > a:last-child:hover {
  background: linear-gradient(135deg, var(--c-pink), var(--c-red));
  box-shadow: 0 0 18px rgba(255,20,147,0.55);
}

/* ── 主内容区 ── */
main {
  position: relative;
  z-index: 1;
}

/* ── Hero（首页） ── */
.hero {
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: 60px 24px 40px;
}
.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
}
.hero-deco {
  flex-shrink: 0;
  animation: spin-slow 20s linear infinite;
  filter: drop-shadow(0 0 18px rgba(255,0,0,0.6));
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-deco { animation: none; }
}
.hero-text {
  text-align: right;
  max-width: 560px;
}
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-pink);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: var(--ff-body);
}
.hero-h1 {
  font-family: var(--ff-head);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 0 30px rgba(255,0,0,0.5), 0 0 60px rgba(255,20,147,0.3);
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--c-text2);
  line-height: 1.6;
  margin-bottom: 24px;
}
.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  box-shadow: 0 0 16px rgba(255,0,0,0.45);
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(255,20,147,0.65);
}
.btn-ghost {
  background: transparent;
  color: var(--c-text) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 24px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--c-border2);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-ghost:hover {
  background: rgba(255,20,147,0.12);
  border-color: var(--c-pink);
  transform: translateY(-2px);
}
.btn-sm { padding: 9px 18px; font-size: 0.85rem; min-height: 40px; }

/* ── 内页主区（sidebar + content） ── */
.inner-main {
  display: flex;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 40px;
  gap: 28px;
}

/* ── 侧边栏（内容左侧） ── */
.sidebar {
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: 24px;
}
.sidebar-inner {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 20px 16px;
  box-shadow: 0 0 18px rgba(255,0,0,0.08);
}
.sidebar-title {
  font-family: var(--ff-head);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--c-red);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}
.sidebar-links li a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--c-text2);
  transition: background var(--transition), color var(--transition);
  line-height: 1.4;
}
.sidebar-links li a:hover,
.sidebar-links li.active a {
  background: rgba(255,0,0,0.12);
  color: #fff;
}
.sidebar-links li.active a {
  color: var(--c-pink);
  font-weight: 600;
}
.sidebar-cta { text-align: center; }

/* ── 内容区 wrap > section > div ── */
.wrap {
  flex: 1;
  min-width: 0;
}
.content-section {
  /* 直接包裹 div */
}
.page-article {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 32px 36px;
  box-shadow: 0 0 32px rgba(255,0,0,0.07), 0 8px 32px rgba(0,0,0,0.35);
}
.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pub-date, .mod-date {
  font-size: 0.8rem;
  color: var(--c-text3);
  font-style: normal;
}
.article-h1 {
  font-family: var(--ff-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,0,0,0.35);
  margin-bottom: 24px;
}

/* ── 首页 content wrap ── */
.page-home .wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-home .content-section {
  margin-bottom: 40px;
}

/* ── 正文 ── */
.article-body {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--c-text);
}
.article-body h2 {
  font-family: var(--ff-head);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 32px 0 12px;
  text-shadow: 0 0 12px rgba(255,20,147,0.3);
}
.article-body h3 {
  font-family: var(--ff-head);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--c-text);
  margin: 24px 0 10px;
}
.article-body h2 > span,
.article-body h3 > span {
  display: inline;
}
.article-body p { margin-bottom: 14px; }
.article-body ul, .article-body ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 6px; }
.article-body a {
  color: var(--c-pink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:hover { color: var(--c-red); }
.article-body strong { color: #fff; font-weight: 700; }
.article-body blockquote {
  border-left: 3px solid var(--c-red);
  padding-left: 16px;
  color: var(--c-text2);
  margin: 16px 0;
  font-style: italic;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.article-body th {
  background: rgba(255,0,0,0.15);
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--c-border);
}
.article-body td {
  padding: 9px 14px;
  border: 1px solid var(--c-border);
  color: var(--c-text2);
}
.article-body tr:hover td { background: rgba(255,20,147,0.06); }
.article-body code {
  background: rgba(255,0,0,0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--c-pink);
}
.article-body pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 16px 20px;
  overflow-x: auto;
  margin-bottom: 16px;
}
.article-body pre code {
  background: transparent;
  padding: 0;
  color: var(--c-text);
}

/* ── FAQ 样式 ── */
.faq-intro {
  padding: 14px 18px;
  background: rgba(255,0,0,0.08);
  border-left: 3px solid var(--c-pink);
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--c-text2);
}
.faq-body .article-body > h2:first-of-type,
.faq-body h2 {
  padding: 14px 16px;
  background: rgba(255,0,0,0.08);
  border-radius: 12px;
  border-left: 3px solid var(--c-red);
}

/* ── About badge ── */
.about-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border-radius: var(--radius-btn);
  margin-bottom: 12px;
}

/* ── 子页 dl 列表 ── */
.child-pages {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}
.child-pages h3 {
  font-family: var(--ff-head);
  font-size: 1.2rem;
  color: var(--c-pink);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.child-pages h3 > span { display: inline; }
.child-dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.child-dl dt {
  font-weight: 600;
}
.child-dl dt a {
  color: var(--c-text);
  font-size: 0.95rem;
  transition: color var(--transition);
}
.child-dl dt a:hover { color: var(--c-pink); }
.child-dl dd {
  font-size: 0.87rem;
  color: var(--c-text3);
  padding-left: 12px;
}

/* ── 首页 Guides 网格 ── */
.guides-section {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.guides-header {
  margin-bottom: 28px;
  text-align: center;
}
.guides-header h2 {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 20px rgba(255,0,0,0.4);
  line-height: 1;
}
.guides-header h2 > span { display: inline; }
.guides-sub {
  color: var(--c-text2);
  font-size: 0.95rem;
  margin-top: 8px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: fadeUp 0.5s both;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 28px rgba(255,0,0,0.2), 0 8px 32px rgba(0,0,0,0.4);
  border-color: rgba(255,20,147,0.4);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
}
.card-inner {
  padding: 22px 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--c-red);
  margin-bottom: 8px;
  font-family: var(--ff-head);
}
.card-title {
  font-family: var(--ff-head);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}
.card-title > span { display: inline; }
.card-desc {
  font-size: 0.85rem;
  color: var(--c-text2);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}
.card-link {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--c-pink) !important;
  transition: color var(--transition);
}
.card-link:hover { color: var(--c-red) !important; }
.card-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--c-red), var(--c-pink));
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  margin-top: auto;
}

/* ── 页脚 ── */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 24px 24px;
  border-top: 1px solid var(--c-border);
  margin-top: 20px;
}
.footer-brand {
  font-family: var(--ff-head);
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: 0.08em;
  line-height: 1;
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.site-footer small {
  display: block;
  font-size: 0.8rem;
  color: var(--c-text3);
  line-height: 1.6;
}
.site-footer small a {
  color: var(--c-text3);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer small a:hover { color: var(--c-pink); }

/* ── 响应式 ── */
@media (max-width: 768px) {
  .inner-main {
    flex-direction: column;
    padding: 20px 16px 40px;
    gap: 20px;
  }
  .sidebar {
    position: static;
    flex: none;
    width: 100%;
  }
  .sidebar-inner {
    border-radius: 18px;
  }
  .page-article {
    padding: 22px 18px;
    border-radius: 18px;
  }
  .hero {
    padding: 40px 16px 28px;
    min-height: 45vh;
    align-items: flex-start;
  }
  .hero-inner {
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
  }
  .hero-deco svg { width: 72px; height: 72px; }
  .hero-cta-row { justify-content: flex-end; }
  .guides-section { padding: 28px 16px 60px; }
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pill-nav > p {
    gap: 4px;
    padding: 5px 6px;
  }
  .pill-nav > p > a {
    font-size: 0.75rem;
    padding: 8px 10px;
  }
  .page-home .wrap { padding: 0 16px; }
  .article-body h2 { font-size: 1.35rem; }
  .article-body h3 { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-text { text-align: right; }
  .article-h1 { font-size: 1.7rem; }
  .pill-nav > p > a:first-child { display: none; }
}

/* ── 滚动条 ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-dark3); }
::-webkit-scrollbar-thumb { background: rgba(255,0,0,0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,20,147,0.55); }

/* ── 焦点 ── */
:focus-visible {
  outline: 2px solid var(--c-pink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 选中 ── */
::selection {
  background: rgba(255,20,147,0.35);
  color: #fff;
}
