﻿/* Tambahkan style untuk input agar tidak kontras dengan tema gelap */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select {
    background-color: #1f2937; /* bg-gray-800 */
    color: #ffffff;
    border: 1px solid #4b5563;
}

input::placeholder {
    color: #9ca3af !important; /* Warna placeholder */
}

input:focus,
select:focus {
    --tw-ring-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px var(--tw-ring-color) !important;
}
/*
 * File ini digunakan untuk menambahkan style kustom
 * yang tidak dicakup oleh Tailwind CSS atau untuk
 * mendefinisikan gaya dasar seperti font.
 */

body {
    font-family: 'Inter', sans-serif;
}

/* (PERBAIKAN) Pastikan html dan body mengisi seluruh tinggi layar */
html, body {
    height: 100%;
    width: 100%;
}

/* === Gaya Tombol & Tautan Umum === */
.btn {
    font-weight: 700;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-radius: 0.5rem;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
    transform: scale(1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .btn:hover {
        transform: translateY(-2px);
    }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-primary {
    background-image: linear-gradient(to right, #6366f1, #9333ea);
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2), 0 4px 6px -2px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background-image: linear-gradient(to right, #4f46e5, #7e22ce);
}

.btn-danger {
    background-image: linear-gradient(to right, #ef4444, #db2777);
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2), 0 4px 6px -2px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background-image: linear-gradient(to right, #dc2626, #c21a68);
}

/* === Gaya Navigasi === */
.nav-link {
    color: #d1d5db;
    transition-property: color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.nav-link:hover {
    color: #ffffff;
}

.mobile-nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: #d1d5db;
}

.mobile-nav-link:hover {
    background-color: #374151;
    color: #ffffff;
}

/* === Gaya Kartu Game (Homepage) === */
.game-card {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

@media (min-width: 1024px) {
    .game-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.2), 0 10px 10px -5px rgba(99, 102, 241, 0.2);
    }
}

.game-card.out-of-stock {
    opacity: 0.6;
    position: relative;
}

/* === Gaya untuk Trending Cards === */
.bg-gray-750 {
    background-color: #2d3748;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* === Gaya Slider Banner === */
.slider-dots, .slider-prev, .slider-next {
    display: none !important;
}

/* === Gaya Halaman Order === */
.step-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-title span {
    background-color: #6366f1;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ffffff;
}

/* (PERBAIKAN) Mengganti selector agar berlaku untuk semua input di form order */
#topup-form input[type="text"],
#topup-form input[type="email"],
#topup-form input[type="tel"],
#topup-form input[type="number"],
#topup-form select {
    width: 100%;
    padding: 0.75rem;
    background-color: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    color: #ffffff; /* PENTING: Membuat teks menjadi putih */
    outline: none;
    transition: all 200ms;
}

/* (PERBAIKAN) Menambahkan style untuk placeholder */
#topup-form input::placeholder {
    color: #9ca3af;
}

/* (PERBAIKAN) Mengganti selector focus */
#topup-form input:focus,
#topup-form select:focus {
    --tw-ring-color: #6366f1;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px var(--tw-ring-color);
}

.item-card, .payment-card {
    border: 2px solid #374151;
    background-color: #1f2937;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 200ms;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.item-card:hover, .payment-card:hover {
    border-color: #6366f1;
    background-color: rgba(55, 65, 81, 0.5);
}

.item-card.selected, .payment-card.selected {
    border-color: #6366f1;
    background-color: rgba(79, 70, 229, 0.15);
    --tw-ring-color: #6366f1;
    box-shadow: 0 0 0 2px var(--tw-ring-color);
}

.item-card.selected::after, .payment-card.selected::after {
    content: '✓';
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: #818cf8;
    font-weight: 700;
}

/* === GAYA FOOTER === */
.footer-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 150ms;
}

.footer-link:hover {
    color: #ffffff;
}

/* === MODAL DIALOG KONFIRMASI === */
#confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#confirmation-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #1f2937;
    padding: 2rem;
    border-radius: 0.75rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s;
}

#confirmation-modal.show .modal-content {
    transform: scale(1);
}

/* === GAYA MODAL PEMBAYARAN (BARU) === */
#payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#payment-modal.show {
    opacity: 1;
    visibility: visible;
}

.payment-modal-content {
    background-color: #1f2937; /* bg-gray-800 */
    border-radius: 0.75rem; /* rounded-xl */
    max-width: 500px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Batasi tinggi modal */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#payment-modal.show .payment-modal-content {
    transform: scale(1);
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #374151; /* border-gray-700 */
}

.payment-modal-header h2 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 700; /* font-bold */
}

.payment-modal-body {
    padding: 1.5rem;
    overflow-y: auto; /* Aktifkan scroll jika kontennya panjang */
}

/* === SPINNER & DETAIL PESANAN === */
.spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === GAYA MODAL POP-UP PROMO === */
#promo-popup.show {
    display: flex;
}

#promo-popup.show #promo-popup-content {
    opacity: 1;
    transform: scale(1);
}

