/* ==========================================================================
   gate.css — 新增的两个页面
     A. 所有放行设备的 5 秒加载倒计时（boot-*）
     B. iOS / iPadOS 非 Safari 浏览器的「浏览器不兼容」引导页（gate-*）
   本文件只负责这两个页面，原站样式一律保留在 site.css 中，互不污染。
   ========================================================================== */

/* hidden 属性必须压过下面的 display:flex，否则初始状态会闪一下 */
[hidden] { display: none !important; }

/* 主页面淡入 */
#page-root { animation: pageIn .75s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   A. 加载倒计时
   -------------------------------------------------------------------------- */
.boot-screen {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #eff6ff 0%, #f7fbff 55%, #ffffff 100%);
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  transition: opacity .6s ease, transform .6s ease;
}
.boot-screen.is-leaving { opacity: 0; transform: scale(1.03); pointer-events: none; }

.boot-glow { position: absolute; border-radius: 50%; pointer-events: none; }
.boot-glow--a {
  width: 520px; height: 520px; top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(37,99,235,.16), transparent 70%);
  filter: blur(30px); animation: bootFloat 9s ease-in-out infinite;
}
.boot-glow--b {
  width: 460px; height: 460px; bottom: -180px; right: -100px;
  background: radial-gradient(circle, rgba(14,165,233,.16), transparent 70%);
  filter: blur(30px); animation: bootFloat 11s ease-in-out infinite reverse;
}
@keyframes bootFloat {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(40px, 28px); }
}
.boot-dots {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(37,99,235,.14) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 72%);
}

