/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem 1rem;
}

/* Background */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -2;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/* Auth Content */
.auth-content {
    width: 100%;
    max-width: 800px;
    z-index: 1;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Form Styles */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 0.75rem;
    display: block;
    font-size: 1.2rem;
}

.input-group {
    position: relative;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-right: none;
    color: #6c757d;
    min-width: 60px;
    justify-content: center;
    font-size: 1.2rem;
}

.form-control {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #adb5bd;
    box-shadow: none;
    outline: none;
}

.input-group .form-control {
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .input-group-text {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

/* Password Toggle */
.btn-outline-secondary {
    border: 1px solid #dee2e6;
    border-left: none;
    color: #6c757d;
    background-color: #f8f9fa;
}

.btn-outline-secondary:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
}

.form-check-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-password:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 1.5rem 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.auth-btn:active {
    transform: translateY(0);
}

/* Auth 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-color: #dee2e6;
}

.auth-divider span {
    background-color: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: white;
    color: #6c757d;
    font-weight: 500;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.social-btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
}

.social-btn i {
    font-size: 1.2rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.auth-footer p {
    color: #6c757d;
    margin: 0;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33.33%;
    background-color: #dc3545;
}

.strength-fill.medium {
    width: 66.66%;
    background-color: #ffc107;
}

.strength-fill.strong {
    width: 100%;
    background-color: #28a745;
}

.strength-text {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Validation Styles */
.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: none;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

/* Loading States */
.btn-loading {
    display: none;
}

.auth-btn.loading .btn-text {
    display: none;
}

.auth-btn.loading .btn-loading {
    display: inline-flex;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2.5rem 1.5rem;
    }
    
    .auth-title {
        font-size: 2rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .social-login {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1rem;
    }
    
    .auth-logo {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
}

/* Animation for form elements */
.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

/* Register page specific optimizations */
body[data-page="register"] .auth-content {
    max-width: 900px;
}

body[data-page="register"] .auth-card {
    padding: 3rem;
}

body[data-page="register"] .form-group {
    margin-bottom: 1rem;
}

body[data-page="register"] .auth-header {
    margin-bottom: 1.25rem;
}

body[data-page="register"] .auth-logo {
    width: 90px;
    height: 90px;
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

body[data-page="register"] .auth-title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

body[data-page="register"] .auth-subtitle {
    font-size: 1.1rem;
}

body[data-page="register"] .form-options {
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

body[data-page="register"] .auth-divider {
    margin: 1rem 0;
}

body[data-page="register"] .social-login {
    margin-bottom: 1rem;
    gap: 0.5rem;
}

body[data-page="register"] .auth-footer {
    padding-top: 0.75rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 