/* Authentication Pages CSS - Login, Register, Password Reset, etc. */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: var(--gradient-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Authentication Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* Authentication Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* Authentication Header */
.auth-header {
    text-align: center;
    padding: 2rem 2rem 1rem 2rem;
}

.auth-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

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

/* Authentication Form */
.auth-form {
    padding: 1rem 2rem 2rem 2rem;
}

.form-floating {
    margin-bottom: 1.5rem;
}

.form-floating .form-control {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-floating .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-floating label {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Authentication Buttons */
.auth-btn {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: 100%;
    color: white;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
    color: white;
}

.auth-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    color: white;
}

/* Secondary Auth Button */
.auth-btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: 100%;
}

.auth-btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* Authentication Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

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

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

/* Back to Home Button */
.back-to-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.back-to-home .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-home .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

/* Error Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Success Messages */
.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Form Check (Remember Me, Terms) */
.form-check {
    margin-bottom: 1rem;
}

.form-check-input {
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-check-label {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak .strength-fill {
    background: var(--danger-color);
    width: 25%;
}

.strength-fair .strength-fill {
    background: var(--accent-color);
    width: 50%;
}

.strength-good .strength-fill {
    background: #3b82f6;
    width: 75%;
}

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

/* Social Login Buttons */
.social-login {
    margin: 1.5rem 0;
}

.social-btn {
    width: 100%;
    padding: 12px 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    color: var(--dark-color);
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.social-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover {
    border-color: #db4437;
    color: #db4437;
}

.social-btn.facebook:hover {
    border-color: #4267B2;
    color: #4267B2;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-card {
        margin: 1rem;
        border-radius: 16px;
    }

    .auth-header {
        padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    }

    .auth-form {
        padding: 0.5rem 1.5rem 1.5rem 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .back-to-home {
        top: 1rem;
        left: 1rem;
    }

    .auth-logo {
        height: 50px;
    }
}

@media (max-width: 576px) {
    .auth-card {
        margin: 0.5rem;
        border-radius: 12px;
    }

    .auth-header {
        padding: 1rem 1rem 0.5rem 1rem;
    }

    .auth-form {
        padding: 0.5rem 1rem 1rem 1rem;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .auth-logo {
        height: 40px;
    }

    .back-to-home {
        top: 0.5rem;
        left: 0.5rem;
    }

    .back-to-home .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.6s ease-out;
}

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

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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