/* login.css - Login Form Styles with Animations */

/* BODY SCROLL FIX */
html,
body {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto !important;
}

/* LOGIN CONTAINER */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

/* ============================================
   INTERACTIVE PARTICLES CANVAS
   ============================================ */
.particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* GLOWING BACKGROUND ORBS */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 15s ease-in-out infinite;
}

.glow-orb-1 {
    top: 10%;
    left: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(180, 100, 255, 0.25) 0%, transparent 70%);
    animation-delay: 0s;
}

.glow-orb-2 {
    bottom: 10%;
    right: 5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(120, 80, 255, 0.2) 0%, transparent 70%);
    animation-delay: -5s;
}

.glow-orb-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(200, 100, 255, 0.15) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    25% {
        transform: translate(30px, -40px) scale(1.1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-20px, 30px) scale(0.9);
        opacity: 0.5;
    }

    75% {
        transform: translate(40px, 20px) scale(1.05);
        opacity: 0.7;
    }
}

/* LOGIN CARD - GLASSMORPHISM */
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 15, 25, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(180, 100, 255, 0.25);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow:
        0 0 80px rgba(180, 100, 255, 0.15),
        0 25px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: cardAppear 0.6s ease-out;
    margin: 1rem 0;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* HEADER */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--muted-foreground);
    font-size: 1rem;
}

/* FORM */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* FORM GROUPS */
.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--foreground);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder {
    color: var(--muted-foreground);
    opacity: 0.6;
}

.form-group input:focus {
    border-color: var(--accent);
    background: rgba(180, 100, 255, 0.05);
    box-shadow:
        0 0 0 3px rgba(180, 100, 255, 0.15),
        0 0 20px rgba(180, 100, 255, 0.1);
}

/* INPUT ICONS */
.input-icon {
    position: absolute;
    left: 1rem;
    top: 2.5rem;
    font-size: 1rem;
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s;
}

.form-group input:focus~.input-icon {
    opacity: 1;
}

/* PASSWORD TOGGLE */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 2.35rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.password-toggle:hover {
    opacity: 1;
}

/* ERROR STATES */
.form-group.error input {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.2),
        0 0 25px rgba(239, 68, 68, 0.15);
    animation: shake 0.5s ease-in-out;
}

.form-group.error label {
    color: #ef4444;
}

.form-group.error .input-icon {
    filter: hue-rotate(-60deg) saturate(2);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* ERROR MESSAGE */
.error-message {
    display: none;
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.375rem;
    padding-left: 0.25rem;
}

.form-group.error .error-message {
    display: block;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SUCCESS STATE */
.form-group.success input {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* ============================================
   ERROR POINTER - NEON CURSOR
   ============================================ */
.error-pointer {
    position: fixed;
    width: 64px;
    height: 64px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform-origin: bottom center;
    transition: opacity 0.3s ease;
}

.error-pointer.visible {
    opacity: 1;
}

.error-pointer.moving {
    filter:
        drop-shadow(0 0 15px var(--accent)) drop-shadow(8px 8px 4px rgba(180, 100, 255, 0.4)) drop-shadow(16px 16px 6px rgba(180, 100, 255, 0.25)) drop-shadow(24px 24px 8px rgba(180, 100, 255, 0.1));
}

.error-pointer svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(180, 100, 255, 0.8));
}

@keyframes pointerBounce {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.error-pointer.pointing {
    animation: pointerBounce 0.6s ease-in-out;
}

@keyframes pointerTap {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(8px) scale(1.05);
    }
}

.error-pointer.tapping {
    animation: pointerTap 0.3s ease-in-out;
}

/* ============================================
   SUBMIT BUTTON 
   ============================================ */
.submit-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--accent), hsl(300, 100%, 60%));
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(180, 100, 255, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: block;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* SIGNUP LINK */
.signup-link {
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-top: 1rem;
}

.signup-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.signup-link a:hover {
    text-shadow: 0 0 10px var(--accent);
}

/* ============================================
   RESPONSIVE 
   ============================================ */
@media (max-width: 520px) {
    .login-card {
        padding: 1.5rem 1.25rem;
    }

    .login-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   SUCCESS OVERLAY 
   ============================================ */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.success-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.success-content {
    text-align: center;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: pulse 1s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(34, 197, 94, 0);
    }
}

.success-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.success-message {
    color: var(--muted-foreground);
}

/* ============================================
   FORGOT PASSWORD LINK
   ============================================ */
.forgot-password-link {
    text-align: center;
    margin-top: 0.75rem;
}

.forgot-password-link a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.forgot-password-link a:hover {
    text-shadow: 0 0 10px var(--accent);
}

/* ============================================
   FORGOT PASSWORD MODAL OVERLAY
   ============================================ */
.forgot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
    overflow-y: auto;
}

