body { 
    font-family: Arial; 
    background:#000000; 
    color:#fff; 
    display:flex; 
    flex-direction:column; 
    align-items:center; 
    margin:0; 
    padding:0; 
    min-height:100vh; 
    background: url('img/casino.webp') no-repeat center center;
    background-size: cover;
}

header { 
    width:100%; 
    background: url('img/merah.webp') repeat;
    background-size: cover; 
    box-sizing:border-box; 
    padding:25px 30px; 
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
}
header .center { display:flex; align-items:center; gap:15px; }
header h2 { margin:0; font-size:28px; font-weight:bold; background:linear-gradient(90deg,#FFD700,#FF0000); -webkit-background-clip:text; -webkit-text-fill-color:transparent; text-shadow:2px 2px 5px rgba(0,0,0,0.5); letter-spacing:2px; font-family:'Arial Black',sans-serif; animation:headerGlow 2s infinite alternate; }
@keyframes headerGlow { from{ text-shadow:2px 2px 5px rgba(255,215,0,0.6); } to{ text-shadow:2px 2 10px rgba(255,140,0,0.9); } }
header img.logo { width:120px; height:auto; }
.btn-header { background: linear-gradient(45deg, #FFD700, #FF8C00); border: none; color: #111; font-weight: bold; font-size: 16px; padding: 12px 25px; border-radius: 30px; cursor: pointer; box-shadow: 0 0 10px rgba(255,215,0,0.7), 0 0 20px rgba(255,140,0,0.8); transition: all 0.3s ease-in-out; }
.btn-header:hover { transform: scale(1.1); box-shadow: 0 0 15px rgba(255,215,0,1), 0 0 30px rgba(255,140,0,1), 0 0 45px rgba(255,69,0,0.9); }
.running-text { width:100%; overflow:hidden; white-space:nowrap; margin-top:10px; }
.running-text span { display:inline-block; padding-left:100%; animation:scroll 40s linear infinite; -webkit-animation:scroll 40s linear infinite; }
@keyframes scroll { 0%{ transform:translateX(0%); } 100%{ transform:translateX(-100%); } }

.main-content { 
    display:flex; 
    gap: 200px; 
    align-items:flex-start; 
    width:100%; 
    justify-content:center; 
    padding: 20px; 
    box-sizing: border-box;
    margin: auto 0; 
}

.box-area { 
    display:flex; 
    flex-direction:column; 
    align-items:center;
    max-width: 480px; 
    width: 100%;
    position: relative; 
}
.boxes { display:grid; grid-template-columns:repeat(3,120px); grid-template-rows:repeat(2,auto); gap:40px; position: relative; height: 340px; } 
.box-container { display:flex; flex-direction:column; align-items:center; transition: all 0.4s ease; }
.box { width:120px; height:120px; cursor:pointer; transition:transform 0.4s ease; }
.box:hover { transform:scale(1.1); }
.box-prize { margin-top:12px; font-size:16px; min-height:40px; text-align:center; color: #FFD700; font-weight: bold; text-shadow: 0 0 5px #ff0000ff, 0 0 10px #ff0000ff; }
.prize-list { background:none; padding:0; min-width:350px; font-family:'Brush Script MT', cursive, sans-serif; }
.prize-list h3 { margin-top:0; margin-bottom:15px; font-size:50px; text-align:center; color:#fff; text-shadow:0 0 5px #ff0000ff,0 0 10px #ff0000ff,0 0 20px #ff0000ff,0 0 30px #ff0000ff,0 0 40px #ff0000ff,0 0 55px #ff0000ff,0 0 75px #ff0000ff; animation:glowText 1.5s ease-in-out infinite alternate; }
@keyframes glowText { from{ text-shadow:0 0 5px #ff0000ff,0 0 10px #ff0000ff,0 0 20px #ff0000ff,0 0 30px #ff0000ff,0 0 40px #ff0000ff,0 0 55px #ff0000ff,0 0 75px #ff0000ff; } to{ text-shadow:0 0 10px #ff0000ff,0 0 20px #ff0000ff,0 0 30px #ff0000ff,0 0 40px #ff0000ff,0 0 50px #ff0404ff,0 0 65px #ff0000ff,0 0 85px #ff0000ff; } }
.prize-list ul { list-style:none; padding:0; margin:0; font-size:24px; line-height:2.5; }
.prize-list li { margin-bottom:10px; padding:0; border-bottom:none; text-align:center; color:#fff; font-family:sans-serif; text-shadow:0 0 3px #ff0000ff,0 0 5px #ff0000ff,0 0 10px #ff0000ff; }

#openBtn { 
    padding:12px 30px; 
    cursor:pointer; 
    background:#ff0000; 
    border:none; 
    color:#fff; 
    font-weight:bold; 
    border-radius:5px; 
    margin-top:0;
}
.winner { animation:glow 1s infinite alternate; }
@keyframes glow { from{ transform:scale(1.2); filter:drop-shadow(0 0 10px gold); } to{ transform:scale(1.1); filter:drop-shadow(0 0 20px yellow); } }
footer { margin-top:auto; padding:15px 0; text-align:center; width:100%; font-size:14px; color:#aaa; }

input { 
    padding:8px 16px; 
    font-size:16px; 
    margin: 0;
}

.input-group {
    display: flex;
    justify-content: center;
    align-items: center; 
    gap: 10px; 
    margin-bottom: 5px; 
}

#codeStatus { 
    margin-top:5px; 
    color:#ff0; 
    text-align:center;
    word-wrap: break-word; 
    width: 100%;
    box-sizing: border-box;
}
.modal { display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); justify-content: center; align-items: center; }
.modal-content { background: #222; padding: 20px 30px; border-radius: 15px; text-align: center; max-width: 400px; box-shadow: 0 0 15px gold; }
.modal-content h3 { margin-top:0; color:#FFD700; }
.modal-content button { margin-top:15px; padding:10px 20px; border:none; border-radius:20px; background:linear-gradient(45deg,#FFD700,#FF8C00); color: #111; font-weight: bold; cursor: pointer; }

/* ==================================== */
/* MODIFIKASI POPUP HADIAH */
/* ==================================== */
.prize-popup-content {
    background: linear-gradient(135deg, #1f1f1f, #000000);
    padding: 30px 20px; 
    border-radius: 20px;
    max-width: 350px; 
    width: 90%;
    text-align: center;
    border: 3px solid #FFD700; 
    box-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 140, 0, 0.7);
    transform: scale(0.5); 
    animation: zoomIn 0.3s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    position: relative;
    overflow: hidden; 
}
@keyframes zoomIn { to { transform: scale(1); } }
.prize-popup-content h3 {
    margin: 0 0 10px 0; font-size: 28px; color: #FFD700; text-shadow: 0 0 8px #FF0000, 0 0 15px #FFD700;
    font-family: 'Arial Black', sans-serif; letter-spacing: 1px; animation: bounceIn 0.5s ease-out;
}
@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); }
}
.prize-subtext { font-size: 16px; color: #ccc; margin-bottom: 5px; animation: fadeIn 1s ease-out; }
.prize-text {
    font-size: 36px; color: #FFFFFF; font-weight: 900; text-transform: uppercase; margin: 10px 0 20px 0;
    text-shadow: 0 0 7px #FF0000, 0 0 20px #FFD700; font-family: 'Impact', sans-serif; letter-spacing: 3px;
    animation: flash 0.8s infinite alternate; 
}
@keyframes flash {
    from { color: #FFFFFF; text-shadow: 0 0 7px #FF0000, 0 0 20px #FFD700; }
    to { color: #FFD700; text-shadow: 0 0 5px #FFFFFF, 0 0 15px #FF0000; }
}
.prize-popup-content button {
    margin-top: 20px; padding: 12px 30px; font-size: 16px; border-radius: 25px;
    background: linear-gradient(90deg, #FF4500, #FFD700); color: #111; font-weight: bold; cursor: pointer;
    box-shadow: 0 5px 10px rgba(0,0,0,0.5); transition: transform 0.2s ease;
}
.prize-popup-content button:hover { transform: translateY(-2px); box-shadow: 0 7px 15px rgba(0,0,0,0.6); }

.confetti { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.coin {
    position: absolute; width: 8px; height: 8px; background-color: gold; border-radius: 50%;
    box-shadow: 0 0 3px rgba(255,215,0,0.8); opacity: 0; animation: fall linear infinite;
}
@keyframes fall { 0% { transform: translateY(-50px) rotate(0deg); opacity: 1; } 100% { transform: translateY(500px) rotate(720deg); opacity: 0; } }
/* ==================================== */
/* AKHIR MODIFIKASI POPUP HADIAH */
/* ==================================== */

/* ======================================================= */
/* MEDIA QUERIES (Responsif Mobile) */
/* ======================================================= */
@media (max-width: 850px) {
    .main-content {
        flex-direction: column; 
        gap: 30px; 
        align-items: center; 
    }
    .box-area {
        max-width: 100%; 
    }
    .boxes {
        grid-template-columns: repeat(3, 80px); 
        gap: 20px; 
        height: 240px; 
    }
    .box {
        width: 80px; 
        height: 80px; 
    }
    .box-prize {
        min-height: 40px; 
        margin-top: 8px; 
        font-size: 14px; 
    }
    .prize-list {
        min-width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }
    .prize-popup-content {
        max-width: 300px;
    }
    .prize-popup-content h3 { font-size: 24px; }
    .prize-text { font-size: 30px; }

    .modal-content {
        max-width: 300px; 
        width: 90%; 
        padding: 15px 20px; 
        font-size: 14px; 
        border-radius: 10px;
    }

    .modal-content h3 {
        font-size: 22px; 
        margin-bottom: 10px;
    }

    .modal-content button {
        margin-top: 10px;
        padding: 8px 15px; 
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    header {
        padding: 10px 5px; 
    }
    
    header .center {
        gap: 5px;
    }
    
    header h2 {
        font-size: 16px; 
        letter-spacing: 1px;
    }
    
    header img.logo {
        width: 40px;
    }

    .btn-header { 
        padding: 5px 10px;
        font-size: 10px; 
    }
}