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

li {
    list-style: none;
}

a {
    text-decoration: none;
}

@font-face {
    font-family: 'Acme';
    src: url('/woogi/0.1/static/gmsui/fonts/COMMONACME-REGULAR.TTF') format('truetype');
}

[v-cloak] {
    display: none !important;
}

body, html {
    overflow: auto;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Acme", Arial, sans-serif;
    background-repeat: no-repeat;
    background-image: url("../imgs/BG_Single_w1920.png.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.popup {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(500px, 100%);
    height: max(600px, 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    overflow-y: auto;
}

.popup_bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.logo {
    width: 200px; /* Use fixed width for consistency, adjust as needed */
    height: auto;
    max-height: 200px;
    /* margin: 4vh; */
    transform: translateX(15px); /* Shifted right by 10px to compensate for shadow */
    display: block;
    position: relative;
    z-index: 1;
}

.expanded-content {
    position: relative;
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
    width: 90%;
    height: auto;
    align-items: center;
    justify-content: center;
    gap: 0.5vh;
}

.expanded-content > p {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #fff;
    margin-bottom: 1vh;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.error {
    color: #ff0000;
    margin: 1vh 0;
    text-align: center;
    width: 100%;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
}

.popup_title {
    position: absolute;
    background-color: rgba(255,255,255,0.6);
    border-radius: 10%;
    /* margin: 0 auto; */
    left: 1%;
    width: 84%;
}

.sso-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    width: 90%;
    margin: 0.5vh auto;
    gap: 8px;
}

.sso-buttons .login-btn {
    flex: 0 0 auto;
    min-width: 0;
    height: 7vh;
    max-height: 67px; /* sign_in: 67px, register: 60px. Use larger for safety */
    background-image: url("../imgs/BigRedBtn_Normal.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    font-size: clamp(1.5rem, 2vw, 1.8rem);
    border-radius: 0;
    font-family: "Acme";
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 2px 0 1px black, 2px 0 2px black, 0 -2px 2px black, 0 2px 2px black;
    width: 50%;
    cursor: pointer;
}

.sso-buttons .login-btn p {
    position: absolute;
    color: #fff;
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    font-family: "Acme";
    width: 100%;
    text-align: center;
    margin: 0;
    pointer-events: none;
    z-index: 2;
}

.sso-button .btn-container {
    position: relative;
}

.sso-buttons .btn-container p {
    position: absolute;
    color: #fff;
}

.expanded-content .login_in_with {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin: 0.5vh auto;
    gap: 8px;
}

.login_in_with .dots {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 59px;
}

.login_in_with .dots img {
    width: 100%;
    height: auto;
    max-height: 8px;
}

.login_in_with .text {
    flex: 0 1 auto;
    text-align: center;
    font-weight: bold;
    font-size: clamp(0.8rem, 1.2vw, 1.2rem);
    white-space: nowrap;
}

.login_in_with .dots:first-child img {
    transform: rotateY(180deg);
}

.login-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* gap: 1vh; */
    /* margin-top: 0.5vh; */
    width: 100%;
}

.input-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.3vh auto;
}

.input-container img {
    width: 80%;
    max-width: 500px;
    height: auto; /* sign_in: auto, register: 7vh+max-height. Use auto for flexibility */
}

.input-container input {
    position: absolute;
    width: 72%;
    height: 77%;
    border: none;
    outline: none;
    background-color: transparent;
    color: #333;
    font-size: clamp(1rem, 1.5vw, 1.8rem);
    font-family: "Acme";
    text-align: center;
    line-height: normal;
    display: flex;
    align-items: center;
}

.input-container input::placeholder {
    color: rgba(51, 51, 51, 0.6);
    line-height: normal;
}

.input-container:last-child img {
    width: 80%;
    max-width: 500px;
}

.input-container:last-child {
    cursor: pointer;
}

.input-container:last-child p {
    position: absolute;
    color: #fff;
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    font-family: "Acme";
    width: 100%;
    text-align: center;
    margin: 0;
    pointer-events: none;
    z-index: 2;
}

.popup p {
    color: #02265c;
    line-height: 1.2;
}

.signup-btn {
    width: 80%;
    padding: 10px 30px;
    background-color: #009fe6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.close-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 8%;
    z-index: 1;
    cursor: pointer;
}

.close-btn:hover {
    color: #333;
}

input:-webkit-autofill {
    -webkit-text-fill-color: #000;
    transition: background-color 86400s ease-in-out 0s;
}

input:-internal-autofill-previewed,
input:-internal-autofill-selected {
    -webkit-text-fill-color: #000;
    transition: background-color 86400s ease-out 0.5s;
}

.login-tips {
    color: #4dace9;
    margin-top: 7px;
    font-size: clamp(1.5rem, 2vw, 2.5rem);
}

@supports (-webkit-overflow-scrolling: touch) {
    body, html {
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .overlay {
        position: absolute;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- MEDIA QUERIES --- */

@media (max-width: 767px) {

    .logo {
        margin-bottom: 0.5vh;
    }

    .expanded-content {
        width: 90%;
        margin: 10.5vw auto;
        gap: 0.5vh;
    }

    .expanded-content > p {
        font-size: clamp(1.5rem, 3vw, 2.2rem);
        margin-bottom: 0.5vh;
    }

    .sso-buttons {
        width: 90%;
        gap: 8px;
    }

    .sso-buttons .login-btn {
        height: 50px;
        width: 50%;
    }

    .expanded-content .login_in_with {
        width: 90%;
        gap: 5px;
    }

    .login_in_with .text {
        font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    }

    .input-container img,
    .input-container:last-child img {
        width: 90%;
    }

    .input-container input {
        width: 80%;
        font-size: clamp(0.9rem, 2vw, 1.5rem);
    }

    .input-container:last-child p {
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }

    .error {
        width: 90%;
    }
}

@media (max-width: 500px) {
    .sso-buttons .login-btn {
        height: 50px;
        width: 50%;
    }

    .input-container:last-child p {
        font-size: 7vw;
    }

    .login-tips {
        color: #4dace9;
        margin-top: 7px;
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }
}

@media (orientation: landscape) and (max-height: 1000px){

    .logo {
        margin-bottom: 0.5vh;
    }

    .expanded-content {
        width: 90%;
        margin: 2.5rem auto;
        gap: 0.5vh;
    }

    .expanded-content > p {
        font-size: clamp(1.5rem, 3vw, 2.2rem);
        margin-bottom: 0.5vh;
    }

    .sso-buttons {
        width: 90%;
        gap: 8px;
    }

    .sso-buttons .login-btn {
        height: 50px;
        width: 50%;
    }

    .expanded-content .login_in_with {
        width: 90%;
        gap: 5px;
    }

    .login_in_with .text {
        font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    }

    .input-container img,
    .input-container:last-child img {
        width: 90%;
    }

    .input-container input {
        width: 80%;
        font-size: clamp(0.9rem, 2vw, 1.5rem);
    }

    .input-container:last-child p {
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }

    .error {
        width: 90%;
    }

    .login-tips {
        color: #4dace9;
        margin-top: .5vw;
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }
}

@media (orientation: landscape) and (max-height: 800px){

    .logo {
        width: 120px;
        margin-bottom: 0.5vh;
    }

    .expanded-content {
        width: 90%;
        margin: 2.5rem auto;
        gap: 0.5vh;
    }

    .expanded-content > p {
        font-size: clamp(1.5rem, 3vw, 2.2rem);
        margin-bottom: 0.5vh;
    }

    .sso-buttons {
        width: 90%;
        gap: 8px;
    }

    .sso-buttons .login-btn {
        height: 50px;
        width: 50%;
    }

    .expanded-content .login_in_with {
        width: 90%;
        gap: 5px;
    }

    .login_in_with .text {
        font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    }

    .input-container img,
    .input-container:last-child img {
        width: 90%;
    }

    .input-container input {
        width: 80%;
        font-size: clamp(0.9rem, 2vw, 1.5rem);
    }

    .input-container:last-child p {
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }

    .error {
        width: 90%;
    }

    .login-tips {
        color: #4dace9;
        margin-top: .5vw;
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }
}

@media (orientation: landscape) and (max-height: 645px){

    .expanded-content {
        width: 90%;
        margin: 0vw auto;
        gap: 0.5vh;
    }

    .expanded-content > p {
        font-size: clamp(1.5rem, 3vw, 2.2rem);
        margin-bottom: 0.5vh;
    }

    .sso-buttons {
        width: 90%;
        gap: 8px;
    }

    .sso-buttons .login-btn {
        height: 50px;
        width: 50%;
    }

    .expanded-content .login_in_with {
        width: 90%;
        gap: 5px;
    }

    .login_in_with .text {
        font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    }

    .input-container img,
    .input-container:last-child img {
        width: 90%;
        height: 7vh;
    }

    .input-container input {
        width: 80%;
        font-size: clamp(0.9rem, 2vw, 1.5rem);
    }

    .input-container:last-child p {
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }

    .error {
        width: 90%;
    }

    .login-tips {
        color: #4dace9;
        margin-top: .5vw;
        font-size: clamp(1.2rem, 2.5vw, 2rem);
    }
}
@media (orientation: landscape) and (max-height: 500px) {

    .expanded-content {
        margin: 0.5rem auto;
        padding: 0.5rem 0;
        gap: 0.3vh;
    }

    .sso-buttons {
        width: 85%;
        margin: 0.3vh auto;
    }

    .login_in_with {
        margin: 0.3vh auto;
        width: 85%;
    }

    .login-info {
        gap: 0.5vh;
        width: 85%;
    }

    .input-container {
        margin: 0.3vh 0;
    }

    .input-container img,
    .input-container:last-child img {
        width: 70%;
        height: 5vw;
    }

    .input-container input {
        width: 60%;
    }

    .sso-buttons .login-btn {
        height: 5vw;
    }

    .login-tips {
        color: #4dace9;
        margin-top: .5vw;
        font-size: 2.5vw;
    }
} 