@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Cairo", sans-serif;
    text-decoration: none;
    list-style: none;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #06162b;
}

.container {
    position: relative;
    width: 850px;
    height: 550px;
    background: #fff;
    margin: 20px;
    border-radius: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .2);
    overflow: hidden;
}

.container h1 {
    font-size: 36px;
    margin: -10px 0;
}

.container p {
    font-size: 14.5px;
    margin: 15px 0;
}

form {
    width: 100%;
}

.form-box {
    position: absolute;
    right: 0;
    width: 50%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    color: #333;
    text-align: center;
    padding: 40px;
    z-index: 1;
    transition: .6s ease-in-out 1.2s, visibility 0s 1s;
}

.container.active .form-box {
    right: 50%;
}

.form-box.register {
    visibility: hidden;
}

.container.active .form-box.register {
    visibility: visible;
}

.input-box {
    position: relative;
    margin: 30px 0;
}

.input-box input {
    width: 100%;
    padding: 13px 50px 13px 20px;
    background: #eee;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.input-box input::placeholder {
    color: #888;
    font-weight: 400;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.forgot-link {
    margin: -15px 0 15px;
}

.forgot-link a {
    font-size: 14.5px;
    color: #333;
}

.btn {
    width: 100%;
    height: 48px;
    background: #fdb813;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #06162b;
    font-weight: 600;
    font-family: "Cairo", sans-serif;
}

.social-icons {
    display: flex;
    justify-content: center;
}

.social-icons a {
    display: inline-flex;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 24px;
    color: #333;
    margin: 0 8px;
}

.toggle-box {
    position: absolute;
    width: 100%;
    height: 100%;
}

.toggle-box::before {
    content: '';
    position: absolute;
    left: -250%;
    width: 300%;
    height: 100%;
    background: #fdb813;
    border-radius: 150px;
    z-index: 2;
    transition: 1.8s ease-in-out;
}

.container.active .toggle-box::before {
    left: 50%;
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: .6s ease-in-out;
}

.toggle-panel.toggle-left {
    left: 0;
    transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left {
    left: -50%;
    transition-delay: .6s;
}

.toggle-panel.toggle-right {
    right: -50%;
    transition-delay: .6s;
}

.container.active .toggle-panel.toggle-right {
    right: 0;
    transition-delay: 1.2s;
}

.toggle-panel p {
    margin-bottom: 20px;
}

.toggle-panel .btn {
    width: 160px;
    height: 46px;
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
    font-family: "Cairo", sans-serif;
}

@media screen and (max-width: 650px) {
    .container {
        height: calc(100vh - 40px);
    }
    .form-box {
        bottom: 0;
        width: 100%;
        height: 70%;
    }
    .container.active .form-box {
        right: 0;
        bottom: 30%;
    }
    .toggle-box::before {
        left: 0;
        top: -270%;
        width: 100%;
        height: 300%;
        border-radius: 20vw;
    }
    .container.active .toggle-box::before {
        left: 0;
        top: 70%;
    }
    .container.active .toggle-panel.toggle-left {
        left: 0;
        top: -30%;
    }
    .toggle-panel {
        width: 100%;
        height: 30%;
    }
    .toggle-panel.toggle-left {
        top: 0;
    }
    .toggle-panel.toggle-right {
        right: 0;
        bottom: -30%;
    }
    .container.active .toggle-panel.toggle-right {
        bottom: 0;
    }
}

/* Forgot Password Styles */
.forgot-password {
    text-align: center;
    margin: 15px 0;
}

.forgot-password a {
    color: #fdb813;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #e6a50a;
    text-decoration: underline;
}

.form-box.forgot-password,
.form-box.otp-verification,
.form-box.new-password {
    display: none;
    visibility: visible;
}

.form-box.forgot-password.active,
.form-box.otp-verification.active,
.form-box.new-password.active {
    display: flex;
}

.form-description {
    font-size: 14px;
    color: #666;
    margin: 15px 0 25px;
    line-height: 1.5;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login a {
    color: #666;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-to-login a:hover {
    color: #fdb813;
    text-decoration: underline;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #06162b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-title i {
    color: #fdb813;
    font-size: 1.3rem;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.modal-form-group {
    margin-bottom: 20px;
}

.modal-form-label {
    display: block;
    font-weight: 600;
    color: #06162b;
    margin-bottom: 8px;
    font-size: 1rem;
}

.modal-input-group {
    position: relative;
}

.modal-input-group i {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #fdb813;
    font-size: 1.1rem;
    z-index: 2;
}

.modal-form-input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #06162b;
    font-family: 'Cairo', Arial, sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.modal-form-input:focus {
    outline: none;
    border-color: #fdb813;
    box-shadow: 0 0 0 4px rgba(253, 184, 19, 0.15), 0 4px 20px rgba(253, 184, 19, 0.1);
    background: white;
    transform: translateY(-1px);
}

.modal-form-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cairo', Arial, sans-serif;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.modal-btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.otp-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
}

.otp-timer {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #dc3545;
    font-weight: 600;
}

.resend-otp-btn {
    background: none;
    border: none;
    color: #fdb813;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    font-family: 'Cairo', Arial, sans-serif;
}

.resend-otp-btn:hover {
    color: #e6a50a;
}

.resend-otp-btn:disabled {
    color: #6c757d;
    cursor: not-allowed;
    text-decoration: none;
}

/* OTP Timer Styles */
.otp-timer {
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: #dc3545;
    font-weight: 600;
    padding: 8px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin: 15px 0;
}

.resend-section .resend-otp-btn {
    background: none;
    border: none;
    color: #fdb813;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Cairo', Arial, sans-serif;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.resend-section .resend-otp-btn:hover {
    color: #e6a50a;
    background: rgba(253, 184, 19, 0.1);
}

.resend-section .resend-otp-btn:disabled {
    color: #6c757d;
    cursor: not-allowed;
    text-decoration: none;
    background: none;
}

/* OTP Input Special Styling */
#otp-input {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 8px;
    padding: 15px 20px;
}

/* Success Message Animation */
.success-message {
    text-align: center;
    color: #28a745;
    font-weight: 600;
    margin: 20px 0;
}

.checkmark {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 10px;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media screen and (max-width: 400px) {
    .form-box {
        padding: 20px;
    }
    .toggle-panel h1 {
        font-size: 30px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .otp-input {
        font-size: 1.3rem;
        letter-spacing: 0.3rem;
    }
}