/* 首页风格：starship（星舰控制台）
 * 所有规则都限定在 body.theme-starship 下，不影响其他页面和其他风格。
 */

.theme-starship {
  --sd-bg: #050816;
  --sd-cyan: #6fe3ff;
  --sd-amber: #ffb454;
  --sd-muted: #9bb0d3;
  --sd-text: #eaf2ff;
  --sd-cut: 16px;

  /* 覆盖 Bootstrap 深色主题的基础变量 */
  --bs-body-bg: var(--sd-bg);
  --bs-body-color: var(--sd-text);
  --bs-secondary-color: var(--sd-muted);
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;

  background: var(--sd-bg);
  color: var(--sd-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 背景：跃迁星流 + 暗角 ---------- */
.theme-starship .sd-warp,
.theme-starship .sd-vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.theme-starship .sd-vignette {
  background: radial-gradient(ellipse at center,
    rgba(5, 8, 22, 0) 0%,
    rgba(5, 8, 22, .35) 45%,
    rgba(5, 8, 22, .9) 100%);
}

.theme-starship .site-header,
.theme-starship .site-main,
.theme-starship .site-footer {
  position: relative;
  z-index: 1;
}
.theme-starship .site-main { flex: 1 0 auto; }

/* ---------- 顶栏 ---------- */
.theme-starship .site-brand {
  color: var(--sd-text);
  letter-spacing: .22em;
  font-size: 1.05rem;
  text-shadow: 0 0 12px rgba(111, 227, 255, .45);
}
.theme-starship .lang-switch a {
  color: var(--sd-muted);
  text-decoration: none;
  font-size: .9rem;
  padding: .15rem .1rem;
  border-bottom: 1px solid transparent;
}
.theme-starship .lang-switch a.active {
  color: var(--sd-cyan);
  border-bottom-color: var(--sd-cyan);
}
.theme-starship .site-brand:hover,
.theme-starship .lang-switch a:hover { color: var(--sd-amber); }
.theme-starship a:focus-visible {
  outline: 2px solid var(--sd-amber);
  outline-offset: 3px;
}

/* ---------- 标题 ---------- */
.theme-starship .sd-hero { padding: clamp(1.5rem, 6vh, 4rem) 0 2rem; }
.theme-starship .sd-title { max-width: 15ch; margin-bottom: 1rem; }
.theme-starship .sd-subtitle { color: var(--sd-muted); max-width: 40rem; }

/* ---------- 控制台按键 ---------- */
/* 切角形状：左上角和右下角各切 16px */
.theme-starship .sd-key,
.theme-starship .sd-key__panel,
.theme-starship .sd-cta {
  clip-path: polygon(
    var(--sd-cut) 0, 100% 0,
    100% calc(100% - var(--sd-cut)), calc(100% - var(--sd-cut)) 100%,
    0 100%, 0 var(--sd-cut)
  );
}

/* 外层：青色半透明，作为描边 */
.theme-starship .sd-key {
  display: block;
  height: 100%;
  padding: 1px;
  background: rgba(111, 227, 255, .38);
  color: var(--sd-text);
  text-decoration: none;
  transition: background-color .2s ease;
}
/* 内层：深色半透明面板 */
.theme-starship .sd-key__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .35rem;
  height: 100%;
  padding: 1.1rem 1.4rem;
  background: rgba(7, 13, 34, .8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color .2s ease;
}
.theme-starship .sd-key__title { font-weight: 700; line-height: 1.2; }
.theme-starship .sd-key__desc { color: var(--sd-muted); font-size: .95rem; }

.theme-starship .sd-key--lg .sd-key__panel { min-height: 150px; }
.theme-starship .sd-key--lg .sd-key__title { font-size: 1.75rem; }
.theme-starship .sd-key--sm .sd-key__panel { min-height: 76px; justify-content: center; }
.theme-starship .sd-key--sm .sd-key__title { font-size: 1.15rem; }

/* 右上角指示灯 */
.theme-starship .sd-led {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sd-cyan);
  box-shadow: 0 0 8px var(--sd-cyan);
  transition: background-color .2s ease, box-shadow .2s ease;
}

/* 悬停：描边变亮、面板变亮、指示灯变琥珀 */
.theme-starship .sd-key:hover { background: var(--sd-cyan); }
.theme-starship .sd-key:hover .sd-key__panel { background: rgba(16, 30, 66, .82); }
.theme-starship .sd-key:hover .sd-led,
.theme-starship .sd-key:focus-visible .sd-led {
  background: var(--sd-amber);
  box-shadow: 0 0 10px var(--sd-amber);
}
/* 键盘焦点：clip-path 会裁掉 outline，改用琥珀色外层表示 */
.theme-starship .sd-key:focus-visible {
  outline: none;
  background: var(--sd-amber);
}
.theme-starship .sd-key:focus-visible .sd-key__panel { background: rgba(16, 30, 66, .82); }

/* ---------- 注册主按钮 ---------- */
.theme-starship .sd-signup { padding: 2.25rem 0 1rem; }
.theme-starship .sd-cta {
  border: 0;
  padding: .95rem 2rem;
  background: var(--sd-amber);
  color: #1d1305;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  animation: sd-pulse 3.2s ease-in-out infinite;
  transition: background-color .2s ease;
}
.theme-starship .sd-cta:hover { background: #ffc67a; }
.theme-starship .sd-cta:focus-visible {
  outline: none;
  background: #fff0d6;
}
.theme-starship .sd-note { color: var(--sd-muted); margin-top: .75rem; }

@keyframes sd-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

/* ---------- 页脚 ---------- */
.theme-starship .site-footer { color: var(--sd-muted); }

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  .theme-starship .sd-cta { animation: none; }
  .theme-starship .sd-key,
  .theme-starship .sd-key__panel,
  .theme-starship .sd-led,
  .theme-starship .sd-cta { transition: none; }
}
