/* ============================================================================
   固定脚本公告 · 一键优化脚本（浅色简约 + 霓虹点缀）
   ----------------------------------------------------------------------------
   上一版是深色终端卡片，与站内浅蓝白主视觉割裂。
   这一版改为：白底卡片 + 细霓虹描边 + 霓虹青绿点缀。

   设计要点：
     1. 底 —— 纯白到极浅青的渐变，配 1px 冷色描边 + 柔和投影
     2. 光 —— 卡片右上角一团极淡的青绿光晕（radial-gradient，透明度 0.10）
     3. 线 —— 顶部 2px 霓虹渐变细线（青 → 绿），只在首屏吸引一次注意力
     4. 代码块 —— 浅灰蓝底，不抢眼；左侧 3px 霓虹竖条做"终端"暗示
     5. 强调色 —— 霓虹青 #12c8c0 / 品牌绿 #96f64d 搭配，克制使用

   色彩层级刻意压低背景饱和度，把唯一的"亮"留给代码和复制按钮。
   ============================================================================ */

.fx-sn {
  position: relative;
  margin: 0 0 16px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, #fbfdff 52%, #f4fbf9 100%);
  border: 1px solid #e3ecf5;
  box-shadow:
    0 1px 2px rgba(20, 50, 90, .04),
    0 10px 26px -18px rgba(20, 60, 110, .28);
  font-family: var(--fx-font, "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif);
}

/* 顶部霓虹细线：整个卡片唯一的强色，作为视觉锚点 */
.fx-sn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #12c8c0 0%, #4dd6b0 42%, #96f64d 100%);
  opacity: .85;
}

/* 右上角柔光 */
.fx-sn::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -50px;
  width: 230px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 200, 192, .13) 0%, rgba(18, 200, 192, 0) 68%);
  pointer-events: none;
}

/* ---------- 标题条 ---------- */
.fx-sn-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px 11px;
}

.fx-sn-head-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #0f9e97;
  background: linear-gradient(140deg, #e6fbf9 0%, #ddf7ef 100%);
  border: 1px solid #bfeae4;
  box-shadow: 0 0 0 3px rgba(18, 200, 192, .07);
  flex-shrink: 0;
}

.fx-sn-head-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #16283d;
}

.fx-sn-head-tip {
  font-size: 11.5px;
  font-weight: 500;
  color: #8a97a8;
  margin-left: 2px;
}

/* ---------- 标签切换 ---------- */
.fx-sn-tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid #eaf0f7;
}

.fx-sn-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 10px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #7d8a9c;
  border-radius: 8px 8px 0 0;
  transition: color .16s ease, background .16s ease;
  font-family: inherit;
}

.fx-sn-tab svg {
  opacity: .8;
  flex-shrink: 0;
}

.fx-sn-tab:hover {
  color: #0f9e97;
  background: #f2fbfa;
}

/* 激活态：青绿字 + 轻微发光感（用文字阴影模拟霓虹） */
.fx-sn-tab.is-active {
  color: #0b8f88;
  text-shadow: 0 0 12px rgba(18, 200, 192, .35);
}

.fx-sn-tab.is-active svg {
  opacity: 1;
}

/* 下划线：霓虹渐变，带柔光 */
.fx-sn-tabs-line {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, #12c8c0, #96f64d);
  box-shadow:
    0 0 8px rgba(18, 200, 192, .55),
    0 0 16px rgba(150, 246, 77, .28);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), width .22s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}

/* ---------- 内容面板 ---------- */
.fx-sn-panes {
  padding: 13px 16px 16px;
}

.fx-sn-pane {
  display: none;
}

.fx-sn-pane.is-active {
  display: block;
  animation: fxSnFade .22s ease both;
}

@keyframes fxSnFade {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fx-sn-desc {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #56657a;
}

/* 行内代码：浅青底 + 青字，不用绿（绿留给按钮） */
.fx-sn-desc code {
  padding: 1px 6px;
  border-radius: 5px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: #0b8f88;
  background: #eafaf8;
  border: 1px solid #cdeeea;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.5;
}

/* ---------- 代码块：浅灰蓝，压低存在感 ---------- */
.fx-sn-code {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 15px;
  border-radius: 10px;
  background: #f6f9fc;
  border: 1px solid #e4ecf4;
}

/* 左侧霓虹竖条：唯一的彩色细节 */
.fx-sn-code::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #12c8c0 0%, #4dd6b0 55%, #96f64d 100%);
  box-shadow: 0 0 10px rgba(18, 200, 192, .4);
}

.fx-sn-cmd {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #2f4356;
  word-break: break-all;
  white-space: pre-wrap;
  user-select: all;
  letter-spacing: .2px;
}

