/* Modern Authentication Pages Styles */

/* Auth Container */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, 
        rgba(52, 152, 219, 0.1) 0%, 
        rgba(155, 89, 182, 0.1) 25%,
        rgba(24, 188, 156, 0.1) 50%,
        rgba(52, 152, 219, 0.1) 75%,
        rgba(155, 89, 182, 0.1) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    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="dots" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="1" fill="rgba(52,152,219,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    animation: slideInUp 0.8s ease-out;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px 25px 0 0;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 3rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #636e72;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Form Groups */
.form-group-auth {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label-auth {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #2d3436;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control-auth {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}

.form-control-auth:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.form-control-auth:hover {
    border-color: #ced4da;
    background: white;
}

.form-control-auth.is-invalid {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.form-control-auth.is-valid {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

/* Input with Icons */
.input-group-auth {
    position: relative;
}

.input-icon-auth {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #636e72;
    font-size: 1rem;
    z-index: 1;
    transition: all 0.3s ease;
}

.input-group-auth .form-control-auth {
    padding-left: 3.5rem;
}

.input-group-auth .form-control-auth:focus + .input-icon-auth,
.input-group-auth .form-control-auth:hover + .input-icon-auth {
    color: var(--primary-color);
}

/* Password Field */
.password-field-auth {
    position: relative;
}

.password-toggle-auth {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #636e72;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 5px;
    z-index: 1;
    transition: all 0.3s ease;
}

.password-toggle-auth:hover {
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

/* Multi-column Form */
.form-row-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Submit Button */
.btn-auth {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-auth-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.btn-auth-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.4);
    color: white;
}

.btn-auth-primary:active {
    transform: translateY(-1px);
}

.btn-auth-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
}

.btn-auth-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.3);
}

.btn-auth-secondary:active {
    transform: translateY(-1px);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading State */
.btn-auth.loading {
    color: transparent !important;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Messages */
.alert-auth {
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    animation: slideInDown 0.5s ease-out;
}

.alert-auth.alert-danger {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(192, 57, 43, 0.1));
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

.alert-auth.alert-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(0, 184, 148, 0.1));
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    margin: 0;
    color: #636e72;
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength-auth {
    margin-top: 0.75rem;
}

.strength-bar-auth {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill-auth {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak .strength-fill-auth {
    width: 25%;
    background: #e74c3c;
}

.strength-medium .strength-fill-auth {
    width: 60%;
    background: #f39c12;
}

.strength-strong .strength-fill-auth {
    width: 100%;
    background: #27ae60;
}

.strength-text-auth {
    font-size: 0.8rem;
    font-weight: 500;
    color: #636e72;
}

/* Step Indicator (for register) */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #636e72;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.step.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: scale(1.1);
}

.step.completed {
    background: #27ae60;
    color: white;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 20px;
    height: 2px;
    background: #e9ecef;
    margin-left: 10px;
    margin-top: -1px;
}

.step.completed:not(:last-child)::after {
    background: #27ae60;
}

/* Section Dividers */
.section-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    gap: 1rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
}

.section-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    padding: 0 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        min-height: auto;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin: 1rem 0;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-row-auth {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-control-auth {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .step-indicator {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .step {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }
    
    .auth-header {
        margin-bottom: 2rem;
    }
    
    .form-control-auth {
        padding: 0.875rem 1rem;
    }
    
    .input-group-auth .form-control-auth {
        padding-left: 3rem;
    }
}

/* Animation Delays */
.form-group-auth:nth-child(1) { animation-delay: 0.1s; }
.form-group-auth:nth-child(2) { animation-delay: 0.2s; }
.form-group-auth:nth-child(3) { animation-delay: 0.3s; }
.form-group-auth:nth-child(4) { animation-delay: 0.4s; }
.form-group-auth:nth-child(5) { animation-delay: 0.5s; }

.form-group-auth {
    animation: slideInUp 0.6s ease-out both;
}

/* Focus Ring */
.form-control-auth:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom Scrollbar for long forms */
.auth-card::-webkit-scrollbar {
    width: 6px;
}

.auth-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.auth-card::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.auth-card::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
} 
