/* General styles */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align elements at the top initially */
    height: 100vh; /* Full viewport height */
    background-color: #000;
    font-family: Arial, sans-serif;
    overflow: hidden; /* Prevent unwanted scrolling */
}

/* Claw */
.claw {
    position: absolute;
    top: -275px; /* Position at the top of the border */
    left: 0; /* Start from 0, but transform sets the position */
    transform: translateX(calc(50% - 25px)); /* Start in the center */
    width: 100px; /* Claw width */
    height: 400px; /* Claw height */
    background-image: url('../images/body.png'); /* Path to your image */
    background-size: cover; /* Make sure the image covers the div */
    background-position: center; /* Center the image */
    background-repeat: no-repeat;  /* Claw color */
    z-index: 2; /* Above the glowing effect */
    transition: transform 0.5s ease-out; /* Slower movement with easing effect */
}

/* Image Section */
.image-container {
    width: 100%;
    max-height: 20%; /* Limit maximum height */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #a7acbf; /* Match the outer background color */
    padding: 10px;
    box-sizing: border-box;
}

.responsive-image {
    max-width: 100%; /* Ensure the image scales with the container */
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px; /* Optional rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Optional shadow for aesthetics */
    background-color: #eef4fa;
}

.responsive-image-transparent {
    max-width: 100%; /* Ensure the image scales with the container */
    height: auto; /* Maintain aspect ratio */
}

/* Lottery Section */
.lottery-container {
    flex: 1; /* Takes up all remaining space */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 10px;
    background-color: #A7ACBF;
}

.lottery-border {
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    border: 5px dashed #ff5722; /* Keep the dashed border */
    background-color: #ffffff; /* White background inside the border */
    border-radius: 20px; /* Smooth corners */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 87, 34, 0.6); /* Add glow effect */
    position: relative;
    overflow: hidden; /* Ensure pseudo-elements stay inside */
}

