html,
body {
    margin: 0;
    height: 100%;
    -webkit-overflow-scrolling: touch;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #e4e6ea;
}

@font-face {
    font-family: "default";
    src: url("fonts/gotham-book.ttf") format("truetype"),
        url("fonts/gotham-book.woff") format("woff"),
        url("fonts/gotham-book.eot") format("embedded-opentype"),
        url("fonts/gotham-book.eot?#iefix") format("embedded-opentype"),
        url("fonts/gotham-book.otf") format("opentype");
}

@font-face {
    font-family: "header";
    src: url("fonts/gotham-bold.ttf") format("truetype"),
        url("fonts/gotham-bold.woff") format("woff"),
        url("fonts/gotham-bold.eot") format("embedded-opentype"),
        url("fonts/gotham-bold.eot?#iefix") format("embedded-opentype"),
        url("fonts/gotham-bold.otf") format("opentype");
}

#div-form {
    max-width: 960px;
    max-height: 540px;
    width: 53vw;
    height: 30vw;
    background-color: #ffc45c;
    background-size: cover;
    margin: 1em auto;
}

::-webkit-scrollbar {
    background: #fdfff2;
    border: 1px solid #dbdbdb;
}

/* Track */
::-webkit-scrollbar-track {}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #dbdbdb;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #dbdbdb;
}

.box-register-tos-agree {
    font-size: 1em;
}

.box-exit-form {
    background: rgba(255, 255, 255, 1);
    color: #000000;
    margin: 1em;
    padding: 1em;
    overflow-y: none;
}

.box-exit-form form {
    margin: auto;
    /* left: 30%; */
    /* width: 30%; */
}

/* LEADERBOARD */

.box-leaderboard {
    background: #fdfff2;
    color: #000000;
    margin: auto;
    display: flex;
    max-width: 480px;
    flex-direction: column;
}

.box-leaderboard-ok-button {
    width: 100%;
}

.box-leaderboard-image {
    width: 100%;
}

.box-leaderboard-image img {
    max-width: 300px;
}

