/* =========================================================
   0. 全局重置
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* =========================================================
   1. 背景层（深色渐变 + 可选动态光斑）
   ========================================================= */

body {
  position: relative;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Noto Sans SC", sans-serif;

  background:
    radial-gradient(circle at 15% 0%, rgba(255, 200, 150, 0.26), transparent 58%),
    radial-gradient(circle at 85% 20%, rgba(160, 190, 255, 0.22), transparent 62%),
    linear-gradient(180deg, #050814, #050818, #050814);

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
}

/* 背景动态光斑：仅在 fx-enabled 时启用动画 */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -40%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  filter: blur(6px);
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 200, 150, 0.42), transparent 60%),
    radial-gradient(circle at 0% 60%, rgba(252, 165, 165, 0.22), transparent 60%);
}

body::after {
  background:
    radial-gradient(circle at 80% 10%, rgba(147, 197, 253, 0.42), transparent 60%),
    radial-gradient(circle at 100% 70%, rgba(192, 132, 252, 0.26), transparent 65%);
}

body.fx-enabled::before,
body.fx-enabled::after {
  opacity: 0.9;
}

body.fx-enabled::before {
  animation: blobMove1 28s ease-in-out infinite alternate;
}

body.fx-enabled::after {
  animation: blobMove2 32s ease-in-out infinite alternate;
}

/* 背景光斑动画 */
@keyframes blobMove1 {
  0% {
    transform: translate3d(-4%, -4%, 0) scale(1);
  }
  50% {
    transform: translate3d(6%, 4%, 0) scale(1.03);
  }
  100% {
    transform: translate3d(2%, 8%, 0) scale(1.05);
  }
}

@keyframes blobMove2 {
  0% {
    transform: translate3d(4%, -6%, 0) scale(1.02);
  }
  50% {
    transform: translate3d(-6%, 2%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-2%, 6%, 0) scale(1);
  }
}

/* =========================================================
   2. 布局容器
   ========================================================= */

.wrapper {
  width: 100%;
  max-width: 720px;
  text-align: center;
  padding-bottom: 8px; /* 防止卡片下沉时与 footer 贴太近 */
}

/* =========================================================
   3. 主卡片（玻璃 UI + 3D 视差）
   ========================================================= */

.card {
  position: relative;
  margin: 0 auto;
  text-align: left;

  background: rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 26px 28px 30px;

  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #f9fafb;

  transform-style: preserve-3d;
  will-change: transform;
  transition:
    transform 0.25s ease-out,
    box-shadow 0.35s ease-out;
}

/* Hover：柔和上浮一点 */
.card:hover {
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* 卡片表面高光 */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 10% 0%,
      rgba(255, 255, 255, 0.25),
      transparent 60%);
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

/* =========================================================
   4. 标题（Internal 流光效果） + 右侧区域
   ========================================================= */

.card-header {
  display: flex;
  align-items: flex-start;        /* 顶部对齐 */
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f9fafb;
}

/* Internal 文本：底层略灰，给高光留对比 */
.title-accent {
  position: relative;
  display: inline-block;
  font-weight: 600;
  color: #cbd5f5;
}

/* 仅在 fx-enabled 时有流光 */
body.fx-enabled .title-accent::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0)
  );
  background-size: 320% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;

  pointer-events: none;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));

  animation: internalFlow 2.6s linear infinite;
}

/* 内部流光：从右向左 */
@keyframes internalFlow {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -20% 0;
  }
}

/* 右侧区域：状态徽章 + 语言胶囊 */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: 3px; /* 微调到和标题视觉平齐 */
}

/* =========================================================
   5. Operational 状态徽章（液态玻璃＋btn-11 扫光＋绿点）
   ========================================================= */

.status-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;

  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden; /* 用圆角裁剪高光条 */
}

/* 前景内容 */
.status-content {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
}

