/* ============================================================
   intro.css · 打开 App 时的引入动画
   ============================================================ */

.intro-cover {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #05020c;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.9s ease;
    /* 手机点按反馈：去掉系统默认的「半透明蓝色高亮」（点图片/指纹时会闪一下，很出戏） */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.intro-cover.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 全屏范围内一律不要「系统点按高亮」（手机上是那块半透明蓝色）：
   .intro-cover 上那条只作用于本元素，这里用通配再补一层，
   保证指纹 / 标题 / 背景 / 空白处点下去都不会闪高亮。 */
.intro-cover,
.intro-cover * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* ===== 擦除光边 ===== */
.intro-edge {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 255, 255, 1) 15%,
        rgba(255, 255, 255, 1) 85%,
        transparent 100%);
    filter: blur(1.5px);
    box-shadow:
        0 0 18px 3px rgba(255, 255, 255, 1),
        0 0 36px 8px rgba(220, 180, 255, 0.95),
        0 0 72px 16px rgba(212, 106, 147, 0.7),
        0 0 120px 24px rgba(201, 166, 107, 0.4);
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
}
.intro-edge.active {
    opacity: 1;
}
.intro-edge-l.revealing {
    animation: edgeL 1.2s cubic-bezier(.3, 0, .4, 1) forwards;
}
.intro-edge-r.revealing {
    animation: edgeR 1.2s cubic-bezier(.3, 0, .4, 1) forwards;
}
@keyframes edgeL {
    0%   { left: 50%;   opacity: 1; }
    88%  { left: 0%;    opacity: 1; }
    100% { left: -3%;   opacity: 0; }
}
@keyframes edgeR {
    0%   { left: 50%;   opacity: 1; }
    88%  { left: 100%;  opacity: 1; }
    100% { left: 103%;  opacity: 0; }
}

/* ===== 阶段容器（统一定义，只此一份）===== */
.intro-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    clip-path: inset(0 50% 0 50%);
    transition: opacity 0.4s;
    z-index: 1;
    isolation: isolate;
    /* 不透明底：盖住底下的 STAGE */
    background: #05020c;
}
.intro-stage.active {
    opacity: 1;
    pointer-events: auto;
    clip-path: inset(0 0 0 0);
    z-index: 1;
}

/* 旧阶段：全屏不动，等被新阶段盖住 */
.intro-stage.leaving {
    opacity: 1;
    pointer-events: none;
    z-index: 1;
}

/* 新阶段：从中间缝向两侧展开（1.5s 匀速） */
.intro-stage.revealing {
    opacity: 1;
    pointer-events: none;
    animation: stageReveal 1.2s cubic-bezier(.3, 0, .4, 1) forwards;
    z-index: 2;
}
@keyframes stageReveal {
    0%   { clip-path: inset(0 50% 0 50%); }
    100% { clip-path: inset(0 0 0 0); }
}

#introParticles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* 中心光晕 */
.intro-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle,
        rgba(212, 106, 147, 0.55) 0%,
        rgba(201, 166, 107, 0.28) 30%,
        transparent 68%);
    filter: blur(38px);
    transform: translate(-50%, -50%);
    animation: introGlowPulse 3.2s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}
@keyframes introGlowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.75; }
    50%      { transform: translate(-50%, -50%) scale(1.18); opacity: 1; }
}

/* 竖线：扫过，然后保持显示（等白闪盖住） */
.intro-scanline {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.95) 50%,
        transparent 100%);
    filter: blur(1px);
    transform: translateX(-50%) scaleY(0);
    transform-origin: top;
    /* 入场动画改由 .intro-cover.go 触发（见文件末尾「开演门控」） */
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(212, 106, 147, 0.8);
}
@keyframes introScanline {
    0%   { transform: translateX(-50%) scaleY(0); opacity: 0; }
    30%  { transform: translateX(-50%) scaleY(1); opacity: 1; }
    100% { transform: translateX(-50%) scaleY(1); opacity: 1; }  /* 保持 */
}

/* 标题 */
.intro-title {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: auto;                       /* 标题要能接到「连点 3 下 = 结束动画」 */
    -webkit-tap-highlight-color: transparent;   /* 去掉手机点按的蓝色高亮 */
}
.intro-title-en {
    font-family: 'Parisienne', cursive;
    font-size: clamp(64px, 12vw, 120px);
    color: #fff;
    line-height: 1;
    letter-spacing: 2px;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.65),
        0 0 42px rgba(212, 106, 147, 0.75),
        0 0 84px rgba(201, 166, 107, 0.45);
    opacity: 0;
    /* 入场动画改由 .intro-cover.go 触发（见文件末尾「开演门控」） */
}
.intro-title-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(212, 106, 147, 0.9);
    letter-spacing: 8px;
    text-transform: uppercase;
    padding-left: 8px;
    text-shadow: 0 0 12px rgba(212, 106, 147, 0.8);
    opacity: 0;
    /* 入场动画改由 .intro-cover.go 触发（见文件末尾「开演门控」） */
}
@keyframes introFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 说明：原来右下角的 Skip 按钮已移除（引入动画改为全自动）；
   需要提前结束时：连点「Dream Fish」标题 3 下 = 立刻结束动画 */