.box-leaderboard-navigation {
    /*border:1px solid #000;*/
    font-size: 2em;
    margin: 0;
    padding: 0;
    /*    margin: 0 0.2em 0 0.2em;*/
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.box-leaderboard-navigation a {
    text-decoration: none;
}

.span_2_of_4_leaderboard {
    display: table;
}

.span_2_of_4_leaderboard a {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

.box-leaderboard-navigation-item {
    text-align: center;
    padding: 0;
    height: auto;
    font-size: 0.65em;
}

.box-leaderboard-navigation-item-highlighted {
    background-color: rgba(204, 204, 204, 0.3);
    /* lighter color */
}

.box-leaderboard-col-header {
    font-family: -apple-system, BlinkMacSystemFont, "header";
    padding: 0 0.5em 0 0.45em;
    font-size: 1.16em;
    font-weight: 300;
    color: #000000;
}

.box-leaderboard-icon img {
    padding: 0.2em 0 0 0;
    width: 80%;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    /*border:1px solid #ccc;*/
}

.box-leaderboard-rank {
    padding: 0.5em;
    /*border:1px solid #ccc;*/
}

.box-leaderboard-username {
    padding: 0.5em;
    text-align: left;
    padding-left: 0.9em;
    /*border:1px solid #ccc;*/
}

.box-leaderboard-score {
    padding: 0.5em;
}

.box-leaderboard-entry {
    /* Basic solution. Better is to have scrollbar sticking to right border
    max-height:300px;
    overflow-y:scroll;    
    */
    /*overflow-y:scroll;*/
}

.box-leaderboard-subheader a {
    color: #f99c06;
    /*text-shadow: 2px 2px #000;*/
}

.box-leaderboard-header {
    background-color: #043d60;
    font-family: -apple-system, BlinkMacSystemFont, "header";
    font-weight: 800;
    text-align: center;
    font-size: 2em;
    text-transform: uppercase;
    color: white;
    -webkit-text-fill-color: white;
    padding: 0.5em 0.5em 0.5em 0.5em;
    position: relative;
}

.box-leaderboard-subheader {
    font-size: 0.8em;
    margin: 0.8em;
}

.box-leaderboard-footer {
    margin: 0.4em;
    font-size: 1.1em;
    text-align: center;
}

.box-leaderboard-subheader {
    margin: 0.4em;
    font-size: 1em;
    text-align: center;
}

.box-leaderboard-contents {
    margin: 0.5em;
    flex: 1;
    overflow-y: auto;
}

.box-user-leaderboard-contents {
    margin: 0.5em;
}

.box-leaderboard-header,
.box-leaderboard-footer,
.box-leaderboard-navigation {
    flex-shrink: 0; /* prevents shrinking */
    flex-grow: 0;   /* prevents growing */
}

.box-leaderboard-close {
    text-align: right;
    background-image: url("images/close.png");
}

.span_2_of_10_leaderboard .box-leaderboard-score {
    padding-left: 1.4em !important;
}

/* LOGIN */

.box-login {
    color: #000000;
    font-size: 0.9em;
    margin: 1em;
    padding: 0.5em;
    overflow-y: none;
}

.box-login-header {
    text-align: center;
    font-size: 1.8em;
    color: #1a4a5c;
    -webkit-text-fill-color: #1a4a5c;
    background-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "header", Arial, sans-serif;
    font-weight: 900;
    margin: 0.2em 0 0.6em 0;
    padding: 0;
    text-transform: uppercase;
}

.box-login-subheader {
    font-size: 0.8em;
    margin: 0.8em;
}

.box-login-footer {
    font-size: 1.1em;
}

.box-login-contents {
    margin: 0.5em;
}

.box-login-close {
    width: 24px;
    height: 24px;
    text-align: right;
    float: right;
    background-image: url("images/close.png");
}

.box-login-close-leaderboard {
    position: absolute;
    top: 0;
    right: 0;
}

.box-register-celebrity-central {
    background-color: #043d60;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "default";
    font-weight: 200;
    font-size: 1em;
    color: white;
    -webkit-text-fill-color: white;
    padding: 0.5em 0.5em 0.5em 0.5em;
    position: relative;
}

/* for register/login/reset password forms*/
.popup-fullscreen {
    background-color: #f2f2f2;
    background-repeat: repeat;
    overflow: auto;
}

#popup-game-access {
    background: #ffc45c;
    overflow-y: auto;
}

.popup-input-wrapper {
		margin-top: 10px;
	}

.popup-input {
	width: 50%;
	padding: 10px;
	font-size: 14px;
	box-sizing: border-box;
}
/* REGISTER */

.box-register {
    color: #000000;
    font-size: 0.9em;
    margin: 0 auto;
    padding: 1.2em 1.4em 1em 1.4em;
    position: relative;
    z-index: 5000;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    max-width: 480px;
    height: auto !important;
    max-height: none;
}

/* 2. STYLE KHUSUS MOBILE (Hanya berlaku di layar kecil) */
/* @media screen and (max-width: 768px) {
    .box-register {
        display: block;
        
        height: 60vh !important; 
        max-height: 90vh;
        overflow-y: auto !important;
        
        -webkit-overflow-scrolling: touch; 
        touch-action: pan-y;               
        overscroll-behavior: contain;      
    }
} */

.box-register-header {
    text-align: center;
    font-size: 2.4em;
    color: #1a3d52;
    -webkit-text-fill-color: #1a3d52;
    background-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "header", Arial, sans-serif;
    font-weight: 900;
    margin: 0.1em 0 0.5em 0;
    padding: 0;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 1.1;
}

img.box-register-header-image {
    width: 100% !important;
    margin-top: 5px;
}

.box-register-subheader {
    font-size: 0.8em;
    margin: 0.8em;
}

.box-register-footer {
    font-size: 1.1em;
}

.box-register-contents {
    margin: 0.5em;
}

.box-register-close {
    width: 24px;
    height: 24px;
    text-align: right;
    float: right;
    background-image: url("images/close.png");
}

.box-register-celebrity-central {
    font-size: 1.3em;
    color: #1a3d52;
    -webkit-text-fill-color: #1a3d52;
    background-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "default", Arial, sans-serif;
    font-weight: 600;
    margin: 0.1em 0 0.5em 0;
    padding: 0;
    letter-spacing: 0.01em;
    text-align: center;
    line-height: 1.1;
}

#game-access-code {
    text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="number"] {
    min-height: 52px;
    margin-top: 0;
    margin-bottom: 0.7em;
    width: 100%;
    font-size: 1.15em;
    border: 2px solid #2a5c72;
    border-radius: 30px;
    background: #fefde8;
    color: #000000;
    padding: 0.3em 1.2em;
    outline: none;
    transition: border-color 0.2s;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "default", Arial, Helvetica, sans-serif;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #1a3d52;
    background: #fffde0;
}


.box-register-note {
    font-size: 0.8em;
    margin-top: 0.5em;
    font-family: -apple-system, BlinkMacSystemFont, "default", Arial, Helvetica,
        sans-serif;
}

