:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-dark: #64748b;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --google: #db4437;
    --apple: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--dark);
    background-color: var(--bg);
}
/* Enhanced Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal {
    background-color: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal.success {
    border-top: 4px solid var(--success);
}

.modal.error {
    border-top: 4px solid var(--danger);
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.2s ease;
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.75rem 1.5rem;
    overflow-y: auto;
    text-align: center;
    flex-grow: 1;
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.modal.success .modal-icon {
    color: var(--success);
}

.modal.error .modal-icon {
    color: var(--danger);
}

.modal-body p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: var(--gray-dark);
    font-size: 1rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.modal-ok {
    min-width: 120px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Mobile-specific styles */
@media (max-width: 480px) {
    .modal {
        max-width: 95%;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
    }
    
    .modal-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .modal-body p {
        font-size: 0.9375rem;
    }
    
    .modal-footer {
        padding: 1rem;
    }
}
.error-container {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.error-container.show {
    display: block;
}

.error-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.error-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.modal-icon {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 3rem;
}

.modal.success .modal-icon i {
    color: var(--success);
}

.modal.error .modal-icon i {
    color: var(--danger);
}

.modal-body {
    text-align: center;
}

.modal-body p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-dark);
}

.modal-footer {
    display: flex;
    justify-content: center;
    padding: 1.5rem;
}
.verification-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 1.5rem;
}

/* Enhanced Verification Inputs */
.verification-inputs {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem auto;
    justify-content: center;
    max-width: 400px;
}

.verification-code {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
    color: var(--dark);
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.verification-code:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.verification-code.filled {
    border-color: var(--primary-light);
    background-color: rgba(99, 102, 241, 0.05);
}

/* Verification Container */
.verification-container {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.verification-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.verification-subtitle {
    color: var(--gray-dark);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.verification-subtitle strong {
    color: var(--dark);
    font-weight: 600;
}

/* Verification Actions */
.verification-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    background-color: var(--bg);
}

.auth-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.auth-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.auth-btn {
    margin: 0 auto;
    display: block;
    width: 200px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-container {
    margin-bottom: 1.5rem;
}

.auth-logo {
    height: 40px;
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-dark);
    font-size: 0.875rem;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    background: none;
    border: none;
    font-weight: 500;
    color: var(--gray-dark);
    cursor: pointer;
    position: relative;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-tab:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.auth-tab.active {
    color: var(--primary);
    font-weight: 600;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    animation: tabUnderline 0.3s ease;
}

@keyframes tabUnderline {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: var(--card-bg);
    color: var(--dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--gray-dark);
    cursor: pointer;
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-primary:disabled {
    background-color: var(--gray);
    cursor: not-allowed;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-loader {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loading .btn-text {
    opacity: 0;
}

.btn-loading .btn-loader {
    display: block;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray);
    font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border);
}

.auth-divider::before {
    margin-right: 1rem;
}

.auth-divider::after {
    margin-left: 1rem;
}

.social-auth {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    background-color: var(--bg);
}

.social-btn.google {
    color: var(--google);
    border-color: rgba(219, 68, 55, 0.2);
}

.social-btn.google:hover {
    background-color: rgba(219, 68, 55, 0.05);
}

.social-btn.apple {
    color: var(--apple);
    border-color: rgba(0, 0, 0, 0.2);
}

.social-btn.apple:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.terms-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.strength-meter {
    flex: 1;
    height: 4px;
    background-color: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background-color: var(--danger);
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--gray-dark);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#captcha-canvas {
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: #f8fafc;
}

.captcha-refresh {
    padding: 0.5rem;
    border-radius: 8px;
    background-color: var(--bg);
    border: none;
    color: var(--gray-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.captcha-refresh:hover {
    color: var(--primary);
    background-color: rgba(99, 102, 241, 0.1);
}

.error-message {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
    animation: fadeIn 0.2s ease;
}

.error-message.show {
    display: block;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}


.btn-secondary {
    background-color: var(--gray);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--gray-dark);
}

/* Verification Modal Specific Styles */
.verification-inputs {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.verification-code {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
    color: var(--dark);
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.verification-code:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}
.verification-code.filled {
    border-color: var(--primary-light);
    background-color: rgba(99, 102, 241, 0.05);
}
.verification-container {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.verification-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.verification-subtitle {
    color: var(--gray-dark);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.verification-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.resend-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}
.resend-container {
    text-align: center;
    margin-top: 1.5rem;
}

.resend-button {
    margin: 0.5rem auto 0;
    display: block;
    width: auto;
    padding: 0.5rem 1rem;
}

.resend-timer {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-align: center;
}
.resend-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.verification-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray);
    text-align: center;
}

.verification-note a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.verification-note a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.verification-success {
    color: var(--success);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.verification-error {
    color: var(--danger);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

/* Animations */
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Form Validation States */
.is-invalid {
    border-color: var(--danger) !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.is-valid {
    border-color: var(--success) !important;
}

.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .social-auth {
        flex-direction: column;
    }
    
    .auth-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 0.25rem;
    }
    
    .auth-tab {
        border-radius: 8px;
    }
    
    .auth-tab.active::after {
        display: none;
    }
    
   .verification-inputs {
        gap: 0.5rem;
    }
    
    .verification-code {
        width: 40px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .verification-actions {
        flex-direction: column;
    }
    
    .verification-actions .btn {
        width: 100%;
    }
/* Forgot Password Modal */
.forgot-password-modal .modal {
    max-width: 420px;
}

/* Reset Password Page */
.reset-password-page .auth-card {
    max-width: 440px;
}

.reset-password-page .auth-header {
    margin-bottom: 1.5rem;
}

.reset-password-page .auth-header p {
    font-size: 0.875rem;
    color: var(--gray-dark);
}

/* Password Strength Meter */
.password-strength {
    margin-top: 0.5rem;
}

.strength-meter {
    height: 4px;
    background-color: var(--border);
    border-radius: 2px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background-color: var(--danger);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--gray-dark);
    margin-top: 0.25rem;
}
}