body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

@font-face {
    font-family: 'Pretentard-Bold';
    src: url('/assets/Fonts/Pretendard-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Pretentard-Medium';
    src: url('/assets/Fonts/Pretendard-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Pretentard-Regular';
    src: url('/assets/Fonts/Pretendard-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    /* background-color: #1d1a19; */
    background: url(/assets/Background/Background.jpg) center no-repeat;
    background-size: cover;
}

#game-wrapper {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: visible;
    transform: scale(var(--scale, 1));
    max-width: 900px;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* background: url(/assets/Background/Background.jpg) center no-repeat;
    background-size: cover; */
    /* hidden by default */
}

#title {
    display: flex;
    flex-direction: column;
    place-items: center;
    width: 100%;
    position: relative;
    height: 15%;
    transform-origin: top center;
    margin-bottom: 2%;
    aspect-ratio: 1;
    padding-top: 7%;
}

.title-name {
    background: url(/assets/Title/Title.png) center no-repeat;
    width: 90%;
    max-width: 625px;
    background-size: contain;
    position: relative;
    height: 70%;
    margin-top: 27px;
}

#title-info {
    width: 90%;
    max-width: 625px;
    background-size: contain;
    position: relative;
    height: 30%;

    font-family: 'Pretendard-Bold', Arial, sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    text-align: center;
    margin: 0 auto;
}

.lottery-container {
    position: relative;
    width: 90%;
    /* max-width: 700px; */
    aspect-ratio: 1;
}

.wheel {
    width: 88%;
    aspect-ratio: 1 / 1;
    position: relative;
}

.wheel-background {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: absolute;
    background: url(/assets/Wheel/Ellipse_3.png) center no-repeat;
    background-size: contain;
}

.inner-wheel {
    width: 100%;
    height: 100%;
    transform: translate(350px, 350px);
}

#center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 75%;
    position: relative;
    min-block-size: fit-content;
}

.wheel-segment {
    position: absolute;
    width: 34%;
    height: 50%;
    transform-origin: bottom center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#wheel-text {
    top: 40%;
    text-align: center;
    font-weight: bold;
    font-size: 7vh;
    font-family: 'Pretentard-Medium';
    color: #ffffff;
    display: block;
    margin-bottom: 5%;
    height: 5%;
}

.segment-background {
    position: absolute;
    width: 100%;
    height: 50%;
    transform: translateY(36px);
    /* aspect-ratio: 1; */
}

.segment-label {
    position: absolute;
    top: 12%;
    text-align: center;
    font-family: 'Pretentard-Regular';
    width: 45%;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.segment-image {
    position: absolute;
    bottom: 40%;
    max-width: 16%;
    max-height: 30%;
}

.wheel-line {
    position: absolute;
    width: 10%;
    height: 47%;
    border-radius: 50%;
    transform-origin: bottom center;
    pointer-events: none;
}

.wheel-line>.wheel-light {
    position: absolute;
    width: 60%;
    height: 60%;
    background: url(/assets/Wheel/Frame_347.png) center no-repeat;
    border-radius: 50%;
    transform: translate(36%, -50%);
    transform-origin: center;
    background-size: contain;
    pointer-events: none;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20%;
    height: 20%;
    background: url(/assets/Wheel/Frame_345.png) center no-repeat;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    max-width: 144px;
    max-height: 144px;
    background-size: contain;
    -webkit-tap-highlight-color: transparent;
    /* for removing the highlight */
}

.wheel-center:hover {
    background-color: #45a049;
}

.wheel-center span {
    color: #ffffff;
    font-size: 1.2em;
}

#date-image {
    width: 270px;
    height: 60px;
    background: url(/assets/UI/Date.png) center no-repeat;
    transform-origin: center;
    background-size: contain;
    pointer-events: none;
    justify-self: center;
}

#wheel-marker {
    position: absolute;
    top: 3%;
    left: 50%;
    width: 20%;
    height: 32%;
    background: url(/assets/Wheel/Frame_342.png) center no-repeat;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    max-width: 162px;
    max-height: 220px;
    background-size: contain;
}

#popup-layer {
    position: absolute;
    pointer-events: none;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
}

/* Popup styles */

#popup {
    position: absolute;
    border-image: url(/assets/UI/Popup.png) 50 fill;
    max-width: 350px;
    max-height: 624px;
    text-align: center;
    pointer-events: all;
    width: 80%;
    height: 30%;
    background-size: contain;
    border-width: 30px;
    border-style: solid;
    box-sizing: border-box;
}

.popup-title {
    margin-top: 2%;
    font-weight: bold;
    transform-origin: center;
    text-align: center;
    font-family: 'Pretentard-Bold';
}

.popup-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 53%;
}

.popup-icon {
    max-width: 400px;
    max-height: 300px;
    margin-top: 5%;
    margin-bottom: 5%;
    height: 100%;
}

.popup-message {
    font-family: 'Pretentard-Regular';
    font-weight: bold;
    margin-top: 2%;
}

.popup-confirm-button {
    margin-top: 0%;
    margin-bottom: 1%;
    background: url(/assets/UI/Button_Default.png) center no-repeat;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 88%;
    height: 29%;
    background-size: contain;
}

.popup-confirm-button-text {
    color: #ffffff;
    font-family: 'Pretentard-Medium';
}

/* popup-mess */

