/* ==========================================================================
   手持弹幕 官网 - base.css
   设计令牌 / 重置 / 通用组件（导航、按钮、页脚、悬浮件、滚动动画）
   版式参考：ledbanner.softin-tech.com（深色 + 玫红强调色，1250px 内容宽度）
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 背景层：参考站用 #000 与 #171717 交替分区 */
  --bg: #000000;
  --bg-1: #171717;
  --bg-2: #1f1f1f;
  --bg-3: #262626;

  /* 强调色：参考站主色 #FF0071 */
  --pink: #ff0071;
  --pink-soft: #ff4d94;
  --pink-deep: #c4005a;
  --led-red: #ff2d3f;

  /* 文本层级 */
  --text-1: #e7e7e7;
  --text-2: #b0b0b0;
  --text-3: #666666;

  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);

  /* 版心与间距 */
  --container: 1250px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius-card: 14px;
  --radius-pill: 51px;

  /* 导航高度 */
  --nav-h: 80px;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.45s;

  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-num: "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 锚点定位时避开固定导航 */
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--pink);
  color: #fff;
}

/* 自定义滚动条（Webkit） */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0d0d0d;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--pink);
}

/* ---------- 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--pink);
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus {
  top: 16px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 200px;
  height: 60px;
  padding: 0 34px;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

/* 描边胶囊 —— 对应参考站 .button_before */
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: #fff;
  border-color: #fff;
  color: #111;
  transform: translateY(-2px);
}

/* 实心胶囊 —— 对应参考站 .button */
.btn--solid {
  color: #fff;
  background: linear-gradient(135deg, var(--pink) 0%, #ff3b84 100%);
  box-shadow: 0 10px 30px -10px rgba(255, 0, 113, 0.85);
}
.btn--solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -12px rgba(255, 0, 113, 0.95);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn__icon {
  width: 19px;
  height: 19px;
  flex: none;
  fill: currentColor;
}

.btn--sm {
  height: 46px;
  min-width: auto;
  padding: 0 24px;
  font-size: 15px;
}

/* ---------- 导航 ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.35s var(--ease),
    border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

/* 滚动后由透明变为半透明实底 */
.site-nav.is-scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.brand__name {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-menu__link {
  position: relative;
  font-size: 16px;
  font-weight: 300;
  color: var(--text-1);
  padding: 6px 0;
}

/* 参考站用 1px 白色下划线做 hover 反馈 */
.nav-menu__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-menu__link:hover::after,
.nav-menu__link.is-active::after {
  transform: scaleX(1);
}
.nav-menu__link.is-active {
  color: #fff;
}

.nav-cta {
  flex: none;
}

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s linear;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- LED 点阵文字 / 屏幕（全站复用） ---------- */
/* 结构：.led-screen > .led-mask(点阵遮罩) > .led-track(位移) > .led-text ×2 */
.led-screen {
  position: relative;
  overflow: hidden;
  background: #050505;
  border-radius: 12px;
  isolation: isolate;
}

.led-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* 点阵间距由 --led-dot 控制：小屏用更细的点阵（3px），文字才认得出 */
  -webkit-mask-image: radial-gradient(
    circle at center,
    #000 calc(var(--led-dot, 5px) * 0.17),
    transparent calc(var(--led-dot, 5px) * 0.25)
  );
  mask-image: radial-gradient(
    circle at center,
    #000 calc(var(--led-dot, 5px) * 0.17),
    transparent calc(var(--led-dot, 5px) * 0.25)
  );
  -webkit-mask-size: var(--led-dot, 5px) var(--led-dot, 5px);
  mask-size: var(--led-dot, 5px) var(--led-dot, 5px);
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

/* 小尺寸 LED 屏：点阵更细，避免笔画被切碎 */
.swatch-wall .led-screen,
.effect-card .led-screen,
.scene-card .led-screen {
  --led-dot: 3px;
}

.led-track {
  display: flex;
  align-items: center;
  gap: var(--led-gap, 160px);
  white-space: nowrap;
  will-change: transform;
  flex: none;
}

.led-text {
  flex: none;
  color: var(--led-color, var(--led-red));
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 0 6px currentColor, 0 0 18px currentColor,
    0 0 40px rgba(255, 45, 63, 0.45);
}

/* 竖排方向时，屏幕内元素改为列方向 */
.led-screen[data-axis="y"] .led-mask {
  align-items: stretch;
  justify-content: center;
}
.led-screen[data-axis="y"] .led-track {
  flex-direction: column;
  justify-content: center;
  gap: var(--led-gap-y, 90px);
  margin: 0 auto;
}

/* ---------- 标签按钮（文案预设 / 公告筛选共用） ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.22s var(--ease);
}
.chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.chip.is-active {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(255, 0, 113, 0.9);
}

/* ---------- 滚动进场动画 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 区块通用标题 ---------- */
.section-head {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}
.section-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-2);
  text-transform: uppercase;
}
.section-head__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
}
.section-head__title {
  font-size: clamp(28px, 3.6vw, 58px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-1);
  letter-spacing: 0.01em;
}
.section-head__desc {
  margin-top: 22px;
  font-size: clamp(16px, 1.6vw, 24px);
  font-weight: 300;
  color: var(--text-2);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.site-footer__brand {
  max-width: 340px;
}
.site-footer__brand .brand__name {
  font-size: 22px;
}
.site-footer__slogan {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.8;
}

.site-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
}
.site-footer__col h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}
.site-footer__col a,
.site-footer__col p {
  display: block;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 10px;
}
.site-footer__col a:hover {
  color: #fff;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  font-size: 12px;
  color: var(--text-3);
}
.site-footer__bottom a {
  color: var(--text-3);
}
.site-footer__bottom a:hover {
  color: #fff;
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

/* ---------- 右侧悬浮件（参考站 .sus-button） ---------- */
.float-dock {
  position: fixed;
  right: 22px;
  bottom: 40px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
    visibility 0.35s;
}
.float-dock.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.float-btn {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg-3);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.9);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.float-btn:hover {
  background: var(--pink);
  transform: translateY(-2px);
}
.float-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* 二维码气泡 */
.float-qr {
  position: absolute;
  right: 66px;
  bottom: 0;
  width: 244px;
  padding: 16px;
  border-radius: 14px;
  background: var(--bg-3);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
    visibility 0.28s;
}
.float-dock__qr-wrap:hover .float-qr,
.float-qr.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.float-qr__row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.float-qr__row + .float-qr__row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
}
.float-qr__img {
  width: 82px;
  height: 82px;
  padding: 5px;
  background: #fff;
  border-radius: 8px;
  flex: none;
}
.float-qr__meta strong {
  display: block;
  font-size: 14px;
  color: var(--text-1);
  font-weight: 500;
}
.float-qr__meta span {
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1024px) {
  :root {
    --nav-h: 68px;
  }
  .brand__name {
    font-size: 21px;
  }
  .nav-menu {
    gap: 26px;
  }
  .float-dock {
    right: 14px;
    bottom: 24px;
  }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }
  .nav-cta {
    display: none;
  }

  /* 移动端下拉菜单 */
  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
      visibility 0.3s;
  }
  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-menu__link {
    padding: 16px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }
  .nav-menu__link::after {
    display: none;
  }

  .btn {
    min-width: auto;
    width: 100%;
    height: 54px;
    font-size: 16px;
  }

  .site-footer__cols {
    gap: 32px 48px;
  }
  .site-footer__grid {
    flex-direction: column;
    gap: 32px;
  }

  .float-qr {
    right: 0;
    bottom: 66px;
    width: min(244px, calc(100vw - 40px));
  }
}

