html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* ⛔ Prevent body scrolling */
    font-size: 16px;
    font-family: 'PingFangSC-Regular, sans-serif !important';
    background: #fff;
}

/* Fixed NAV */
.register-nav {
    max-width: 500px;
    width: 100%;
    height: 45px;
    background-color: #e03933;
    display: flex;
    align-items: center;
    color: white;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000; /* 👍 Ensure nav stays above */
    --bs-gutter-x: 0 !important;
    font-size: 18px;
}

/* Middle scrollable container */
.register-container {
    max-width: 500px;
    width: 100%;
    /* height is the space between nav + footer */
    height: calc(100vh - 45px - 52px); /* ⬅ NAV 45px + FOOTER 52px */
    margin: 45px 0 52px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow-y: auto; /* 👍 Only this scrolls */
    background: linear-gradient(to bottom, #FFFFFF, #EBEDF0);
    display: flex;
    flex-direction: column;
    padding: 0 8px;
    color: #8d8f99;
    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;
}

/* WebKit Browsers */
.register-container::-webkit-scrollbar {
    width: 6px;
}

.register-container::-webkit-scrollbar-track {
    background: transparent;
}

.register-container::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 10px;
}

.register-container::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Fixed FOOTER */
.register-footer {
    max-width: 500px;
    width: 100%;
    height: 52px;
    background-color: #EBEDF0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: #8d8f99;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
}

.btn,
.btn:focus,
.btn:focus-visible,
.btn:active,
.btn:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.btn::-moz-focus-inner {
    border: 0 !important;
}

#selectedLangIcon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.hasAccountToLogin {
    color: #8d8f99;
    font-size: 14px;
    text-align: center;
    line-height: 16px;
}

.loginLink {
    color: #e03933;
    text-decoration: underline;
}

.version-tip {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    line-height: 36px;
    color: #999;
}

.referrer-box {
    padding: 0 1.5rem !important;
}

.referrer-info {
    line-height: 40px;
    font-size: 14px;
}

.referrer-user-box {
    height: 55px;
}

.referrer-user-avatar,
.referrer-user-avatar img {
    width: 50px;
    height: 50px;
}

.register-content {
    margin-top: 20px;
}

.registration-info {
    font-size: 14px;
    height: 36px;
    padding: 20px 24px 12px 0;
}

