/* ============================================
   AeroWealth - Auth Pages (Login & Signup)
   ============================================ */

/* ============ Auth Layout ============ */
.auth-page {
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

.auth-bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 243, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 0, 229, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(180, 0, 255, 0.05) 0%, transparent 50%);
    z-index: 0;
    animation: gradient-shift 15s ease infinite;
    background-size: 200% 200%;
}

/* ============ Split Screen ============ */
.auth-split-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 40px;
}

.auth-split-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 40px;
    background: rgba(10, 10, 20, 0.5);
    backdrop-filter: blur(10px);
}

/* ============ Auth Illustration ============ */
.auth-illustration {
    text-align: center;
    max-width: 500px;
}

.auth-illustration .orb {
    width: 280px;
    height: 280px;
    margin: 0 auto 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 243, 255, 0.4), rgba(180, 0, 255, 0.2), rgba(255, 0, 229, 0.1));
    position: relative;
    animation: float 4s ease-in-out infinite;
    box-shadow: 0 0 60px rgba(0, 243, 255, 0.2), 0 0 120px rgba(180, 0, 255, 0.1);
}

.auth-illustration .orb::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1px solid rgba(0, 243, 255, 0.2);
    animation: rotate-slow 15s linear infinite;
}

.auth-illustration .orb::after {
    content: '';
    position: absolute;
    inset: -40px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 0, 229, 0.15);
    animation: rotate-reverse 20s linear infinite;
}

.orb-inner {
    position: absolute;
    inset: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(0, 243, 255, 0.6), transparent);
    animation: pulse-glow 3s ease-in-out infinite;
}

.orb-ring {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 243, 255, 0.1);
    animation: rotate-slow 8s linear infinite;
}

.orb-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.auth-illustration h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.auth-illustration p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* ============ Auth Form Container ============ */
.auth-form-container {
    width: 100%;
    max-width: 440px;
    position: relative;
}

.auth-logo {
    text-align: center;
    margin-bottom: 14px;
}

.auth-logo h1 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.auth-logo p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.auth-form-card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 22px 26px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,243,255,0.05), 0 20px 60px rgba(0,0,0,0.4);
    animation: card-enter 0.55s cubic-bezier(0.34,1.4,0.64,1) both;
}

.auth-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink), var(--accent-purple));
    z-index: 1;
}

.auth-form-card::after {
    content: '';
    position: absolute;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,243,255,0.7), rgba(255,0,229,0.5), transparent);
    top: 0;
    animation: card-scan 1.2s cubic-bezier(0.4,0,0.2,1) 0.5s both;
    pointer-events: none;
    z-index: 2;
}

/* ============ Multi-Step Signup ============ */
.signup-steps {
    position: relative;
    overflow: hidden;
}

.signup-step {
    display: none;
    opacity: 0;
}

.signup-step.active {
    display: block;
    animation: slide-in-left 0.5s ease-out forwards;
}

.signup-step.slide-out-left {
    animation: slide-out-left 0.4s ease-in forwards;
}

.signup-step.slide-out-right {
    animation: slide-out-right 0.4s ease-in forwards;
}

@keyframes slide-out-left {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-60px); }
}

@keyframes slide-out-right {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(60px); }
}

/* Step transition variants */
.signup-step.flip-in {
    animation: flip-in-x 0.6s ease-out forwards;
}

.signup-step.scale-in {
    animation: scale-in 0.5s ease-out forwards;
}

/* ============ Step Indicators ============ */
.step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 18px;
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid var(--glass-border);
    color: var(--text-muted);
    background: var(--bg-secondary);
    transition: var(--transition-normal);
    position: relative;
    z-index: 2;
}

.step-dot.active {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.35);
    animation: neon-pulse 2s ease-in-out infinite;
}

.step-dot.completed {
    border-color: var(--accent-green);
    background: var(--accent-green);
    color: var(--bg-primary);
    animation: bounce-in 0.4s ease-out;
}

.step-line {
    width: 44px;
    height: 2px;
    background: var(--glass-border);
    transition: var(--transition-slow);
}

