body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #ffbf1f;
}

button {
    background-color: #ffbf1f;
    color: white;
    font-size: 36px;
    padding: 20px 140px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 30px;
}

.result-container {
    padding: 30px;
    border: 5px solid #ffbf1f;
    border-radius: 12px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.voucher-boxes {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.char-box {
    background-color: #ffbf1f;
    color: #fff;
    font-size: 108px;
    font-weight: bold;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    text-transform: uppercase;
}

#winnerName {
    font-size: 36px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
    margin-top: 20px;
}

/* Fireworks container */
#fireworksContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.95;
}

/* Partikel dasar */
.pyro {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffbf1f;
    animation: moveUp 1.5s ease-out forwards, explode 2s ease-out forwards, glitter 1s infinite alternate;
}

/* Variasi warna */
.pyro:nth-child(odd) { background-color: #ff3d00; }
.pyro:nth-child(even) { background-color: #00e5ff; }

/* Partikel bintang */
.star {
    background-color: transparent;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    box-shadow: 0 0 10px 10px #ffd700, 0 0 20px 15px #ffdf00;
    animation: moveUp 1.5s ease-out forwards, explode 2s ease-out forwards, glitter 1s infinite alternate, rotateStar 2s linear infinite;
}

/* Animasi bergerak ke atas */
@keyframes moveUp {
    0% { transform: translateY(500); opacity: 1; }
    100% { transform: translateY(-500px); opacity: 0; }
}

/* Efek ledakan */
@keyframes explode {
    0% {
        box-shadow: 0 0 10px 5px #fff;
    }
    100% {
        /* 5 titik ledakan dengan lebih banyak partikel */
        box-shadow:
            0 0 30px 15px #ffbf1f,   /* Titik 1 */
            0 0 30px 15px #ff3d00,   /* Titik 2 */
            0 0 30px 15px #00e5ff,   /* Titik 3 */
            0 0 30px 15px #ffd700,   /* Titik 4 */
            0 0 30px 15px #ff00ff,   /* Titik 5 */
            30px 30px #ffbf1f,       /* Titik 1 kiri atas */
            -30px 30px #ff3d00,      /* Titik 2 kiri atas */
            30px -30px #00e5ff,      /* Titik 3 kanan bawah */
            -30px -30px #ffd700,     /* Titik 4 kanan bawah */
            60px 60px #ff00ff,       /* Titik 5 lebih jauh */
            -60px 60px #ffbf1f,      /* Titik 1 lebih jauh */
            60px -60px #ff3d00,      /* Titik 2 lebih jauh */
            -60px -60px #00e5ff,     /* Titik 3 lebih jauh */
            90px 90px #ffd700,       /* Titik 4 lebih jauh */
            -90px 90px #ff00ff,      /* Titik 5 lebih jauh */
            90px -90px #ffbf1f,      /* Titik 1 sangat jauh */
            -90px -90px #ff3d00,     /* Titik 2 sangat jauh */
            120px 120px #00e5ff,     /* Titik 3 sangat jauh */
            -120px 120px #ffd700,    /* Titik 4 sangat jauh */
            120px -120px #ff00ff;    /* Titik 5 sangat jauh */
    }
}

/* Kilau */
@keyframes glitter {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* Rotasi bintang */
@keyframes rotateStar {
    0% { transform: rotate(0deg); opacity: 1; }
    100% { transform: rotate(360deg); opacity: 0; }
}

/* Modal & Tabel Pemenang */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    color: #000;
    border-radius: 12px;
    width: 80%;
    max-width: 800px;
    max-height: 80%;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.modal-content h2 {
    color: #ffbf1f;
    text-align: center;
    margin-top: 0;
}

.close {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.winner-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.winner-table th,
.winner-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.winner-table th {
    background-color: #ffbf1f;
    color: #fff;
}

.view-winners-link {
    color: #ffbf1f;
    font-size: 20px;
    margin-top: 20px;
    display: inline-block;
    text-decoration: underline;
    cursor: pointer;
}

.view-winners-link:hover {
    color: #fff;
    border-bottom: 2px solid #ffbf1f;
}

/* Glow title */
.glow-text {
    font-size: 28px;
    font-weight: bold;
    color: #ffbf1f;
    text-align: center;
    margin-top: 30px;
    cursor: pointer;
    background-image: linear-gradient(to right, #ffbf1f, #ffd700, #ffbf1f);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px #ffbf1f, 0 0 30px #ffd700;
    transition: all 0.3s ease;
}

.glow-text:hover {
    text-shadow: 0 0 10px #ffbf1f, 0 0 20px #ffd700, 0 0 30px #ffbf1f;
    transform: scale(1.1) rotate(2deg);
}

.glow-text:active {
    transform: scale(1) rotate(0deg);
    text-shadow: 0 0 20px #ffbf1f, 0 0 40px #ffd700;
}
