/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #202124;
    background-color: #ffffff;
}

/* OAuth Container */
.oauth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    max-width: 1024px;
    margin: 0 auto;
}

/* Header Styles */
.oauth-header {
    display: flex;
    align-items: center;
    padding: 24px 40px;
    border-bottom: 1px solid #dadce0;
    background: #ffffff;
    position: relative;
    min-height: 80px;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    color: #5f6368;
    transition: all 0.2s ease;
    margin-right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    background-color: #f1f3f4;
    color: #202124;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title {
    font-size: 22px;
    font-weight: 400;
    color: #5f6368;
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 40px 24px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* Illustration Container */
.illustration-container {
    margin-bottom: 32px;
    text-align: center;
}

.forgot-illustration {
    position: relative;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    margin-bottom: 32px;
    object-fit: contain;
    aspect-ratio: 6/5;
}

.person-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Person Styles */
.person {
    position: relative;
    z-index: 2;
}

.person-head {
    width: 50px;
    height: 50px;
    position: relative;
    margin: 0 auto 10px;
}

.person-hair {
    width: 50px;
    height: 30px;
    background: #8D4004;
    border-radius: 25px 25px 0 0;
    position: absolute;
    top: 0;
}

.person-face {
    width: 45px;
    height: 40px;
    background: #FFDBAC;
    border-radius: 50%;
    position: absolute;
    top: 15px;
    left: 2.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.person-eye {
    width: 3px;
    height: 3px;
    background: #000;
    border-radius: 50%;
    position: absolute;
    top: 12px;
}

.person-eye.left {
    left: 12px;
}

.person-eye.right {
    right: 12px;
}

.person-mouth {
    width: 8px;
    height: 4px;
    border: 2px solid #000;
    border-top: none;
    border-radius: 0 0 8px 8px;
    position: absolute;
    bottom: 8px;
}

.person-body {
    position: relative;
    margin: 0 auto;
}

.person-shirt {
    width: 40px;
    height: 50px;
    background: #9CCC65;
    border-radius: 20px 20px 0 0;
    margin: 0 auto;
}

.person-arm {
    width: 15px;
    height: 35px;
    background: #FFDBAC;
    border-radius: 7.5px;
    position: absolute;
    top: 0;
}

.person-arm.left-arm {
    left: -10px;
    transform: rotate(-20deg);
    transform-origin: top;
}

.person-arm.right-arm {
    right: -10px;
    transform: rotate(45deg);
    transform-origin: top;
}

.person-legs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: -5px;
}

.person-leg {
    width: 15px;
    height: 40px;
    background: #424242;
    border-radius: 0 0 7.5px 7.5px;
}

/* Question Marks */
.question-marks {
    position: absolute;
    top: -20px;
    right: 60px;
    z-index: 3;
}

.question-mark {
    position: absolute;
    font-size: 18px;
    color: #4CAF50;
    font-weight: bold;
}

.question-mark.q1 {
    top: 0;
    left: 0;
}

.question-mark.q2 {
    top: -10px;
    left: 15px;
    font-size: 14px;
}

.question-mark.q3 {
    top: 5px;
    left: 25px;
    font-size: 12px;
}

/* Password Screen */
.password-screen {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 100px;
    background: #37474F;
    border-radius: 8px;
    padding: 8px;
    z-index: 1;
    transform: perspective(400px) rotateY(-15deg) translateY(-50%);
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.screen-icon svg {
    width: 12px;
    height: 12px;
}

.screen-title {
    font-size: 6px;
    color: white;
    font-weight: bold;
}

.screen-dots {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.dot {
    width: 4px;
    height: 4px;
    background: #4CAF50;
    border-radius: 50%;
}

.screen-button {
    width: 100%;
    height: 20px;
    position: relative;
}

.button-bg {
    width: 100%;
    height: 100%;
    background: #4CAF50;
    border-radius: 4px;
}

/* Plants */
.plant {
    position: absolute;
    bottom: -10px;
    z-index: 1;
}

.plant.left-plant {
    left: 20px;
}

.plant.right-plant {
    right: 20px;
}

.plant-pot {
    width: 20px;
    height: 15px;
    background: #8D6E63;
    border-radius: 0 0 10px 10px;
    margin: 0 auto;
}

.plant-leaves {
    position: relative;
    margin-bottom: 5px;
}

.leaf {
    width: 12px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50% 10% 50% 10%;
    position: absolute;
    bottom: 0;
}

.leaf.leaf1 {
    left: 4px;
    transform: rotate(-10deg);
}

.leaf.leaf2 {
    left: 8px;
    transform: rotate(10deg);
}

.leaf.leaf3 {
    left: 0px;
    transform: rotate(-30deg);
}

/* Forgot Title */
.forgot-title {
    text-align: center;
    margin-bottom: 24px;
}

.main-title {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin: 0;
    line-height: 1.33;
}

/* Description */
.forgot-description {
    text-align: center;
    margin-bottom: 28px;
    max-width: 400px;
}

.description-text {
    font-size: 16px;
    color: #5f6368;
    line-height: 1.5;
    margin: 0;
}

/* Form Styles */
.forgot-form {
    width: 100%;
    max-width: 350px;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 16px;
    color: #202124;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.form-input::placeholder {
    color: #9aa0a6;
    font-weight: 400;
}

/* Email Badge */
.email-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 20px;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.email-avatar {
    width: 32px;
    height: 32px;
    background: #ea4335;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

.email-text {
    font-size: 14px;
    color: #5f6368;
    font-weight: 400;
}

/* Verification Inputs */
.verification-inputs {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 32px 0;
}

.verification-input {
    width: 56px;
    height: 56px;
    border: 2px solid #dadce0;
    border-radius: 12px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #202124;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.verification-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.verification-input:not(:placeholder-shown) {
    border-color: #34a853;
    background: #f0fdf4;
}

/* Resend Timer */
.resend-timer {
    text-align: center;
    margin-top: 24px;
}

.timer-text {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
}

.resend-btn {
    background: none;
    border: none;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    transition: color 0.2s ease;
}

.resend-btn:hover {
    color: #1555c0;
}

/* Form Buttons */
.form-buttons {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.send-code-btn {
    background: #193D29;
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-code-btn:hover {
    background: #1B5E20;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.send-code-btn:active {
    background: #0D4E12;
    transform: translateY(1px);
}

.send-code-btn:disabled {
    background: #9aa0a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .oauth-header {
        padding: 16px 24px;
        min-height: 64px;
    }

    .header-title {
        font-size: 18px;
    }

    .main-content {
        padding: 24px 24px 16px;
    }

    .forgot-illustration {
        max-width: 240px;
        margin-bottom: 24px;
    }

    .main-title {
        font-size: 24px;
    }

    .description-text {
        font-size: 15px;
    }

    .verification-inputs {
        gap: 12px;
    }

    .verification-input {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .person-head {
        width: 40px;
        height: 40px;
    }

    .person-hair {
        width: 40px;
        height: 25px;
    }

    .person-face {
        width: 35px;
        height: 32px;
        left: 2.5px;
        top: 12px;
    }

    .person-shirt {
        width: 32px;
        height: 40px;
    }

    .password-screen {
        width: 65px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .oauth-header {
        padding: 12px 16px;
    }

    .back-btn {
        padding: 8px;
        margin-right: 16px;
    }

    .header-title {
        font-size: 16px;
    }

    .main-content {
        padding: 16px 16px 12px;
    }

    .forgot-illustration {
        max-width: 200px;
        margin-bottom: 20px;
    }

    .main-title {
        font-size: 22px;
    }

    .description-text {
        font-size: 14px;
    }

    .verification-inputs {
        gap: 8px;
        margin: 24px 0;
    }

    .verification-input {
        width: 44px;
        height: 44px;
        font-size: 18px;
        border-radius: 8px;
    }

    .email-badge {
        padding: 6px 12px;
        gap: 8px;
    }

    .email-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .email-text {
        font-size: 13px;
    }

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

    .send-code-btn {
        padding: 10px 24px;
        font-size: 15px;
    }

    .person-head {
        width: 35px;
        height: 35px;
    }

    .person-hair {
        width: 35px;
        height: 20px;
    }

    .person-face {
        width: 30px;
        height: 28px;
        left: 2.5px;
        top: 10px;
    }

    .person-shirt {
        width: 28px;
        height: 35px;
    }

    .person-arm {
        width: 12px;
        height: 28px;
    }

    .person-leg {
        width: 12px;
        height: 32px;
    }

    .password-screen {
        width: 55px;
        height: 70px;
        right: -15px;
    }

    .question-mark {
        font-size: 14px;
    }

    .question-mark.q2 {
        font-size: 12px;
    }

    .question-mark.q3 {
        font-size: 10px;
    }
}

/* Focus States for Accessibility */
.back-btn:focus,
.form-input:focus,
.verification-input:focus,
.send-code-btn:focus,
.resend-btn:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 2px;
    }
    
    .oauth-header {
        border-bottom-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .oauth-container {
        box-shadow: none;
    }
    
    .back-btn,
    .send-code-btn {
        background: #f8f9fa !important;
        color: #202124 !important;
        border: 1px solid #dadce0 !important;
    }
    
    .forgot-illustration {
        display: none;
    }
}