#popup-mess {
    position: absolute;
    border-image: url(/assets/UI/Popup.png) 50 fill;
    max-width: 350px;
    max-height: 624px;
    text-align: center;
    pointer-events: all;
    width: 90%;
    height: 25%;
    background-size: contain;
    border-width: 30px;
    border-style: solid;
    box-sizing: border-box;
    text-align: center;
    aspect-ratio: 1.78;
    object-fit: contain !important;
}

#popup-title-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
}

#popup-mess-icon {
    width: 40px;
    height: 40px;
    background: url(/assets/UI/InfoCircle.png) center no-repeat;
    background-size: contain;
}

.popup-title-mess {
    margin-top: -4%;
    font-weight: bold;
    transform-origin: center;
    font-family: 'Pretentard-Bold';
    margin-left: 12px;
}

.popup-mess-content {
    font-family: 'Pretentard-Regular';
    margin-top: 5%;
    height: 48%;
    width: 100%;
    justify-self: center;
    text-align: left;
    font-size: 14px;
}

.popup-confirm-button-mess {
    /* margin-top: 5%; */
    margin-bottom: 1%;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 88%;
    height: 31%;
    background-color: #0C491C;
}

.popup-confirm-button-text-mess {
    font-size: 3.5vh;
    color: #ffffff;
    font-family: 'Pretentard-Medium';
    font-size: 16px;
}

.under {
    display: block;
    max-height: 300px;
    width: 100%;
    height: 30vh;
    background-color: #042b0e;
    height: 25%;
    align-content: center;
    overflow-y: hidden;
}

#version {
    font-size: 1vh;
    font-family: 'Pretentard-Regular';
    color: #D3D3D5;
    margin-left: 5%;
    margin-top: 2%;
    height: 100%;
    margin-right: 9%;
}

#version2 {
    font-size: 1vh;
    font-family: 'Pretentard-Regular';
    color: #D3D3D5;
    margin-left: auto;
}

.under-message {
    font-size: 2.5vh;
    font-family: 'Pretentard-Regular';
    color: white;
    margin-left: 5%;
    margin-top: 25px;
    height: 100%;
    width: 89%;
    font-weight: 500;
    text-align: center;
}

#game-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 75%;
    flex-direction: column;
    align-items: center;
}

/* ----- */
#popup-reward {
    position: absolute;
    border-image: url(/assets/UI/Popup.png) 22 fill;
    max-width: 350px;
    max-height: 624px;
    text-align: center;
    pointer-events: all;
    width: 80%;
    height: 42%;
    background-size: cover;
    border-width: 12px;
    border-style: solid;
    box-sizing: border-box;
}

.popup-title-reward {
    margin-top: 4px;
    font-weight: bold;
    transform-origin: center;
    text-align: center;
    font-family: 'Pretentard-Bold';
    font-size: 18px;
}

.popup-icon-container-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36%;
}

.popup-icon-reward {
    max-height: 102px;
    margin-top: 5%;
    margin-bottom: 5%;
    height: 30%;
    width: 75%;
    text-align: left;
    background: url(/assets/UI/LogoCoupon.png) center no-repeat;
    background-size: contain;
    position: absolute;
    z-index: 10;
}

#popup-reward-content-wrapper {
    line-break: anywhere;
    width: 70%;
    align-items: normal;
    align-self: baseline;
}

.reward-content-wrapper {
    position: absolute;
    top: 10%;
    left: 5%;
    right: 10%;
    bottom: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.popup-message-reward {
    font-family: 'Pretentard-Regular';
    font-weight: bold;
    margin-top: 2%;
    z-index: 11;
    font-size: 16px;
}

.popup-confirm-button-reward {
    margin-top: 1%;
    margin-bottom: 1%;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 88%;
    height: 18%;
    background-size: contain;
    background-color: #0C491C;
}

.popup-confirm-button-text-reward {
    color: #ffffff;
    font-family: 'Pretentard-Medium';
    font-size: 16px;
}

.popup-cancel-button-reward {
    margin-bottom: 1%;
    background: url(/assets/UI/Btn_Cancel.png) center no-repeat;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 88%;
    height: 18%;
    background-size: contain;
}

.popup-cancel-button-text-reward {
    color: #ffffff;
    font-family: 'Pretentard-Medium';
}

#under-content {}

.ad-container {
    bottom: 0;
    width: 100%;
    background-color: #f1f1f1;
    text-align: center;
    font-size: 16px;
    color: #000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    height: 5%;
}

#spacer {
    height: 6%;
    display: list-item;
    opacity: 0;
}

#under-space {
    height: 25px;
    display: list-item;
    opacity: 0;
}

/* testing only */
#rotating-image {
    width: 100%;
    height: 100%;
    background-size: contain;
}

#popup-container {
    place-self: normal;
    display: flex;
    justify-content: center;
    align-items: center;
}


@keyframes light-on-off {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.5;
    }
}

@keyframes zoom-in {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

@keyframes zoom-out {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}


canvas {
    overflow-y: hidden;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    position: absolute;
    z-index: 1001;
    pointer-events: none;
}

#game-wrapper {
    transition: opacity 0.3s ease-out;
    display: flex;
}

.loader {
    border: 10px solid transparent;
    border-radius: 50%;
    border-top: 10px solid #e83c09;
    width: 50px;
    height: 50px;
    -webkit-animation: spin 2s linear infinite;
    /* Safari */
    animation: spin 1s linear infinite;
    position: absolute;
    z-index: 9999;
    display: none;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}