/* ============================================================
   AirRocket 风格皮肤（只改视觉，不动布局/交互）
   深墨底 + 青绿主色 + 大圆角卡片 + Rubik / Fredoka 字体
   仅作用于 html.dark，亮色模式保持原样
   ============================================================ */

html.dark {
  --rk-bg: #070c10;
  --rk-bg-soft: #0a1116;
  --rk-card: #0e171d;
  --rk-card-hi: #122028;
  --rk-line: rgba(255, 255, 255, 0.07);
  --rk-line-teal: rgba(35, 183, 156, 0.22);
  --rk-text: #e6f0f3;
  --rk-text-dim: #8ba3ae;
  --rk-teal: #23b79c;
  --rk-radius: 16px;
}

/* ---------- 背景与底色 ---------- */
html.dark,
html.dark body {
  background-color: var(--rk-bg) !important;
  background-image:
    radial-gradient(900px 520px at 50% -12%, rgba(35, 183, 156, 0.14), transparent 62%),
    radial-gradient(700px 420px at 100% 0%, rgba(42, 139, 249, 0.08), transparent 60%) !important;
  background-attachment: fixed !important;
  color: var(--rk-text);
}

html.dark .n-layout,
html.dark .n-layout-scroll-container,
html.dark .n-layout-content,
html.dark .n-layout-main {
  background-color: transparent !important;
}

/* ---------- 字体 ---------- */
html.dark body,
html.dark .n-card,
html.dark .n-input,
html.dark .n-button,
html.dark .n-menu,
html.dark .n-tag,
html.dark .n-table {
  font-family: Rubik, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 数字与标题用展示字体，更接近 AirRocket */
html.dark .n-card h1,
html.dark .n-card h2,
html.dark .n-card h3,
html.dark .text-3xl,
html.dark .text-4xl,
html.dark .text-xl.font-semibold {
  font-family: Fredoka, Rubik, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  letter-spacing: 0.2px;
}

/* ---------- 卡片 ---------- */
html.dark .n-card {
  background-color: var(--rk-card) !important;
  background-image: linear-gradient(180deg, var(--rk-card-hi), var(--rk-card)) !important;
  border: 1px solid var(--rk-line) !important;
  border-radius: var(--rk-radius) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38) !important;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

html.dark .n-card:hover {
  border-color: var(--rk-line-teal) !important;
}

html.dark .n-card-header {
  border-bottom-color: var(--rk-line) !important;
}

html.dark .n-card__content {
  padding: 18px 18px 20px;
}

/* ---------- 按钮 ---------- */
html.dark .n-button {
  border-radius: 10px !important;
  font-weight: 500;
}

html.dark .n-button--primary-type {
  box-shadow: 0 8px 22px rgba(35, 183, 156, 0.28);
}

html.dark .n-button--primary-type:not(.n-button--disabled):hover {
  box-shadow: 0 10px 26px rgba(35, 183, 156, 0.4);
}

/* 顶部工具按钮保持极简 */
html.dark .n-button--default-type {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--rk-line) !important;
}

/* ---------- 输入框 ---------- */
html.dark .n-input {
  border-radius: 10px !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--rk-line) !important;
}

html.dark .n-input.n-input--focus,
html.dark .n-input:focus-within {
  border-color: var(--rk-line-teal) !important;
  box-shadow: 0 0 0 3px rgba(35, 183, 156, 0.12);
}

/* ---------- 标签 / 进度条 ---------- */
html.dark .n-tag {
  border-radius: 8px !important;
}