.forgot-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.forgot-modal {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(15, 15, 25, 0.98);
    border: 1px solid rgba(180, 100, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow:
        0 0 60px rgba(180, 100, 255, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.forgot-overlay.visible .forgot-modal {
    transform: scale(1) translateY(0);
}

.forgot-back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.forgot-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.forgot-back-btn svg {
    width: 20px;
    height: 20px;
    color: var(--muted-foreground);
}

.forgot-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
}

.forgot-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(180, 100, 255, 0.2), rgba(180, 100, 255, 0.05));
    border: 1px solid rgba(180, 100, 255, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forgot-icon svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.forgot-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.forgot-subtitle {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ============================================
   OTP INPUT STYLES (Reusing from signup)
   ============================================ */
.otp-input-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin: 1.25rem 0;
}

.otp-digit {
    width: 44px;
    height: 54px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--foreground);
    transition: all 0.2s;
    outline: none;
}

.otp-digit:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(180, 100, 255, 0.2);
    background: rgba(180, 100, 255, 0.05);
}

.otp-digit.filled {
    border-color: var(--accent);
    background: rgba(180, 100, 255, 0.1);
}

.otp-digit.error {
    border-color: #ef4444;
    animation: shake 0.5s ease;
}

.otp-separator {
    font-size: 1.5rem;
    color: var(--muted-foreground);
    margin: 0 0.25rem;
}

/* ============================================
   FORGOT TIMER
   ============================================ */
.forgot-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.forgot-timer svg {
    width: 16px;
    height: 16px;
}

.forgot-timer strong {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   PASSWORD HELPER (Reusing from signup)
   ============================================ */
.password-helper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.helper-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted-foreground);
    transition: color 0.3s;
}

.requirement.met {
    color: #22c55e;
}

.check-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.check-svg {
    width: 100%;
    height: 100%;
}

.check-circle {
    fill: none;
    stroke: var(--border);
    stroke-width: 2;
    transition: all 0.3s;
}

.check-mark {
    fill: none;
    stroke: transparent;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s;
}

.requirement.met .check-circle {
    fill: #22c55e;
    stroke: #22c55e;
}

.requirement.met .check-mark {
    stroke: #fff;
}

/* ============================================
   FORGOT BUTTONS
   ============================================ */
.forgot-btn {
    width: 100%;
    padding: 0.875rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--accent), hsl(300, 100%, 60%));
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.forgot-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.forgot-btn:hover::before {
    left: 100%;
}

.forgot-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(180, 100, 255, 0.4);
}

.forgot-btn.loading .btn-text {
    opacity: 0;
}

.forgot-btn.loading .btn-loader {
    display: block;
}

.forgot-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   FORGOT ERROR MESSAGE
   ============================================ */
.forgot-error {
    color: #ef4444;
    font-size: 0.85rem;
    text-align: center;
    margin: 0.5rem 0;
    min-height: 1.2em;
}

/* ============================================
   FORGOT RESEND
   ============================================ */
.forgot-resend {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.forgot-resend-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    transition: all 0.2s;
}

.forgot-resend-btn:hover {
    text-shadow: 0 0 10px var(--accent);
}

.forgot-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE FOR FORGOT MODAL
   ============================================ */
@media (max-width: 520px) {
    .forgot-modal {
        padding: 1.5rem;
    }

    .otp-digit {
        width: 38px;
        height: 48px;
        font-size: 1.25rem;
    }

    .forgot-title {
        font-size: 1.25rem;
    }
}