/* ---------- 复制按钮：霓虹绿 ---------- */
.fx-sn-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid #b9e88c;
  background: linear-gradient(160deg, #f4ffe9 0%, #e9fcd8 100%);
  color: #3d7a12;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .16s ease;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(96, 180, 40, .1);
}

.fx-sn-copy:hover {
  border-color: #8fd94f;
  background: linear-gradient(160deg, #ecffd9 0%, #dcfcc0 100%);
  color: #33680a;
  box-shadow: 0 0 0 3px rgba(150, 246, 77, .16), 0 2px 8px -2px rgba(96, 180, 40, .35);
}

.fx-sn-copy:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* 复制成功：实心霓虹绿 */
.fx-sn-copy.is-ok {
  background: linear-gradient(160deg, #a8fb63 0%, #96f64d 100%);
  border-color: #86e83c;
  color: #17340a;
  box-shadow: 0 0 0 3px rgba(150, 246, 77, .22), 0 2px 10px -2px rgba(120, 220, 60, .45);
}

.fx-sn-copy svg {
  flex-shrink: 0;
}

/* ---------- SSH 下载面板（外链，非命令） ----------
   此面板没有可复制的命令，右侧按钮是「前往下载」外链，
   造型沿用 .fx-sn-code 的代码块样式，保持三个标签页视觉一致。 */
.fx-sn-code--link {
  align-items: center;
}

.fx-sn-link-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #56657a;
  word-break: break-all;
}

.fx-sn-link-text code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: #0b8f88;
  letter-spacing: .2px;
}

/* 下载按钮：与复制按钮同款，但用链接语义 */
.fx-sn-dl {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid #b9e88c;
  background: linear-gradient(160deg, #f4ffe9 0%, #e9fcd8 100%);
  color: #3d7a12;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .16s ease;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(96, 180, 40, .1);
}

.fx-sn-dl:hover {
  border-color: #8fd94f;
  background: linear-gradient(160deg, #ecffd9 0%, #dcfcc0 100%);
  color: #33680a;
  box-shadow: 0 0 0 3px rgba(150, 246, 77, .16), 0 2px 8px -2px rgba(96, 180, 40, .35);
}

.fx-sn-dl:active {
  transform: translateY(1px);
  box-shadow: none;
}

.fx-sn-dl svg {
  flex-shrink: 0;
}

/* ---------- 移动端 ---------- */
@media screen and (max-width: 750px) {
  .fx-sn {
    border-radius: 12px;
    margin-bottom: 12px;
  }
  .fx-sn-head {
    padding: 11px 13px 9px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .fx-sn-head-title {
    font-size: 13.5px;
  }
  .fx-sn-head-tip {
    font-size: 11px;
    width: 100%;
    margin-left: 33px;
  }
  .fx-sn-tab {
    flex: 1;
    justify-content: center;
    padding: 9px 8px 11px;
    font-size: 12.5px;
    /* 三个标签（Linux / Docker / SSH）在 390px 下若不加 nowrap 会折成两行，
       导致标签条高度跳动、下划线挤压。
       这里禁止换行，并让图标与文字整体略收紧，保证一行放下。 */
    white-space: nowrap;
    gap: 4px;
    letter-spacing: -.2px;
  }
  .fx-sn-tab svg {
    width: 12px;
    height: 12px;
  }
  /* 超窄屏再收一档字号，避免「Linux 换系统源」被截断 */
  @media screen and (max-width: 360px) {
    .fx-sn-tab {
      font-size: 11.5px;
      padding: 9px 5px 11px;
      gap: 3px;
    }
    .fx-sn-tab svg {
      display: none;
    }
  }
  .fx-sn-panes {
    padding: 11px 12px 13px;
  }
  .fx-sn-desc {
    font-size: 12px;
  }
  .fx-sn-code {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    padding: 11px 11px 11px 14px;
  }
  .fx-sn-cmd {
    font-size: 11.5px;
    line-height: 1.65;
  }
  .fx-sn-copy {
    justify-content: center;
    padding: 8px 12px;
  }
  /* 手机端下载按钮同样铺满整行，方便点击 */
  .fx-sn-dl {
    justify-content: center;
    padding: 8px 12px;
  }
  .fx-sn-link-text {
    font-size: 12px;
  }
  .fx-sn-link-text code {
    font-size: 11.5px;
  }
}

/* ---------- 尊重减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-sn-tabs-line,
  .fx-sn-tab,
  .fx-sn-copy {
    transition: none !important;
  }
  .fx-sn-pane.is-active {
    animation: none !important;
  }
}
