@font-face {
    font-family: 'El Messiri';
    src: url('../fonts/ElMessiri-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

.forgot-password {
    margin-top: 10px;
    text-align: right;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.forgot-password a {
    color: #888;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password a:hover {
    color: var(--red-color);
}

.forgot-password a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--red-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.forgot-password a:hover::after {
    transform: scaleX(1);
}

.outer-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.verification-container {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 20px;
}

.verification-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 2.5rem;
    text-align: center;
    max-width: 480px;
    width: 100%;
    border-top: 4px solid #e74c3c; /* Main red color */
}

.verification-title {
    color: #333;
    margin: 1.5rem 0;
    font-size: 1.8rem;
}

.email-highlight {
    color: #e74c3c;
    word-break: break-all;
}

.verification-text {
    color: #444;
    line-height: 1.6;
    margin: 1rem 0;
}

.verification-note {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.resend-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.resend-link:hover {
    color: #c0392b;
}

.return-link {
    display: inline-block;
    color: #444;
    text-decoration: none;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.hint-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.verification-icon svg {
    animation: checkmark 0.6s ease;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

body.signup-body, body.login-body {
    font-family: 'Helvetica Neue', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f7f7f7;
    margin: 0;
}

.signup-container, .login-container {
    background-color: #ffffff;
    padding: 2.25rem;
    border: none;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    margin: 64px auto 96px;
}

.signup-container h2, .login-container h2 {
    font-family: 'El Messiri', sans-serif;
    color: var(--red-color);
    font-weight: normal;
    margin-bottom: 2rem;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.input-field {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    width: 100%;
    padding: 14px 16px;
    margin: 0.75rem 0;
    border: 1px solid #e5e5ea;
    background-color: #f5f5f7;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.input-field:focus {
    background-color: #ffffff;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.input-field::placeholder {
    color: #b0b0b0;
}

.input-wrapper::before { display: none; }

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.checkbox-container input {
    display: none;
}

.checkbox-container input + label::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--red-color);
    display: inline-block;
    margin-right: 0.5rem;
    position: relative;
    top: 3px;
}

.checkbox-container input:checked + label::before {
    border-color: #ddd;
    background-color: var(--red-color);
}

.checkbox-container input:checked + label::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--red-color);
    position: absolute;
    left: 6px;
    top: 6px;
    transform: translate(-50%, -50%);
}

.checkbox-container a {
    color: var(--red-color);
    text-decoration: none;
}

.signup-button, .login-button {
    background-color: var(--red-color);
    color: #ffffff;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 12px;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s ease, transform .05s ease, box-shadow .2s ease;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.18);
}

.signup-button:hover, .login-button:hover { background-color: #d94a43; }
.signup-button:active, .login-button:active { transform: translateY(1px); }

.login-link, .signup-link {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #b0b0b0;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.login-link a, .signup-link a {
    color: var(--red-color);
    text-decoration: none;
}

.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5e5ea;
    margin: 20px auto 0 auto;
    text-decoration: none;
    transition: box-shadow .2s ease, transform .05s ease;
}

.google-button:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.google-button:active { transform: translateY(1px); }

/* Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.show {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.modal-container {
    position: relative;
    margin: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    transform: translateY(0);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h2 {
    font-family: 'El Messiri', sans-serif;
    color: var(--red-color);
    font-weight: normal;
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.modal-footer a {
    color: var(--red-color);
    text-decoration: none;
    font-weight: 500;
}

.verification-body {
    text-align: center;
}

.verification-body .verification-icon {
    margin-bottom: 1.5rem;
}

.verification-body .verification-title {
    color: #333;
    margin: 1rem 0 1.5rem;
    font-size: 1.3rem;
}

.verification-body .verification-text {
    color: #444;
    line-height: 1.6;
    margin: 1rem 0;
}

.verification-body .verification-note {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.verification-body .resend-link {
    color: var(--red-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.verification-body .resend-link:hover {
    color: #c0392b;
}

.verification-body .return-link {
    display: inline-block;
    color: #444;
    text-decoration: none;
    margin-top: 1rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.verification-body .return-link:hover {
    background-color: #f5f5f5;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .input-field {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .signup-button, .login-button {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }
}