:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#101828;
  --muted:#667085;
  --shadow:0 10px 30px rgba(16,24,40,.08);
  --radius:18px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  background:var(--bg);
  color:var(--text);
}

.container{
  max-width:1200px;
  margin:40px auto 60px;
  padding:0 18px;
  text-align:center;
}

h1{
  margin:0 0 14px;
  font-size:44px;
  letter-spacing:1px;
  font-weight:900;
}

.filters{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:8px 0 10px;
}

select{
  height:34px;
  border-radius:8px;
  border:1px solid #d0d5dd;
  padding:0 10px;
  background:#fff;
  color:#101828;
  outline:none;
}
select:disabled{ opacity:.6; }

.status{
  margin:8px 0 18px;
  color:var(--muted);
  font-size:14px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:18px;
  justify-items:stretch;
}

@media (max-width:1100px){
  .grid{ grid-template-columns:repeat(4, 1fr); }
}
@media (max-width:900px){
  .grid{ grid-template-columns:repeat(3, 1fr); }
}
@media (max-width:640px){
  .grid{ grid-template-columns:repeat(2, 1fr); }
}

.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  text-align:left;
  position:relative;
}

.card .imgwrap{
  background:#111;
  height:210px;
  overflow:hidden;
}
.card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  cursor:pointer;
}

.card .body{
  padding:14px 14px 16px;
}
.card .name{
  font-size:22px;
  font-weight:900;
  margin:0 0 10px;
}
.meta{
  font-size:14px;
  color:#344054;
  line-height:1.5;
}
.badge{
  position:absolute;
  right:10px;
  top:10px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  cursor:pointer;
}

/* Modal */
.modal.hidden{ display:none; }
.modal{
  position:fixed;
  inset:0;
  z-index:9999;
}
.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
}
.modal-panel{
  position:relative;
  width:min(980px, 92vw);
  height:min(720px, 86vh);
  margin:6vh auto 0;
  background:#111;
  border-radius:20px;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
  overflow:hidden;
}
.modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:40px;
  height:40px;
  border-radius:10px;
  border:0;
  background:rgba(255,255,255,.1);
  color:#fff;
  font-size:22px;
  cursor:pointer;
}
.modal-body{
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:18px 60px;
  gap:10px;
}
#modalImg{
  max-width:100%;
  max-height:78%;
  border-radius:14px;
  object-fit:contain;
  background:#000;
}
.modal-title{
  color:#fff;
  font-weight:800;
  font-size:16px;
}
.modal-meta{
  color:#e5e7eb;
  font-size:14px;
  text-align:center;
  line-height:1.4;
}

.modal-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  border-radius:12px;
  border:0;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:28px;
  cursor:pointer;
}
.modal-prev{ left:12px; }
.modal-next{ right:12px; }
