/* =========================================================================
   Aceternity UI 1:1 还原 — 全局样式
   Inter字体 + 暗色主题 + 圆角 + 阴影体系
   ========================================================================= */

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

/* ====== CSS 变量 ====== */
:root {
  --ace-bg: #0a0a0a;
  --ace-bg-soft: #111111;
  --ace-bg-card: #0f0f0f;
  --ace-border: rgba(255,255,255,0.08);
  --ace-border-hover: rgba(255,255,255,0.16);
  --ace-text: #fafafa;
  --ace-text-soft: #a1a1aa;
  --ace-text-muted: #71717a;
  --ace-primary: #818cf8;
  --ace-primary-dark: #6366f1;
  --ace-radius: 12px;
  --ace-radius-lg: 16px;
  --ace-radius-xl: 20px;
  --ace-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ace-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
}

/* ====== Reset ====== */
* { box-sizing: border-box; margin: 0; padding: 0; }

.ace-body {
  font-family: var(--ace-font);
  background: var(--ace-bg);
  color: var(--ace-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ====== Header ====== */
.ace-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--ace-border);
}

.ace-header-nav {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 24px;
}

.ace-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ace-text);
  flex-shrink: 0;
}

.ace-header-logo-text {
  letter-spacing: -0.02em;
}

.ace-header-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.ace-header-link {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ace-text-soft);
  border-radius: 8px;
  transition: all 0.15s;
}

.ace-header-link:hover {
  color: var(--ace-text);
  background: rgba(255,255,255,0.05);
}

.ace-header-link-active {
  color: var(--ace-text) !important;
  background: rgba(255,255,255,0.06);
}

.ace-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ace-header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ace-border);
  border-radius: 8px;
  transition: all 0.15s;
  min-width: 200px;
}

.ace-header-search:focus-within {
  border-color: rgba(129,140,248,0.4);
  background: rgba(255,255,255,0.06);
}

.ace-header-search svg {
  width: 16px;
  height: 16px;
  color: var(--ace-text-muted);
  flex-shrink: 0;
}

.ace-header-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--ace-text);
  font-family: var(--ace-font);
  font-size: 14px;
  width: 100%;
}

.ace-header-search input::placeholder { color: var(--ace-text-muted); }

.ace-search-kbd {
  font-family: var(--ace-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--ace-border);
  border-radius: 4px;
  color: var(--ace-text-muted);
  white-space: nowrap;
}

.ace-header-external {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--ace-text-soft);
  transition: all 0.15s;
}

.ace-header-external:hover {
  color: var(--ace-text);
  background: rgba(255,255,255,0.05);
}

.ace-header-external svg { width: 18px; height: 18px; }

.ace-header-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ace-text);
  cursor: pointer;
  padding: 4px;
}

.ace-header-mobile-toggle svg { width: 24px; height: 24px; }

/* 搜索下拉 */
.ace-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--ace-bg-soft);
  border: 1px solid var(--ace-border);
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}

.ace-search-dropdown.active { display: block; }

.ace-search-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--ace-border);
  transition: background 0.15s;
}

.ace-search-dropdown a:last-child { border-bottom: none; }
.ace-search-dropdown a:hover { background: rgba(255,255,255,0.04); }
.ace-search-dropdown strong { color: var(--ace-text); }
.ace-search-dropdown span { color: var(--ace-text-muted); }

/* ====== 主页面容器 ====== */
.ace-component-page {
  max-width: 1024px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* ====== 面包屑 ====== */
.ace-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ace-text-muted);
  margin-bottom: 32px;
}

.ace-breadcrumb a { transition: color 0.15s; }
.ace-breadcrumb a:hover { color: var(--ace-text); }
.ace-breadcrumb-sep { color: var(--ace-text-muted); }
.ace-breadcrumb-current { color: var(--ace-text-soft); }

/* ====== 组件标题区 ====== */
.ace-component-header {
  margin-bottom: 48px;
}

.ace-component-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.1;
}

.ace-component-desc {
  font-size: 1rem;
  color: var(--ace-text-soft);
  margin-bottom: 16px;
}

.ace-component-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ace-component-tag {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 400;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ace-border);
  border-radius: 999px;
  color: var(--ace-text-soft);
  transition: all 0.15s;
}

.ace-component-tag:hover {
  background: rgba(255,255,255,0.08);
  color: var(--ace-text);
}

/* ====== Demo 容器 ====== */
.ace-demo-container {
  border: 1px solid var(--ace-border);
  border-radius: var(--ace-radius-lg);
  overflow: hidden;
  margin-bottom: 64px;
  background: var(--ace-bg-card);
}

