@font-face {
    font-family: 'HONORSansArabicUI-DB';
    src: url('../Fonts/HONORSansArabicUI-DB.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* General styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'HONORSansArabicUI-DB', sans-serif;
    display: flex;
    min-height: 100vh;
    background: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Animated background particles */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particles {
    position: relative;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #34C334, #28a745);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.3;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { top: 40%; left: 80%; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 70%; animation-delay: 3s; }
.particle:nth-child(5) { top: 30%; left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { top: 70%; left: 30%; animation-delay: 5s; }
.particle:nth-child(7) { top: 10%; left: 90%; animation-delay: 6s; }
.particle:nth-child(8) { top: 90%; left: 10%; animation-delay: 7s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.7; }
}

/* Logo styling */
.logo {
    position: fixed;
    top: 30px;
    right: 235px;
    z-index: 100;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s ease;
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* Layout */
.left-side {
    flex: 1;
    display: flex;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 50%, #004085 100%);
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.left-side::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: grain 20s linear infinite;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.animated-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
    max-width: 500px;
}

/* Email Animation */
.email-animation {
    margin-bottom: 40px;
}

.email-container {
    display: inline-block;
    animation: emailFloat 3s ease-in-out infinite;
}

.email-icon {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.envelope {
    width: 100%;
    height: 100%;
    position: relative;
    animation: envelopePulse 2s ease-in-out infinite;
}

.envelope-body {
    width: 100%;
    height: 80px;
    background: #fff;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.envelope-flap {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: #fff;
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    animation: flapMove 3s ease-in-out infinite;
}

.envelope-content {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter {
    width: 80%;
    height: 60%;
    background: #fff;
    border-radius: 3px;
    position: relative;
    animation: letterGlow 2s ease-in-out infinite;
}

.letter-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 10px;
}

.code-dots {
    display: flex;
    gap: 3px;
    animation: dotsPulse 1.5s ease-in-out infinite;
}

.dot {
    width: 6px;
    height: 6px;
    background: #007bff;
    border-radius: 50%;
    animation: dotBlink 1.5s ease-in-out infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
.dot:nth-child(4) { animation-delay: 0.6s; }
.dot:nth-child(5) { animation-delay: 0.8s; }
.dot:nth-child(6) { animation-delay: 1s; }

@keyframes emailFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes envelopePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(255, 255, 255, 0.5); }
}

@keyframes flapMove {
    0%, 100% { transform: rotateX(0deg); }
    50% { transform: rotateX(10deg); }
}

@keyframes letterGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 123, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.6); }
}

@keyframes dotsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes dotBlink {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Welcome Text */
.welcome-text {
    margin-bottom: 40px;
}

.welcome-text h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(45deg, #ffffff, #f0f8ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Recovery Features */
.recovery-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

.feature-icon {
    font-size: 2rem;
    animation: iconBounce 2s ease-in-out infinite;
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fff;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

/* Animation classes */
.animate-fade-in {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s ease;
}

.animate-slide-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-input {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.animate-button {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

/* Content styling */
.content {
    width: 100%;
    max-width: 500px;
    text-align: right;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Input fields */
.input-group {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 18px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8f9fa;
    direction: rtl;
}

.input-group input:focus {
    border-color: #34C334;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 196, 52, 0.1);
    transform: translateY(-2px);
}

.floating-label {
    position: absolute;
    right: 15px;
    top: 18px;
    transition: all 0.3s ease;
    color: #6c757d;
    pointer-events: none;
    background: transparent;
    padding: 0 5px;
    font-size: 16px;
}

.input-group input:focus + .floating-label,
.input-group input:not(:placeholder-shown) + .floating-label {
    top: -10px;
    font-size: 12px;
    color: #34C334;
    background: #fff;
    font-weight: 600;
}

/* Button styling */
button[type="submit"] {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #34C334, #28a745);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button[type="submit"]::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;
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #28a745, #20c997);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(52, 196, 52, 0.3);
}

button[type="submit"]:active {
    transform: translateY(-1px);
}

button[type="submit"]:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Options link */
.options {
    margin-top: 25px;
    text-align: center;
}

.options a {
    color: #34C334;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.options a:hover {
    color: #28a745;
    text-decoration: underline;
}

/* Message styling */
.error-message {
    color: #dc3545;
    text-align: right;
    margin: 15px 0;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    display: none;
    font-weight: 500;
}

.success-message {
    color: #28a745;
    text-align: right;
    margin: 15px 0;
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    display: none;
    font-weight: 500;
}

.info-message {
    color: #007bff;
    text-align: right;
    margin: 15px 0;
    padding: 15px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 10px;
    display: none;
    font-weight: 500;
}

/* Loading Animation */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.spinner {
    border: 4px solid rgba(52, 196, 52, 0.1);
    border-radius: 50%;
    border-top: 4px solid #34C334;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #34C334;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 992px) {
    body {
        flex-direction: column;
    }
    
    .left-side {
        display: none;
    }
    
    .right-side {
        padding: 80px 20px 20px;
        width: 100%;
        max-width: 100%;
    }
    
    .logo {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .logo img {
        height: 50px;
    }

    .welcome-text h1 {
        font-size: 2rem;
    }

    .recovery-features {
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .input-group {
        margin-bottom: 20px;
    }
    
    .input-group input {
        padding: 15px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    p {
        font-size: 14px;
    }
    
    button[type="submit"] {
        padding: 15px;
    }

    .welcome-text h1 {
        font-size: 1.8rem;
    }

    .recovery-features {
        flex-direction: column;
        gap: 15px;
    }
}