/* ============================================================
   阶段 2 · Start
   ============================================================ */
.intro-stage2-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
}

/* 【指纹页布局】整屏当作定位容器：
   指纹绝对定位到屏幕正中 → 与阶段 2 背景同心圆「同心」
   （viewBox 圆心 200/400，preserveAspectRatio="xMidYMid slice" 时正好映射到视口中心）。
   原来这里是 flex 竖列（标题 + 指纹）居中，指纹中心会跑到圆心下方约 80px。 */
.intro-start-content {
    position: absolute;
    inset: 0;
    z-index: 3;
}
.intro-start-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-50% - 200px));   /* 抬到圆心上方，不压住正中的指纹 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: auto;                       /* 标题要能接到「连点 3 下 = 跳过动画」 */
    -webkit-tap-highlight-color: transparent;   /* 去掉手机点按的蓝色高亮 */
}
/* 矮屏（横屏 / 小机器）把标题再往下收一点，别顶出屏幕 */
@media (max-height: 640px) {
    .intro-start-title { transform: translate(-50%, calc(-50% - 150px)); }
}
.intro-start-title-en {
    font-family: 'Parisienne', cursive;
    font-size: clamp(52px, 9vw, 84px);
    color: #fff;
    line-height: 1;
    text-shadow:
        0 0 18px rgba(255, 255, 255, 0.55),
        0 0 36px rgba(212, 106, 147, 0.7);
}
.intro-start-title-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(212, 106, 147, 0.75);
    letter-spacing: 6px;
    text-transform: uppercase;
    padding-left: 6px;
}

/* 指纹 */
.intro-fingerprint {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 20, 45, 0.85), rgba(15, 10, 25, 0.95));
    border: 1.5px solid rgba(212, 106, 147, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;                       /* 指纹要能点到 / 长按到（点或长按才开始识别） */
    -webkit-tap-highlight-color: transparent;   /* 去掉手机点按的蓝色高亮 */
    outline: none;                              /* 点一下也不要留焦点方框 */
    position: absolute;                         /* 绝对定位到屏幕正中 = 与背景同心圆同心 */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 24px rgba(212, 106, 147, 0.4),
        0 0 60px rgba(212, 106, 147, 0.15),
        inset 0 0 40px rgba(212, 106, 147, 0.1);
    transition: all .3s;
    overflow: hidden;
}
.intro-fingerprint::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(212, 106, 147, 0.35);
    animation: fpRotate 22s linear infinite;
    pointer-events: none;
}
@keyframes fpRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
/* 悬停效果只在「鼠标」上生效：手机上 touch 完 hover 会一直粘着，
   看起来就像点按高亮残留（紫白光块）→ 用媒体查询挡掉触摸设备。 */
@media (hover: hover) and (pointer: fine) {
    .intro-fingerprint:hover {
        border-color: rgba(212, 106, 147, 1);
        box-shadow:
            0 0 36px rgba(212, 106, 147, 0.7),
            0 0 80px rgba(212, 106, 147, 0.25),
            inset 0 0 40px rgba(212, 106, 147, 0.18);
    }
}
/* 指纹图片（mask 染色） */
.intro-fingerprint-img {
    width: 92px;
    height: 92px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #e8d5ff 0%, #D46A93 45%, #C9A66B 100%);
    -webkit-mask-image: url("../assets/fingerprint.png");
    mask-image: url("../assets/fingerprint.png");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    filter:
        drop-shadow(0 0 6px rgba(212, 106, 147, 0.85))
        drop-shadow(0 0 14px rgba(212, 106, 147, 0.5));
    transition: filter .3s, background .3s;
}
@media (hover: hover) and (pointer: fine) {
    .intro-fingerprint:hover .intro-fingerprint-img {
        filter:
            drop-shadow(0 0 10px rgba(230, 200, 255, 1))
            drop-shadow(0 0 22px rgba(212, 106, 147, 0.85));
    }
}
.intro-fingerprint.scanning::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 0%;
    background: linear-gradient(to top,
        transparent 0%,
        rgba(212, 106, 147, 0.5) 40%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(212, 106, 147, 0.5) 60%,
        transparent 100%);
    animation: fpScan 1.2s ease-in-out forwards;
    z-index: 1;
    pointer-events: none;
    box-shadow: 0 -20px 40px rgba(212, 106, 147, 0.8);
}
@keyframes fpScan {
    from { height: 0%; }
    to   { height: 100%; }
}
.intro-fingerprint.success {
    border-color: #34d399;
    box-shadow: 0 0 36px rgba(52, 211, 153, 0.7);
}
.intro-fingerprint.success .intro-fingerprint-img {
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 50%, #10b981 100%);
    filter:
        drop-shadow(0 0 10px rgba(52, 211, 153, 1))
        drop-shadow(0 0 22px rgba(52, 211, 153, 0.7));
}
.intro-fingerprint.success::after {
    border-color: rgba(52, 211, 153, 0.5);
}
/* ============================================================
   阶段 3 · 认证中
   ============================================================ */