.core-payment-btn {
    /* (PERBAIKAN) Mengganti @apply dengan CSS standar */
    background-color: #4f46e5; /* bg-indigo-600 */
    color: #ffffff; /* text-white */
    font-weight: 600; /* font-semibold */
    padding: 0.5rem 1rem; /* py-2 px-4 */
    border-radius: 0.5rem; /* rounded-lg */
    transition: background-color 200ms; /* transition-colors duration-200 */
}

.core-payment-btn:hover {
    background-color: #4338ca; /* hover:bg-indigo-700 */
}

.core-payment-btn:disabled {
    background-color: #6b7280; /* disabled:bg-gray-500 */
    cursor: not-allowed; /* disabled:cursor-not-allowed */
}

/* Sembunyikan panah input nomor */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  /* (PERBAIKAN) Menambahkan properti standar untuk kompatibilitas */
  appearance: textfield;
}

/* (BARU) CSS untuk membuat Order Summary menjadi sticky di mobile */
@media (max-width: 1023px) {
    #order-summary {
        /* (PERBAIKAN) Jadikan fixed sejak awal untuk keluar dari alur dokumen */
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 40; /* Pastikan di atas konten lain */
        border-top-width: 1px;
        border-color: #4b5563; /* border-gray-600 */
        box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
    }

    #order-summary.show-sticky-summary {
        /* (PERBAIKAN) Cukup ubah transform untuk memunculkannya */
        transform: translateY(0);
    }
}

/* (BARU) Menambahkan padding di bawah body saat ringkasan pesanan sticky muncul */
/* Ini mencegah ringkasan menutupi konten di bagian bawah halaman (misal: footer) */
/* (PERBAIKAN) Ganti target dari body ke footer untuk hasil yang lebih andal */
body.summary-visible footer {
    /* Menambahkan margin di bawah footer untuk mendorongnya ke atas */
    margin-bottom: 150px; 
    transition: margin-bottom 0.3s ease-in-out;
}

/* (BARU) Gaya untuk tombol filter status di dashboard admin */
.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #374151; /* bg-gray-700 */
    color: #d1d5db; /* text-gray-300 */
    transition: all 200ms;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #4f46e5; /* bg-indigo-600 */
    color: #ffffff; /* text-white */
}

/* === PRE-ORDER SYSTEM STYLES === */

/* 1. Animasi & Style Leaderboard */
.leaderboard-row {
    transition: all 0.3s ease;
}

.leaderboard-row:hover {
    background-color: rgba(55, 65, 81, 0.8); /* Darker gray on hover */
    transform: translateX(4px); /* Sedikit geser ke kanan */
}

/* Highlight untuk Penawar Tertinggi */
.leaderboard-row:first-child {
    background-color: rgba(234, 179, 8, 0.15); /* Yellow-500 low opacity */
    border-left: 4px solid #eab308; /* Solid Yellow border */
    box-shadow: 0 4px 6px -1px rgba(234, 179, 8, 0.1), 0 2px 4px -1px rgba(234, 179, 8, 0.06);
}

/* 2. Custom Scrollbar untuk Daftar Antrian */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #4b5563;
    border-radius: 20px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280;
}

/* 3. Tombol Pembayaran di Halaman Pre-Order */
.po-pay-btn {
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: #ffffff;
    color: #1f2937;
}

.po-pay-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #6366f1; /* Indigo border on hover */
    background-color: #f3f4f6; /* Gray-100 */
}

.po-pay-btn:active {
    transform: translateY(0);
}

.po-pay-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* 4. Animasi Fade In Up (Muncul dari bawah) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* 5. Badge Status di Tabel Admin PO */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;

}

/* ========================================= */
/* RESPONSIVE DESIGN UNTUK MOBILE */
/* ========================================= */

/* Mobile Phones - Portrait & Landscape */
@media (max-width: 768px) {
    /* Container & Spacing */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Typography */
    h1, .text-3xl {
        font-size: 1.5rem !important;
    }
    
    h2, .text-2xl {
        font-size: 1.25rem !important;
    }
    
    /* Navigation */
    nav {
        padding: 0.75rem 1rem !important;
    }
    
    /* Products Grid - 2 columns */
    #products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    /* Banner - Ukuran lebih besar dan pas */
    #new-banner-slider {
        width: 100% !important;
        max-width: 100% !important;
        height: 180px !important;
        margin: 0 !important;
        border-radius: 0.5rem !important;
        overflow: hidden !important;
        box-shadow: none !important;
    }
    
    #new-banner-slides-container {
        width: 100% !important;
        height: 100% !important;
    }
    
    #new-banner-slider img,
    #new-banner-slides-container img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
    }
    
    /* Dots indicator */
    #new-banner-dots {
        bottom: 0.75rem !important;
    }
    
    /* Order Form */
    #topup-form {
        grid-template-columns: 1fr !important;
    }
    
    #item-selection {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Modal */
    .modal-content, .payment-modal-content {
        width: 95% !important;
        max-width: 95% !important;
    }
    
    /* Input - prevent iOS zoom */
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Small Mobile (< 576px) */
@media (max-width: 575px) {
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    h1, .text-3xl {
        font-size: 1.25rem !important;
    }
    
    /* Banner di HP kecil - lebih pendek */
    #new-banner-slider {
        height: 150px !important;
    }
    
    #products-grid {
        gap: 0.5rem !important;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    #products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    #item-selection {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