.boot-card {
  position: relative; z-index: 1;
  width: min(440px, 90vw);
  padding: 40px 40px 34px;
  border-radius: 28px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  box-shadow: 0 32px 80px -24px rgba(37,99,235,.28), 0 8px 26px rgba(17,24,39,.05), inset 0 1px 0 rgba(255,255,255,.9);
  text-align: center;
  animation: bootCardIn .7s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes bootCardIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.boot-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 15px; font-weight: 600; color: #111827; letter-spacing: -.01em;
}
.boot-brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(to bottom right, #2563eb, #0ea5e9);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(37,99,235,.28);
}
.boot-brand-mark .material-symbols-outlined { font-size: 19px; color: #fff; font-variation-settings: 'FILL' 1; }

.boot-ring { position: relative; width: 176px; height: 176px; margin: 28px auto 24px; }
.boot-ring svg { width: 100%; height: 100%; display: block; }
.boot-ring-track { fill: none; stroke: rgba(37,99,235,.10); stroke-width: 8; }
.boot-ring-progress {
  fill: none; stroke: url(#bootGrad); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 414.6902; stroke-dashoffset: 414.6902;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  filter: drop-shadow(0 2px 6px rgba(37,99,235,.25));
}
.boot-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.boot-number {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -.05em;
  color: #111827; font-variant-numeric: tabular-nums;
}
.boot-number.is-tick { animation: bootTick .32s cubic-bezier(.22, 1, .36, 1); }
@keyframes bootTick {
  0%   { opacity: .55; transform: scale(.82); }
  100% { opacity: 1;   transform: scale(1); }
}
.boot-unit { margin-top: 8px; font-size: 12px; color: #6b7280; letter-spacing: .08em; }

.boot-title {
  margin: 0 0 6px; font-size: 20px; font-weight: 600; color: #111827;
  font-family: 'Space Grotesk', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.boot-subtitle { margin: 0; font-size: 12px; color: #9ca3af; letter-spacing: .1em; }
.boot-bar {
  height: 5px; margin: 24px 0 14px; border-radius: 999px;
  background: rgba(37,99,235,.10); overflow: hidden;
}
.boot-bar-fill {
  width: 0%; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  box-shadow: 0 0 12px rgba(14,165,233,.55);
  transition: width .1s linear;
}
.boot-tip { margin: 0; font-size: 11px; color: #9ca3af; letter-spacing: .02em; }
.boot-footer {
  position: absolute; bottom: 26px; left: 0; right: 0; z-index: 1;
  text-align: center; font-size: 10px; letter-spacing: .18em; color: #9ca3af;
  text-transform: uppercase;
}
.boot-badge-img { width: 46px; height: 46px; object-fit: contain; margin: 0 auto 14px; display: block; }

/* --------------------------------------------------------------------------
   B. 浏览器不兼容提示页
   -------------------------------------------------------------------------- */
.gate-screen {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 20px; overflow-y: auto; overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 15% -10%, #123b7a 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 110%, #0e4f7a 0%, transparent 58%),
    #070d1c;
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.gate-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 78%);
}
.gate-glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(70px); }
.gate-glow--a { width: 380px; height: 380px; top: -120px; left: -80px; background: rgba(37,99,235,.32); animation: gateFloat 12s ease-in-out infinite; }
.gate-glow--b { width: 340px; height: 340px; bottom: -120px; right: -60px; background: rgba(14,165,233,.24); animation: gateFloat 15s ease-in-out infinite reverse; }
@keyframes gateFloat { 0%,100% { transform: translate(0,0); } 50% { transform: translate(50px, 36px); } }

.gate-panel {
  position: relative; z-index: 1;
  width: min(560px, 100%); min-width: 0; max-width: calc(100vw - 40px);
  padding: 40px 46px 34px;
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(255,255,255,.095), rgba(255,255,255,.035));
  border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.14);
  text-align: center;
  animation: gateCardIn .8s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes gateCardIn {
  from { opacity: 0; transform: translateY(22px) scale(.975); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gate-compass { width: 88px; height: 88px; margin: 0 auto 22px; filter: drop-shadow(0 12px 26px rgba(30,155,240,.42)); animation: compassFloat 6s ease-in-out infinite; }
.gate-compass svg { width: 100%; height: 100%; display: block; }
@keyframes compassFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.gate-badge {
  display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: .18em;
  color: #7dd3fc; background: rgba(125,211,252,.08); border: 1px solid rgba(125,211,252,.32);
}
.gate-title { margin: 0 0 8px; font-size: 34px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.gate-subtitle { margin: 0 0 16px; font-size: 18px; font-weight: 500; color: #93c5fd; overflow-wrap: anywhere; }
.gate-desc { margin: 0 auto 22px; max-width: 430px; font-size: 13px; line-height: 1.9; color: rgba(255,255,255,.6); overflow-wrap: anywhere; }

.gate-detected {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1);
  font-size: 12px; color: rgba(255,255,255,.5);
}
.gate-detected strong { color: #fff; font-weight: 600; }
.gate-detected-dot { width: 7px; height: 7px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }

.gate-divider { height: 1px; margin: 26px 0 22px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent); }
.gate-steps-title { margin: 0 0 18px; font-size: 10px; letter-spacing: .18em; color: rgba(255,255,255,.38); text-transform: uppercase; }
.gate-steps { list-style: none; padding: 0; margin: 0 0 26px; display: flex; gap: 10px; min-width: 0; }
.gate-steps li { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; color: rgba(255,255,255,.68); line-height: 1.5; overflow-wrap: anywhere; }
.gate-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600;
  color: #7dd3fc; background: rgba(125,211,252,.1); border: 1px solid rgba(125,211,252,.38);
}

.gate-url-box {
  display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; max-width: 100%;
  padding: 8px 8px 8px 16px; border-radius: 14px;
  background: rgba(0,0,0,.26); border: 1px solid rgba(255,255,255,.11);
}
.gate-url { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gate-copy {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 10px 15px; border: 0; border-radius: 10px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 8px 20px -6px rgba(37,99,235,.7);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.gate-copy:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 12px 26px -6px rgba(37,99,235,.85); }
.gate-copy:active { transform: translateY(0); }
.gate-copy svg { width: 14px; height: 14px; fill: currentColor; }
.gate-hint { margin: 18px 0 0; font-size: 11px; line-height: 1.8; color: rgba(255,255,255,.34); overflow-wrap: anywhere; }
.gate-footer { position: relative; z-index: 1; margin-top: 26px; font-size: 10px; letter-spacing: .16em; color: rgba(255,255,255,.25); }

@media (max-width: 560px) {
  .gate-screen { padding: 32px 14px; }
  .gate-panel { padding: 30px 18px 26px; border-radius: 22px; max-width: calc(100vw - 28px); }
  .gate-compass { width: 72px; height: 72px; margin-bottom: 16px; }
  .gate-badge { margin-bottom: 14px; font-size: 9px; letter-spacing: .14em; }
  .gate-title { font-size: 25px; }
  .gate-subtitle { font-size: 15px; }
  .gate-desc { font-size: 12.5px; line-height: 1.8; margin-bottom: 18px; }
  .gate-detected { font-size: 11px; padding: 7px 12px; }
  .gate-divider { margin: 20px 0 18px; }
  .gate-steps-title { margin-bottom: 14px; }
  .gate-steps { gap: 6px; margin-bottom: 20px; }
  .gate-steps li { font-size: 11px; gap: 8px; }
  .gate-step-num { width: 25px; height: 25px; font-size: 11px; }
  .gate-url-box { flex-direction: column; align-items: stretch; }
  .gate-copy { justify-content: center; }
  .gate-hint { font-size: 10.5px; margin-top: 14px; }
  .boot-card { padding: 32px 24px 28px; }
}

/* --------------------------------------------------------------------------
   对比度微调：浅蓝背景上让加载卡片与文字更清晰（后定义，覆盖上方同值）
   -------------------------------------------------------------------------- */
.boot-glow--a { background: radial-gradient(circle, rgba(37,99,235,.11), transparent 70%); }
.boot-glow--b { background: radial-gradient(circle, rgba(14,165,233,.11), transparent 70%); }
.boot-dots { opacity: .32; }
.boot-card {
  background: rgba(255,255,255,.94);
  border-color: rgba(37,99,235,.12);
  box-shadow: 0 36px 90px -26px rgba(37,99,235,.30), 0 10px 30px rgba(17,24,39,.07), inset 0 1px 0 #fff;
}
.boot-brand-mark svg { width: 19px; height: 19px; display: block; }
.boot-ring-track { stroke: rgba(37,99,235,.14); }
.boot-bar { background: rgba(37,99,235,.13); }
.boot-subtitle, .boot-tip { color: #6b7280; }
.boot-footer { color: #94a3b8; }
@keyframes bootCardIn {
  from { opacity: .55; transform: translateY(18px) scale(.97); }
  to   { opacity: 1;   transform: translateY(0) scale(1); }
}
