

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 13, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: #0A101D;
    width: 100%;
    max-width: 440px;
    padding: 3rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px -10px rgba(6, 182, 212, 0.1);
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-modal-overlay.active .auth-modal {
    transform: translateY(0) scale(1);
}


.auth-modal-close, .auth-back-btn {
    position: absolute;
    top: 2rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-modal-close { right: 2rem; }
.auth-back-btn { left: 2rem; }

.auth-modal-close:hover, .auth-back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}


.auth-modal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.auth-modal-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #06b6d4;
}

.auth-modal-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.auth-modal-subtitle {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}


.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-form-label {
    display: block;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #475569;
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

.auth-form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.25rem;
    color: white;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

.auth-form-input.has-icon {
    padding-left: 3.25rem;
}

.auth-form-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    width: 1.25rem;
    height: 1.25rem;
}


.auth-password-toggle {
    position: relative;
    width: 100%;
}

.auth-password-toggle-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #475569;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 10;
}

.auth-password-toggle-btn:hover {
    color: #06b6d4;
}


.auth-btn-primary {
    width: 100%;
    padding: 1.25rem;
    background: #0891b2;
    color: white;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.4);
}

.auth-btn-primary:hover {
    background: #06b6d4;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(6, 182, 212, 0.5);
}

.auth-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}


.auth-code-inputs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 2.5rem 0;
}

.auth-code-input {
    width: 3.5rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #06b6d4;
    transition: all 0.3s ease;
}

.auth-code-input:focus {
    outline: none;
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.05);
}


.auth-helper-text {
    text-align: center;
    color: #64748b;
    font-size: 0.8125rem;
}

.auth-info-box {
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.1);
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.auth-info-box i {
    color: #06b6d4;
    flex-shrink: 0;
}

.auth-error-message, .auth-success-message {
    padding: 0.75rem;
    font-size: 0.75rem;
    text-align: center;
    margin-bottom: 1.5rem;
    display: none;
    border-radius: 2px;
}

.auth-error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.auth-success-message {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

.auth-error-message.active, .auth-success-message.active { 
    display: block; 
}


.auth-step-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.auth-step-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-loading {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}