/**
 * Modern Authentication Pages Styling
 * Beautiful, attractive, and modern design
 */

:root {
    --auth-primary: #1bbd36;
    --auth-primary-dark: #159c2d;
    --auth-primary-light: #2ae149;
    --auth-secondary: #47b2e4;
    --auth-danger: #dc3545;
    --auth-success: #28a745;
    --auth-warning: #ffc107;
}

/* Modern Gradient Background with Animation */
body.auth-page {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(-45deg, #1bbd36, #2ae149, #47b2e4, #1bbd36);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* RTL Scrollbar */
body.auth-page[dir="rtl"] {
    direction: rtl;
}

/* Custom Scrollbar for Webkit (Chrome, Safari, Edge) */
body.auth-page::-webkit-scrollbar {
    width: 10px;
}

body.auth-page::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

body.auth-page::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

body.auth-page::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
    background-clip: padding-box;
}

/* Firefox Scrollbar */
body.auth-page {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* RTL Scrollbar Position */
body.auth-page[dir="rtl"]::-webkit-scrollbar {
    left: 0;
    right: auto;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Particles Background */
body.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0.3; transform: translateY(0px); }
    50% { opacity: 0.6; transform: translateY(-20px); }
}

/* Auth Container with Modern Card */
.auth-container {
    max-width: 500px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 10;
}

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

/* Glass-morphism Card Effect */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

/* Modern Header with Gradient */
.auth-header {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    padding: 50px 30px 40px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: headerPulse 4s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.auth-logo {
    max-width: 200px;
    margin-bottom: 25px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-header p {
    font-size: 17px;
    opacity: 0.95;
    margin: 0;
    position: relative;
    z-index: 2;
}

/* Auth Body */
.auth-body {
    padding: 45px 35px;
}

/* Modern Form Elements */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    padding: 14px 18px;
    border: 2px solid #e8ecef;
    border-radius: 15px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(27, 189, 54, 0.1);
    background: white;
    transform: translateY(-2px);
}

.input-group {
    position: relative;
}

.input-group-text {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e8ecef;
    border-right: 0;
    color: var(--auth-primary);
    font-size: 18px;
    padding: 0 15px;
    border-radius: 15px 0 0 15px;
}

.input-group .form-control {
    border-left: 0;
    border-radius: 0 15px 15px 0;
}

[dir="rtl"] .input-group-text {
    border-left: 0;
    border-right: 2px solid #e8ecef;
    border-radius: 0 15px 15px 0;
}

[dir="rtl"] .input-group .form-control {
    border-right: 0;
    border-left: 2px solid #e8ecef;
    border-radius: 15px 0 0 15px;
}

/* Modern Primary Button with Gradient and Animation */
.btn-primary {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    border: none;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(27, 189, 54, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(27, 189, 54, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Custom Checkbox */
.form-check-input {
    width: 22px;
    height: 22px;
    border: 2px solid #e8ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(27, 189, 54, 0.1);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    margin-left: 8px;
    color: #5a6c7d;
}

/* Modern Divider */
.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e8ecef, transparent);
}

.divider span {
    background: white;
    padding: 0 20px;
    position: relative;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modern Social Login Buttons */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-social {
    padding: 14px 20px;
    border: 2px solid #e8ecef;
    background: white;
    border-radius: 15px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #5a6c7d;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

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

.btn-social:hover {
    background: #f8f9fa;
    border-color: var(--auth-primary);
    color: var(--auth-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.btn-social i {
    font-size: 18px;
}

/* Modern Footer */
.auth-footer {
    text-align: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 15px;
    color: #5a6c7d;
}

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

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

/* Modern Alert Messages */
.alert {
    border-radius: 15px;
    border: none;
    padding: 16px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInDown 0.4s ease-out;
}

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

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert i {
    font-size: 20px;
}

/* Language Switcher in Auth Pages */
.language-switcher-auth {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 100;
}

[dir="rtl"] .language-switcher-auth {
    left: 25px;
    right: auto;
}

.language-switcher-auth .dropdown-toggle {
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.4);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.language-switcher-auth .dropdown-toggle:hover {
    background: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Password Strength Indicator */
.password-strength {
    height: 6px;
    border-radius: 10px;
    background: #e8ecef;
    margin-top: 10px;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

.password-strength::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 10px;
    transition: all 0.4s ease;
}

.password-strength.weak::after {
    background: linear-gradient(90deg, #dc3545, #ff6b7a);
    width: 33%;
}

.password-strength.medium::after {
    background: linear-gradient(90deg, #ffc107, #ffdb4d);
    width: 66%;
}

.password-strength.strong::after {
    background: linear-gradient(90deg, #28a745, #48d56b);
    width: 100%;
}

/* Social Info Card */
.social-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border: 2px solid rgba(27, 189, 54, 0.1);
}

.social-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.social-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.social-provider {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-primary);
    margin-top: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.provider-icon {
    font-size: 20px;
}

/* Help Text */
.help-text {
    font-size: 13px;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

/* Back to Website Link */
.auth-container .text-center.mt-4 a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.auth-container .text-center.mt-4 a:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 576px) {
    body.auth-page {
        padding: 20px 10px;
        align-items: flex-start;
    }
    
    .auth-container {
        max-width: 100%;
        padding: 0;
        margin: 20px 0;
    }
    
    .auth-card {
        border-radius: 20px;
    }
    
    .auth-header {
        padding: 35px 20px 30px;
    }
    
    .auth-header h1 {
        font-size: 26px;
    }
    
    .auth-body {
        padding: 30px 20px;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .language-switcher-auth {
        top: 15px;
        right: 15px;
    }
    
    [dir="rtl"] .language-switcher-auth {
        left: 15px;
        right: auto;
    }
    
    /* Mobile Scrollbar */
    body.auth-page::-webkit-scrollbar {
        width: 6px;
    }
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Smooth Transitions for All Interactive Elements */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

input, button, select, textarea {
    transition: all 0.3s ease;
}