.step-line.active {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

/* ============ Password Strength ============ */
.password-strength {
    margin-top: -10px;
    margin-bottom: 14px;
}

.strength-bar-bg {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.5s ease, background 0.5s ease;
}

.strength-bar-fill.weak { width: 25%; background: var(--accent-red); }
.strength-bar-fill.fair { width: 50%; background: var(--accent-yellow); }
.strength-bar-fill.good { width: 75%; background: var(--accent-cyan); }
.strength-bar-fill.strong { width: 100%; background: var(--accent-green); }

.strength-text {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============ Password Toggle ============ */
.password-toggle {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-normal);
}

.password-toggle:hover {
    color: var(--accent-cyan);
}

.password-toggle svg {
    transition: var(--transition-spring);
}

.password-toggle.visible svg {
    color: var(--accent-cyan);
}

/* ============ Country Code Dropdown ============ */
.country-code-select {
    position: absolute;
    left: 0;
    top: 0;
    width: 90px;
    height: 100%;
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 0 8px;
    appearance: none;
    cursor: pointer;
    outline: none;
}

.country-code-select:focus {
    border-color: var(--accent-cyan);
}

.phone-input-wrapper .neon-input {
    padding-left: 100px;
}

/* ============ Animated Checkbox ============ */
.neon-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
}

.neon-checkbox input {
    display: none;
}

.checkbox-visual {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.neon-checkbox input:checked + .checkbox-visual {
    border-color: var(--accent-cyan);
    background: var(--accent-cyan);
    animation: bounce-in 0.4s ease-out;
}

.checkbox-visual svg {
    color: var(--bg-primary);
    opacity: 0;
    transform: scale(0);
    transition: var(--transition-spring);
}

.neon-checkbox input:checked + .checkbox-visual svg {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* ============ Auth Links ============ */
.auth-footer {
    text-align: center;
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-normal);
}

.auth-footer a:hover {
    text-shadow: var(--glow-cyan);
}

/* ============ Login Typing Animation ============ */
.typing-welcome {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    min-height: 1.7rem;
    color: var(--text-primary);
}

.auth-logo.animate-slide-up {
    animation: slide-in-up 0.5s 0.05s both;
}

.typing-welcome.animate-slide-up {
    animation: slide-in-up 0.5s 0.15s both;
}

.auth-form-card.animate-slide-up {
    animation: card-enter 0.55s 0.2s cubic-bezier(0.34,1.4,0.64,1) both;
}

.step-indicators.animate-slide-up {
    animation: slide-in-up 0.5s 0.1s both;
}

.auth-footer.animate-slide-up {
    animation: slide-in-up 0.4s 0.45s both;
}

.typing-cursor {
    border-right: 3px solid var(--accent-cyan);
    animation: blink-cursor 0.7s step-end infinite;
    padding-right: 4px;
}
.fingerprint-visual {
    width: 80px;
    height: 80px;
    margin: 20px auto;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: var(--transition-normal);
}

.fingerprint-visual:hover {
    box-shadow: var(--glow-cyan);
    transform: scale(1.05);
}

.fingerprint-visual svg {
    color: var(--accent-cyan);
    width: 36px;
    height: 36px;
}

.fingerprint-scan-line {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    animation: fingerprint-scan 2s ease-in-out infinite;
}

@keyframes fingerprint-scan {
    0%, 100% { top: 20%; opacity: 0; }
    50% { top: 80%; opacity: 1; }
}

/* ============ Forgot Password Modal ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 36px;
    max-width: 420px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-spring);
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-normal);
}

.modal-close:hover { color: var(--accent-pink); }

.envelope-anim {
    width: 80px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

.envelope-body {
    width: 80px;
    height: 50px;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-cyan);
    border-radius: 4px 4px 8px 8px;
    position: absolute;
    bottom: 0;
}

.envelope-flap {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-top: 30px solid var(--accent-cyan);
    position: absolute;
    top: 0;
    transition: transform 0.5s ease;
    transform-origin: top;
}

.envelope-anim.sending .envelope-flap {
    transform: rotateX(180deg);
}

.envelope-anim.sending {
    animation: float 1s ease-in-out, fade-in 0.5s reverse forwards 1.5s;
}

/* ============ Confetti Container ============ */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confetti-fall var(--fall-duration, 3s) linear forwards;
}

/* ============ Floating Bubbles ============ */
.floating-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 243, 255, 0.15);
    animation: float-slow var(--duration, 6s) ease-in-out infinite;
}

/* ============ Responsive ============ */
@media (max-width: 992px) {
    .auth-split-left {
        display: none;
    }

    .auth-split-right {
        flex: 1;
        background: transparent;
    }
}

@media (max-width: 576px) {
    .auth-form-card {
        padding: 18px 16px;
        border-radius: var(--radius-lg);
    }

    .auth-split-right {
        padding: 16px;
    }

    .step-line {
        width: 28px;
    }
}

/* ── Auth-specific input size overrides ── */
.auth-form-card .neon-input-group {
    margin-bottom: 14px;
}

