/* Modern Auth UI/UX Enhancement - ReviewBD */
/* Phase 6: Login Experience Upgrade */

:root {
    /* Modern color palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #7c88f3;
    --secondary-color: #48bb78;
    --danger-color: #f56565;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f7fafc;
        --text-secondary: #cbd5e0;
        --text-muted: #718096;
        --bg-light: #1a202c;
        --bg-white: #2d3748;
        --border-color: #4a5568;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Enhanced Image Section */
.image-section {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Animated background pattern */
.image-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.03) 0px,
        rgba(255, 255, 255, 0.03) 1px,
        transparent 1px,
        transparent 15px
    );
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

/* Floating shapes for visual interest */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: 20%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    background: white;
    transform: rotate(45deg);
    top: 50%;
    right: 30%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(30px) rotate(240deg); }
}

/* Enhanced image content */
.image-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem;
    max-width: 600px;
}

.image-content h2 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Feature highlights */
.feature-highlights {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.95rem;
    opacity: 0.9;
}

.feature-item i {
    font-size: 1.2rem;
}

/* Enhanced form section */
.form-section {
    background: var(--bg-white);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

/* Form container with glassmorphism effect */
.form-container {
    width: 100%;
    max-width: 420px;
    background: var(--bg-white);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

/* Form header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

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

/* Enhanced form groups */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group.has-error .form-control {
    border-color: var(--danger-color);
}

.form-group.has-success .form-control {
    border-color: var(--secondary-color);
}

/* Modern input styling */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-control {
    width: 100%;
    padding: 1rem 3.5rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition-base);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Floating labels */
.form-label {
    position: absolute;
    left: 3.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-base);
    background: var(--bg-white);
    padding: 0 0.5rem;
}

.form-control:focus ~ .form-label,
.form-control:not(:placeholder-shown) ~ .form-label {
    top: 0;
    font-size: 0.875rem;
    color: var(--primary-color);
}

/* Enhanced icons */
.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    transition: var(--transition-base);
    z-index: 1;
}

.form-control:focus ~ .input-icon {
    color: var(--primary-color);
}

/* Password visibility toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-base);
    padding: 0.5rem;
    z-index: 1;
}

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

/* Enhanced checkbox */
.form-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-base);
    cursor: pointer;
}

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

.form-check-label {
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

/* Enhanced forgot password link */
.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-base);
    position: relative;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.forgot-password:hover::after {
    width: 100%;
}

/* Enhanced submit button */
.btn-signin {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-signin::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-signin:hover::before {
    transform: translateX(0);
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-signin:active {
    transform: translateY(0);
}

.btn-signin:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading state */
.btn-signin.loading {
    color: transparent;
}

.btn-signin.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

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

/* Social login section - Removed as per user request */
/* If you want to re-enable social login, uncomment the CSS below */
/*
.social-login {
    margin-top: 2rem;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    gap: 1rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-social {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-social:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.btn-social i {
    font-size: 1.25rem;
}
*/

/* Sign up link */
.signup-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.signup-text {
    color: var(--text-secondary);
}

.signup-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
}

.signup-link:hover {
    text-decoration: underline;
}

/* Alert messages */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

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

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.alert-error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(245, 101, 101, 0.2);
}

.alert i {
    font-size: 1.25rem;
}

/* Language switcher enhancement */
.language-switcher {
    margin-top: 2rem;
}

/* Override Bootstrap dropdown styles */
.language-switcher .btn-secondary,
.language-switcher .btn-secondary:focus,
.language-switcher .btn-secondary:active {
    background: transparent !important;
    border-color: transparent !important;
}

.language-switcher .dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-base);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.language-switcher .dropdown-toggle:hover,
.language-switcher .dropdown-toggle:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.language-switcher .dropdown-toggle::after {
    margin-left: 0.5rem;
}

.language-switcher .dropdown-menu {
    border-radius: 12px !important;
    border: none !important;
    box-shadow: var(--shadow-xl) !important;
    padding: 0.5rem !important;
    background: white !important;
    background-color: white !important;
    min-width: 200px !important;
}

.language-switcher .dropdown-menu li {
    list-style: none !important;
}

.language-switcher .dropdown-item {
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    transition: var(--transition-base) !important;
    color: #333333 !important;
    background-color: transparent !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
}

.language-switcher .dropdown-item span {
    color: #333333 !important;
}

.language-switcher .dropdown-item:hover {
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.language-switcher .dropdown-item:hover span {
    color: var(--primary-color) !important;
}

.language-switcher .dropdown-item:active,
.language-switcher .dropdown-item:focus {
    background: var(--primary-color) !important;
    background-color: var(--primary-color) !important;
    color: white !important;
    text-decoration: none !important;
}

.language-switcher .dropdown-item:active span,
.language-switcher .dropdown-item:focus span {
    color: white !important;
}

/* Trust indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.trust-item i {
    color: var(--secondary-color);
}

/* Responsive design */
@media (max-width: 991.98px) {
    .image-section {
        display: none;
    }
    
    .form-section {
        min-height: 100vh;
        padding: 2rem;
    }
    
    .form-container {
        box-shadow: none;
        padding: 2rem;
    }
}

@media (max-width: 575.98px) {
    .form-section {
        padding: 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.75rem;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .btn-social {
        width: 100%;
    }
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .image-section,
    .language-switcher,
    .social-login,
    .trust-indicators {
        display: none;
    }
}