.box-register-terms {
    font-size: 1em;
    padding-top: 0.5em;
    padding-bottom: 2em;
}

/* 
.register-submit input {
    width: 40%;
    margin-left: 30%;
    margin-right: 30%;
} */

input[type="submit"] {
    display: block;
    margin: 0.4em auto 0.2em auto;
    width: 85%;
    font-size: 1.7em;
    background-color: #bb2211;
    color: #fff;
    border: none;
    border-radius: 35px;
    padding: 0.4em 1em;
    font-family: -apple-system, BlinkMacSystemFont, "header", Arial, sans-serif;
    font-weight: 900;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(160,20,10,0.3);
    position: static;
    left: auto;
    transform: none;
    -ms-transform: none;
    transition: background-color 0.2s;
    text-transform: uppercase;
}

input[type="submit"]:hover,
.button:hover {
    -webkit-appearance: none;
    background-color: #aa1a00;
    text-decoration: none;
}

.button {
    text-decoration: none;
    display: block;
    margin: 0.4em auto 0.2em auto;
    width: 85%;
    font-size: 1.7em;
    background-color: #bb2211;
    color: #fff;
    border: none;
    border-radius: 35px;
    padding: 0.4em 1em;
    font-family: -apple-system, BlinkMacSystemFont, "header", Arial, sans-serif;
    font-weight: 900;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(160,20,10,0.3);
    position: static;
    left: auto;
    transform: none;
    -ms-transform: none;
    text-align: center;
    text-shadow: none;
    text-transform: uppercase;
}

/* 
.register-submit input {
    display: block;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.25em;
    padding: 0.7em 1.2em;  
} */

/* REGISTER */

.box-reset-password {
    color: #000000;
    font-size: 0.9em;
    margin: 1em;
    padding: 0.5em;
}

.box-reset-password-header {
    text-align: center;
    font-size: 1.8em;
    color: #1a4a5c;
    -webkit-text-fill-color: #1a4a5c;
    background-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "header", Arial, sans-serif;
    font-weight: 900;
    margin: 0.2em 0 0.6em 0;
    padding: 0;
    text-transform: uppercase;
}

.box-reset-password-subheader {
    font-size: 0.8em;
    margin: 0.8em;
}

.box-reset-password-footer {
    /* border-top: 1px solid #ccc; */
    font-size: 1.1em;
    margin: 0;
    padding-top: 0.4em;
}

.box-reset-password-contents {
    margin: 0.5em;
}

.box-reset-password-close {
    width: 24px;
    height: 24px;
    text-align: right;
    float: right;
    background-image: url("images/close.png");
}

/* POPUP */

.box-popup {
    background-color: #f2f2f2;
    background-repeat: repeat;
    color: #000000;
    font-size: 1em;
    margin: auto;
    max-width: 420px;
}

.box-popup-header {
    text-align: center;
    font-size: 2em;
    color: white;
    -webkit-text-fill-color: white;
    background-color: #043d60;
    font-family: -apple-system, BlinkMacSystemFont, "header";
    font-weight: 800;
    /* border-bottom: 1px solid #ccc; */
    /*margin: 0.35em;*/
    margin-bottom: 0.5em;
    padding-top: 0.3em;
    padding-bottom: 0.3em;
}

.box-popup-subheader {
    font-size: 0.8em;
    margin: 0.8em;
}

.box-popup-footer {
    border-top: 1px solid #ccc;
    font-size: 0.8em;
    margin: 0.8em;
    padding-top: 0.4em;
}

.box-popup-contents {
    text-align: center;
    font-size: 1.2em;
    margin: 0.5em;
}

.box-popup-close {
    width: 24px;
    height: 24px;
    text-align: right;
    float: right;
    background-image: url("images/close.png");
}

.box-leaderboard-entry {
    font-size: 1em;
}

::placeholder {
    color: #0C1010;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #0C1010;
}

::-ms-input-placeholder {
    color: #0C1010;
}

@media only screen and (max-width: 500px) {
    /*
    .box-leaderboard-entry {
        font-size: 1em;
    }
*/
    /*
    .box-leaderboard-navigation-item {
        height: 1.6em;
        font-size: 1em;
    }
*/
    /*
    .box-leaderboard-footer {
        margin: 0.4em;
        font-size: 1em;
    }
*/
    /* .box-login-footer {
        font-size: 1em;
    }

    .box-register-footer {
        font-size: 1em;
    }

    .box-register-tos-agree {
        font-size: 1em;
    }

    .box-reset-password-footer {
        font-size: 1em;
    } */
}

