/* assets/css/machine-zoo.css */

.mz-hero{ padding:70px 0 22px; }

.mz-hero-inner{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:stretch;
}

.mz-hero-card{ padding:26px 26px 22px; }

.mz-hero-top{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.mz-title{
  margin:0 0 10px;
  font-family: var(--font-display);
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size: clamp(28px, 4vw, 44px);
}

:root[data-theme="light"] .mz-title{
  color: rgba(18,19,26,.96);
}

.mz-sub{
  margin:0 0 16px;
  color: rgba(232,232,238,.84);
  line-height:1.65;
  font-size:14px;
  max-width: 76ch;
}

:root[data-theme="light"] .mz-sub{
  color: rgba(18,19,26,.76);
}

.mz-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.mz-stats{
  padding:18px;
  box-shadow: var(--shadow-soft);
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}

.mz-stat{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  padding:12px;
  min-height: 82px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

:root[data-theme="light"] .mz-stat{
  border-color: rgba(0,0,0,.10);
  background: rgba(255,255,255,.70);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

.mz-k{
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(184,186,198,.95);
  font-weight:800;
  margin-bottom:6px;
}

:root[data-theme="light"] .mz-k{
  color: rgba(18,19,26,.56);
}

.mz-v{
  font-family: var(--font-display);
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:18px;
  color: rgba(232,232,238,.92);
}

:root[data-theme="light"] .mz-v{
  color: rgba(18,19,26,.92);
}

.mz-feed{
  padding:18px 0 70px;
}

.mz-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.mz-head h2{
  margin:0 0 6px;
}

.mz-head p{
  margin:0;
  color: rgba(184,186,198,.92);
  font-size:13px;
  line-height:1.55;
}

:root[data-theme="light"] .mz-head p{
  color: rgba(18,19,26,.58);
}

.mz-right-note{
  color: rgba(184,186,198,.92);
  font-size:13px;
  white-space:nowrap;
}

:root[data-theme="light"] .mz-right-note{
  color: rgba(18,19,26,.56);
}

.mz-empty{
  padding:18px;
  box-shadow: var(--shadow-soft);
  color: rgba(232,232,238,.88);
}

:root[data-theme="light"] .mz-empty{
  color: rgba(18,19,26,.82);
}

.mz-empty-sub{
  margin-top:10px;
  color: rgba(184,186,198,.92);
  font-size:13px;
}

:root[data-theme="light"] .mz-empty-sub{
  color: rgba(18,19,26,.58);
}

.mz-list{
  display:grid;
  gap:14px;
}

.mz-row{
  display:grid;
  grid-template-columns: 280px 1fr auto;
  gap:16px;
  padding:14px;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  text-decoration:none;
}

.mz-row:hover{
  transform: translateY(-2px);
  border-color: rgba(255,45,45,.22);
}

:root[data-theme="light"] .mz-row:hover{
  border-color: rgba(255,45,45,.28);
}

.mz-row-left{
  min-width:0;
}

.mz-row-thumb{
  height:132px;
  border-radius:18px;
  border: 1px solid rgba(255,255,255,.10);
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(320px 200px at 18% 28%, rgba(255,45,45,.16), transparent 55%),
    radial-gradient(320px 220px at 90% 40%, rgba(78,161,255,.10), transparent 58%),
    rgba(255,255,255,.03);
}

:root[data-theme="light"] .mz-row-thumb{
  border-color: rgba(0,0,0,.10);
  background:
    radial-gradient(320px 200px at 18% 28%, rgba(255,45,45,.10), transparent 55%),
    radial-gradient(320px 220px at 90% 40%, rgba(78,161,255,.08), transparent 58%),
    rgba(255,255,255,.55);
}

.mz-thumb-layer{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  z-index:0;
  transform:scale(1.02);
  transition: transform .24s ease;
}

.mz-row:hover .mz-thumb-layer{
  transform:scale(1.06);
}

.mz-row-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
  background:
    radial-gradient(320px 200px at 18% 28%, rgba(255,45,45,.16), transparent 55%),
    radial-gradient(320px 220px at 90% 40%, rgba(78,161,255,.10), transparent 58%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  opacity:.95;
}

:root[data-theme="light"] .mz-row-thumb::after{
  opacity:.55;
}

.mz-thumb-placeholder{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-family: var(--font-display);
  letter-spacing:.12em;
  color: rgba(232,232,238,.52);
  z-index:0;
}

:root[data-theme="light"] .mz-thumb-placeholder{
  color: rgba(18,19,26,.42);
}

.mz-badge,
.mz-status{
  position:absolute;
  top:12px;
  height:30px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,10,14,.40);
  font-family: var(--font-display);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:11px;
  z-index:2;
}

.mz-badge{
  left:12px;
}

.mz-status{
  right:12px;
  border-color: rgba(78,161,255,.22);
  background: rgba(78,161,255,.10);
}

:root[data-theme="light"] .mz-badge,
:root[data-theme="light"] .mz-status{
  border-color: rgba(0,0,0,.10);
  background: rgba(255,255,255,.70);
  color: rgba(18,19,26,.86);
}

.mz-row-right{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.mz-row-title{
  font-weight:900;
  letter-spacing:.02em;
  font-size:17px;
  color: rgba(232,232,238,.95);
}

:root[data-theme="light"] .mz-row-title{
  color: rgba(18,19,26,.92);
}

.mz-row-subtitle{
  margin-top:5px;
  color: rgba(255,255,255,.58);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

:root[data-theme="light"] .mz-row-subtitle{
  color: rgba(18,19,26,.52);
}

.mz-row-excerpt{
  margin-top:8px;
  color: rgba(232,232,238,.82);
  font-size:13px;
  line-height:1.55;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

:root[data-theme="light"] .mz-row-excerpt{
  color: rgba(18,19,26,.70);
}

.mz-row-meta{
  margin-top:8px;
  color: var(--muted);
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

:root[data-theme="light"] .mz-row-meta{
  color: rgba(18,19,26,.56);
}

.mz-tags{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:10px;
}

.mz-tags span{
  font-size:11px;
  padding:5px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(232,232,238,.78);
}

:root[data-theme="light"] .mz-tags span{
  background: rgba(255,255,255,.68);
  border-color: rgba(0,0,0,.08);
  color: rgba(18,19,26,.64);
}

.mz-row-go{
  align-self:center;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: rgba(232,232,238,.92);
  font-weight:900;
}

:root[data-theme="light"] .mz-row-go{
  border-color: rgba(0,0,0,.12);
  background: rgba(255,255,255,.78);
  color: rgba(18,19,26,.86);
}

/* ==========================================================
   Machine Zoo pager
   ========================================================== */

.mz-feed .mz-pager{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin:32px 0 0;
  padding:0;
}

.mz-feed .mz-list + .mz-pager{
  margin-top:32px;
}

.mz-feed .mz-pager .btn{
  min-width:48px;
  height:46px;
  padding:0 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  line-height:1;
}

.mz-feed .mz-pager .btn-primary{
  border-color:rgba(255,45,45,.72);
  background:linear-gradient(135deg, rgba(255,45,45,.92), rgba(255,75,110,.78));
  color:#fff;
  box-shadow:0 14px 34px rgba(255,45,45,.22);
}

.mz-feed .mz-pager .btn-ghost:hover{
  transform:translateY(-2px);
  border-color:rgba(255,45,45,.28);
  background:rgba(255,255,255,.075);
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 980px){
  .mz-hero-inner{
    grid-template-columns:1fr;
  }

  .mz-row{
    grid-template-columns:220px 1fr auto;
  }

  .mz-row-thumb{
    height:120px;
  }
}

@media (max-width: 680px){
  .mz-hero{
    padding-top:48px;
  }

  .mz-hero-card{
    padding:22px 18px;
  }

  .mz-stats{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mz-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .mz-right-note{
    white-space:normal;
  }

  .mz-row{
    grid-template-columns:1fr;
  }

  .mz-row-go{
    display:none;
  }

  .mz-row-thumb{
    height:170px;
  }

  .mz-row-meta{
    white-space:normal;
  }

  .mz-feed .mz-pager{
    justify-content:center;
    margin-top:24px;
    gap:8px;
  }

  .mz-feed .mz-pager .btn{
    min-width:42px;
    height:42px;
    padding:0 14px;
    border-radius:14px;
    font-size:13px;
  }
}

@media (max-width: 420px){
  .mz-stats{
    grid-template-columns:1fr;
  }
}