* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: rgba(141, 132, 132, 0.281);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hero-section {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 78, 134, 0.041);
    background-color: #ffffff;
    max-width: 365px;
    width: 100%;
    height: 99vh;
    margin: 5px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Navigation */
.navigation-bar {
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* only back button now */
}

.navigation-bar img {
    width: auto;
}

.back-btn {
    background: none;
    border: none;
    outline: none;
    padding: 6px 10px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
}

.back-btn:hover {
    background: #f5f5f5;
    border-radius: 8px;
}

/* Forms Container */
.forms-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 30px;
    overflow-y: auto;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.form-subtitle {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
}

/* Profile Icon */
.profile-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-icon img {
    width: 60px;
    height: 60px;
}

/* Form Groups */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-label {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
    display: block;
    font-weight: 400;
}

.form-input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    color: #333;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-bottom-color: #25ac25;
    box-shadow: 0 1px 0 0 #25ac25;
}

.form-input::placeholder {
    color: #999;
}

/* Phone input with country code prefix */
.phone-input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.country-code {
    color: #333;
    font-size: 15px;
    margin-right: 5px;
    padding: 10px 0;
    flex-shrink: 0;
}

.phone-input-group .form-input {
    flex: 1;
    width: auto !important;
    min-width: 0;
}

/* Password Input Group */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group .form-input {
    flex: 1;
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, opacity 0.2s;
    opacity: 0;
    pointer-events: none;
}

.password-input-group:focus-within .password-toggle,
.password-input-group:hover .password-toggle {
    opacity: 1;
    pointer-events: auto;
}

.password-toggle:hover {
    color: #25ac25;
}

.password-toggle:active {
    color: #25ac25;
}

.password-toggle:focus {
    outline: none;
}

.password-toggle:focus-visible {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Error Messages */
.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.success-message.show {
    display: block;
}

/* Buttons */
.button-container {
    position: relative;
    width: 140px;
    height: 60px;
    margin: 30px auto 20px;
}

.btn-primary {
    position: absolute;
    top: 0;
    left: 0;
    width: 140px;
    height: 50px;
    background: #25ac25;
    border: 2px solid rgba(9, 255, 9, 0.247);
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-primary:hover {
    background: #229922;
}

.btn-primary:focus {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
}

.btn-primary:active {
    transform: translateY(3px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Shimmer effect for loading buttons */
.btn-primary.loading {
    background: linear-gradient(90deg, #25ac25 0%, #25ac25 40%, #5cdb5c 50%, #25ac25 60%, #25ac25 100%);
    background-size: 200% 100%;
    animation: btn-shimmer 1.5s infinite;
}

@keyframes btn-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.btn-shadow {
    position: absolute;
    top: 3px;
    left: 0;
    width: 140px;
    height: 52px;
    background: #25ac25;
    opacity: 0.88;
    border-radius: 50px;
    border: 2px solid rgba(9, 255, 9, 0.247);
    z-index: 2;
}

.btn-text {
    display: block;
    text-align: center;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    text-decoration: none;
    background: none;
    border: none;
    padding: 8px;
    font-family: inherit;
    transition: color 0.2s;
}

.btn-text:hover {
    color: #25ac25;
}

.btn-text:focus {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
    border-radius: 4px;
}

/* OTP Timer */
.otp-timer-group {
    text-align: center;
    margin-bottom: 20px;
}

.otp-timer-display {
    font-size: 16px;
    font-weight: bold;
    color: #666;
}

/* Resend button disabled state */
.resend-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.forgot-password {
    background: none;
    border: none;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    margin-top: 5px;
    text-align: left;
    padding: 8px 0;
    font-family: inherit;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #25ac25;
}

.forgot-password:focus {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Footer - logo sits bottom left */
.footer {
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    box-sizing: border-box;
    margin-top: auto;
}

.logo-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: fit-content;
    align-self: flex-end;
}

.logo-container img {
    width: auto;
}

.logo-container ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

.logo-container li {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.logo-container a {
    color: #999;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-decoration: none;
    font-weight: 400;
    line-height: 1;
    display: block;
    margin-left: 15px;
    padding: 0;
    transition: color 0.2s;
}

.logo-container a:hover {
    color: #666;
}

.logo-container a:focus {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
    border-radius: 2px;
}

.logo-container span {
    color: #999;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
    font-weight: 400;
    display: block;
    margin-left: 15px;
}

.balls {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
}

.balls img {
    width: auto;
    height: 50px;
}

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

/* Mobile responsiveness improvements */
@media (max-width: 380px) {
    .hero-section {
        margin: 0;
        height: 100vh;
    }
    
    .forms-container {
        padding: 0 20px;
    }
    
    .navigation-bar,
    .footer {
        padding: 15px 20px;
    }
}

/* Loan Type Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
}

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

.modal-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: -0.5px;
}

.modal-subtitle {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin-bottom: 40px;
    line-height: 1.5;
}

.loan-type-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.loan-type-btn {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    text-align: center;
}

.loan-type-btn:hover {
    border-color: #25ac25;
    background-color: #f5f5f5;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(37, 172, 37, 0.1);
}

.loan-type-btn.active {
    border-color: #25ac25;
    background-color: #25ac25;
    color: white;
}

.loan-type-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.loan-type-btn:hover .loan-type-title {
    color: #25ac25;
}

.loan-type-btn.active .loan-type-title {
    color: white;
}

.loan-type-desc {
    font-size: 13px;
    color: #888;
    text-align: center;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.loan-type-btn:hover .loan-type-desc {
    color: #25ac25;
}

.loan-type-btn.active .loan-type-desc {
    color: rgba(255, 255, 255, 0.85);
}