/* ---------- 无障碍：尊重系统的减少动效设置 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* language switch */
.lang-toggle { margin-left: 12px; border: 1px solid rgba(255,255,255,.28); background: transparent; color: inherit; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.lang-toggle:hover, .lang-toggle:focus-visible { border-color: var(--accent, #ff2d55); color: #fff; }
@media (max-width: 760px) { .lang-toggle { margin: 12px 0 0; } }
.lang-switch { display:flex; align-items:center; gap:2px; margin-left:12px; padding:2px; border:1px solid #e4ddd5; border-radius:999px; background:#fff; }
.lang-switch button { border:0; background:transparent; color:#766e68; border-radius:999px; padding:6px 9px; font:inherit; font-size:12px; cursor:pointer; }
.lang-switch button.is-active { background:#f26a55; color:#fff; font-weight:700; }
.lang-switch { flex: 0 0 auto; width: max-content; min-width: 156px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 2px; white-space: nowrap; overflow: visible; }
.lang-switch button { display: block; width: 100%; min-width: 34px; padding: 6px 8px; text-align: center; white-space: nowrap; flex: none; }
@media (max-width: 760px) { .lang-switch { min-width: 156px; margin-left: 8px; } .site-nav__inner { flex-wrap: wrap; } }

/* 语言选择器：匹配深色导航与玫红强调色 */
.lang-switch { margin-left: 14px; min-width: 168px; height: 34px; padding: 3px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; align-items: stretch; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.lang-switch button { min-width: 0; width: 100%; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font-family: var(--font); font-size: 12px; line-height: 26px; text-align: center; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.lang-switch button:hover { color: var(--text-1); background: rgba(255,255,255,.1); }
.lang-switch button.is-active { color: #fff; background: var(--pink); box-shadow: 0 4px 14px rgba(255,0,113,.28); font-weight: 700; }
.lang-switch button:focus-visible { outline: 2px solid var(--pink-soft); outline-offset: 2px; }
@media (max-width: 760px) { .lang-switch { min-width: 160px; height: 32px; margin-left: 8px; } .lang-switch button { font-size: 11px; padding: 0 6px; } }
