/* Import Font & Pengaturan Dasar */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

header {
    background-color: #1a237e;
    color: white;
    text-align: center;
    padding: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0; /* Padding diatur oleh elemen di dalam */
}

/* ---------------------------------- */
/* ## Gaya Halaman Utama (Katalog) ## */
/* ---------------------------------- */

#auction-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.auction-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.auction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.card-image-placeholder {
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333; /* Warna default */
}

/* Warna latar belakang spesifik per kategori game */
.card-image-placeholder.mlbb { background-color: #1e3a8a; }
.card-image-placeholder.genshin { background-color: #e0e7ff; }
.card-image-placeholder.hsr { background-color: #1e293b; }

.card-image-placeholder img {
    height: 60px;
    width: auto;
}

.card-content {
    padding: 1rem;
}

.card-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.card-content p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #555;
}

.card-price {
    margin-top: 1rem !important;
    font-size: 1rem !important;
    color: #1a237e !important;
}


/* ------------------------------------ */
/* ## Gaya Halaman Detail Lelang ## */
/* ------------------------------------ */

.auction-item-container {
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: #e9e9f0;
}

.slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    height: 100%;
}

.slide {
    min-width: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
}

.slide img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 5px;
    z-index: 10;
}

.prev { left: 15px; }
.next { right: 15px; }

.auction-details {
    padding: 2rem;
}

/* Elemen lain (countdown, accordion, form, dll.) */
.countdown { text-align: center; margin-top: 1.5rem; padding: 1rem; background-color: #fff3e0; border: 1px solid #ffcc80; border-radius: 8px; }
.countdown h3 { margin-top: 0; color: #ef6c00; }
#timer { font-size: 1.5rem; font-weight: 700; color: #1a237e; }
#timer span { display: inline-block; min-width: 50px; padding: 8px; background-color: #3f51b5; color: white; border-radius: 4px; margin: 0 5px; }

.accordion { background-color: #f1f1f1; color: #444; cursor: pointer; padding: 12px 18px; width: 100%; border: none; text-align: left; outline: none; font-size: 1rem; font-weight: 600; transition: background-color 0.4s; border-radius: 4px; margin: 1.5rem 0; display: flex; justify-content: space-between; align-items: center; }
.accordion:hover, .accordion.active { background-color: #e8eaf6; }
.accordion::after { content: '\002B'; font-size: 1.2rem; color: #777; }
.accordion.active::after { content: "\2212"; }
.panel { padding: 0 18px; background-color: white; max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.panel ul { list-style: none; padding-left: 0; }

.price-info { background-color: #e8eaf6; padding: 1rem; border-radius: 8px; text-align: center; margin-top: 1rem; }
.price-info p { margin: 0; }
#currentPrice { font-size: 2rem; color: #3f51b5; margin: 0.5rem 0; }

form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.form-group { display: flex; flex-direction: column; }
input[type="text"], input[type="tel"] { padding: 0.8rem; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; font-family: 'Poppins', sans-serif; }
button { background-color: #3f51b5; color: white; border: none; padding: 1rem; font-size: 1.1rem; font-weight: 600; cursor: pointer; border-radius: 4px; transition: background-color 0.3s; }
button:disabled { background-color: #9e9e9e; cursor: not-allowed; }

.message { text-align: center; padding: 1rem; border-radius: 4px; margin-top: 1rem; display: none; }
.message.success { background-color: #d4edda; color: #155724; display: block; }
.message.error { background-color: #f8d7da; color: #721c24; display: block; }

/* Sembunyikan scrollbar */
.slider::-webkit-scrollbar { display: none; }
.slider { -ms-overflow-style: none; scrollbar-width: none; }

/* -------------------------- */
/* ## Mobile-Friendly ## */
/* -------------------------- */
@media (max-width: 768px) {
    main {
        margin: 1rem;
    }

    #auction-list {
        padding: 0.5rem;
    }

    .auction-details {
        padding: 1rem;
    }

    .slider-btn {
        display: none;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    #timer {
        font-size: 0.8rem;
        font-weight: normal;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 2px 4px;
    }

    #timer span {
        min-width: 30px;
        padding: 4px;
        margin: 0;
        font-size: 1rem;
    }
}