/* ═══════════════════════════════════════
   AUTH ANIMATIONS — Shared starfield,
   shooting stars, constellation, particles
   ═══════════════════════════════════════ */

/* ─── Blinking Starfield ─── */
.wl-starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.wl-star {
    position: absolute;
    border-radius: 50%;
    background: #ffffff;
}

.wl-star--sm { width: 1px; height: 1px; }
.wl-star--md { width: 2px; height: 2px; }
.wl-star--lg { width: 3px; height: 3px; box-shadow: 0 0 4px 1px rgba(255,255,255,0.3); }

.wl-star--blink-slow  { animation: authStarBlink 4s ease-in-out infinite; }
.wl-star--blink-med   { animation: authStarBlink 2.5s ease-in-out infinite; }
.wl-star--blink-fast  { animation: authStarBlink 1.5s ease-in-out infinite; }

@keyframes authStarBlink {
    0%, 100% { opacity: 0.12; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.4); }
}

/* Sparkle cross */
.wl-star--sparkle {
    width: 4px;
    height: 4px;
    background: transparent;
    border-radius: 0;
}

.wl-star--sparkle::before,
.wl-star--sparkle::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border-radius: 1px;
}

.wl-star--sparkle::before {
    width: 1px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.wl-star--sparkle::after {
    width: 100%;
    height: 1px;
    top: 50%;
    transform: translateY(-50%);
}

/* ─── Shooting Stars ─── */
.wl-shooting-stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.wl-shooting-star {
    position: absolute;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
    top: 15%;
    left: -150px;
    transform: rotate(-35deg);
    animation: authShootingStar 6s ease-in-out infinite;
    opacity: 0;
}

.wl-shooting-star::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px 2px rgba(255,255,255,0.6), 0 0 14px 4px rgba(99,102,241,0.4);
}

.wl-shooting-star--2 {
    top: 35%;
    animation-delay: 2.5s;
    animation-duration: 7s;
    transform: rotate(-28deg);
    width: 90px;
}

.wl-shooting-star--3 {
    top: 60%;
    animation-delay: 4.5s;
    animation-duration: 5.5s;
    transform: rotate(-40deg);
    width: 80px;
}

@keyframes authShootingStar {
    0%  { left: -150px; opacity: 0; }
    2%  { opacity: 1; }
    15% { left: 110%; opacity: 0; }
    100%{ left: 110%; opacity: 0; }
}

/* ─── Constellation Canvas ─── */
.wl-constellation {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ─── Construction Skyline Canvas ─── */
.wl-construction {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ─── Enhanced floating particles ─── */
.wl-extra-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.wl-extra-particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #818cf8;
    animation: authParticleRise linear infinite;
}

.wl-extra-particles span::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: inherit;
    filter: blur(5px);
    opacity: 0.4;
}

.wl-extra-particles span:nth-child(1) { left: 5%; animation-duration: 18s; animation-delay: 0s; }
.wl-extra-particles span:nth-child(2) { left: 20%; animation-duration: 22s; animation-delay: -3s; background: #06b6d4; width: 2px; height: 2px; }
.wl-extra-particles span:nth-child(3) { left: 35%; animation-duration: 16s; animation-delay: -6s; background: #a78bfa; width: 4px; height: 4px; }
.wl-extra-particles span:nth-child(4) { left: 50%; animation-duration: 20s; animation-delay: -2s; background: #06b6d4; }
.wl-extra-particles span:nth-child(5) { left: 65%; animation-duration: 24s; animation-delay: -8s; width: 2px; height: 2px; }
.wl-extra-particles span:nth-child(6) { left: 80%; animation-duration: 17s; animation-delay: -4s; background: #a78bfa; }
.wl-extra-particles span:nth-child(7) { left: 92%; animation-duration: 21s; animation-delay: -7s; background: #06b6d4; width: 4px; height: 4px; }

@keyframes authParticleRise {
    0%   { transform: translateY(110vh) scale(0); opacity: 0; }
    5%   { opacity: 0.7; transform: translateY(105vh) scale(1); }
    90%  { opacity: 0.7; }
    100% { transform: translateY(-10vh) scale(0.3); opacity: 0; }
}

/* ─── Scanline sweep ─── */
.wl-auth-scanline {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(99,102,241,0.4) 30%, rgba(6,182,212,0.4) 70%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    animation: authScanMove 8s ease-in-out infinite;
}

@keyframes authScanMove {
    0%   { top: -1px; opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ─── Noise texture overlay ─── */
.wl-auth-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.02;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Grid overlay ─── */
.wl-auth-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
}

/* ─── Entrance animation for cards ─── */
.auth-anim-entrance {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
    animation: authEntrance 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

@keyframes authEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ─── Subtle hover tilt for card (card layout pages) ─── */
.ac-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ac-card:hover {
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35), 0 0 30px rgba(99, 102, 241, 0.05);
}
