:root {
    --primary-color: #4285f4;
    --primary-dark: #3367d6;
    --success-color: #34a853;
    --warning-color: #fbbc05;
    --danger-color: #ea4335;
    --gray-light: #f8f9fa;
    --gray-medium: #e2e8f0;
    --gray-dark: #64748b;
    --transition: all 0.3s ease;
    
    /* Light mode variables */
    --card-bg: white;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.05);
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --input-bg: white;
    --input-border: #e2e8f0;
    --input-focus-border: #4285f4;
    --input-placeholder: #94a3b8;
    --illustration-bg: #f8fafc;
}

/* Dark mode variables */
[data-bs-theme="dark"] {
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.05);
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    --box-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.35);
    --input-bg: #0f172a;
    --input-border: #334155;
    --input-focus-border: #4285f4;
    --input-placeholder: #64748b;
    --illustration-bg: #0f172a;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-light);
    font-family: 'Poppins', sans-serif;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

[data-bs-theme="dark"] body {
    background-color: #0f172a;
}

.forgot-password-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--card-bg);
    margin: 2rem;
    position: relative;
    min-height: 550px;
}

.forgot-password-illustration {
    flex: 1;
    background-color: var(--illustration-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.forgot-password-illustration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(66, 133, 244, 0.2));
    z-index: 1;
}

.illustration-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.illustration-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: rgba(66, 133, 244, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 10px 25px rgba(66, 133, 244, 0.2);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(66, 133, 244, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0);
    }
}

.illustration-icon i {
    font-size: 3.5rem;
    color: var(--primary-color);
}

.illustration-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    background: linear-gradient(135deg, #4285f4, #34a853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.illustration-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.floating-keys {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.floating-key {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(66, 133, 244, 0.3);
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.forgot-password-form-container {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.forgot-password-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.forgot-password-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.forgot-password-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.forgot-password-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
    outline: none;
}

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

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
}

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

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.submit-button {
    width: 100%;
    padding: 0.9rem;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.submit-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.25);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button i {
    margin-right: 0.5rem;
}

.login-link {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

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

/* Invalid feedback */
.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.form-control.is-invalid ~ .form-icon {
    color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-valid ~ .form-icon {
    color: var(--success-color);
}

/* Theme toggle */
.theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

[data-bs-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Flash messages */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.alert {
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

/* Responsive styles */
@media (max-width: 992px) {
    .forgot-password-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }
    
    .forgot-password-illustration {
        padding: 2rem;
        min-height: 250px;
    }
    
    .illustration-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }
    
    .illustration-icon i {
        font-size: 2.5rem;
    }
    
    .illustration-title {
        font-size: 1.8rem;
    }
    
    .illustration-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .forgot-password-form-container {
        padding: 2rem;
    }
    
    .forgot-password-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .forgot-password-container {
        margin: 1rem;
        border-radius: 12px;
    }
    
    .forgot-password-illustration {
        padding: 1.5rem;
        min-height: 200px;
    }
    
    .illustration-icon {
        width: 60px;
        height: 60px;
    }
    
    .illustration-icon i {
        font-size: 2rem;
    }
    
    .illustration-title {
        font-size: 1.5rem;
    }
    
    .forgot-password-form-container {
        padding: 1.5rem;
    }
}

/* Animation classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
    opacity: 0;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
    opacity: 0;
}

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}
