* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #e7e7e7;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 80px; /* Memberikan ruang untuk box konfirmasi di bagian bawah */
}

.container {
    max-width: 1200px;
    margin: 120px auto 0;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: #f7f7f7;
    box-shadow: 0 6px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    margin-right: 1rem;
}

.logo {
    width: auto;
    height: 70px;
}

.hamburger {
    position: relative;
    cursor: pointer;
    z-index: 1001;
    margin-left: 1rem;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px;
    background-color: #333;
    transition: all 0.3s ease;
}

.nav-menu {
    position: fixed;
    top: 70px;
    left: 1rem;  
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

.nav-menu.active {
    display: block;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.nav-menu li:hover {
    border-bottom: 1px solid #8d8d8d;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: #6a5acd;
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.main-content {
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.left-section, .right-section {
    flex: 1;
}

.game-card {
    background-color: #2c2c2c;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.game-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.game-logo {
    width: 50px;
    height: 50px;
}

.game-info span {
    font-size: 14px;
    color: #ffd700;
}

.service-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #ffffff;
    margin-top: 5px;
}

.game-description h2 {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 10px;
}

.game-description p {
    font-size: 14px;
    color: #e0e0e0;
    text-align: justify;
}

.topup-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-section, .topup-options, .payment-options {
    background-color: #2c2c2c;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.info-section h3, .topup-options h3, .payment-options h3 {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-section h3 span {
    font-size: 12px;
    color: #ffd700;
    cursor: help;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #ffffff;
}

form input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #444444;
    border-radius: 5px;
    background-color: #ffffff;
    color: #000000;
    font-size: 14px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.option-card {
    background-color: #333333;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
}

.option-card:hover {
    transform: scale(1.05);
}

.option-card .diamond {
    font-size: 24px;
    color: #00b4d8;
}

.option-card p {
    font-size: 14px;
    color: #ffffff;
    margin: 5px 0;
}

.option-card.selected {
    background-color: #6a5acd; /* Warna latar belakang ungu muda */
    border: 2px solid #4a2c7b; /* Border lebih gelap untuk kontras */
    color: #ffffff; /* Teks putih untuk kontras */
}

.option-card.selected .diamond {
    color: #ffffff; /* Ikon berlian putih saat dipilih */
}

.option-card.selected p {
    color: #ffffff; /* Teks di dalam card putih saat dipilih */
}

.payment-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.category-btn {
    background-color: #444444;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.category-btn:hover {
    background-color: #555555;
}

.payment-dropdowns {
    position: relative;
}

.dropdown-content {
    display: none;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    padding: 10px;
    background-color: #333333;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.dropdown-content.active {
    display: flex;
}

.payment-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid #e0e0e0;
    height: 100px;
    width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.payment-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.payment-logo {
    height: 40px;
    width: auto;
    margin-bottom: 5px;
    object-fit: contain;
}

.payment-card p {
    font-size: 14px;
    color: #333333;
    margin: 0;
    flex-grow: 0;
}

.payment-card.selected {
    background-color: #6a5acd; /* Warna latar belakang ungu muda */
    border: 2px solid #4a2c7b; /* Border lebih gelap untuk kontras */
}

.payment-card.selected .payment-logo {
    filter: brightness(0) invert(1); /* Membuat logo putih saat dipilih */
}

.payment-card.selected p {
    color: #ffffff; /* Teks putih saat dipilih */
}

/* Styles untuk Box Konfirmasi */
.confirmation-box {
    position: fixed;
    bottom: 0;
    left: 50%; /* Pusatkan horizontal */
    transform: translateX(-50%); /* Koreksi posisi tengah */
    right: auto; /* Reset nilai right */
    width: 90%; /* Lebar box */
    max-width: 600px; /* Lebar maksimum */
    background-color: #1a1a1a;
    border-radius: 10px 10px 0 0; /* Hanya border radius di atas */
    padding: 15px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    margin: 0; /* Hapus margin */ /* Memberikan margin horizontal agar tidak menempel pada tepi */
}

.confirmation-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    overflow: hidden; /* Mencegah teks terlalu panjang */
}

.confirmation-box .diamond {
    font-size: 24px;
    color: #00b4d8;
}

.confirmation-box p {
    font-size: 16px;
    color: #ffffff;
    margin: 0;
    white-space: nowrap; /* Mencegah teks patah baris */
    overflow: hidden;
    text-overflow: ellipsis; /* Menambahkan ellipsis jika teks terlalu panjang */
    max-width: 200px; /* Batas maksimum lebar teks */
}

.confirm-btn {
    background-color: #6a5acd; /* Ungu seperti pada gambar */
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.confirm-btn:hover {
    background-color: #5d4ab3; /* Ungu sedikit lebih gelap saat hover */
}

.confirm-btn::after {
    content: "→";
    margin-left: 5px;
}

/* Styles untuk Modal Detail Pesanan */
.modal1 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Latar belakang semi-transparan */
    z-index: 2000; /* Z-index yang sangat tinggi untuk memastikan di atas elemen lain */
    display: flex; /* Menggunakan flexbox untuk menempatkan konten di tengah */
    justify-content: center; /* Menempatkan konten di tengah secara horizontal */
    align-items: center; /* Menempatkan konten di tengah secara vertikal */
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Memindahkan ke tengah dengan offset */
    background-color: #2c2c2c;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center; /* Memastikan teks di dalamnya rata tengah secara default */
}

.modal-content h2 {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 10px;
    text-align: center;
}

.modal-content p {
    font-size: 14px;
    color: #e0e0e0;
    margin-bottom: 15px;
    text-align: center;
}

.order-details {
    text-align: left; /* Menempatkan teks di sebelah kiri di dalam kotak */
    width: 100%;
    margin-bottom: 20px;
}

.order-details p {
    font-size: 16px;
    color: #ffffff;
    margin: 5px 0;
    text-align: left;
}

.order-details span {
    color: #6a5acd; /* Warna ungu untuk nilai */
}

.modal-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center; /* Menjaga tombol di tengah secara horizontal */
}

.cancel-btn {
    background-color: #444444;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    flex-grow: 1;
    max-width: 120px; /* Batas maksimum lebar tombol */
}

.cancel-btn:hover {
    background-color: #555555;
}

.buy-btn {
    background-color: #6a5acd;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 150px; /* Batas maksimum lebar tombol */
}

.buy-btn:hover {
    background-color: #5d4ab3;
}

.buy-btn::after {
    content: "→";
    margin-left: 5px;
}

/* ... (CSS sebelumnya tetap sama hingga bagian akhir) ... */

/* Gaya kustom untuk SweetAlert2 */
.custom-swal {
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Responsivitas untuk SweetAlert2 */
@media (max-width: 600px) {
    .swal2-popup {
        width: 80% !important;
    }
}

@media (max-width: 900px) {
    .swal2-popup {
        width: 90% !important;
    }
}

/* Responsivitas untuk layar kecil */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-categories {
        flex-direction: column;
    }

    .category-btn {
        width: 100%;
        text-align: center;
    }

    .dropdown-content {
        flex-direction: column;
        align-items: center;
    }

    .payment-card {
        width: 80px;
        height: 80px;
    }

    .confirmation-box {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 10px;
    }

    .confirmation-content {
        flex-direction: column;
        align-items: center;
    }

    .confirmation-box .diamond {
        display: block; /* Memastikan ikon berlian tetap terlihat di layout vertikal */
    }

    .confirmation-box p {
        max-width: 150px; /* Mengurangi lebar teks untuk layar medium */
    }

    .confirm-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        width: 80%;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .navbar {
        flex-direction: column;
        text-align: center;
    }

    .game-header {
        flex-direction: column;
        text-align: center;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .payment-categories {
        flex-direction: column;
    }

    .category-btn {
        width: 100%;
        text-align: center;
    }

    .dropdown-content {
        flex-direction: column;
        align-items: center;
    }

    .payment-card {
        width: 70px;
        height: 70px;
    }

    .confirmation-box {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 10px;
    }

    .confirmation-content {
        flex-direction: column;
        align-items: center;
    }

    .confirmation-box .diamond {
        display: block; /* Memastikan ikon berlian tetap terlihat di layout vertikal */
    }

    .confirmation-box p {
        max-width: 120px; /* Mengurangi lebar teks untuk layar kecil */
    }

    .confirm-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        width: 90%;
    }

    .container {
        margin: 120px auto 70px; /* Menyesuaikan margin bawah untuk akomodasi box konfirmasi */
    }
}