/* Glowing Lamp Effect */
.lottery-border::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.3) 0%, transparent 60%);
    animation: glow 2s infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes glow {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.lottery-border p {
    position: relative;
    z-index: 2; /* Ensure text is above all effects */
    font-size: 1.2em;
    color: #555;
    text-align: center;
    margin: 0;
}

/* Controller Section */
.controller-container {
    width: 100%;
    height: auto; /* Allow flexible height */
    min-height: 150px;
    display: flex;
    justify-content: space-around; /* Equal spacing between joystick and button */
    align-items: flex-start; /* Align items to the top */
    background: linear-gradient(to bottom, #dfe3ed, #c1c7d6); /* Gradient for machine effect */
    border: 5px solid #a7acbf; /* Border to make it look like a box */
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3), inset 0 -3px 10px rgba(255, 255, 255, 0.2); /* Shadow for depth */
    padding: 0 10px; /* Padding inside the box */
    box-sizing: border-box;
}

/* Joystick Base */
.joystick {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
}

.joystick-base {
    position: relative;
    width: 80px;
    height: 80px;
    background: #ff7043;
    border-radius: 50%;
    box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Joystick Shaft */
.joystick-shaft {
    position: relative;
    width: 15px;
    height: 50px;
    background: #ffb74d;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Joystick Knob */
.joystick-knob {
    position: absolute;
    width: 35px;
    height: 35px;
    background: linear-gradient(to bottom, #ff5722, #d84315);
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    touch-action: none;
}

/* CAPIT Button */
.capit-button {
    background: linear-gradient(to bottom, #ff5722, #d84315);
    color: #ffffff;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    padding: 10px 50px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
    margin-top: 25px;
}

.capit-button:hover {
    background: linear-gradient(to bottom, #ff7043, #d84315);
}

.capit-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Container untuk Hadiah Bawah */
.bottom-prizes {
    display: flex;
    justify-content: space-evenly; /* Jarak merata antar hadiah */
    align-items: center; /* Rata tengah secara vertikal */
    width: 100%; /* Lebar penuh container */
    position: absolute;
    bottom: 0; /* Tetapkan di bagian paling bawah */
}

/* Hadiah */
.prize {
    width: 65px; /* Lebar hadiah */
    height: 65px; /* Tinggi hadiah */
    object-fit: cover;
}

/* Container untuk Hadiah Acak di Atas */
.random-prizes {
    position: relative;
    width: 100%;
    height: 80%; /* Area di atas hadiah bawah */
}

/* Hadiah di Atas (Tumpukan Acak) */
.random-prizes .prize {
    position: absolute; /* Posisi bebas untuk hadiah acak */
    width: 65px;
    height: 65px;
    object-fit: cover;
}

/* Posisi dan Rotasi Acak untuk Hadiah di Atas */
.random-prizes .prize:nth-child(1) { bottom: 4%; left: 0%; transform: rotate(45deg); z-index: 1; }
.random-prizes .prize:nth-child(2) { bottom: 4%; left: 20%; transform: rotate(-10deg); z-index: 2; }
.random-prizes .prize:nth-child(3) { bottom: 4%; left: 40%; transform: rotate(90deg); z-index: 3; }
.random-prizes .prize:nth-child(4) { bottom: 4%; left: 60%; transform: rotate(-45deg); z-index: 4; }
.random-prizes .prize:nth-child(5) { bottom: 4%; left: 80%; transform: rotate(30deg); z-index: 5; }
.random-prizes .prize:nth-child(6) { bottom: 20%; left: 0%; transform: rotate(-15deg); z-index: 6; }
.random-prizes .prize:nth-child(7) { bottom: 20%; left: 20%; transform: rotate(180deg); z-index: 7; }
.random-prizes .prize:nth-child(8) { bottom: 20%; left: 40%; transform: rotate(-4deg); z-index: 8; }
.random-prizes .prize:nth-child(9) { bottom: 20%; left: 60%; transform: rotate(120deg); z-index: 9; }
.random-prizes .prize:nth-child(10) { bottom: 20%; left: 80%; transform: rotate(-30deg); z-index: 10; }
.random-prizes .prize:nth-child(11) { bottom: 36%; left: 0%; transform: rotate(200deg); z-index: 11; }
.random-prizes .prize:nth-child(12) { bottom: 36%; left: 20%; transform: rotate(-10deg); z-index: 12; }
.random-prizes .prize:nth-child(13) { bottom: 36%; left: 40%; transform: rotate(-40deg); z-index: 13; }
.random-prizes .prize:nth-child(14) { bottom: 36%; left: 60%; transform: rotate(90deg); z-index: 14; }
.random-prizes .prize:nth-child(15) { bottom: 36%; left: 80%; transform: rotate(-90deg); z-index: 15; }

/* Modal backdrop */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Modal content */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-voucher {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    background: rgba(0,0,0,0);
    border-radius: 8px;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-reward {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal header */
.modal-header {
    font-size: 1em;
    margin-bottom: 10px;
    text-align: center;
}

/* Modal footer */
.modal-footer {
    text-align: right;
    margin-top: 20px;
}

/* Close button */
.close-modal {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Centered prize image */
.modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

.prize-image {
    max-width: 80%;
    max-height: 200px;
}

.show-modal {
    display: block;
}

.game-input {
    outline: none;
    border-radius: 8px;
    min-height: 65px;
    border: 5px solid #ff4f4c;
    box-shadow: 0 6px 0 #ae2725, 0 8px 1px 1px rgba(0, 0, 0, .3), 0 10px 0 5px #831614, 0 12px 0 5px #a33634, 0 15px 0 5px #631716, 0 15px 1px 6px rgba(0, 0, 0, .3);
    font-family: 'Carter One', sans-serif;
    font-size: 30px;
    line-height: 1.5em;
    letter-spacing: .1em;
    text-shadow: 2px 2px 1px #d72d21, -2px 2px 1px #d72d21, 2px -2px 1px #d72d21, -2px -2px 1px #d72d21, 0px 2px 1px #d72d21, 0px -2px 1px #d72d21, 0px 4px 1px #930704, 2px 4px 1px #930704, -2px 4px 1px #930704;
    color: #fff;
    caret-color: #d72d21;
    padding: 5px;
    text-transform: uppercase;
}

.game-input::placeholder {
    text-transform: uppercase;
    font-family: 'Carter One', sans-serif;
    font-size: 25px;
    line-height: 1.5em;
    letter-spacing: .1em;
    text-shadow: 2px 2px 1px #d72d21, -2px 2px 1px #d72d21, 2px -2px 1px #d72d21, -2px -2px 1px #d72d21, 0px 2px 1px #d72d21, 0px -2px 1px #d72d21, 0px 4px 1px #930704, 2px 4px 1px #930704, -2px 4px 1px #930704;
    color: #fff;
    opacity: .3;
}

.game-button {
	display: block;
	width: 100%;
    position: relative;
    top: 0;
    cursor: pointer;
	padding: 2px;
    text-decoration: none !important;
    outline: none !important;
    font-family: 'Carter One', sans-serif;
    font-size: 20px;
	text-align: center;
    line-height: 2em;
    letter-spacing: .1em;
	margin-top: 25px;
    text-shadow: 2px 2px 1px #0066a2, -2px 2px 1px #0066a2, 2px -2px 1px #0066a2, -2px -2px 1px #0066a2, 0px 2px 1px #0066a2, 0px -2px 1px #0066a2, 0px 4px 1px #004a87, 2px 4px 1px #004a87, -2px 4px 1px #004a87;
    border: none;
    background: repeating-linear-gradient(45deg, #3ebbf7, #3ebbf7 5px, #45b1f4 5px, #45b1f4 10px);
    border-bottom: 3px solid rgba(16, 91, 146, 0.5);
    border-top: 3px solid rgba(255, 255, 255, .3);
    color: #fff !important;
    border-radius: 8px;
    box-shadow: 0 6px 0 #266b91, 0 8px 1px 1px rgba(0, 0, 0, .3), 0 10px 0 5px #12517d, 0 12px 0 5px #1a6b9a, 0 15px 0 5px #0c405e, 0 15px 1px 6px rgba(0, 0, 0, .3);
}

.game-button:hover {
    top: 2px;
    box-shadow: 0 4px 0 #266b91, 0 6px 1px 1px rgba(0, 0, 0, .3), 0 8px 0 5px #12517d, 0 10px 0 5px #1a6b9a, 0 13px 0 5px #0c405e, 0 13px 1px 6px rgba(0, 0, 0, .3);
}

.game-button::before {
    content: '';
    height: 10%;
    position: absolute;
    width: 40%;
    background: #fff;
    right: 13%;
    top: -3%;
    border-radius: 99px;
}

.game-button::after {
    content: '';
    height: 10%;
    position: absolute;
    width: 5%;
    background: #fff;
    right: 5%;
    top: -3%;
    border-radius: 99px;
}


.game-button.red {
    background: repeating-linear-gradient(45deg, #ff4f4c, #ff4f4c 5px, #ff4643 5px, #ff4643 10px);
    box-shadow: 0 6px 0 #ae2725, 0 8px 1px 1px rgba(0, 0, 0, .3), 0 10px 0 5px #831614, 0 12px 0 5px #a33634, 0 15px 0 5px #631716, 0 15px 1px 6px rgba(0, 0, 0, .3);
    border-bottom: 3px solid rgba(160, 25, 23, 0.5);
    text-shadow: 2px 2px 1px #d72d21, -2px 2px 1px #d72d21, 2px -2px 1px #d72d21, -2px -2px 1px #d72d21, 0px 2px 1px #d72d21, 0px -2px 1px #d72d21, 0px 4px 1px #930704, 2px 4px 1px #930704, -2px 4px 1px #930704;
}

.game-button.red:hover {
    top: 2px;
    box-shadow: 0 4px 0 #ae2725, 0 6px 1px 1px rgba(0, 0, 0, .3), 0 8px 0 5px #831614, 0 10px 0 5px #a33634, 0 13px 0 5px #631716, 0 13px 1px 6px rgba(0, 0, 0, .3);
}

.game-button.orange {
    background: repeating-linear-gradient( 45deg, #ffc800, #ffc800 5px, #ffc200 5px, #ffc200 10px);
    box-shadow: 0 6px 0 #b76113, 0 8px 1px 1px rgba(0,0,0,.3), 0 10px 0 5px #75421f, 0 12px 0 5px #8a542b, 0 15px 0 5px #593116, 0 15px 1px 6px rgba(0,0,0,.3);
    border-bottom: 3px solid rgba(205, 102, 0, 0.5);
    text-shadow: 2px 2px 1px #e78700, -2px 2px 1px #e78700, 2px -2px 1px #e78700, -2px -2px 1px #e78700, 0px 2px 1px #e78700, 0px -2px 1px #e78700, 0px 4px 1px #c96100, 2px 4px 1px #c96100, -2px 4px 1px  #c96100;
}
.game-button.orange:hover {
    top:2px;
    box-shadow: 0 4px 0 #b76113, 0 6px 1px 1px rgba(0,0,0,.3), 0 8px 0 5px #75421f, 0 10px 0 5px #8a542b, 0 13px 0 5px #593116, 0 13px 1px 6px rgba(0,0,0,.3);
}

.game-button.green {
    background: repeating-linear-gradient( 45deg, #54d440, #54d440 5px, #52cc3f 5px, #52cc3f 10px);
     box-shadow: 0 6px 0 #348628, 0 8px 1px 1px rgba(0,0,0,.3), 0 10px 0 5px #2a6d20, 0 12px 0 5px #39822e, 0 15px 0 5px #1d4c16, 0 15px 1px 6px rgba(0,0,0,.3);
     border-bottom: 3px solid rgba(40, 117, 29, 0.5);
     text-shadow: 2px 2px 1px #348628, -2px 2px 1px #348628, 2px -2px 1px #348628, -2px -2px 1px #348628, 0px 2px 1px #348628, 0px -2px 1px #348628, 0px 4px 1px #1d4c16, 2px 4px 1px #1d4c16, -2px 4px 1px #1d4c16;
 }
 .game-button.green:hover {
   top:2px;
   box-shadow: 0 4px 0 #348628, 0 6px 1px 1px rgba(0,0,0,.3), 0 8px 0 5px #2a6d20, 0 10px 0 5px #39822e, 0 13px 0 5px #1d4c16, 0 13px 1px 6px rgba(0,0,0,.3);
 }

 @media (max-width: 576px) {
    .game-input {
        width: 300px;
        height: auto;
    }

    button {
        font-size: 1rem;
        margin-top: 30px;
        display: block;
    }
	
	.alert {
		width: 275px;
        height: auto;
	}
	
	.image-grid {
		grid-template-columns: repeat(2, 1fr); /* 2 images per row for smaller screens */
	}
}

@media (min-width: 577px) {
    .game-input {
        width: 500px;
        height: auto;
    }

    button {
        font-size: 1rem;
        margin-top: 30px;
        display: block;
    }
	
	.alert {
		width: 475px;
        height: auto;
	}
	
	.image-grid {
		grid-template-columns: 1fr; /* 2 images per row for smaller screens */
	}
}

/*snow*/
.snow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001; /* Prevent interaction with snowflakes */
}

.snowflake {
    position: absolute;
    top: -50px; /* Start above the screen */
    background-image: url("../images/snow.png"); /* Path to snowflake image */
    background-size: cover;
    opacity: 1; /* Slight transparency for a softer look */
    animation: flip-snowflake infinite linear;
}

/* General Alert Styles */
.alert {
    padding: 15px 20px;
    margin-bottom: 5px;
    border: 1px solid transparent;
    border-radius: 0.375rem; /* Slightly rounded corners */
    font-family: Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

/* Alert Variants */
.alert-primary {
    background-color: #cfe2ff;
    border-color: #b6d4fe;
    color: #084298;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.image-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr); /* 4 images per row */
	gap: 16px; /* Spacing between images */
	padding: 16px; /* Padding around the grid */
}

.image-grid img {
	width: 100%; /* Make images responsive */
	height: auto;
	border-radius: 8px; /* Optional: rounded corners */
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: shadow for depth */
}