:root{--bg:#0b0d10;--card:#12161a;--muted:#9aa4af;--text:#e6eef7;--accent:#3b82f6;--accent-2:#22d3ee;--chip:#1b2127;--chip-active:#0f1720}
*{box-sizing:border-box}
html{min-height:100%;background-color:#0b0d10;overscroll-behavior:none}
body{margin:0;min-height:100vh;background:linear-gradient(180deg,#0b0d10,#0b0d10 60%,#0f1317);color:var(--text);font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,'Noto Sans',sans-serif;overscroll-behavior:none}

.topbar{padding:28px 16px 12px;max-width:1100px;margin:0 auto}
.topbar h1{margin:0 0 6px;font-size:28px}
.topbar .sub{margin:0 0 14px;color:var(--muted);font-size:13px}

.searchbar{display:flex;gap:8px}
.searchbar input{flex:1;padding:12px 14px;border-radius:10px;border:1px solid #27303a;background:var(--card);color:var(--text);outline:none}
.searchbar button{padding:12px 16px;border-radius:10px;border:0;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;cursor:pointer}
.searchbar button:hover{filter:brightness(1.05)}

.categories{margin:14px 0 0;display:flex;flex-wrap:wrap;gap:8px}
.chip{background:var(--chip);border:1px solid #27303a;color:var(--text);padding:8px 12px;border-radius:999px;cursor:pointer}
.chip.active{background:var(--chip-active);border-color:#334155}

.container{max-width:1100px;margin:10px auto 40px;padding:0 16px}
.status{min-height:22px;margin:8px 0 10px;color:var(--muted);font-size:13px}
.gallery{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
@media(min-width:640px){.gallery{grid-template-columns:repeat(3,1fr)}}
@media(min-width:980px){.gallery{grid-template-columns:repeat(4,1fr)}}
.card{position:relative;border-radius:12px;overflow:hidden;background:#0e1216;border:1px solid #27303a;contain:paint}
.card img{width:100%;height:220px;object-fit:cover;display:block;transition:transform .35s ease;transform:translateZ(0)}
.card:hover img{transform:scale(1.03);will-change:transform}
.card .overlay{position:absolute;inset:auto 8px 8px 8px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.badge{background:rgba(0,0,0,.6);border:1px solid #334155;color:#dbeafe;padding:6px 10px;border-radius:999px;font-size:12px}
.actions{display:flex;justify-content:center;margin:18px 0 0}
.loadmore{padding:12px 18px;border-radius:12px;border:1px solid #27303a;background:var(--card);color:var(--text);cursor:pointer}
.loadmore:hover{border-color:#334155}
.footer{max-width:1100px;margin:18px auto 28px;padding:0 16px;color:var(--muted);font-size:12px}

.skeleton{background:linear-gradient(90deg,#14181d,#1a2027,#14181d);background-size:200% 100%;animation:shimmer 1.5s infinite}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

.viewer-overlay{position:fixed;inset:0;background:rgba(0,0,0,.85);display:none;z-index:9999;align-items:center;justify-content:center;padding:24px}
.viewer-overlay.show{display:flex}
.viewer-box{position:relative;background:#0f0f0f;border:1px solid #27303a;border-radius:12px;max-width:1280px;width:90vw;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.viewer-bar{display:flex;gap:8px;align-items:center;padding:10px;border-bottom:1px solid #27303a}
.viewer-btn{background:#3b82f6;color:#fff;border:0;border-radius:10px;padding:8px 12px;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.viewer-btn.alt{background:#1f2937;color:#e5e7eb;border:1px solid #334155}
.viewer-content{flex:0 0 auto;display:flex;align-items:center;justify-content:center;overflow:auto;background:#0b0d10;border-radius:0 0 12px 12px}
.viewer-content img{max-width:100%;max-height:100%;object-fit:contain}

.viewer-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid #334155;background:rgba(0,0,0,.55);color:#e5e7eb;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:24px;line-height:1;user-select:none}
.viewer-nav:hover{background:rgba(0,0,0,.75)}
.viewer-prev{left:12px}
.viewer-next{right:12px}