.intro-stage3-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
}

/* 散落的英文词 */
.intro-words {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}
.iw {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(212, 106, 147, 0.55);
    letter-spacing: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(212, 106, 147, 0.5);
    /* 入场动画改由 .intro-cover.go 触发（见文件末尾「开演门控」） */
}
.iw-1 { top: 8%;  left: 6%;  animation-delay: 0s;   }
.iw-2 { top: 16%; right: 8%; animation-delay: 1.4s; }
.iw-3 { top: 28%; left: 5%;  animation-delay: 2.8s; }
.iw-4 { top: 42%; right: 6%; animation-delay: 4.2s; }
.iw-5 { top: 55%; left: 8%;  animation-delay: 5.6s; }
.iw-6 { top: 68%; right: 10%;animation-delay: 7.0s; }
.iw-7 { top: 78%; left: 12%; animation-delay: 8.4s; }
.iw-8 { top: 90%; right: 7%; animation-delay: 9.8s; }
.iw-9 { top: 36%; left: 72%;animation-delay: 3.5s; }
.iw-10{ top: 62%; left: 22%;animation-delay: 6.5s; }
@keyframes iwDrift {
    0%, 100% { opacity: 0.35; transform: translateY(0); }
    50%      { opacity: 0.75; transform: translateY(-6px); }
}

.intro-authing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 3;
}
.intro-authing-title {
    font-family: 'WenJinMincho', 'Noto Serif SC', serif;
    font-size: clamp(42px, 7vw, 60px);
    color: #fff;
    letter-spacing: 18px;
    padding-left: 18px;
    line-height: 1.1;
    text-shadow:
        0 0 8px  rgba(255, 255, 255, 0.95),
        0 0 24px rgba(255, 255, 255, 0.7),
        0 0 48px rgba(212, 106, 147, 0.9),
        0 0 90px rgba(201, 166, 107, 0.55);
}
.intro-authing-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: rgba(212, 106, 147, 0.95);
    letter-spacing: 10px;
    padding-left: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(212, 106, 147, 0.8);
}
.intro-authing-dots {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}
.intro-authing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D46A93;
    box-shadow: 0 0 12px rgba(212, 106, 147, 1);
    animation: authDots 1.2s ease-in-out infinite;
}
.intro-authing-dots span:nth-child(2) { animation-delay: 0.2s; }
.intro-authing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes authDots {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50%      { opacity: 1;   transform: scale(1.2); }
}

/* ============================================================
   开演门控 · 只有 index.html 的启动脚本确认「可以播了」后才加 .intro-cover.go
   ------------------------------------------------------------
   原来把 animation 写死在静态 CSS 上 = 页面首帧就开始计时，
   而粒子 / 阶段计时要等 js/intro.js（模块列表第 24 位）才跑，
   结果动画在加载期空跑完 → 用户只看到「不动的标题 + 空画布」，像卡住。
   现在：字体就绪（上限 1 秒）后加 .go，动画与粒子从同一刻开始。
   ============================================================ */
.intro-cover.go .intro-title-en { animation: introFadeUp 1s ease-out 0.4s forwards; }
.intro-cover.go .intro-title-sub { animation: introFadeUp 1s ease-out 1.3s forwards; }
.intro-cover.go .intro-scanline { animation: introScanline 1.8s ease-in-out 0.4s forwards; }
.intro-cover.go .iw { animation: iwDrift 12s ease-in-out infinite; }

/* ===== 加载提示：只在「开场动画（阶段 1）」期间显示；阶段 1 一开始擦除就淡出 =====
   （由 js/intro.js 在擦除那一刻摘掉 .pending，并在 0.65s 后彻底隐藏 —— 指纹页上不会出现） */
.intro-loading {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(212, 106, 147, 0.62);
    text-shadow: 0 0 12px rgba(212, 106, 147, 0.5);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 10;   /* 压在所有阶段之上（阶段是 z-index 1） */
}
.intro-cover.pending .intro-loading {
    opacity: 1;
}
.intro-loading-dots {
    display: flex;
    gap: 7px;
}
/* 复用阶段 3 已有的 authDots 关键帧，不新增动画 */
.intro-loading-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #D46A93;
    box-shadow: 0 0 10px rgba(212, 106, 147, 0.9);
    animation: authDots 1.2s ease-in-out infinite;
}
.intro-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.intro-loading-dots span:nth-child(3) { animation-delay: 0.4s; }