/* ============================================================
   550W · 进入页（Gate）
   ------------------------------------------------------------
   深黑底 + 白色 550W 标志 —— 鼠标下滑 → 过渡界面 → 淡入站点。
   没有授权弹窗，下滑即进入。
   只作用于首页；其它页面不加载这两个文件。
   与站点 CSP 兼容：没有内联脚本，样式全部在这个外部文件里。
   ============================================================ */

/* 进入页期间锁住整页滚动（由 entry.js 加/移除这个类） */
html.entry-lock,
html.entry-lock body {
  overflow: hidden !important;
}

/* ---------------- 黑色进入页 ---------------- */
.entry-gate {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147482500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 780px at 50% 42%, #0c0e11 0%, #060709 55%, #010102 100%);
  color: #f2f4f6;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  opacity: 1;
  transition: opacity .6s ease, transform .6s ease;
}

/* ---------------- MOSS 扫描线 ----------------
   两层纯 CSS 效果，不占 DOM：
   ::before = 一条缓慢下移的扫描光带（CRT / HUD 扫描）
   ::after  = 整屏细横纹（老式监视器的行扫描）
   都只做视觉，不接收鼠标事件。 */
.entry-gate::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 22vh;
  z-index: 2;              /* 扫描光带从文字上方掠过 */
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(190, 230, 255, 0) 0%,
    rgba(190, 230, 255, .035) 45%,
    rgba(220, 245, 255, .07) 50%,
    rgba(190, 230, 255, .035) 55%,
    rgba(190, 230, 255, 0) 100%
  );
  animation: entry-scan 7.5s linear infinite;
  will-change: transform;
}

.entry-gate::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .028) 0,
    rgba(255, 255, 255, .028) 1px,
    rgba(255, 255, 255, 0) 1px,
    rgba(255, 255, 255, 0) 3px
  );
  opacity: .75;
}

/* 文字层：细横纹在文字底下（保证可读），扫描光带在文字上面（z-index:2） */
.entry-brand,
.entry-hint,
.entry-load {
  position: relative;
  z-index: 1;
}

/* 品牌区 */
.entry-brand {
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  animation: entry-rise .9s cubic-bezier(.2, .7, .2, 1) both;
  transition: opacity .35s ease, transform .35s ease;
}

.entry-logo {
  font-size: clamp(72px, 16vw, 176px);
  font-weight: 800;
  line-height: .88;
  letter-spacing: -.05em;
  color: #ffffff;
  text-shadow: 0 0 60px rgba(255, 255, 255, .10);
}

.entry-sub {
  margin-top: 26px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .62em;
  text-indent: .62em;
  color: #ffffff;
  opacity: .46;
  text-transform: uppercase;
}

.entry-line {
  width: 44px;
  height: 1px;
  margin: 30px auto 0;
  background: #ffffff;
  opacity: .16;
}

/* 底部下滑提示 */
.entry-hint {
  position: absolute;
  left: 50%;
  bottom: max(40px, env(safe-area-inset-bottom, 0px) + 32px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: .34em;
  text-indent: .34em;
  color: rgba(255, 255, 255, .40);
  animation: entry-fade 1.2s ease .5s both;
  transition: opacity .35s ease;
}

.entry-chevron {
  display: block;
  position: relative;
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .04), rgba(255, 255, 255, .30));
  overflow: hidden;
}

.entry-chevron::after {
  content: "";
  position: absolute;
  left: -1px;
  top: -12px;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: #ffffff;
  animation: entry-drop 1.9s cubic-bezier(.6, 0, .3, 1) infinite;
}

/* ---------------- 过渡界面 ---------------- */
.entry-load {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease;
}

.entry-load-logo {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #ffffff;
  animation: entry-breathe 2.4s ease-in-out infinite;
}

.entry-load-track {
  width: min(300px, 62vw);
  height: 1px;
  margin-top: 30px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.entry-load-track i {
  display: block;
  width: 0;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, .65);
  transition: width 1.4s cubic-bezier(.45, .05, .25, 1);
}

.entry-load-track i.go {
  width: 100%;
}

.entry-load-text {
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: .3em;
  text-indent: .3em;
  color: rgba(255, 255, 255, .55);
}

/* 下滑后：品牌与提示退场，过渡界面进场
   （入场动画带 fill:both，会盖过普通声明，先把它关掉才能淡出） */
.entry-gate.is-entering .entry-brand,
.entry-gate.is-entering .entry-hint {
  animation: none;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.entry-gate.is-entering .entry-load {
  opacity: 1;
  visibility: visible;
}

/* 离场：整层淡出并轻微放大，下面是已经就绪的站点 */
.entry-gate.is-leaving {
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
}

/* ---------------- 动效 ---------------- */
@keyframes entry-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes entry-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes entry-drop {
  0%   { transform: translateY(0);    opacity: 0; }
  18%  { opacity: 1; }
  70%  { transform: translateY(46px); opacity: 1; }
  100% { transform: translateY(52px); opacity: 0; }
}

@keyframes entry-breathe {
  0%, 100% { opacity: .85; }
  50%      { opacity: 1; }
}

@keyframes entry-scan {
  from { transform: translateY(-25vh); }
  to   { transform: translateY(130vh); }
}

@media (prefers-reduced-motion: reduce) {
  .entry-brand,
  .entry-hint,
  .entry-chevron::after,
  .entry-load-logo,
  .entry-gate::before {
    animation: none !important;
  }
  .entry-gate::before {
    opacity: 0;           /* 不动的光带反而碍眼，直接收掉 */
  }
  .entry-gate,
  .entry-load-track i {
    transition-duration: .01s;
  }
}

/* 窄屏微调 */
@media (max-width: 480px) {
  .entry-sub {
    letter-spacing: .4em;
    text-indent: .4em;
  }
}