/* LOADER */
.newtons-cradle {
    --uib-size: 50px;
    --uib-speed: 1.2s;
    --uib-color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--uib-size);
    height: var(--uib-size);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
}

.newtons-cradle__dot {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    width: 25%;
    transform-origin: center top;
}

.newtons-cradle__dot::after {
    content: "";
    display: block;
    width: 100%;
    height: 25%;
    border-radius: 50%;
    background-color: var(--uib-color);
}

.newtons-cradle__dot:first-child {
    animation: swing var(--uib-speed) linear infinite;
}

.newtons-cradle__dot:last-child {
    animation: swing2 var(--uib-speed) linear infinite;
}

@keyframes swing {
    0% {
        transform: rotate(0deg);
        animation-timing-function: ease-out;
    }

    25% {
        transform: rotate(70deg);
        animation-timing-function: ease-in;
    }

    50% {
        transform: rotate(0deg);
        animation-timing-function: linear;
    }
}

@keyframes swing2 {
    0% {
        transform: rotate(0deg);
        animation-timing-function: linear;
    }

    50% {
        transform: rotate(0deg);
        animation-timing-function: ease-out;
    }

    75% {
        transform: rotate(-70deg);
        animation-timing-function: ease-in;
    }
}

.overlay-background {
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    min-height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10003;
    display: none;
}
/* start custom checkbox */
.material-checkbox {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #000000;
    cursor: pointer;
}

.material-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    border: 2px solid #000000;
    border-radius: 4px;
    transition: all 0.3s;
}

.material-checkbox input[type="checkbox"]:checked~.checkmark {
    background-color: #00509E;
    border-color: #0077B6;
}

.material-checkbox input[type="checkbox"]:checked~.checkmark:after {
    content: "";
    position: absolute;
    top: 1px;
    left: 5px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.material-checkbox input[type="checkbox"]:focus~.checkmark {
    box-shadow: 0 0 0 2px #B0E0E6;
    /* Updated to a light blue shade */
}

.material-checkbox:hover input[type="checkbox"]~.checkmark {
    border-color: #00BFFF;
    /* Updated hover color to brighter blue */
}

.material-checkbox input[type="checkbox"]:disabled~.checkmark {
    opacity: 0.5;
    cursor: not-allowed;
}

.material-checkbox input[type="checkbox"]:disabled~.checkmark:hover {
    border-color: #4d4d4d;
}
/* end custom checkbox */
.box-leaderboard-entry-highlighted {
    background-color: #DCEEFB;
}

/* Make the parent fill the screen and use flexbox for centering */
#card-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	/* overflow: auto; */
}

#card-content {
	border: 3px solid #E87433;
	width: 90%;
	max-width: 980px;
	max-height: 108vh;
	background-color: #FFFFFF;
	position: relative;
	overflow-y: auto;
	overflow-x: clip;
}

#card-content>div:not(:first-child) {
	margin: 10px;
}

#card-preview {
	position: relative;
	width: 101%;
}

#card-preview>img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

#card-popup-close-btn {
	position: absolute;
	top: -1px;
	right: -1px;
	background: none;
	border: none;
	font-size: 28px;
	color: #E87433;
	cursor: pointer;
	z-index: 1001;
}

#card-message {
	text-align: center;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.25rem);
    color: black;
    -webkit-text-fill-color: black;
    font-family: -apple-system, BlinkMacSystemFont, "default";
    font-weight: 400;
    /* border-bottom: 1px solid #ccc; */
    margin: 0.35em;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
    padding-top: 0.3em;
}

#share-btn {
	margin: 1em auto 1em auto;
	padding-bottom: 8px;
}

#card-download-btn {
	position: absolute;
	bottom: 12px;
	right: 20px;
	background: #E87433;
	color: white;
	border: 2px solid #E87433;
	padding: 5px 8px;
	border-radius: 3px;
	font-size: 15px;
	cursor: pointer;
	z-index: 1002;
}

@media all and (max-width: 1200px) and (min-width: 600px) and (max-height: 600px) and (min-height: 200px) {

    #card-content {
        border: 3px solid #E87433;
        width: 50%;
        height: 90%;
        max-width: 980px;
        max-height: 108vh;
        background-color: #FFFFFF;
        position: relative;
        overflow-y: auto;
        overflow-x: clip;
    }
}

/* === COLLAB SIGN-UP CARD EXTRAS === */

/* Logo above the card */
.box-register-logo {
    text-align: center;
    margin-bottom: 0.8em;
}