.register-tip,
.register-tip img {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.reg-input-form {
    border-radius: 5px;
    margin: 10px 0;
}

.reg-input-field, 
.mobile-input-field,
.otp-input-field {
    height: 55px;
    padding: 5px 0;
    border-radius: 5px;
    border: 1px solid transparent;
}

.img-box {
    margin: 0 12px 0 6px;
}

.img-box img {
    width: 30px;
}

.verticalLine {
    width: 1px;
    height: 16px;
    background-color: #e3e5e8;
}

body input {
    font-weight: 400;
    font-size: 16px;
}

input {
    font: inherit;
    outline: 0;
}

.input-box,
.mobile-input-box,
.otp-input-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-box input,
.mobile-input-box input,
.otp-input-box input {
    border: none;
    width: 100%;
    padding: 10px 16px;
}

::placeholder {
    color: #C2BBBB;
    opacity: 1;
}

.input-box input:focus {
    border: none;
}

.clearButton {
    position: absolute;
    right: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgb(200, 200, 200);
    color: white;
    font-size: 12px;
    width: 14px;
    height: 14px;
    padding: 0;
    line-height: 1;
    display: none;
    /* 默认隐藏 */
}

.clearButton:hover {
    color: #e03933;
}

.check-btn,
.request-otp-btn,
.btn-login {
    border-radius: 5px;
    border: none;
    background-color: #e03933;
    color: #ffffff;
    height: 30px;
    margin-right: 10px;
    width: 50px;;
}

.eye-btn img {
    width: 24px;
}

.inputErrorTips {
    color: #f24427;
    font-size: 14px;
    display: none;
}

.verify-header {
    font-size: 14px;
    line-height: 45px;
}

.mobile-tab {
    line-height: 34px;
    border-bottom: 1px solid #e03933;
    color: #e03933;
    display: inline-block;
}

.blank {
    height: 15px;
}

.mobile-input-form,
.otp-input-form {
    margin: 0px 0px 10px 0px;
    border-radius: 5px;
}

.mobile-input-field,
.otp-input-field {
    border: 1px solid #e8e8e8;
    padding-left: 15px;
    padding-right: 16px;
    color: #2e3033;
}

.mobile-areaText {
    cursor: pointer;
}

.mobile-areaText img {
    margin-right: 16px;
    margin-left: 3px;
    width: 14px;
}

.mobile-input-box input {
    padding-left: 4px;
}

.otp-input-field {
    padding-right: 15px;;
}

.otp-id {
    min-width: 54px;
}

.request-otp-btn {
    font-size: 14px;
    padding: 0 8px;
    white-space: nowrap;
    height: 37px;
    width: 90px;
    line-height: 35px;
    margin-right: 0px;
    box-shadow: 0 0 0 1px transparent;
    transition: filter .2s;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-us {
    font-size: 14px;
    width: 100%;
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.contact {
    margin-left: 5px;
    text-decoration: underline;
    color: #e03933;
}

.submit-btn {
    width: 100%;
    height: 43px;
    line-height: 43px;
    border: none;
    border-radius: 5px;
    color: white;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    transition: filter .2s;
    background-color: #e03933;
    user-select: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.submit-btn.disabled {
    width: 100%;
    height: 43px;
    line-height: 43px;
    border: none;
    border-radius: 5px;
    color: white;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    transition: filter .2s;
    background-color: #ced1db;
    user-select: none;
    cursor: not-allowed;
    display: flex;
    justify-content: center;
    align-items: center;
}

.userAgreement {
    font-size: 14px;
    text-align: center;
    line-height: 16px;
}

.userAgreement .link {
    text-decoration: underline;
    color: #e03933;
}

.languagePopupBox,
.registerTipPopupBox,
.countryCodePopupBox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2003;

    /* Animate overlay */
    background: rgba(0, 0, 0, 0);        /* start transparent */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, background 0.35s ease, visibility 0.35s ease;
}

.languagePopupBox.show,
.registerTipPopupBox.show,
.countryCodePopupBox.show {
    background: rgba(0, 0, 0, 0.4);      /* visible overlay */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.languagePopup,
.countryCodePopup {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(110%); /* start off-screen */
    z-index: 2004;

    background: #fff;
    width: 100%;
    max-width: 500px;

    border-radius: 10px 10px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    /* Smooth slide */
    transition: transform 0.4s ease-in-out;
    will-change: transform;
}

.languagePopupBox.show .languagePopup,
.countryCodePopupBox.show .countryCodePopup {
    transform: translateX(-50%) translateY(0); /* slide up */
}

.languagePopupHeader,
.countryCodePopupHeader {
    width: 100%;
    height: 50px;
    color: #fff;
    background-color: #e03933;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.languagePopupItem,
.countryCodePopupItem {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    position: relative;
    width: 100%;
    border: none;
    background-color: #FFFFFF;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    border-top: 1px solid #e3e5e8;
}

.languagePopupItem img {
    width: 32px;
    height: 32px;
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
}

.registerTipPopupBox {
    transition: background 0.5s ease, opacity 0.5s ease, visibility 0.5s ease;
}

.registerTipPopup {
    width: 80%;
    max-width: 400px; /* 80% of 500px */
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
    color: #8d8f99;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
}

.registerTipPopupHeader {
    padding: 15px 25px 0 25px;
    text-align: center;
    line-height: 16px;
}

.registerTipPopupBody {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}

.registerTipPopupBody p {
    margin: 0;
    padding: 0;
    line-height: 16px;
}

.registerTipPopupContent {
    width: 100%;
    border-top: 1px solid #e4e6eb;
    min-height: 80px;
    margin-bottom: 14px;
    margin-top: 15px;
    display: flex;
}

.registerTipPopupContent ul {
    width: 50%;
    text-align: center;
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;
}

.registerTipPopupContent ul li {
    line-height: 20px;
}

.registerTipPopupContent ul li img {
    vertical-align: middle;
    width: 14px;
}

.registerTipPopupCloseBtn {
    border: none;
    width: 100%;
    background: none;
    text-align: center;
    line-height: 55px;
    color: #e03933;
    border-top: 1px solid #e4e6eb;
    padding: 0;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2001;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    justify-content: center;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    z-index: 2002;
}

.modal-content h3 {
    color: #e03933;
    font-weight: bold;
    font-size: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}