/* 绿点旧版：内发光呼吸灯 */
/*
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #30d158;
  box-shadow:
    inset 0 0 2px rgba(15, 118, 110, 0.9),
    inset 0 0 4px rgba(187, 247, 208, 0.95);
  animation: dotPulse 1.4s ease-in-out infinite;
}

/* 呼吸灯动画（固定大小，只变亮度） 
@keyframes dotPulse {
  0% {
    opacity: 0.9;
    background: #22c55e;
    box-shadow:
      inset 0 0 2px rgba(15, 118, 110, 0.9),
      inset 0 0 4px rgba(187, 247, 208, 0.95);
  }
  50% {
    opacity: 1;
    background: #4ade80;
    box-shadow:
      inset 0 0 1px rgba(16, 185, 129, 0.8),
      inset 0 0 6px rgba(209, 250, 229, 1);
  }
  100% {
    opacity: 0.9;
    background: #22c55e;
    box-shadow:
      inset 0 0 2px rgba(15, 118, 110, 0.9),
      inset 0 0 4px rgba(187, 247, 208, 0.95);
  }
}
*/
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;

  /* 颜色：Apple 风柔和绿，比 #30D158 稍柔一点 */
  background: #34c759;

  /* 光晕：小半径柔光，不霓虹、不炸裂 */
  box-shadow:
    0 0 2px rgba(52, 199, 89, 0.75),
    0 0 5px rgba(52, 199, 89, 0.5);

  /* 呼吸节奏：略慢一点，更“系统级” */
  animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
    box-shadow:
      0 0 2px rgba(52, 199, 89, 0.6),
      0 0 4px rgba(52, 199, 89, 0.35);
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
    box-shadow:
      0 0 4px rgba(52, 199, 89, 0.9),
      0 0 7px rgba(52, 199, 89, 0.7);
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
    box-shadow:
      0 0 2px rgba(52, 199, 89, 0.6),
      0 0 4px rgba(52, 199, 89, 0.35);
  }
}


.status-label {
  color: #f0fff4;
  font-weight: 600;
  text-shadow:
    0 0 3px rgba(15, 23, 42, 0.9),
    0 0 6px rgba(15, 23, 42, 0.7);
}

/* 徽章高光：复用 btn-11 的白条，只在 fx-enabled 时运行 */
body.fx-enabled .status-badge::before {
  position: absolute;
  content: "";
  display: inline-block;
  top: -180px;
  left: 0;
  width: 30px;
  height: 100%;
  background-color: #fff;
  pointer-events: none;

  transform: scale(0) rotate(45deg);
  animation: shiny-btn1 6s ease-in-out infinite;
  opacity: 0.35;
}

/* 液态玻璃噪声：仅在 fx-enabled 时叠加 */
body.fx-enabled .status-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  filter: url(#liquid-glass);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

/* =========================================================
   6. 语言切换：Apple 风 segmented control
   ========================================================= */

/* 语言切换胶囊：暗色玻璃底 */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;

  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* 滑块：亮白高光块，随语言切换移动 */
.lang-switch-indicator {
  position: absolute;
  top: 2px;
  left: 2px;
  height: calc(100% - 4px);
  width: calc((100% - 4px) / 3); /* 3 个按钮时的等分宽度 */
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(148, 163, 184, 0.6);
  transition:
    transform 0.22s ease-out,
    opacity 0.18s ease-out;
  pointer-events: none;
}


/* 语言按钮：标签文字层 */
.lang-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: #e5e7eb;
  padding: 4px 12px; /* 更居中，也给指示器留宽度 */

  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0.78;
  transition:
    color 0.18s ease,
    opacity 0.18s ease;
}

/* 当前选中语言：文字变深色、完全不透明 */
.lang-btn.is-active {
  color: #0f172a;
  opacity: 1;
}

/* Hover：桌面环境下稍微提亮 */
@media (hover: hover) {
  .lang-btn:hover {
    opacity: 1;
  }
}

/* =========================================================
   7. 主体文案
   ========================================================= */

