@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: inherit;
    padding: 0;
    margin: 0;
}

html {
    font-size: 62.5%;
    height: 100vh;
    width: 100vw;
    color: white;
    font-family: 'M PLUS Rounded 1c', 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    overflow: hidden;
}

.logo-above-machine {
    position: absolute;
    /* Atau relative, tergantung kebutuhan */
    top: 13%;
    /* Sesuaikan dengan posisi yang diinginkan */
    left: 50%;
    /* Pusatkan logo */
    transform: translateX(-50%);
    /* Pusatkan logo secara horizontal */
}

#machineLogo {
    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.5s ease;
}

body {
    font-size: 1.6rem;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url(/background.png) center/cover no-repeat fixed;
    background-size: 100% 100%;
}

/* Redemption Form Styles */
/* Redemption Form Styles - Updated without dark overlay */
.redemption-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    /* Removed background: rgba(0, 0, 0, 0.7); */
}

.redemption-form {
    background: linear-gradient(135deg, #ffe6f7, #a60000);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    /* Sama dengan footer */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    color: #333;
    text-align: center;
    animation: bounceIn 0.7s ease-out;
    margin: 0 auto;
    /* Tengah secara horizontal */
}


.redemption-form h2 {
    color: #ff5e76;
    font-size: 2.4rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 1.6rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.6rem;
    transition: border 0.3s;
    background: white;
    color: #333;
}

.form-group input:focus {
    border-color: #ff5e76;
    outline: none;
    box-shadow: 0 0 8px rgba(240, 110, 91, 0.4);
}

#redeemButton {
    background: #ff5e76;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

#redeemButton:hover {
    background: #e05a48;
    transform: scale(1.05);
}

#redeemButton:active {
    transform: scale(0.98);
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 1.4rem;
    min-height: 20px;
}

/* Hide redemption form when validated */
.redemption-layer.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    70% {
        transform: scale(1.05);
    }

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

/* Original CSS below */
.dim {
    transition: 0.5s linear;
}

.dim[data-animate] {
    filter: brightness(0.6) saturate(0.8);
}

.confetti {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    perspective: 100vmin;
}

.confetti span {
    --size: 5;
    display: block;
    position: absolute;
    width: calc(var(--size) * 1px);
    height: calc(var(--size) * 1px);
    background-color: blue;
    animation: rotate linear calc(var(--rs) * 1s) infinite both;
}

#app {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app.gotcha {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app.gotcha .container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app.gotcha .container .game-layer {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
}

#app.gotcha .container .game-layer .machine-container {
    position: relative;
    white-space: nowrap;
    margin: auto;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(0) !important;
}

#app.gotcha .container .game-layer .machine-container .machine {
    position: relative;
    z-index: 1;
    max-height: 80vh;
    pointer-events: none;
}

#app.gotcha .container .game-layer .machine-container .backboard {
    z-index: 0;
    width: 15vh;
    height: 13vh;
    top: 65%;
    left: 48%;
    background-color: #6b6868;
    position: absolute;
}

#app.gotcha .container .game-layer .machine-container .title {
    --stroke-color: #ad8bd6;
    position: absolute;
    display: block;
    top: 10%;
    width: 100%;
    text-align: center;
    text-shadow: 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color);
    filter: drop-shadow(0px 2px 0px rgba(0, 0, 0, 0.2));
    font-size: 5vh;
    z-index: 3;
}

#app.gotcha .container .game-layer .machine-container .title span {
    animation: blink 0.8s linear both infinite;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(1) {
    animation-delay: 0.12s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(2) {
    animation-delay: 0.24s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(3) {
    animation-delay: 0.36s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(4) {
    animation-delay: 0.48s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(5) {
    animation-delay: 0.6s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(6) {
    animation-delay: 0.72s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(7) {
    animation-delay: 0.84s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(8) {
    animation-delay: 0.96s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(9) {
    animation-delay: 1.08s;
}

#app.gotcha .container .game-layer .machine-container .title span:nth-child(10) {
    animation-delay: 1.2s;
}

#app.gotcha .container .game-layer .machine-container .price {
    z-index: 3;
    position: absolute;
    color: #fb91c9;
    font-size: 2.5vh;
    top: 80%;
    left: 15%;
}

#app.gotcha .container .game-layer .machine-container .handle {
    z-index: 3;
    position: absolute;
    height: 3.9vh;
    left: 13%;
    top: 69%;
    cursor: pointer;
}

#app.gotcha .container .game-layer .machine-container .balls {
    position: absolute;
    top: 22%;
    left: 2%;
    width: 96%;
    height: 34.5%;
}

#app.gotcha .container .game-layer .machine-container .pointer {
    position: absolute;
    height: 15vh;
    top: 75%;
    left: 15%;
    z-index: 5;
    pointer-events: none;
}

#app.gotcha .container .game-layer .machine-container .pointer img {
    height: 100%;
    display: block;
    transform: rotate(-30deg);
    transform-origin: 0% 0%;
    animation: click 1s ease-in-out infinite both;
}

#app.gotcha .container .ui-layer {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app.gotcha .container .ui-layer .title-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app.gotcha .container .ui-layer .title-container .title h2 {
    --stroke-color: #ff5e76;
    text-align: center;
    text-shadow: 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color),
        0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color), 0px 0px 2px var(--stroke-color);
    filter: drop-shadow(0px 2px 0px rgba(0, 0, 0, 0.2));
    font-size: 5vh;
}

