/* ============================================
   AI StudyHub - Authentication Styles
   ============================================ */

.auth-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 1000;
}

.auth-page {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.auth-page.active { display: flex; }

/* Background Animation */
.auth-bg-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: float 20s infinite ease-in-out;
}
.shape-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; right: -100px; animation-delay: 0s; }
.shape-2 { width: 300px; height: 300px; background: var(--accent); bottom: -80px; left: -50px; animation-delay: -5s; }
.shape-3 { width: 200px; height: 200px; background: var(--success); top: 50%; left: 20%; animation-delay: -10s; }
.shape-4 { width: 250px; height: 250px; background: var(--warning); bottom: 20%; right: 20%; animation-delay: -15s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(30px, -40px) rotate(90deg) scale(1.1); }
    50% { transform: translate(-20px, 30px) rotate(180deg) scale(0.95); }
    75% { transform: translate(40px, 20px) rotate(270deg) scale(1.05); }
}

/* Auth Card */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: var(--space-2xl);
    margin: var(--space-md);
}

.auth-logo {
    text-align: center;
    margin-bottom: var(--space-xl);
}
.auth-logo .logo-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: var(--space-sm);
    display: block;
    animation: pulse-icon 2s infinite;
}
@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.auth-logo h1 {
    font-size: var(--font-size-2xl);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-subtitle {
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

/* Auth Form */
.auth-form .form-group {
    position: relative;
}
.auth-form .form-group .form-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 20px;
    z-index: 1;
}
.auth-form .form-group input,
.auth-form .form-group select {
    padding-left: 42px;
}
.auth-form .form-group label {
    display: none;
}
.auth-form .form-group .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 20px;
    z-index: 1;
}
.auth-form .form-group .toggle-password:hover { color: var(--text-primary); }

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--text-secondary);
}
.checkbox-label input { display: none; }
.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.checkbox-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}
.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}
.forgot-link { color: var(--primary); font-size: var(--font-size-sm); }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-md) 0;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}
.auth-switch a { font-weight: 600; }

/* Avatar Upload */
.avatar-upload { text-align: center; }
.avatar-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}
.avatar-label input { display: none; }
.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all var(--transition-fast);
    background: var(--bg-tertiary);
}
.avatar-preview:hover { border-color: var(--primary); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview .material-icons { font-size: 32px; color: var(--text-tertiary); }