.ace-demo-sm .ace-demo-panel { min-height: 300px; }

/* Tab Bar */
.ace-demo-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--ace-border);
}

.ace-demo-tabs-left {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 3px;
}

.ace-demo-tab {
  font-family: var(--ace-font);
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ace-text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s;
}

.ace-demo-tab:hover { color: var(--ace-text-soft); }
.ace-demo-tab.active { color: var(--ace-text); }

.ace-demo-tab-indicator {
  position: absolute;
  height: calc(100% - 6px);
  top: 3px;
  left: 3px;
  width: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  transition: width 0.25s ease, transform 0.25s ease;
  z-index: 0;
}

.ace-demo-tabs-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ace-demo-pkg {
  font-family: var(--ace-mono);
  font-size: 12px;
  color: var(--ace-text-soft);
  background: rgba(255,255,255,0.04);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--ace-border);
}

.ace-demo-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--ace-text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
  font-family: var(--ace-font);
  transition: color 0.15s;
}

.ace-demo-copy:hover { color: var(--ace-text); }
.ace-demo-copy.copied { color: #86efac; }

.ace-icon-sm { width: 16px; height: 16px; }

/* Demo Panel */
.ace-demo-panel {
  display: none;
  min-height: 420px;
  padding: 0;
  background: var(--ace-bg);
}

.ace-demo-panel.active {
  display: block;
  animation: ace-fade-in 0.25s ease-out;
}

@keyframes ace-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 图片预览 */
.ace-preview-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 32px;
}

.ace-preview-img-wrap img {
  max-width: 100%;
  max-height: 500px;
  border-radius: var(--ace-radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.ace-preview-placeholder {
  min-height: 420px;
  background: var(--ace-bg-soft);
  position: relative;
  overflow: hidden;
}

.ace-ph-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ====== 3D 卡片演示（1:1 还原） ====== */
.ace-3d-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  padding: 40px;
  perspective: 1000px;
}

.ace-3d-card-wrap {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.ace-3d-card {
  width: 320px;
  height: 440px;
  border-radius: var(--ace-radius-xl);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ace-border);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.02) inset;
  transform-style: preserve-3d;
  cursor: pointer;
}

.ace-3d-card-body {
  position: relative;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
}

.ace-3d-card-item {
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}

/* 图片 */
.ace-3d-card-img {
  border-radius: var(--ace-radius);
  overflow: hidden;
  margin-bottom: 20px;
  height: 160px;
  position: relative;
}

.ace-3d-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--ace-radius);
}

/* 标题 */
.ace-3d-card-title-wrap { margin-bottom: auto; }

.ace-3d-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ace-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.ace-3d-card-subtitle {
  font-size: 0.85rem;
  color: var(--ace-text-soft);
  line-height: 1.5;
}

/* 按钮 */
.ace-3d-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.ace-3d-btn {
  font-family: var(--ace-font);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.ace-3d-btn-primary {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.ace-3d-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}

.ace-3d-btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--ace-text-soft);
  border: 1px solid var(--ace-border);
}

.ace-3d-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--ace-text);
}

.ace-3d-btn .ace-icon-sm { width: 14px; height: 14px; }

/* ====== 代码区 ====== */
.ace-code-block {
  background: #0a0a0a;
  border-radius: 0;
  overflow: hidden;
}

.ace-code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--ace-border);
}

.ace-code-lang {
  font-family: var(--ace-mono);
  font-size: 12px;
  color: var(--ace-text-muted);
  text-transform: lowercase;
}

.ace-code-block pre {
  margin: 0;
  overflow-x: auto;
  background: #0a0a0a;
}

.ace-code-block pre code {
  display: block;
  font-family: var(--ace-mono);
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
  padding: 16px 0;
  white-space: pre;
}

/* 行号 */
.ace-code-line {
  display: block;
  padding: 0 16px 0 48px;
  position: relative;
  white-space: pre;
}

.ace-code-line:hover { background: rgba(255,255,255,0.02); }

.ace-line-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  text-align: right;
  padding-right: 12px;
  color: rgba(255,255,255,0.2);
  font-size: 12px;
  user-select: none;
  pointer-events: none;
}