.box-register-logo img {
    width: 90px;
    height: auto;
}

/* Footer link style */
.box-register-footer,
.box-login-footer,
.box-reset-password-footer {
    text-align: center;
    font-size: 1em;
    color: #444;
}

.box-register-footer a,
.box-login-footer a,
.box-reset-password-footer a {
    color: #1a4a5c;
    font-weight: bold;
    text-decoration: underline;
}

/* reCAPTCHA centering */
.captchas {
    display: flex;
    justify-content: center;
    margin: 0.4em 0;
}

/* Checkbox label */
.box-register-tos-agree {
    font-size: 1em;
    color: #333;
}

.box-register-tos-agree a {
    color: #1a4a5c;
}

/* === NEW SIGN-UP DESIGN EXTRAS === */

/* Dual logo row */
.box-register-logos {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.6em, 3vw, 1.4em);
    margin-top: 0;
    margin-bottom: 0.7em;
    padding: 0em 4.2em;
    flex-wrap: nowrap;
}

.box-register-logo-collab {
    width: clamp(55px, 18vw, 90px);
    height: auto;
    flex-shrink: 0;
}

.box-register-logo-partner {
    width: clamp(100px, 32vw, 160px);
    height: auto;
    flex-shrink: 0;
}

/* Stack logos vertically on very small screens */
@media only screen and (max-width: 320px) {
    .box-register-logos {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }

    .box-register-logo-collab {
        width: 60px;
    }

    .box-register-logo-partner {
        width: 110px;
    }
}

/* Styled select to match pill inputs */
.box-register-select,
select.box-register-form-input {
    min-height: 52px;
    margin-top: 0;
    margin-bottom: 0.7em;
    width: 100%;
    font-size: 1.15em;
    font-weight: bold;
    border: 2px solid #2a5c72;
    border-radius: 30px;
    background: #fefde8;
    color: #0C1010;
    padding: 0.3em 2.5em 0.3em 1.2em;
    outline: none;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "default", Arial, Helvetica, sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%232a5c72' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1em center;
    cursor: pointer;
}

.box-register-select option[value=""] {
    color: #0C1010;
    font-weight: bold;
}

/* Login header matching */
.box-login-header {
    text-align: center;
    font-size: 2.4em;
    color: #1a3d52;
    -webkit-text-fill-color: #1a3d52;
    background-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "header", Arial, sans-serif;
    font-weight: 900;
    margin: 0.1em 0 0.5em 0;
    padding: 0;
    text-transform: uppercase;
    line-height: 1.1;
}

/* Reset password header matching */
.box-reset-password-header {
    text-align: center;
    font-size: 2.4em;
    color: #1a3d52;
    -webkit-text-fill-color: #1a3d52;
    background-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "header", Arial, sans-serif;
    font-weight: 900;
    margin: 0.1em 0 0.5em 0;
    padding: 0;
    text-transform: uppercase;
    line-height: 1.1;
}


/* =====================================================
   FORM OVERLAY — true centered modal, content-sized card
   ===================================================== */

/* Backdrop: full screen, flex-centered */
#register.overlay-container-basic,
#login.overlay-container-basic,
#reset-password.overlay-container-basic {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10004;
    background: rgba(120, 125, 130, 0.75) !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* flex centering — JS .show() sets display:block, overridden below */
    display: none;
    align-items: center;
    justify-content: center;
}

/* Force flex when jQuery shows the overlay */
#register.overlay-container-basic[style*="block"],
#login.overlay-container-basic[style*="block"],
#reset-password.overlay-container-basic[style*="block"] {
    display: flex !important;
}

/* Hide blank spacer columns — flex handles centering */
#register .overlay_span_side,
#login .overlay_span_side,
#reset-password .overlay_span_side {
    display: none !important;
}

/* Middle column: centered, capped width, no float */
#register .overlay_span_middle,
#login .overlay_span_middle,
#reset-password .overlay_span_middle {
    float: none !important;
    width: 92vw !important;
    max-width: 480px !important;
    padding: 0 !important;
    box-sizing: border-box;
    display: block;
}

/* Card: white card, rounded, shrinks to content */
#box-register,
#box-login,
#box-reset-password {
    background-color: #e4e6ea !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    padding: 1.2em 1.4em 1.4em !important;
    box-sizing: border-box;
    width: 100% !important;
    height: auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    /* Neutralize JS margin-top from centerPopupVertically */
    margin-top: 0 !important;
}

.box-register,
.box-login,
.box-reset-password {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
}