/* Reset dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('/assets/bg.webp') no-repeat center center/cover;
    margin: 0;
    padding: 0;
}

.voucher-container, .game-container {
    width: 100%;
    max-width: 400px;
    background-color: rgb(255 255 255 / 52%);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
    backdrop-filter: blur(8px);
}

h1 {
    font-size: 26px;
    color: #fff;
    margin-bottom: 15px;
    font-weight: bold;
}

.error-message {
    color: #d9534f;
    font-weight: bold;
    margin-bottom: 20px;
    border: 1px solid #d9534f;
    padding: 10px;
    border-radius: 5px;
    background-color: rgba(217, 83, 79, 0.1);
}

input[type="text"], button {
    padding: 12px;
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

button {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
}

button:hover {
    background: linear-gradient(45deg, #0056b3, #003d80);
    transform: scale(1.05);
}

.result-display {
    font-size: 18px;
    color: #444;
    margin-top: 15px;
    font-weight: bold;
    padding: 10px;
    background-color: rgb(0 123 255 / 0%);
    border: 1px solid rgb(0 123 255 / 0%);
    border-radius: 5px;
}

.back-button {
    padding: 12px;
    background: linear-gradient(45deg, #ff6f61, #ff1e1e);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    display: block; /* Tombol hanya tampil setelah kotak selesai dibuka */
    transition: all 0.3s ease;
    margin: 0 auto; /* Untuk memusatkan tombol di dalam elemen flex */
}

.back-button:hover {
    background: linear-gradient(45deg, #ff1e1e, #950000);
    transform: scale(1.05);
}

.result-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}


/* CSS untuk kotak hadiah */
.bingo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.bingo-box {
    position: relative;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ff6f61, #ff1e1e);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bingo-box:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.box-cover {
    position: absolute;
    top: 0;
    width: 100%;
    height: 50%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px 10px 0 0;
    transform-origin: bottom;
    transition: transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #ff1e1e;
}

.bingo-box.opened .box-cover {
    transform: rotateX(-90deg);
}

.box-number {
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.bingo-box.opened .box-number {
    opacity: 0; /* Angka menghilang setelah kotak dibuka */
}

.prize-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 2;
}

.bingo-box.opened .prize-image {
    opacity: 1; /* Gambar muncul setelah kotak dibuka */
}

/* ALERT */

/* Modal Pop-Up */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    padding: 20px;
    text-align: center;
    z-index: 1000;
    width: 100%;
    display: none;
}

.modal.show {
    display: block;
}

.modal p {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: bold;
}

.modal button {
    padding: 12px 20px;
    background: linear-gradient(45deg, #28a745, #218838);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.modal button:hover {
    background: linear-gradient(45deg, #218838, #1e7e34);
    transform: scale(1.05);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.modal-overlay.show {
    display: block;
}

/* END OF ALERT */

/* Tampilan kontainer tambahan */
.additional-container {
    margin-top: 20px;
    text-align: center;
}

.login-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-button:hover {
    background: linear-gradient(45deg, #0056b3, #003d80);
    transform: scale(1.05);
}

/* Riwayat Pemenang */
/* Posisi Winner History */
.winner-history-container {
    position: relative; /* Posisi di luar game-container */
    margin-top: 30px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    max-width: 400px;
    margin: 30px auto;
}

.winner-history-container h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.winner-history-container ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.winner-history-container ul li {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    animation: fadeIn 0.5s ease-in-out;
}

/* Animasi Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
