/* ============================================================================
   styles-flash.css —— 首页 FLASH 风格加载 / 入场动效（FLASH LOADER）
   ----------------------------------------------------------------------------
   目标：打开首页时呈现一个深紫科技风的加载入口——多层红蓝发光圆环旋转、
         Ai 标志、正在加载文案、底部品牌条，随后光效转场淡出，露出主站。

   设计来源：lingkeai.vip 风格的深紫渐变 + 红蓝渐变发光弧 + 环形光点。
   与主站协调：光环采用站点既有的青紫 + 洋红点缀色；退场用径向光晕过渡，
               避免深紫加载层到浅色主站的硬切。

   约束：本文件只作用于 #flashLoader 这一独立全屏层及其子元素，
         position 仅用于该层自身；不改动任何业务 DOM、布局或脚本，
         退场后整层从 DOM 移除，零残留、不拦截任何交互。

   加载顺序：置于 styles-lux.css 之后（最后一个样式）。
   回滚方式：删除 index.html 中本文件的 <link> 与加载层 DOM/脚本即可。
   ============================================================================ */

/* ------------------------------- 1. 全屏容器 ------------------------------- */
#flashLoader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  overflow: hidden;
  color: #fff;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  background:
    radial-gradient(120% 90% at 50% 42%, #33295a 0%, #221c40 32%, #15112b 62%, #0c0a1a 100%);
  animation: fl-screen-in .45s cubic-bezier(.22, 1, .36, 1) both;
}
/* 极淡网格：呼应主站网格背景，形成视觉延续 */
#flashLoader::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(168, 150, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 150, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  transform: perspective(600px) rotateX(58deg) scale(1.4) translateY(28%);
  opacity: .55;
  pointer-events: none;
  animation: fl-grid-drift 9s linear infinite;
}
/* 中心氛围光晕 */
#flashLoader::after {
  content: "";
  position: absolute;
  width: 62vmin;
  height: 62vmin;
  max-width: 640px;
  max-height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 80, 255, .28) 0%, rgba(255, 45, 111, .12) 42%, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  animation: fl-aura 2.6s ease-in-out infinite;
}

/* ------------------------------- 2. 环形主体 ------------------------------- */
.fl-orbit {
  position: relative;
  width: 210px;
  height: 210px;
  flex: 0 0 auto;
  animation: fl-orbit-in .7s cubic-bezier(.22, 1, .36, 1) both;
}

/* 外圈暗紫环带：厚、低饱和，提供层次底座 */
.fl-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #2a2148, #3a2a63, #241d40, #35285a, #2a2148);
  box-shadow:
    inset 0 0 0 1px rgba(180, 160, 255, .14),
    inset 0 6px 22px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(150, 130, 220, .1),
    0 24px 60px rgba(0, 0, 0, .5);
  animation: fl-spin-slow 14s linear infinite;
}

/* 发光渐变弧：红→紫→蓝→青，用 mask 掏成细环，反向旋转 */
.fl-ring-arc {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    #ff2d6f 42deg,
    #a855f7 96deg,
    #5b5bd6 168deg,
    #22d3ee 238deg,
    transparent 300deg,
    transparent 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, .75));
  animation: fl-spin 1.15s linear infinite;
}

/* 第二道更细的反向弧：制造交错光轨 */
.fl-ring-arc-2 {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: conic-gradient(from 180deg,
    transparent 0deg,
    #22d3ee 60deg,
    #7c4dff 150deg,
    #ff2d6f 230deg,
    transparent 290deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  opacity: .8;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, .6));
  animation: fl-spin-rev 1.8s linear infinite;
}

/* 内侧深色盘 + 高光描边 */
.fl-ring-inner {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #2b2450 0%, #171330 46%, #0b091b 100%);
  box-shadow:
    inset 0 0 0 1px rgba(190, 170, 255, .2),
    inset 0 10px 26px rgba(0, 0, 0, .7),
    0 0 26px rgba(120, 80, 255, .28);
}

