/* ============================================================
   page-shell.css — 内页与首页统一的 Midnight Aurora 壳层
   为 page-*.css（手绘变量）提供与 common.css 一致的暗色映射，
   并补充 shell-hero / title-metal / 玻璃 sketch-box。
   ============================================================ */

html.theme-midnight-aurora {
  /* 与旧版 page-*.css 中 var(--ink) 等对齐 → 映射到极光主题 */
  --paper: rgba(10, 6, 20, 0.35);
  --paper-dot: rgba(167, 139, 250, 0.06);
  --ink: #e8e4f5;
  --ink-light: #9b92b8;
  --marker-yellow: rgba(253, 230, 138, 0.92);
  --marker-blue: rgba(125, 211, 252, 0.85);
  --marker-pink: rgba(244, 114, 182, 0.85);
  --marker-green: rgba(134, 239, 172, 0.8);
  --border-width: 1px;
  --shadow-sketch: 0 24px 50px -12px rgba(0, 0, 0, 0.45);
  --transition: all 0.3s ease;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.2s;
  --dur-med: 0.45s;
  --dur-slow: 0.65s;
  --sketch-radius-1: 18px;
  --sketch-radius-2: 18px;
  --sketch-radius-3: 18px;

  --idx-vitrine-bg: linear-gradient(
    155deg,
    rgba(28, 16, 48, 0.82) 0%,
    rgba(14, 8, 28, 0.88) 45%,
    rgba(18, 10, 36, 0.78) 100%
  );
  --idx-vitrine-border: rgba(167, 139, 250, 0.22);
  --idx-vitrine-shadow: 0 24px 60px -28px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 玻璃卡片：替代白底手绘盒 */
html.theme-midnight-aurora .sketch-box {
  background: var(--idx-vitrine-bg);
  border: 1px solid var(--idx-vitrine-border);
  border-radius: 18px;
  box-shadow: var(--idx-vitrine-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition:
    transform 0.35s var(--ease-smooth),
    box-shadow 0.35s var(--ease-smooth),
    border-color 0.25s ease;
}

html.theme-midnight-aurora .sketch-box:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.38);
  box-shadow:
    0 28px 64px -28px rgba(79, 70, 229, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

@media (prefers-reduced-motion: reduce) {
  html.theme-midnight-aurora .sketch-box:hover {
    transform: none;
  }
}

/* 马克笔高亮 → 极光渐变条 */
html.theme-midnight-aurora .hl-blue {
  background: linear-gradient(
    104deg,
    transparent 0%,
    rgba(99, 102, 241, 0.35) 6%,
    rgba(129, 140, 248, 0.42) 50%,
    rgba(99, 102, 241, 0.3) 94%,
    transparent 100%
  );
  padding: 0.08em 0.45em;
  border-radius: 8px;
}

html.theme-midnight-aurora .hl-yellow {
  background: linear-gradient(
    104deg,
    transparent 0%,
    rgba(253, 230, 138, 0.35) 6%,
    rgba(251, 191, 36, 0.38) 50%,
    rgba(253, 230, 138, 0.28) 94%,
    transparent 100%
  );
  padding: 0.08em 0.45em;
  border-radius: 8px;
}

html.theme-midnight-aurora .hl-pink {
  background: linear-gradient(
    104deg,
    transparent 0%,
    rgba(244, 114, 182, 0.28) 6%,
    rgba(232, 121, 249, 0.35) 50%,
    rgba(244, 114, 182, 0.25) 94%,
    transparent 100%
  );
  padding: 0.08em 0.45em;
  border-radius: 8px;
}

html.theme-midnight-aurora .section-header h2::after {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.5), rgba(232, 121, 249, 0.45));
  height: 5px;
  bottom: -4px;
}

html.theme-midnight-aurora .section-header p {
  color: var(--muted);
}

/* Lucide 线色随文字 */
html.theme-midnight-aurora .lucide {
  stroke: currentColor;
}

/* —— 内页首屏：与 idx-hero 同系的收窄条带 —— */
.shell-hero {
  position: relative;
  padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px);
  overflow: hidden;
}

.shell-hero__aurora {
  position: absolute;
  inset: -50% -15% auto;
  height: 140%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 48% at 28% 18%, rgba(99, 102, 241, 0.32) 0, transparent 58%),
    radial-gradient(ellipse 45% 40% at 78% 32%, rgba(232, 121, 249, 0.18) 0, transparent 52%),
    radial-gradient(ellipse 38% 34% at 52% 78%, rgba(244, 114, 182, 0.1) 0, transparent 50%);
  animation: shell-aurora-pulse 14s ease-in-out infinite alternate;
}

@keyframes shell-aurora-pulse {
  0% {
    opacity: 0.88;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell-hero__aurora {
    animation: none;
    opacity: 0.95;
  }
}

.shell-hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 52rem;
  margin: 0 auto;
}

.shell-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.shell-kicker__ico {
  width: 15px;
  height: 15px;
  opacity: 0.9;
}

/* 内页大标题：与首页 title-metal 同系（不依赖 page-index.css） */
html.theme-midnight-aurora .page-shell .title-metal {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #f5f3ff;
  text-shadow: 0 0 48px rgba(167, 139, 250, 0.22);
  margin: 0 0 14px;
}

.shell-hero .title-metal {
  margin: 0 0 14px;
}

.shell-hero .title-metal--sub {
  display: block;
  margin-top: 6px;
  font-size: 0.58em;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e9d5ff 0%, #c4b5fd 40%, #f0abfc 70%, #fda4af 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(232, 121, 249, 0.28));
}

.shell-lead {
  margin: 0;
  font-size: clamp(15px, 1.75vw, 18px);
  line-height: 1.65;
  color: rgba(233, 223, 255, 0.92);
  font-weight: 600;
  text-wrap: balance;
}

.shell-lead + .shell-lead {
  margin-top: 12px;
}

.shell-body-section {
  padding-top: 8px;
}

.page-shell.page-main {
  padding-top: 0;
}

/* 帮助页等：快捷链 pill → 极光描边 */
html.theme-midnight-aurora .help-quick-links a {
  background: rgba(12, 8, 24, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.28);
  color: #e9d5ff;
  box-shadow: 0 8px 28px -16px rgba(99, 102, 241, 0.45);
}

html.theme-midnight-aurora .help-quick-links a:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(244, 114, 182, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -12px rgba(139, 92, 246, 0.4);
}

html.theme-midnight-aurora .help-toc {
  background: rgba(14, 10, 28, 0.65);
  border: 1px dashed rgba(167, 139, 250, 0.35);
}

/* 博客列表顶区：与 shell 一致 */
html.theme-midnight-aurora .blog-dual-rail-wrap {
  margin-bottom: 8px;
}

/* 博客文章（无顶栏导航）：顶栏与分隔线随极光主题 */
html.theme-midnight-aurora[data-layout-no-nav] .blog-article-topbar {
  border-bottom-color: rgba(167, 139, 250, 0.22);
}

html.theme-midnight-aurora[data-layout-no-nav] .blog-article-head {
  border-bottom-color: rgba(167, 139, 250, 0.2);
}

html.theme-midnight-aurora[data-layout-no-nav] .blog-article-body h2 {
  border-left-color: rgba(167, 139, 250, 0.55);
}
