/* auth.css - Beautiful authentication UI styles */

.auth-ui-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    box-sizing: border-box;
}

.auth-ui-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

.auth-ui-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(252, 70, 107, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(251, 179, 77, 0.2), transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }
}

.auth-ui-content {
    position: relative;
    width: 100%;
    max-width: 560px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.auth-ui-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-radius: 40px;
    padding: 40px 36px;
    box-shadow: 0 10px 24px rgba(42, 22, 86, 0.12);
    width: 100%;
    max-width: 440px;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
}

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

.auth-ui-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-wordmark-img {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px 0;
    text-align: center;
}

.auth-form-subtitle {
    font-size: 14px;
    color: #718096;
    margin: 0 0 24px 0;
    text-align: center;
    line-height: 1.5;
    display: none;
}

.auth-error {
    display: none;
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.auth-success {
    display: none;
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-form-group {
    margin-bottom: 0;
}

.auth-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #1a202c;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-input::placeholder {
    color: #a0aec0;
}

.auth-forgot-link {
    display: inline-block;
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0;
    align-self: flex-end;
    padding: 0;
    transition: color 0.2s ease;
}

.auth-forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.auth-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn-google {
    background: white;
    color: #3c4043;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    margin-top: 16px;
}

.auth-btn-google:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-google-icon {
    width: 20px;
    height: 20px;
}

.auth-btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 20px;
    color: #a0aec0;
    font-size: 14px;
    flex-shrink: 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 12px;
}

.auth-toggle-text {
    text-align: center;
    margin-top: 16px;
    color: #718096;
    font-size: 14px;
}

.auth-toggle-link {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.auth-toggle-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    text-decoration: none;
}

.auth-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
    padding: 0;
    transition: color 0.2s ease;
}

.auth-back-btn:hover {
    color: #764ba2;
}

.auth-password-requirements {
    margin-top: 12px;
    padding: 14px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.password-requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #718096;
    margin-bottom: 6px;
    transition: color 0.2s ease;
}

.password-requirement:last-child {
    margin-bottom: 0;
}

.password-requirement i {
    font-size: 8px;
    color: #cbd5e0;
    transition: color 0.2s ease;
}

.password-requirement.met {
    color: #38a169;
}

.password-requirement.met i {
    color: #38a169;
}


.auth-btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.35);
    margin-top: 12px;
}

.auth-btn-secondary:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.08);
    border-color: #667eea;
    transform: translateY(-1px);
}

.auth-btn-secondary:active:not(:disabled) {
    transform: translateY(0);
}

/* Dark mode support */
[data-theme="dark"] .auth-ui-card {
    background: rgba(30, 30, 30, 0.98);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .auth-form-title {
    color: #e2e8f0;
}

[data-theme="dark"] .auth-form-subtitle {
    color: #a0aec0;
}

[data-theme="dark"] .auth-label {
    color: #cbd5e0;
}

[data-theme="dark"] .auth-input {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .auth-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .auth-btn-google {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .auth-btn-google:hover:not(:disabled) {
    background: #374151;
    border-color: #667eea;
}

[data-theme="dark"] .auth-password-requirements {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
    border-color: #4a5568;
}

/* Responsive design */
@media (max-width: 640px) {
    .auth-ui-card {
        padding: 32px 24px;
        border-radius: 32px;
    }
    
    .auth-form-title {
        font-size: 20px;
    }
    
    .auth-wordmark-img {
        height: 48px;
    }
    
    .auth-ui-logo {
        margin-bottom: 20px;
    }
}