/* 语法高亮 */
.ace-code-area .ace-kw { color: #c084fc; }
.ace-code-area .ace-str { color: #86efac; }
.ace-code-area .ace-num { color: #fbbf24; }
.ace-code-area .ace-com { color: rgba(255,255,255,0.3); font-style: italic; }
.ace-code-area .ace-fn { color: #60a5fa; }
.ace-code-area .ace-tag { color: #f472b6; }

/* 滚动条 */
.ace-code-block pre::-webkit-scrollbar { width: 6px; height: 6px; }
.ace-code-block pre::-webkit-scrollbar-track { background: transparent; }
.ace-code-block pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.ace-code-block pre::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

.ace-code-sm pre code { font-size: 12px; }

/* ====== Section ====== */
.ace-section {
  margin-bottom: 64px;
}

.ace-section-heading {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ace-text);
}

/* ====== 安装区 ====== */
.ace-install-tabs { }

.ace-install-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--ace-border);
  margin-bottom: 16px;
}

.ace-install-tab {
  font-family: var(--ace-font);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ace-text-muted);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
}

.ace-install-tab:hover { color: var(--ace-text-soft); }
.ace-install-tab.active { color: var(--ace-text); border-bottom-color: var(--ace-text); }

.ace-install-content { display: none; }
.ace-install-content.active { display: block; }

.ace-install-cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0a0a0a;
  border: 1px solid var(--ace-border);
  border-radius: var(--ace-radius);
  padding: 12px 16px;
}

.ace-install-cmd code {
  font-family: var(--ace-mono);
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  flex: 1;
}

.ace-install-cmd button {
  background: none;
  border: none;
  color: var(--ace-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.ace-install-cmd button:hover { color: var(--ace-text); }

/* ====== 文档区 ====== */
.ace-doc-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ace-text-soft);
}

.ace-doc-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ace-text);
  margin: 32px 0 16px;
  letter-spacing: -0.02em;
}

.ace-doc-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ace-text);
  margin: 24px 0 12px;
}

.ace-doc-content p { margin-bottom: 14px; }

.ace-doc-content ul, .ace-doc-content ol { margin: 0 0 16px 20px; }
.ace-doc-content li { margin-bottom: 6px; }

.ace-doc-content code {
  font-family: var(--ace-mono);
  font-size: 0.85em;
  background: rgba(255,255,255,0.06);
  color: #c4b5fd;
  padding: 2px 6px;
  border-radius: 4px;
}

.ace-doc-content pre {
  margin: 16px 0;
  border-radius: var(--ace-radius);
  overflow: hidden;
}

.ace-doc-content pre code {
  display: block;
  padding: 16px;
  background: #0a0a0a;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  line-height: 1.6;
  border-radius: var(--ace-radius);
}

.ace-md-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--ace-border);
  border-radius: var(--ace-radius);
}

.ace-md-table, .ace-doc-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ace-md-table th, .ace-doc-content th {
  background: rgba(255,255,255,0.03);
  font-weight: 600;
  color: var(--ace-text);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ace-border);
}

.ace-md-table td, .ace-doc-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ace-border);
  color: var(--ace-text-soft);
}

.ace-md-table tr:last-child td { border-bottom: none; }

/* ====== Props 表格 ====== */
.ace-props-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ace-border);
  border-radius: var(--ace-radius);
}

.ace-props-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ace-props-table th {
  background: rgba(255,255,255,0.03);
  font-weight: 600;
  color: var(--ace-text);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ace-border);
}

.ace-props-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ace-border);
  color: var(--ace-text-soft);
}

.ace-props-table tr:last-child td { border-bottom: none; }
.ace-props-table tr:hover td { background: rgba(255,255,255,0.02); }
.ace-props-table .ace-type { color: #60a5fa; }
.ace-props-table code { font-family: var(--ace-mono); font-size: 13px; background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; }

.ace-required {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #818cf8);
}

/* ====== Example ====== */
.ace-example-block { margin-bottom: 48px; }

.ace-example-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ace-text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.ace-demo-sm .ace-demo-tabs { border-radius: var(--ace-radius-lg) var(--ace-radius-lg) 0 0; }

/* ====== 上下篇导航 ====== */
.ace-page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  margin-bottom: 64px;
}

.ace-nav-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border: 1px solid var(--ace-border);
  border-radius: var(--ace-radius);
  transition: all 0.15s;
  max-width: 48%;
}

.ace-nav-card:hover {
  border-color: var(--ace-border-hover);
  background: rgba(255,255,255,0.02);
}

.ace-nav-card-right { text-align: right; }

.ace-nav-label {
  font-size: 13px;
  color: var(--ace-text-muted);
}

.ace-nav-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ace-text);
}

/* ====== 相关组件 ====== */
.ace-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ace-related-item {
  border: 1px solid var(--ace-border);
  border-radius: var(--ace-radius);
  overflow: hidden;
  transition: all 0.2s;
}