#app.gotcha .container .ui-layer .prize-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app.gotcha .container .ui-layer .prize-container .prize-ball-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app.gotcha .container .ui-layer .prize-container .prize-reward-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app.gotcha .container .ui-layer .prize-container .prize-reward-container>* {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#app.gotcha .container .ui-layer .prize-container .prize-reward-container .prize img {
    height: 50vh;
}

#app.gotcha .container .ui-layer .prize-container .prize-reward-container .shine img {
    height: 100vh;
    animation: spin linear 5s infinite forwards;
}

#app.gotcha .container .ball {
    --size: 8vh;
    --outline: #4c3fc2;
    --color1: #2facff;
    --color2: #ff8ff6;

    width: var(--size);
    height: var(--size);
    border-radius: 100%;
    background-color: var(--color1);
    border: solid 0.8vh var(--outline);
    position: absolute;
    overflow: hidden;
}

#app.gotcha .container .ball::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    height: 200%;
    width: 200%;
    background-color: var(--color2);
    border-radius: 100%;
    border: inherit;
    transform: translate(-25%, -5%);
}

#app.gotcha .wiggle {
    animation: wiggle 2s ease-in-out infinite both;
}

@keyframes blink {
    0% {
        color: #ffc7e5;
    }

    20% {
        color: #fcff33;
    }

    100% {
        color: #ffc7e5;
    }
}

@keyframes wiggle {
    0% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }

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

@keyframes click {
    0% {
        transform: rotate(-30deg) translateY(0vh);
    }

    80% {
        transform: rotate(-30deg) translateY(5vh);
    }

    100% {
        transform: rotate(-30deg) translateY(0vh);
    }
}

@keyframes spin {
    to {
        transform: rotate(0turn);
    }

    from {
        transform: rotate(1turn);
    }
}

@keyframes rotate {
    from {
        transform: rotate3d(var(--rx), var(--ry), var(--rz), 0turn);
    }

    to {
        transform: rotate3d(var(--rx), var(--ry), var(--rz), 1turn);
    }
}

.screenshot-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.screenshot-popup-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: bounceIn 0.7s ease-out;
}

.screenshot-popup-content h2 {
    color: #ff5e76;
    font-size: 2.4rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.screenshot-popup-content p {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: bold;
    line-height: 1.4;
}

#screenshotOkButton {
    background: #ff5e76;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    font-weight: bold;
}

#screenshotOkButton:hover {
    background: #e05a48;
    transform: scale(1.05);
}

#screenshotOkButton:active {
    transform: scale(0.98);
}

.button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.additional-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
}

.main-button,
.secondary-button {
    background: #ff5e76;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.3rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

.main-button:hover,
.secondary-button:hover {
    background: #e05a48;
    transform: scale(1.05);
}

.main-button:active,
.secondary-button:active {
    transform: scale(0.98);
}

.secondary-button {
    background: #ff5e76;
    margin-top: 0;
}

.secondary-button:hover {
    background: #e05a48;
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-overlay.show {
    display: flex;
}

.popup-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    color: #333;
    text-align: center;
}

.popup-content h2 {
    color: #ff5e76;
    font-size: 2.4rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.popup-content .close-popup {
    display: block;
    margin: 20px auto 0;
    width: 120px;
}

.popup-scroll {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 20px;
}

#listHadiah {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 0;
    margin: 0;
}

#listHadiah li {
    list-style: none;
    width: 120px;
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#listHadiah img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 8px;
    border-radius: 6px;
}

#historyTable {
    width: 100%;
    border-collapse: collapse;
}

#historyTable th,
#historyTable td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

#historyTable th {
    background-color: #ff5e76;
    color: white;
}

#historyTable tr:nth-child(even) {
    background-color: #f2f2f2;
}

.terms-content {
    text-align: center;
}

.terms-scroll {
    max-height: 50vh;
    overflow-y: auto;
}

.terms-scroll ol {
    padding-left: 30px;
}

.terms-scroll li {
    margin-bottom: 10px;
    line-height: 1.3;
}

.close-popup {
    background: #ff5e76;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    margin-top: 20px;
}

.close-popup:hover {
    background: #e05a48;
    transform: scale(1.05);
}

.close-popup:active {
    transform: scale(0.98);
}

.site-footer {
    display: none;
}

.floating-buttons {
    display: flex;
    position: fixed;
    bottom: 100px;
    right: 20px;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

@media (max-width: 768px) {
    .floating-buttons {
        display: none !important;
    }

        .site-footer {
            display: flex !important;
            position: fixed;
            top: 0;
            left: 50%;
            /* Pusatkan elemen */
            transform: translateX(-50%);
            /* Pusatkan secara horizontal */
            max-width: 390px;
            /* Atur lebar maksimum */
            width: 100%;
            /* Pastikan lebar menyesuaikan */
            justify-content: space-around;
            align-items: center;
            background: linear-gradient(135deg, #ffe6f7, #a60000);
            border-bottom: 1px solid #ddd;
            padding: 5px 0;
            z-index: 1000;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
            border-radius: 0 0 15px 15px;
        }
}

.footer-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer-button:hover {
    color: #555;
}

.footer-button img {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
}

.footer-button span {
    font-size: 1rem;
}

.floating-menu {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.menu-button {
    width: 60px;
    height: 60px;
    background-color: #ff5e76;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.menu-dropdown {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex-direction: column;
}

.menu-item {
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    color: white;
    font-size: 1.6rem;
    display: block;
    transition: background 0.3s ease;
}

.menu-item.whatsapp-button {
    background-color: #25D366;
}

.menu-item.livechat-button {
    background-color: #0078FF;
}

.menu-item:hover {
    opacity: 0.8;
}