html.dark .n-progress-graph-line-rail {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* ---------- 侧边栏 ---------- */
html.dark .n-layout-sider {
  background-image: linear-gradient(180deg, rgba(18, 32, 40, 0.96), rgba(8, 13, 17, 0.96)) !important;
  border-right: 1px solid var(--rk-line) !important;
}

html.dark .n-layout-sider__border {
  background-color: var(--rk-line) !important;
}

html.dark .n-menu-item-content::before {
  border-radius: 10px !important;
}

html.dark .n-menu-item-content--selected::before,
html.dark .n-menu-item-content:hover::before {
  background-color: rgba(35, 183, 156, 0.12) !important;
}

/* ---------- 弹窗 / 抽屉 ---------- */
html.dark .n-modal,
html.dark .n-drawer,
html.dark .n-popover,
html.dark .n-popselect {
  border-radius: 16px !important;
  background-color: var(--rk-card) !important;
  border: 1px solid var(--rk-line) !important;
}

/* ---------- 滚动条 ---------- */
html.dark ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

html.dark ::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 标题/正文对比度（主题把 h1/h5 的 color 写在属性上） ---------- */
html.dark h1[color],
html.dark h2[color],
html.dark h3[color] {
  color: #eaf4f6 !important;
}

html.dark h5[color] {
  color: var(--rk-text-dim) !important;
}

/* ---------- 顶部工具条 / 页面标题区 ---------- */
html.dark .n-layout-header,
html.dark header {
  background-color: rgba(7, 12, 16, 0.72) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rk-line);
}

/* ---------- 套餐内容（v3_plan.content 里自带的 HTML 卡片） ---------- */
html.dark .pricing-outer .card {
  background: linear-gradient(180deg, #12242b 0%, #0e1a20 100%) !important;
  border: 1px solid rgba(35, 183, 156, 0.22) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
}

html.dark .pricing-outer .card-name,
html.dark .pricing-outer .card-price,
html.dark .pricing-outer .card-tagline,
html.dark .pricing-outer .card-period,
html.dark .pricing-outer .card li,
html.dark .pricing-outer .card p,
html.dark .pricing-outer .card div {
  color: #dcecf0 !important;
}

html.dark .pricing-outer .card-btn {
  background: linear-gradient(90deg, #23b79c, #1e9d86) !important;
  box-shadow: 0 10px 24px rgba(35, 183, 156, 0.3) !important;
}

/* ============================================================
   布局：去掉左侧边栏，改成 AirRocket 的「顶部细栏 + 底部胶囊导航」
   （结构改动，亮色/深色都生效）
   ============================================================ */
.n-layout-sider {
  display: none !important;
}

.n-layout-sider + article,
article {
  width: 100%;
  max-width: 100%;
}

/* 主题自带的移动端悬浮菜单按钮，交给底部导航后不再需要 */
article > header .n-button.absolute,
article > header > div:first-of-type {
  display: none !important;
}

/* 内容区居中，贴近 AirRocket 的版心宽度 */
.cus-scroll-y.wh-full > * {
  width: 100%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

/* 内容区背景交给页面渐变，底部给导航留出空间 */
html.dark article > section.flex-1 {
  background: transparent !important;
}

html.dark .cus-scroll-y.wh-full {
  background: transparent !important;
}

.cus-scroll-y.wh-full {
  padding-bottom: 104px !important;
}

@media (min-width: 1024px) {
  .cus-scroll-y.wh-full {
    padding-bottom: 120px !important;
  }
}

/* ============================================================
   顶栏 / 底部导航微调：对齐 AirRocket 的尺度
   ============================================================ */
article > header {
  padding: 0 20px !important;
}

article > header i.n-icon {
  font-size: 19px !important;
}

article > header .mr-5 {
  margin-right: 14px !important;
}

/* 头像旁边那串邮箱在 AirRocket 里没有，隐藏 */
article > header span.md\:block {
  display: none !important;
}

article > header .n-button {
  min-width: 0 !important;
  padding: 0 !important;
}

/* AirRocket 仪表盘宿主要给底部导航留位置（窄屏） */
.rk-air-host {
  padding-bottom: 96px;
}

@media (min-width: 1024px) {
  .rk-air-host {
    padding-bottom: 24px;
  }
}

/* 顶栏头像保持圆形，不要浅色底 */
article > header .n-button {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 头像去掉浅色胶囊底，贴近原版纯圆形 */
article > header .n-avatar {
  background: transparent !important;
}

article > header .n-button {
  --n-color: transparent !important;
  --n-color-hover: rgba(255, 255, 255, 0.08) !important;
  --n-color-pressed: rgba(255, 255, 255, 0.12) !important;
}

/* 仪表盘宿主作为滚动容器（否则移动端无法上下滑动） */
.rk-air-host {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
