/* ============================================================
   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;
}
.intro-cover.hidden {
    opacity: 0;
    pointer-events: 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(192, 132, 252, 0.7),
        0 0 120px 24px rgba(236, 72, 153, 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(192, 132, 252, 0.55) 0%,
        rgba(236, 72, 153, 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;
    animation: introScanline 1.8s ease-in-out 0.4s forwards;
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(192, 132, 252, 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: none;
}
.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(192, 132, 252, 0.75),
        0 0 84px rgba(236, 72, 153, 0.45);
    opacity: 0;
    animation: introFadeUp 1s ease-out 0.4s forwards;
}
.intro-title-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(192, 132, 252, 0.9);
    letter-spacing: 8px;
    text-transform: uppercase;
    padding-left: 8px;
    text-shadow: 0 0 12px rgba(192, 132, 252, 0.8);
    opacity: 0;
    animation: introFadeUp 1s ease-out 1.3s forwards;
}
@keyframes introFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Skip */
.intro-skip {
    position: absolute;
    right: 24px;
    bottom: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 999px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all .25s;
    z-index: 10;
}
.intro-skip:hover {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(192, 132, 252, 0.6);
    box-shadow: 0 0 14px rgba(192, 132, 252, 0.4);
}

/* ============================================================
   阶段 2 · Start
   ============================================================ */
.intro-stage2-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
}

.intro-start-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 52px;
    position: relative;
    z-index: 3;
}
.intro-start-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.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(192, 132, 252, 0.7);
}
.intro-start-title-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(192, 132, 252, 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(192, 132, 252, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow:
        0 0 24px rgba(192, 132, 252, 0.4),
        0 0 60px rgba(192, 132, 252, 0.15),
        inset 0 0 40px rgba(192, 132, 252, 0.1);
    transition: all .3s;
    overflow: hidden;
}
.intro-fingerprint::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(192, 132, 252, 0.35);
    animation: fpRotate 22s linear infinite;
    pointer-events: none;
}
@keyframes fpRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.intro-fingerprint:hover {
    border-color: rgba(192, 132, 252, 1);
    box-shadow:
        0 0 36px rgba(192, 132, 252, 0.7),
        0 0 80px rgba(192, 132, 252, 0.25),
        inset 0 0 40px rgba(192, 132, 252, 0.18);
}
/* 指纹图片（mask 染色） */
.intro-fingerprint-img {
    width: 92px;
    height: 92px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #e8d5ff 0%, #c084fc 45%, #ec4899 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(192, 132, 252, 0.85))
        drop-shadow(0 0 14px rgba(192, 132, 252, 0.5));
    transition: filter .3s, background .3s;
}
.intro-fingerprint:hover .intro-fingerprint-img {
    filter:
        drop-shadow(0 0 10px rgba(230, 200, 255, 1))
        drop-shadow(0 0 22px rgba(192, 132, 252, 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(192, 132, 252, 0.5) 40%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(192, 132, 252, 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(192, 132, 252, 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);
}
.intro-start-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 4px;
    margin-top: 8px;
    padding-left: 4px;
}

/* ============================================================
   阶段 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(192, 132, 252, 0.55);
    letter-spacing: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
    animation: iwDrift 12s ease-in-out infinite;
}
.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(192, 132, 252, 0.9),
        0 0 90px rgba(236, 72, 153, 0.55);
}
.intro-authing-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: rgba(192, 132, 252, 0.95);
    letter-spacing: 10px;
    padding-left: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 16px rgba(192, 132, 252, 0.8);
}
.intro-authing-dots {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}
.intro-authing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c084fc;
    box-shadow: 0 0 12px rgba(192, 132, 252, 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); }
}