@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4070f4, #265df2);
    padding: 20px;
    overflow: hidden;
}

.container {
    max-width: 1000px;
    width: 100%;
    border-radius: 10px;
    padding: 40px;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    max-height: 100vh;
    overflow: hidden;
}

.container header {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.container header::after {
    content: "";
    display: block;
    height: 4px;
    width: 45%;
    background-color: #4070f4;
    margin: 10px auto;
    border-radius: 5px;
}

.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 14px;
    color: #666;
    position: relative;
    transition: all 0.3s ease;
    min-width: 150px;
}

.step.active {
    background: #4070f4;
    color: #fff;
}

.step span {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    background: #fff;
    color: #4070f4;
    border-radius: 50%;
    margin-right: 8px;
    font-weight: 500;
}

.step.active span {
    background: #265df2;
    color: #fff;
}

form {
    position: relative;
    overflow: hidden;
    height: calc(100% - 120px);
}

.form {
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.form:not(.active) {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    position: absolute;
}

.form.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    position: relative;
}

.scrollable-content {
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    flex-grow: 1;
}

.title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #4070f4;
    padding-bottom: 5px;
}

.fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: start;
    max-width: 100%;
    overflow-x: hidden;
}

.input-field {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
}

.input-field label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 5px;
}

.input-field input,
.input-field select {
    height: 45px;
    padding: 0 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.input-field input:focus,
.input-field select:focus {
    border-color: #4070f4;
    box-shadow: 0 0 5px rgba(64, 112, 244, 0.3);
}

.input-field input[type="file"] {
    padding: 10px;
    height: auto;
}

.buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
    padding: 10px 20px;
    background: #fff;
    border-top: 1px solid #eee;
}

button {
    height: 45px;
    padding: 0 20px;
    border: none;
    border-radius: 5px;
    background: #4070f4;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

button:hover {
    background: #265df2;
}

.backBtn {
    background: #666;
}

.backBtn:hover {
    background: #555;
}

.submitBtn {
    background: #28a745;
}

.submitBtn:hover {
    background: #218838;
}

.otp-btn {
    height: 45px;
    padding: 0 20px;
    background: #4070f4;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
    min-width: 120px; /* Consistent width */
}

.otp-btn:hover {
    background: #265df2;
}

.otp-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* OTP Section Styling */
.otp-section {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between elements */
}

/* Override .input-field flex-direction for OTP section */
.input-field.otp-section {
    flex-direction: row;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    align-items: center;
}

.input-field.otp-section input {
    width: 150px; /* Fixed width for OTP input */
    margin: 0; /* Remove extra margins */
}

.input-field.otp-section .otp-btn {
    margin-top: 0; /* Align with input */
}

/* Timer Styling */
#otpTimer {
    font-size: 14px;
    font-weight: 500;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    color: #333;
    display: inline-block; /* Ensure it stays inline */
}

/* Specific alignment for Account Information */
.details.personal .fields {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: #4070f4;
    border-radius: 10px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #265df2;
}

@media (max-width: 1024px) {
    .fields {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 30px;
    }
    .steps {
        flex-direction: column;
        gap: 15px;
    }
    .step {
        min-width: 100%;
    }
    .scrollable-content {
        max-height: 350px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    .fields {
        grid-template-columns: 1fr;
    }
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    button {
        width: 100%;
    }
    .scrollable-content {
        max-height: 300px;
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .input-field.otp-section {
        flex-direction: column;
        align-items: flex-start;
    }
    .input-field.otp-section input {
        width: 100%;
    }
    .otp-btn {
        width: 100%;
    }
    #otpTimer {
        margin-top: 10px;
    }
}