:root{
  --bg:#050608;
  --bg2:#111318;
  --text:#eef2ff;
  --muted: rgba(238,242,255,.72);
  --line: rgba(255,255,255,.10);
  --accent:#22c55e;
  --radius:18px;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Outfit", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 15% 10%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(800px 500px at 85% 18%, rgba(255,255,255,.06), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}
.wrap{width:min(1120px, calc(100% - 40px)); margin:0 auto}

.bg-glow{
  position: fixed;
  inset: -30%;
  background:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,.10), transparent 58%),
    radial-gradient(circle at 75% 30%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(circle at 55% 75%, rgba(255,255,255,.06), transparent 62%);
  filter: blur(38px);
  z-index: -1;
  pointer-events: none;
  animation: floatGlow 10s ease-in-out infinite alternate;
}
@keyframes floatGlow{
  from{ transform: translate3d(-10px, -8px,0) scale(1); }
  to{ transform: translate3d(10px, 10px,0) scale(1.03); }
}

/* Topbar */
.topbar{
  position: sticky;
  top:0;
  z-index:50;
  background: rgba(7,11,20,.55);
  backdrop-filter: blur(14px);
  border-bottom:1px solid var(--line);
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 0;
}
.brand{display:flex; align-items:center; gap:12px}
.brand__dot{
  width:34px;height:34px;border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  position:relative;
}
.brand__dot:after{
  content:"";
  width:10px;height:10px;border-radius:999px;
  position:absolute; inset:auto; left:12px; top:12px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(34,197,94,.12);
}
.brand__txt{display:flex;flex-direction:column;line-height:1.05}
.brand__txt small{color:var(--muted)}

.actions{display:flex; gap:10px; align-items:center}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 14px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  font-weight:700;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22)}
.btn--accent{
  background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(52,211,153,.70));
  border-color: rgba(255,255,255,.16);
}

/* Head */
.head{padding: 28px 0 12px}
.head h1{
  margin:0;
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing:-.4px;
}
.head p{margin:10px 0 0; color:var(--muted); max-width: 70ch}
.meta{display:flex; gap:10px; flex-wrap:wrap; margin-top: 12px}
.chip{
  display:inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-weight:600;
}

/* Grid desktop */
.grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
  padding: 10px 0 26px;
}

.tile{
  padding:0; border:0; background:transparent;
  cursor:pointer;
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
  transition: transform .18s ease, border-color .18s ease;
}
.tile:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,.22); }
.tile img{
  width:100%;
  height: 240px;
  object-fit: cover;
  display:block;
}

/* Mobile: swipe */
@media (max-width: 900px){
  .grid{
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    grid-template-columns: unset;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .tile{ scroll-snap-align: start; }
  .tile img{ height: 280px; }

  .grid::-webkit-scrollbar{ height: 8px; }
  .grid::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,.18);
    border-radius: 999px;
  }
  .grid{ scrollbar-color: rgba(255,255,255,.18) transparent; scrollbar-width: thin; }
}

.hint{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  color: var(--muted);
  padding-bottom: 34px;
}

/* Empty */
.empty{
  margin: 18px 0 40px;
  padding: 18px;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
}
.empty code{color: var(--text)}

/* Lightbox */
.lightbox{
  position:fixed; inset:0;
  display:none;
  place-items:center;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
  z-index: 999;
}
.lightbox.is-open{display:grid}

.lb__img{
  width: min(1100px, calc(100% - 54px));
  max-height: 82vh;
  object-fit: contain;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}

.lb__close{
  position:fixed; top:16px; right:16px;
  width:46px; height:46px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 28px;
  cursor:pointer;
}

.lb__nav{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 72px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-size: 42px;
  cursor:pointer;
  display:grid; place-items:center;
}
.lb__prev{ left: 14px; }
.lb__next{ right: 14px; }

.lb__caption{
  position:fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(7,11,20,.65);
  color: var(--muted);
  font-weight: 700;
}
