/* login.css */

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    position: relative;
    z-index: 2000;
}

.auth-glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 240, 255, 0.05);
}

/* Header & AI Orb */
.auth-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 2000;
}

.auth-ai-orb {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-cyan) 10%, var(--purple-glow) 70%, transparent 100%);
    animation: orb-pulse 3s infinite alternate ease-in-out;
}

@keyframes orb-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 15px rgba(0, 240, 255, 0.3); }
    100% { transform: scale(1.05); box-shadow: 0 0 30px rgba(0, 240, 255, 0.6), 0 0 50px rgba(138, 43, 226, 0.4); }
}


.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 5px;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--text-main), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* text-align: right; */
}

.auth-header .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    text-align: right;
}


/* Form Steps */
.auth-step {
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 2000;
}

.auth-step.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.auth-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slide-up 0.4s ease forwards;
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Inputs */
.input-group {
    margin-bottom: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: left;
    direction: ltr;
}

.input-group input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}
[dir="rtl"] .input-group input {
    text-align: right;
}

[dir="ltr"] .otp-input {
    direction: ltr;
}


/* --- Inputs --- */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}


.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    right: 1rem;
    color: var(--text-dim);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    color: var(--text-main);
}
.auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(188, 19, 254, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.input-with-icon input {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    outline: none;
    transition: var(--transition-smooth);
}

.input-with-icon input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

/* Inline Status */
.status-indicator {
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 0.75rem;
    transition: opacity 0.2s ease;
}

.status-indicator.login-status-error { color: var(--status-crit); text-align: center; }
.status-indicator.login-status-success { color: var(--status-success); text-align: center;}

/* Buttons */
.login-btn-primary {
    font-family: var(--font-family);
    width: 100%;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-btn-primary:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    text-shadow: 0 0 5px var(--accent-cyan);
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Verify Step Specifics */
.verify-header {
    text-align: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.verify-header strong {
    color: var(--text-main);
    letter-spacing: 1px;
}

#user-display {
    color: var(--accent-cyan);
    letter-spacing: 1px;
    direction: ltr;
    display: inline-block;
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--gold-accent);
    font-size: 0.8rem;
    margin-top: 8px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
    font-family: inherit;
}

.btn-text-only:hover {
    color: var(--text-main-hover);
}

/* OTP Inputs (7 digits layout) */
.otp-container {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 25px;
    direction: ltr;
}

.otp-input {
    width: 45px;
    height: 55px;
    background: var(--dark-cover);
    border: 1px solid var(--light-cover);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 1.2rem;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.otp-input:focus {
    border-color: var(--accent-purple-neon);
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.4);
    transform: translateY(-2px);
}

#otp-status {
    display: block;
    text-align: center;
    margin-top: -15px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    height: 15px;
    position: relative;
    bottom: auto;
    right: auto;
}

/* Timer */
.resend-timer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

#countdown {
    color: var(--accent-gold);
    font-weight: monospace;
    margin-right: 5px;
    direction: ltr;
    display: inline-block;
}

/* Responsive constraints */
@media (max-width: 400px) {
    .glass-card {
        padding: 30px 15px;
    }
    .otp-input {
        width: 32px;
        height: 40px;
        font-size: 1rem;
    }
    .otp-container {
        gap: 2px;
    }
}
