/* General Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fff;
    color: #333;
    margin: 0;
    padding-top: 10px;
}

a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #007bff;
}

main {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.view {
    display: none;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    color: #555;
}

.loader {
    text-align: center;
    width: 100%;
    padding: 50px;
    font-size: 18px;
    color: #777;
}

/* ============================================== */
/* HEADER                                         */
/* ============================================== */
.new-header {
    background-color: #fff;
    padding: 0 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
}

.header-content-new {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 20px;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.site-brand {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    grid-column: 1 / 2;
}


/* PERUBAHAN: Penataan Ulang Search Bar */
.search-container-new {
    grid-column: 2 / 4;
    display: flex; /* Menggunakan flexbox untuk menyatukan input dan button */
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color: #f4f4f4;
    overflow: hidden; /* Mencegah elemen keluar dari border radius */
}

#search-input {
    flex-grow: 1; /* Input mengisi ruang yang tersedia */
    height: 40px;
    padding: 0 20px;
    border: none; /* Border dipindahkan ke kontainer */
    background-color: transparent; /* Latar belakang transparan */
    font-size: 16px;
    outline: none; /* Hilangkan outline saat fokus */
}

.search-button-new {
    height: 40px;
    width: 50px;
    border: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23888' class='bi bi-search' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}
/* AKHIR PERUBAHAN SEARCH BAR */


/* GAYA HALAMAN DEPAN (HOME VIEW) */
.home-section-title { font-size: 22px; margin: 40px 0 20px 0; font-weight: 500; }
#random-image-grid.grid-container { grid-template-columns: repeat(6, 1fr); }
.home-ad-slot { width: 100%; max-width: 970px; height: 250px; margin: 40px auto; background-color: #e9ecef; border: 2px dashed #ced4da; display: flex; align-items: center; justify-content: center; color: #6c757d; }

/* GAYA DAFTAR KATEGORI MULTI-KOLOM */
#full-category-list-container { background-color: #f8f9fa; border: 1px solid #e9ecef; padding: 30px; border-radius: 8px; }
.category-columns-wrapper { display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 40px; }
.category-list-column { flex: 1; }
.category-list-column h3 { font-size: 16px; font-weight: bold; margin-top: 0; margin-bottom: 15px; }
.category-list-column ul { list-style: none; padding: 0; margin: 0 0 25px 0; }
.category-list-column li { margin-bottom: 12px; }
.category-list-column li a { font-size: 14px; }

/* Breadcrumbs & Judul Halaman Non-Home */
.breadcrumbs-container { font-size: 14px; color: #555; margin-bottom: 20px; }
.breadcrumbs-container a { color: #555; }
.breadcrumbs-container a:hover { color: #007bff; }
.breadcrumbs-container span { margin: 0 8px; }
.page-title-view { font-size: 32px; margin-bottom: 30px; }

/* Grid Styling */
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.grid-container a { display: block; border: 1px solid #ddd; border-radius: 8px; background-color: #fff; box-shadow: 0 4px 8px rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; color: #333;}
.grid-container a:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.grid-container .image-container { width: 100%; padding-top: 100%; position: relative; background-color: #f0f0f0; border-radius: 8px 8px 0 0; }
.grid-container img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; box-sizing: border-box; }
.grid-container .card-title { padding: 15px; font-weight: 500; }

/* Pagination */
.pagination-container { text-align: center; margin-top: 40px; }
.pagination-container a { margin: 0 5px; padding: 10px 15px; border: 1px solid #ddd; border-radius: 5px; color: #333;}
.pagination-container a.active { background-color: #007bff; color: #fff; border-color: #007bff; }

/* HALAMAN DETAIL */
#mediafire-container { display: flex; justify-content: center; gap: 20px; max-width: 1400px; margin: 0 auto; align-items: flex-start; }
#download-content-column { flex: 1; min-width: 0; }
#ad-column-right { flex: 0 0 220px; }
.sticky-ad { position: sticky; top: 80px; }
.ad-placeholder, .ad-header-slot { width: 100%; background-color: #e9ecef; border: 2px dashed #ced4da; display: flex; align-items: center; justify-content: center; color: #6c757d; font-size: 16px; text-align: center; border-radius: 8px; }
.ad-placeholder { height: 600px; }
.ad-header-slot { height: 90px; margin-bottom: 20px; }
.download-info-box { background-color: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 20px; }
#item-preview-wrapper-mf { width: 100%; height: auto; max-height: 700px; margin: 0 auto 20px auto; background-color: #f8f9fa; border-radius: 5px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#item-preview-mf { max-width: 100%; max-height: 100%; object-fit: contain; }
.file-details h3 { font-size: 24px; margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
.file-details p { margin: 10px 0; color: #495057; line-height: 1.6; }
.file-details p strong { color: #212529; }
.download-button-mf { display: block; background-color: #28a745; color: #fff; padding: 15px 30px; border-radius: 5px; font-weight: bold; font-size: 20px; text-align: center; margin-top: 25px; transition: background-color 0.2s; }
.download-button-mf:hover { background-color: #218838; color: #fff; }
#related-items-section { margin-top: 40px; background-color: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 20px; }
#related-items-section h3 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }
#related-items-grid.grid-container { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* GAYA MENU KATEGORI (AKORDEON) */
#category-menu-column { flex: 0 0 220px; position: sticky; top: 80px; }
#category-menu-column .category-group h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 10px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#category-menu-column .category-group h3::after {
    content: '▾';
    font-size: 16px;
    color: #888;
    transition: transform 0.2s;
}
#category-menu-column .category-group h3.active::after {
    transform: rotate(180deg);
}
#category-menu-column .category-group ul {
    list-style: none;
    padding: 5px 0 10px 0;
    margin: 0;
    background-color: #f8f9fa;
    display: none;
}
#category-menu-column .category-group ul.visible {
    display: block;
}
#category-menu-column li a { 
    display: block; padding: 8px 10px 8px 20px; margin: 0; 
    border-radius: 0; transition: background-color 0.2s; font-size: 14px; 
}
#category-menu-column li a:hover { 
    background-color: #e9ecef; 
}