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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    position: relative;
}

/* Screen Management */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex;
}

/* Splash Screen */
#splash-screen {
    background: linear-gradient(135deg, #0d5f7b 0%, #0a4a62 100%);
    justify-content: center;
    align-items: center;
}

.splash-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    animation: fadeIn 1s ease-in;
}

.logo-wrapper {
    width: 180px;
    height: 180px;
    animation: slideDown 0.8s ease-out;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Loader Overlay */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #fcc60d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* OTP Error Message */
.otp-error {
    background-color: #ffe6e6;
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.otp-error p {
    color: #d32f2f;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.otp-error.hidden {
    display: none;
}

/* Centered OTP Label */
.otp-label {
    text-align: center;
}

/* Phone Screen & PIN Screen & OTP Screen */
#phone-screen,
#pin-screen,
#otp-screen {
    background-color: #f9f9f9;
    justify-content: flex-start;
    flex-direction: column;
}

.phone-container,
.pin-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
}

/* Header */
.header {
    padding: 24px 24px 16px;
    text-align: center;
    background-color: #f9f9f9;
    border-bottom: none;
}

.header-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
    object-fit: contain;
}

.greeting {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.welcome-text {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* Form Section */
.form-section {
    flex: 0 1 auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #f9f9f9;
}

/* Input Sections */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-section.hidden {
    display: none;
}

.phone-display {
    font-size: 14px;
    color: #666;
    padding: 12px 0;
    text-align: center;
    font-weight: 500;
}

.form-label {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    display: block;
}

.phone-input {
    width: 100%;
    padding: 16px 14px;
    font-size: 16px;
    border: 2px solid #d0d0d0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.phone-input:focus {
    border-color: #0d5f7b;
    box-shadow: 0 0 0 3px rgba(13, 95, 123, 0.1);
}

.phone-input::placeholder {
    color: #bbb;
}

/* PIN Inputs */
.pin-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.pin-input {
    width: 60px;
    height: 60px;
    font-size: 28px;
    text-align: center;
    border: 2px solid #d0d0d0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 8px;
    font-family: inherit;
}

.pin-input:focus {
    border-color: #0d5f7b;
    box-shadow: 0 0 0 3px rgba(13, 95, 123, 0.1);
}

.pin-input::placeholder {
    letter-spacing: 0;
}

/* Continue Button */
.continue-btn {
    width: 100%;
    padding: 16px;
    background-color: #fcc60d;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(252, 198, 13, 0.3);
    font-family: inherit;
}

.continue-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(252, 198, 13, 0.2);
}

.continue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* OTP Screen Specific */
.otp-heading {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
}

/* Circular OTP Inputs */
.otp-inputs-circle {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 32px 0;
    flex-wrap: wrap;
}

.otp-input {
    width: 70px;
    height: 70px;
    font-size: 32px;
    text-align: center;
    border: 2px solid #d0d0d0;
    border-radius: 50%;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 8px;
    font-family: inherit;
    background-color: #fff;
}

.otp-input:focus {
    border-color: #fcc60d;
    box-shadow: 0 0 0 4px rgba(252, 198, 13, 0.2);
}

.otp-input::placeholder {
    letter-spacing: 0;
}

/* Resend Section */
.resend-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 12px;
}

.resend-btn {
    padding: 10px 24px;
    background-color: transparent;
    border: 2px solid #0d5f7b;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0d5f7b;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.resend-btn:hover:not(:disabled) {
    background-color: #0d5f7b;
    color: #fff;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timer {
    font-size: 14px;
    font-weight: 600;
    color: #0d5f7b;
    min-width: 30px;
}

/* Links */
.change-link,
#back-link {
    text-align: center;
    color: #0d5f7b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
    margin-top: 12px;
}

.change-link:active,
#back-link:active {
    opacity: 0.7;
}

/* Footer */
.footer {
    padding: 20px 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.agreement-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
    font-weight: 500;
}

.link {
    color: #0d5f7b;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.powered-by {
    font-size: 12px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mtn-text,
.bank-text {
    font-weight: 700;
    color: #0d5f7b;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .greeting {
        font-size: 28px;
    }

    .header {
        padding: 32px 20px 24px;
    }

    .form-section {
        padding: 24px 20px;
    }

    .pin-input {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .pin-inputs {
        gap: 10px;
    }

    .splash-title {
        font-size: 40px;
    }

    .footer {
        padding: 20px 16px;
    }

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

    .powered-by {
        font-size: 12px;
    }
}

@media (max-width: 320px) {
    .splash-title {
        font-size: 32px;
    }

    .greeting {
        font-size: 24px;
    }

    .pin-input {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .form-label {
        font-size: 14px;
    }

    .continue-btn {
        font-size: 16px;
        padding: 14px;
    }
}
