
/* ========================================
   AUTH.CSS - Authentication Styles
   ======================================== */

/* Authentication Section */
.auth-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    background: var(--surface-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease;
}

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

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Auth Form */
.auth-form {
    animation: fadeIn 0.3s ease;
}

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

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Input Groups */
.auth-form .input-group {
    margin-bottom: 1rem;
    border-radius: 12px;
}

.auth-form .input-group-text {
    padding: 1rem;
    background: var(--background-color);
    color: var(--text-secondary);
}

.auth-form .form-control {
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
}

.auth-form .form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Error Message */
.error-message {
    background: #FFEBEE;
    color: var(--error-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    animation: shake 0.5s ease;
}

body.dark-mode .error-message {
    background: rgba(244, 67, 54, 0.1);
}

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

.error-message i {
    font-size: 1.2rem;
}

.error-text {
    flex: 1;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--primary-color);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
    animation: btnPulse 0.3s ease;
}

@keyframes btnPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

/* Button Loading State */
.auth-btn .btn-text,
.auth-btn .btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-btn .btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-btn.loading .btn-text {
    opacity: 0;
    visibility: hidden;
}

.auth-btn.loading .btn-spinner {
    opacity: 1;
    visibility: visible;
}

.auth-btn:not(.loading) .btn-spinner {
    opacity: 0;
    visibility: hidden;
}

/* Switch Auth Links */
.switch-auth {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Form Toggle Animation */
.auth-form.hide {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.auth-form.show {
    animation: fadeInRight 0.3s ease forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Input Focus Effects */
.auth-form .input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
}

.auth-form .input-group:focus-within .input-group-text {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-container {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .auth-logo {
        font-size: 3rem;
    }
    
    .auth-title {
        font-size: 1.7rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .form-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 400px) {
    .auth-section {
        padding: 0.5rem;
    }
    
    .auth-container {
        padding: 1.5rem 1rem;
    }
    
    .auth-logo {
        font-size: 2.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}

/* Dark Mode Specific Styles */
body.dark-mode .auth-section {
    background: linear-gradient(135deg, #1a237e 0%, #311b92 100%);
}

body.dark-mode .auth-container {
    background: var(--surface-color);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

body.dark-mode .auth-form .input-group-text {
    background: var(--background-color);
}

/* Success State (for future use) */
.auth-success {
    background: #E8F5E9;
    color: var(--success-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    animation: slideDown 0.5s ease;
}

body.dark-mode .auth-success {
    background: rgba(76, 175, 80, 0.1);
}

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

/* Password Strength Indicator (for future use) */
.password-strength {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: var(--error-color);
}

.password-strength-bar.medium {
    width: 66%;
    background: var(--warning-color);
}

.password-strength-bar.strong {
    width: 100%;
    background: var(--success-color);
}

/* Forgot Password Link (for future use) */
.forgot-password {
    text-align: right;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.forgot-password a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.forgot-password a:hover {
    color: var(--primary-color);
}