/* 核心 Ai 标志 */
.fl-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.fl-ai {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.06em;
  background: linear-gradient(135deg, #ffffff 0%, #d9d3ff 45%, #8be9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(160, 140, 255, .55));
  animation: fl-core-pulse 2s ease-in-out infinite;
}
.fl-ai .i { font-size: .82em; margin-left: 1px; }

/* 沿环运行的光点：一青一粉，增强"能量流动" */
.fl-spark {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  animation: fl-spin 1.15s linear infinite;
}
.fl-spark::before,
.fl-spark::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: #7ef0ff;
  box-shadow: 0 0 12px 3px rgba(126, 240, 255, .9), 0 0 26px 6px rgba(34, 211, 238, .5);
}
.fl-spark::after {
  top: auto;
  bottom: -4px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  background: #ff6ba6;
  box-shadow: 0 0 12px 3px rgba(255, 107, 166, .9), 0 0 24px 6px rgba(255, 45, 111, .45);
}

/* ------------------------------- 3. 文案区 -------------------------------- */
.fl-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  animation: fl-copy-in .8s .18s cubic-bezier(.22, 1, .36, 1) both;
}
.fl-title {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .16em;
  color: #f4f1ff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .5);
}
.fl-dots { display: inline-flex; gap: 2px; margin-left: 2px; }
.fl-dots i {
  font-style: normal;
  animation: fl-dot 1.2s infinite;
}
.fl-dots i:nth-child(2) { animation-delay: .18s; }
.fl-dots i:nth-child(3) { animation-delay: .36s; }
.fl-brand {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  color: rgba(200, 192, 230, .72);
  animation: fl-brand-breathe 2.2s ease-in-out infinite;
}

/* ------------------------------- 4. 退场光效 ------------------------------- */
/* 一道径向光晕从中心扩散扫过，衔接深紫加载层 → 浅色主站 */
.fl-wipe {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .9) 0%, rgba(160, 140, 255, .5) 18%, transparent 46%);
}
#flashLoader.is-out .fl-wipe { animation: fl-wipe .62s ease-out both; }
#flashLoader.is-out {
  pointer-events: none;
  animation: fl-screen-out .62s cubic-bezier(.55, 0, .68, .35) both;
}

/* ------------------------------- 5. 关键帧 -------------------------------- */
@keyframes fl-screen-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fl-screen-out {
  0%   { opacity: 1; transform: scale(1); filter: blur(0); }
  70%  { opacity: .5; transform: scale(1.04); filter: blur(2px); }
  100% { opacity: 0; transform: scale(1.09); filter: blur(8px); }
}
@keyframes fl-orbit-in {
  from { opacity: 0; transform: scale(.72) rotate(-40deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes fl-copy-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fl-spin { to { transform: rotate(360deg); } }
@keyframes fl-spin-rev { to { transform: rotate(-360deg); } }
@keyframes fl-spin-slow { to { transform: rotate(360deg); } }
@keyframes fl-aura {
  0%, 100% { transform: scale(.94); opacity: .62; }
  50%      { transform: scale(1.08); opacity: 1; }
}
@keyframes fl-core-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 14px rgba(160, 140, 255, .55)); }
  50%      { transform: scale(1.06); filter: drop-shadow(0 2px 22px rgba(140, 210, 255, .85)); }
}
@keyframes fl-dot {
  0%, 60%, 100% { opacity: .22; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-3px); }
}
@keyframes fl-brand-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes fl-grid-drift { to { background-position: 0 46px, 46px 0; } }
@keyframes fl-wipe {
  0%   { opacity: 0; transform: scale(.2); }
  35%  { opacity: .85; }
  100% { opacity: 0; transform: scale(2.4); }
}

/* ------------------------------- 6. 移动端 --------------------------------- */
@media (max-width: 520px) {
  #flashLoader { gap: 26px; }
  .fl-orbit { width: 168px; height: 168px; }
  .fl-ring-inner { inset: 24px; }
  .fl-ai { font-size: 42px; }
  .fl-title { font-size: 17px; letter-spacing: .12em; }
  .fl-brand { font-size: 9.5px; letter-spacing: .16em; }
}
@media (max-height: 560px) {
  #flashLoader { gap: 16px; }
  .fl-orbit { width: 132px; height: 132px; }
  .fl-ring-inner { inset: 19px; }
  .fl-ai { font-size: 34px; }
}

/* ------------------------------- 7. 无障碍 --------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #flashLoader,
  #flashLoader::before,
  #flashLoader::after,
  .fl-orbit,
  .fl-ring-outer,
  .fl-ring-arc,
  .fl-ring-arc-2,
  .fl-spark,
  .fl-ai,
  .fl-copy,
  .fl-brand,
  .fl-dots i,
  #flashLoader.is-out,
  #flashLoader.is-out .fl-wipe {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