.main-info {
  margin-top: 20px;
}

.desc {
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.7;
  color: #f3f4f6;
  opacity: 0.94;
}

.link {
  color: #add8ff;
  text-decoration: none;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
  color: #d0e7ff;
}

.notice {
  margin-top: 16px;
  font-size: 13px;
  color: #e5e7eb;
  opacity: 0.78;
  line-height: 1.6;
}

/* =========================================================
   8. Dino 模块预留
   ========================================================= */

.dino-block {
  margin-top: 26px;
}

.dino-title {
  margin: 0 0 10px;
  font-size: 14px;
  color: #dbeafe;
}

.dino-placeholder {
  height: 160px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-text {
  font-size: 13px;
  opacity: 0.7;
}

/* =========================================================
   9. 高级效果开关按钮（保留全部效果，暂时隐藏）
   ========================================================= */

/* 高级效果按钮：仿 btn-11 发光扫光效果（暂时 display:none） */
.fx-toggle {
  margin-top: 18px;
  padding: 10px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;

  position: relative;
  overflow: hidden;

  background: linear-gradient(120deg, #6366f1, #ec4899);
  color: #fdfcff;

  box-shadow:
    0 12px 25px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.14);

  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.15s ease,
    color 0.25s ease,
    opacity 0.25s ease;

  display: none; /* 暂时隐藏按钮，后续调试时移除此行即可 */
}

/* 按钮上的白色斜线扫光（btn-11 原版逻辑） */
.fx-toggle::before {
  position: absolute;
  content: "";
  display: inline-block;
  top: -180px;
  left: 0;
  width: 30px;
  height: 100%;
  background-color: #fff;
  opacity: 0;
  pointer-events: none;

  transform: scale(0) rotate(45deg);
  animation: shiny-btn1 3s ease-in-out infinite;
}

/* 关闭状态：变暗 + 关掉高光动画 */
.fx-toggle.fx-off {
  background: linear-gradient(120deg, #4b5563, #111827);
  color: #e5e7eb;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(148, 163, 184, 0.35);
  opacity: 0.9;
}

.fx-toggle.fx-off::before {
  opacity: 0;
  animation: none;
}

/* Hover：稍微抬起一点，阴影柔和放大 */
.fx-toggle:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* 按下：轻微下压，阴影收缩 */
.fx-toggle:active {
  transform: translateY(1px);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* 按钮 / 徽章扫光动画（btn-11 原版） */
@-webkit-keyframes shiny-btn1 {
  0% {
    -webkit-transform: scale(0) rotate(45deg);
    opacity: 0;
  }
  80% {
    -webkit-transform: scale(0) rotate(45deg);
    opacity: 0.5;
  }
  81% {
    -webkit-transform: scale(4) rotate(45deg);
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(50) rotate(45deg);
    opacity: 0;
  }
}

@keyframes shiny-btn1 {
  0% {
    transform: scale(0) rotate(45deg);
    opacity: 0;
  }
  80% {
    transform: scale(0) rotate(45deg);
    opacity: 0.5;
  }
  81% {
    transform: scale(4) rotate(45deg);
    opacity: 1;
  }
  100% {
    transform: scale(50) rotate(45deg);
    opacity: 0;
  }
}

/* =========================================================
   10. 底部版权 + 响应式
   ========================================================= */

.footer {
  margin-top: 26px; /* 比原来更高，避免与下沉卡片重叠 */
  font-size: 11px;
  color: #d1d5db;
  opacity: 0.7;
}

/* 响应式（手机） */
@media (max-width: 480px) {
  body {
    padding: 26px 14px;
  }

  .card {
    padding: 20px 18px 22px;
    border-radius: 20px;
  }

  .title {
    font-size: 18px;
  }

  .desc {
    font-size: 14px;
  }

  .header-right {
    align-items: flex-start;
  }

  .lang-switch {
    margin-top: 2px;
  }
}