.ace-related-item:hover {
  border-color: var(--ace-border-hover);
  transform: translateY(-2px);
}

.ace-related-img {
  height: 120px;
  background: var(--ace-bg-soft);
  position: relative;
  overflow: hidden;
}

.ace-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ace-related-info { padding: 12px 14px; }

.ace-related-info h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--ace-text);
  line-height: 1.4;
}

/* ====== 返回顶部 ====== */
.ace-back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--ace-border);
  color: var(--ace-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s;
  z-index: 90;
  backdrop-filter: blur(8px);
}

.ace-back-top svg { width: 20px; height: 20px; }

.ace-back-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ace-back-top:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--ace-border-hover);
}

/* ====== Footer ====== */
.ace-footer {
  border-top: 1px solid var(--ace-border);
  background: var(--ace-bg);
}

.ace-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.ace-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.ace-footer-brand h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ace-footer-brand p {
  font-size: 14px;
  color: var(--ace-text-muted);
  max-width: 320px;
}

.ace-footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--ace-text);
  margin-bottom: 12px;
}

.ace-footer-col ul { list-style: none; }

.ace-footer-col li { margin-bottom: 8px; }

.ace-footer-col a {
  font-size: 13px;
  color: var(--ace-text-muted);
  transition: color 0.15s;
}

.ace-footer-col a:hover { color: var(--ace-text); }

.ace-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--ace-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ace-text-muted);
}

.ace-footer-bottom a { transition: color 0.15s; }
.ace-footer-bottom a:hover { color: var(--ace-text); }

/* ====== 滚动渐入 ====== */
.ace-fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s, transform 0.5s; }
.ace-fade-in.ace-visible { opacity: 1; transform: translateY(0); }

/* ====== 响应式 ====== */
@media (max-width: 768px) {
  .ace-header-links { display: none; }
  .ace-header-search { min-width: 140px; }
  .ace-search-kbd { display: none; }
  .ace-header-mobile-toggle { display: block; }

  .ace-component-page { padding: 32px 16px 64px; }
  .ace-component-title { font-size: 1.75rem; }

  .ace-3d-card { width: 280px; height: 400px; }
  .ace-3d-card-img { height: 130px; }

  .ace-related-grid { grid-template-columns: repeat(2, 1fr); }

  .ace-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ace-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .ace-code-block pre code { font-size: 12px; }
  .ace-code-line { padding: 0 12px 0 36px; }
  .ace-line-num { width: 28px; font-size: 10px; }

  .ace-back-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .ace-component-title { font-size: 1.5rem; }
  .ace-3d-card { width: 250px; height: 360px; }
  .ace-3d-card-img { height: 100px; }
  .ace-related-grid { grid-template-columns: 1fr 1fr; }
  .ace-page-nav { flex-direction: column; }
  .ace-nav-card { max-width: 100%; }
  .ace-nav-card-right { text-align: left; }
}

/* =========================================================================
   强力覆盖旧 aceternity.css 冲突
   ========================================================================= */

/* 重置 body */
.ace-body {
  background: #0a0a0a !important;
  color: #fafafa !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* 重置链接颜色 */
.ace-body a { color: inherit !important; }
.ace-body a:hover { color: inherit !important; }

/* 重置阅读进度条颜色 */
.ace-reading-progress {
  background: linear-gradient(90deg, #6366f1, #818cf8) !important;
  box-shadow: 0 0 8px rgba(99,102,241,0.4) !important;
}

/* 重置 Header */
.ace-header {
  background: rgba(10,10,10,0.72) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

/* 隐藏旧的 header-inner（如果存在） */
.ace-header-inner { display: none !important; }

/* 重置页面容器 */
.ace-site {
  min-height: calc(100vh - 60px) !important;
}

/* 重置 aceternity-page 旧样式 */
.aceternity-page {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 重置 aceternity-page 旧布局（如果存在） */
.aceternity-page.aceternity-single {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 确保新布局正确 */
.ace-component-page {
  max-width: 1024px !important;
  margin: 0 auto !important;
  padding: 48px 24px 96px !important;
}

/* 确保 footer 新样式 */
.ace-footer {
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  background: #0a0a0a !important;
}

.ace-footer-inner {
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 48px 24px 32px !important;
}

.ace-footer-grid {
  display: grid !important;
  grid-template-columns: 2fr 1fr 1fr 1fr !important;
  gap: 40px !important;
  margin-bottom: 32px !important;
}

.ace-footer-bottom {
  padding-top: 24px !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 13px !important;
  color: #71717a !important;
}

