* {
    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;
    overflow: hidden;
}

/* Screen Container */
.screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* Splash Screen */
#splashScreen {
    background: linear-gradient(135deg, #0a2a3f 0%, #1a4d6d 100%);
    justify-content: center;
    align-items: center;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.logo-container {
    margin-bottom: 20px;
}

.splash-logo {
    width: 200px;
    height: auto;
    animation: fadeInScale 0.8s ease-in-out;
}

.tagline {
    font-size: 24px;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 1px;
    font-style: italic;
}

.version {
    font-size: 14px;
    color: #a0c4d4;
    font-weight: 400;
}

/* Loading Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 20px;
}

.spinner-small {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(26, 77, 109, 0.2);
    border-top-color: #1a4d6d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(26, 77, 109, 0.2);
    border-top-color: #1a4d6d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Step Screens */
#step1Screen,
#step2Screen,
#step3Screen,
#step4Screen {
    background-color: #ffffff;
    padding: 20px;
    overflow-y: auto;
}

/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.back-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #1a4d6d;
    cursor: pointer;
    padding: 8px 12px;
    transition: opacity 0.2s;
    flex: 0 0 auto;
}

.back-btn:hover {
    opacity: 0.7;
}

.step-logo {
    width: 120px;
    height: auto;
    flex: 1;
    text-align: center;
    margin: 0 auto;
}

.placeholder {
    flex: 0 0 auto;
    width: 40px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #d0d0d0;
    transition: background-color 0.3s, transform 0.3s;
    cursor: pointer;
}

.step-dot.active {
    background-color: #1a4d6d;
    transform: scale(1.3);
}

.step-label {
    font-size: 14px;
    color: #666;
    margin-left: 12px;
    font-weight: 500;
}

/* Step Content */
.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.step-title {
    font-size: 20px;
    color: #1a4d6d;
    text-align: center;
    font-weight: 600;
    margin-bottom: 30px;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
    color: #333;
    background-color: #f9f9f9;
}

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

.form-input:focus {
    border-color: #1a4d6d;
    background-color: #ffffff;
}

.form-input:valid {
    border-color: #4caf50;
}

/* Info Text */
.info-text {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

.resend-text {
    font-size: 14px;
    color: #999;
    text-align: center;
}

.error-msg {
    font-size: 13px;
    color: #d32f2f;
    text-align: center;
    margin-top: 12px;
    padding: 10px;
    background-color: #ffebee;
    border-radius: 6px;
    border-left: 3px solid #d32f2f;
}

/* Loader Container */
.loader-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-top: 16px;
}

.loader-container.active {
    display: flex;
}

.otp-expired-msg {
    font-size: 14px;
    color: #d32f2f;
    text-align: center;
    font-weight: 500;
    margin: 0;
}

/* Full Screen Loader */
.full-screen-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.otp-expired-msg-fullscreen {
    font-size: 16px;
    color: #d32f2f;
    font-weight: 600;
    margin: 0;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #0a2a3f 0%, #1a4d6d 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 77, 109, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

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

/* Resend Button */
.resend-btn {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    font-weight: 500;
    color: #1a4d6d;
    background: transparent;
    border: 2px solid #1a4d6d;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.resend-btn:hover {
    background-color: #f0f6f8;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    #step1Screen,
    #step2Screen,
    #step3Screen,
    #step4Screen {
        padding: 16px;
    }

    .splash-logo {
        width: 140px;
    }

    .step-logo {
        width: 90px;
    }

    .step-title {
        font-size: 18px;
        margin-bottom: 24px;
    }

    .step-content {
        padding: 0;
    }

    .submit-btn,
    .resend-btn {
        padding: 14px 16px;
        font-size: 15px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px;
    }

    .step-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
        gap: 8px;
    }

    .step-indicator {
        gap: 10px;
        margin-bottom: 32px;
    }

    .tagline {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    #step1Screen,
    #step2Screen,
    #step3Screen,
    #step4Screen {
        padding: 12px;
    }

    .splash-logo {
        width: 120px;
    }

    .step-logo {
        width: 80px;
    }

    .step-title {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .step-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .back-btn {
        font-size: 24px;
        padding: 6px 8px;
    }

    .step-indicator {
        gap: 8px;
        margin-bottom: 24px;
    }

    .step-dot {
        width: 10px;
        height: 10px;
    }

    .step-label {
        font-size: 12px;
        margin-left: 8px;
    }

    .form-group {
        gap: 6px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-input {
        padding: 11px 12px;
        font-size: 15px;
    }

    .submit-btn,
    .resend-btn {
        padding: 12px 14px;
        font-size: 14px;
    }

    .info-text,
    .resend-text {
        font-size: 13px;
    }

    .tagline {
        font-size: 18px;
    }

    .version {
        font-size: 12px;
    }

    form {
        gap: 16px;
    }

    .submit-btn {
        margin-top: 16px;
    }

    .resend-btn {
        margin-top: 8px;
    }
}

@media (max-height: 600px) {
    .step-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .step-indicator {
        margin-bottom: 15px;
    }

    .step-title {
        margin-bottom: 12px;
        font-size: 17px;
    }

    form {
        gap: 12px;
    }

    .submit-btn {
        margin-top: 8px;
    }

    .form-group {
        gap: 6px;
    }
}

@media (max-width: 600px) {
    .splash-logo {
        width: 150px;
    }

    .step-logo {
        width: 100px;
    }

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

    .tagline {
        font-size: 20px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px;
    }

    .step-header {
        gap: 10px;
    }

    .step-indicator {
        gap: 10px;
        margin-bottom: 30px;
    }

    .step-content {
        padding: 0;
    }
}