.auth-form-card .neon-input-group label {
    font-size: 0.65rem;
    margin-bottom: 5px;
}

.auth-form-card .neon-input {
    padding: 10px 13px;
    font-size: 0.88rem;
}

.auth-form-card .password-toggle {
    bottom: 10px;
}

.auth-form-card .mb-4 {
    margin-bottom: 14px !important;
}

.auth-form-card .mb-3 {
    margin-bottom: 10px !important;
}

.auth-form-card .my-4 {
    margin-top: 14px !important;
    margin-bottom: 14px !important;
}

.auth-form-card .mt-2 {
    margin-top: 10px !important;
}

.auth-form-card .signup-step > p.text-muted-cyber {
    margin-bottom: 12px !important;
    font-size: 0.78rem;
}

/* ── New Card Entrance Keyframe ── */
@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.97);
        box-shadow: 0 0 60px rgba(0,243,255,0.25), 0 0 0 1px rgba(0,243,255,0.2);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 1px rgba(0,243,255,0.05), 0 20px 60px rgba(0,0,0,0.4);
    }
}

/* ── Scan beam that sweeps down the card on entry ── */
@keyframes card-scan {
    0%   { top: 0;    opacity: 0; }
    10%  { opacity: 1; }
    80%  { opacity: 0.8; }
    100% { top: 100%; opacity: 0; }
}

/* ── Staggered input field reveals ── */
.auth-form-card .neon-input-group:nth-child(1) { animation: input-in 0.4s 0.25s both; }
.auth-form-card .neon-input-group:nth-child(2) { animation: input-in 0.4s 0.38s both; }
.auth-form-card .neon-input-group:nth-child(3) { animation: input-in 0.4s 0.51s both; }
.auth-form-card .neon-input-group:nth-child(4) { animation: input-in 0.4s 0.64s both; }
.auth-form-card .neon-input-group:nth-child(5) { animation: input-in 0.4s 0.77s both; }

@keyframes input-in {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Button cyber-charge shimmer on hover ── */
.auth-form-card .btn-neon-filled::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
    transform: translateX(-100%);
    pointer-events: none;
    z-index: 1;
}

.auth-form-card .btn-neon-filled:hover::before {
    transform: translateX(100%);
    transition: transform 0.45s ease;
}

/* ── Neon input hover lift ── */
.neon-input:hover:not(:focus) {
    border-color: rgba(0,243,255,0.25);
    background: rgba(20,20,40,0.65);
}

/* ── Auth right side: subtle animated grid ── */
.auth-split-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,243,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,243,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: grid-drift 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

.auth-split-right .auth-form-container {
    position: relative;
    z-index: 2;
}

@keyframes grid-drift {
    from { background-position: 0 0; }
    to   { background-position: 48px 48px; }
}

/* ============ Light Theme Overrides ============ */
[data-theme="light"] .auth-bg-gradient {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 144, 168, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(200, 0, 176, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(128, 0, 204, 0.03) 0%, transparent 50%);
}

[data-theme="light"] .auth-split-right {
    background: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .auth-illustration .orb {
    background: radial-gradient(circle at 30% 30%, rgba(0, 144, 168, 0.3), rgba(128, 0, 204, 0.15), rgba(200, 0, 176, 0.08));
    box-shadow: 0 0 40px rgba(0, 144, 168, 0.12), 0 0 80px rgba(128, 0, 204, 0.06);
}

[data-theme="light"] .auth-illustration .orb::before {
    border-color: rgba(0, 144, 168, 0.15);
}

[data-theme="light"] .auth-illustration .orb::after {
    border-color: rgba(200, 0, 176, 0.1);
}

[data-theme="light"] .orb-inner {
    background: radial-gradient(circle at 40% 40%, rgba(0, 144, 168, 0.4), transparent);
}

[data-theme="light"] .orb-ring {
    border-color: rgba(0, 144, 168, 0.08);
}

[data-theme="light"] .auth-form-card {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .step-dot.active {
    box-shadow: 0 0 12px rgba(0, 144, 168, 0.2);
}

[data-theme="light"] .step-line.active {
    box-shadow: 0 0 6px rgba(0, 144, 168, 0.15);
}

[data-theme="light"] .country-code-select {
    background: rgba(240, 242, 248, 0.9);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .modal-overlay {
    background: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .modal-content {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .bubble {
    border-color: rgba(0, 144, 168, 0.1);
}

[data-theme="light"] .confetti-piece {
    opacity: 0.85;
}
