.zg-wrap{color:#fff;min-height:100vh;font-family:-apple-system,BlinkMacSystemFont,”Segoe UI”,Roboto,Arial,sans-serif}
.zg-inner{width:100%;}
h1.post-title {
display: none !important;
}
/* — NEW DETAIL HEADER LAYOUT — */
.zg-detail-head {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 30px;
gap: 16px;
}
.zg-detail-left {
display: flex;
flex-direction: column;
}
/* — UPGRADED BACK BUTTON — */
.zg-back {
color: #9da7bd;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
font-size: 15px;
font-weight: 600;
transition: color 0.3s ease;
}
.zg-back svg {
width: 18px;
height: 18px;
fill: none;
stroke: currentColor;
stroke-width: 2.5;
stroke-linecap: round;
stroke-linejoin: round;
transition: transform 0.3s ease;
}
.zg-back:hover { color: #3b82f6; }
.zg-back:hover svg { transform: translateX(-4px); }
/* —————————- */
.zg-title{font-size:32px;font-weight:900;margin:0 !important;text-align:left !important;}
/* — UPGRADED SEARCH BAR (ICON ON RIGHT) — */
.zg-search-wrap { position: relative; width: 280px; max-width: 100%; }
.zg-search-icon {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
width: 18px;
height: 18px;
fill: none;
stroke: #9da7bd;
stroke-width: 2.5;
stroke-linecap: round;
stroke-linejoin: round;
pointer-events: none;
transition: stroke 0.3s;
z-index: 2;
}
.zg-search-wrap:focus-within .zg-search-icon { stroke: #3b82f6; }
.zg-search { width: 100%; box-sizing: border-box; border: 1px solid #252b3a; background: rgba(17, 22, 34, 0.6); backdrop-filter: blur(10px); color: #fff; border-radius: 12px; padding: 14px 44px 14px 18px; outline: none; transition: .3s; }
.zg-search:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); background: rgba(17, 22, 34, 0.9); }
/* ————————— */
.zg-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 10px;
margin-bottom: 5px;
}
.zg-card{position:relative;display:block;overflow:hidden;background:#111622;aspect-ratio:2/3;text-decoration:none;}
.zg-img{width:100%;height:100%;object-fit:cover;display:block;transition: transform .3s ease;}
.bagian-post .post-body {
padding: 0 !important;
}
a.button.medium.buy {
display: none !important;
}
/* =========================================
UNIFIED FULL-COVER SLIDE-UP GRADIENT
========================================= */
.zg-overlay {
position: absolute;
inset: 0;
background: linear-gradient(to top, rgba(0,0,0,0.95) 0, rgba(0,0,0,0.6) 11%, rgba(0,0,0,-0.9) 51%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
padding: 12px 12px 20px 12px;
transform: translateY(100%);
transition: transform 0.35s ease;
text-align: center;
pointer-events: none;
z-index: 10;
}
.zg-overlay-content {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
.zg-card:hover .zg-img { transform: scale(1.05); }
/* Trigger the entire gradient to slide up */
.zg-card:hover .zg-overlay { transform: translateY(0); }
/* Unified Title Styling (Exact Match) */
.zg-name {
font-size: 13px;
font-weight: 700;
color: #fff;
line-height: 1.4;
text-shadow: 0 2px 5px rgba(0,0,0,0.9), 0 0 10px rgba(0,0,0,0.5); /* Heavier shadow for readability */
padding: 0 8px;
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
width: 100%;
}
.zg-empty{color:#9da7bd;padding:30px 0}
/* Grid Responsiveness */
/* Desktop limits removed because auto-fill handles the scaling perfectly now! */
@media(max-width:760px){
/* Locks the grid to exactly 3 columns for tablets */
.zg-grid{grid-template-columns:repeat(3,1fr);gap:12px}
.zg-title{font-size:24px}
.zg-detail-head { flex-direction: column; align-items: stretch; margin-bottom: 20px;}
.zg-search-wrap { width: 100%; margin-top: 10px; }
}
@media(max-width:520px){
/* Locks the grid to exactly 2 columns for phones */
.zg-grid{grid-template-columns:repeat(2,1fr)}
}
(function(){
const app=document.getElementById(“zgCollectionDetailApp”);
const seriesKey=new URLSearchParams(window.location.search).get(“series”);
/* Updated security function to properly render Thai HTML characters */
function safeText(v){
return String(v||””)
.replace(/&(?!#?[a-z0-9]+;)/ig, “&”)
.replace(//g, “>”)
.replace(/”/g, “"”)
.replace(/’/g, “'”);
}
function render(searchText){
const collections=window.ZG_COLLECTIONS||{};
const collection=collections[seriesKey];
if(!collection){
app.innerHTML=’
‘;
return;
}
const games=collection.games||[];
const query = String(searchText || “”).toLowerCase().trim();
// Filter the games based on what the user types in the search bar
const filteredGames = games.filter(function(game){
return !query || String(game.title || “”).toLowerCase().includes(query);
});
app.innerHTML=
‘
‘
‘
‘
‘ +
‘
‘ +
‘
” +
” +
‘
‘ +
‘
‘ +
(filteredGames.length?’
‘:’
‘) +
‘
‘;
const search = document.getElementById(“zgSearch”);
if(search){
search.focus();
const val = search.value;
search.value = ”;
search.value = val;
search.addEventListener(“input”,function(){
render(this.value);
});
}
}
function wait(attempt){
if(window.ZG_COLLECTIONS&&Object.keys(window.ZG_COLLECTIONS).length){render(“”);return;}
if(attempt>=50){app.innerHTML=’
‘;return;}
setTimeout(function(){wait(attempt+1)},100);
}
wait(0);
})();