/* Modern Auth Pages Styling */

/* Body and Background */
body.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 20px;
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-card:hover {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

/* Auth Header */
.auth-header {
    text-align: center;
    padding: 40px 40px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.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 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.auth-logo i {
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-align: center;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 0;
    text-align: center;
}

/* Auth Body */
.auth-body {
    padding: 30px 40px 40px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Controls */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
}

#loginForm .input-group>.form-control:focus,
#resetForm .input-group>.form-control:focus,
#forgotForm .input-group>.form-control:focus
{
    z-index:3;
}
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
    background: white;
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Input Icons */
.input-group {
    position: relative;
}

.input-group .form-control {
    padding-left: 45px;
}

.input-group-text {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 45px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    color: #6c757d;
    font-size: 1.1rem;
}

.form-control:focus ~ .input-group-text {
    color: #667eea;
}

/* Buttons */
.btn-auth {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-auth::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 ease;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-auth:active {
    transform: translateY(0px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Secondary Button */
.btn-secondary-auth {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary-auth:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Alert Messages */
.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    color: #0c5460;
    border-left: 4px solid #667eea;
}

/* Auth Links */
.auth-links {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.auth-link:hover::after {
    width: 100%;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: none;
}

/* Checkbox Styling */
.form-check {
    margin: 20px 0;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-label {
    font-size: 0.95rem;
    color: #495057;
    margin-left: 8px;
}

/* Terms and Conditions Specific */
.terms-content {
    background: rgba(248, 249, 250, 0.8);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.terms-content::-webkit-scrollbar {
    width: 8px;
}

.terms-content::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 10px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

.terms-content h1, .terms-content h2, .terms-content h3 {
    color: #495057;
    margin-top: 20px;
    margin-bottom: 15px;
}

.terms-content h1 {
    font-size: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.terms-content h2 {
    font-size: 1.3rem;
    color: #667eea;
}

.terms-content h3 {
    font-size: 1.1rem;
    color: #764ba2;
}

.terms-content p {
    margin-bottom: 15px;
    color: #6c757d;
}

.terms-content ul, .terms-content ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.terms-content li {
    margin-bottom: 8px;
    color: #6c757d;
}

/* Loading States */
.btn-auth.loading {
    position: relative;
    color: transparent;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-header {
        padding: 30px 25px 15px;
    }
    
    .auth-body {
        padding: 20px 25px 30px;
    }
    
    .auth-title {
        font-size: 1.6rem;
    }
    
    .auth-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .auth-logo i {
        font-size: 2rem;
    }
    
    .form-control {
        padding: 10px 14px;
    }
    
    .btn-auth {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
}

/* Specific styling for forgot password and reset password pages */
body.forgot-password-page .auth-container,
body.reset-password-page .auth-container {
    max-width: 550px;
}

body.forgot-password-page .auth-card,
body.reset-password-page .auth-card {
    padding: 0;
}

body.forgot-password-page .auth-header,
body.reset-password-page .auth-header {
    padding: 45px 45px 25px;
}

body.forgot-password-page .auth-body,
body.reset-password-page .auth-body {
    padding: 25px 45px 45px;
}

body.forgot-password-page .form-group,
body.reset-password-page .form-group {
    margin-bottom: 30px;
}

body.forgot-password-page .form-control,
body.reset-password-page .form-control {
    padding: 14px 18px;
    font-size: 1.05rem;
}

body.forgot-password-page .input-group .form-control,
body.reset-password-page .input-group .form-control {
    padding-left: 50px;
}

body.forgot-password-page .btn-auth,
body.reset-password-page .btn-auth {
    padding: 14px 35px;
    font-size: 1.05rem;
}

/* Responsive adjustments for larger cards */
@media (max-width: 576px) {
    body.forgot-password-page .auth-container,
    body.reset-password-page .auth-container {
        max-width: 100%;
        padding: 15px;
    }
    
    body.forgot-password-page .auth-header,
    body.reset-password-page .auth-header {
        padding: 35px 30px 20px;
    }
    
    body.forgot-password-page .auth-body,
    body.reset-password-page .auth-body {
        padding: 20px 30px 35px;
    }
    
    body.forgot-password-page .form-group,
    body.reset-password-page .form-group {
        margin-bottom: 25px;
    }
}

/* Animation entrance */
.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-weak .password-strength-bar {
    width: 33%;
    background: #dc3545;
}

.password-strength-medium .password-strength-bar {
    width: 66%;
    background: #ffc107;
}

.password-strength-strong .password-strength-bar {
    width: 100%;
    background: #28a745;
}

/* Focus effects enhancement */
.form-control:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Bootstrap 5 Style Callouts */
.bd-callout {
    padding: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #e9ecef;
    border-left: 0.25rem solid #6f42c1;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.bd-callout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.bd-callout h4 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.bd-callout p:last-child {
    margin-bottom: 0;
}

.bd-callout code {
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    font-size: 0.875rem;
}

/* Callout Variants */
.bd-callout-info {
    border-left-color: #0dcaf0;
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.05) 0%, rgba(13, 202, 240, 0.02) 100%);
}

.bd-callout-info h4 {
    color: #055160;
}

.bd-callout-info p,
.bd-callout-info li {
    color: #0c5460;
}

.bd-callout-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.02) 100%);
}

.bd-callout-warning h4 {
    color: #664d03;
}

.bd-callout-warning p,
.bd-callout-warning li {
    color: #856404;
}

.bd-callout-danger {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(220, 53, 69, 0.02) 100%);
}

.bd-callout-danger h4 {
    color: #58151c;
}

.bd-callout-danger p,
.bd-callout-danger li {
    color: #721c24;
}

.bd-callout-success {
    border-left-color: #198754;
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.05) 0%, rgba(25, 135, 84, 0.02) 100%);
}

.bd-callout-success h4 {
    color: #0a3622;
}

.bd-callout-success p,
.bd-callout-success li {
    color: #155724;
}

.bd-callout-primary {
    border-left-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.02) 100%);
}

.bd-callout-primary h4 {
    color: #3d52a0;
}

.bd-callout-primary p,
.bd-callout-primary li {
    color: #495057;
}

.bd-callout-secondary {
    border-left-color: #6c757d;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.05) 0%, rgba(108, 117, 125, 0.02) 100%);
}

.bd-callout-secondary h4 {
    color: #383d41;
}

.bd-callout-secondary p,
.bd-callout-secondary li {
    color: #495057;
}

/* Callout with Icons */
.bd-callout-icon {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.bd-callout-icon .callout-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    margin-top: 0.125rem;
}

.bd-callout-info .callout-icon {
    background: #0dcaf0;
}

.bd-callout-warning .callout-icon {
    background: #ffc107;
    color: #000;
}

.bd-callout-danger .callout-icon {
    background: #dc3545;
}

.bd-callout-success .callout-icon {
    background: #198754;
}

.bd-callout-primary .callout-icon {
    background: #667eea;
}

.bd-callout-secondary .callout-icon {
    background: #6c757d;
}

/* Callout Content */
.bd-callout-content {
    flex: 1;
    min-width: 0;
}

/* Enhanced Callout Styles */
.bd-callout-enhanced {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: none;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.bd-callout-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Responsive Design for Callouts */
@media (max-width: 576px) {
    .bd-callout {
        padding: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .bd-callout h4 {
        font-size: 1rem;
    }
    
    .bd-callout-icon {
        gap: 0.75rem;
    }
    
    .bd-callout-icon .callout-icon {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.875rem;
    }
}

/* Cloudflare Turnstile Styling */
.cf-turnstile {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.form-group .cf-turnstile {
    margin-top: 0.5rem;
}
