@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500&display=swap');

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body.mcg-body{
  width:100%;min-height:100%;
  background:#0a0a0f;overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

/* ── Fixed background layers ── */
.mcg-bg,
.mcg-bg-video {
  position:fixed;inset:0;z-index:0;
  background-size:cover;background-position:center;background-repeat:no-repeat;
  width:100%;height:100%;object-fit:cover;
}
.mcg-bg-overlay {
  position:fixed;inset:0;z-index:1;
  background:rgba(0,0,0,var(--bg-trans,0));
  pointer-events:none;
}

/* ── Scrollable page ── */
.mcg-page {
  position:relative;z-index:2;
  min-height:100vh;
  padding-bottom:90px;
  font-family:'DM Sans',-apple-system,sans-serif;
}

/* ── Top bar ── */
.mcg-topbar {
  display:flex;align-items:center;gap:12px;
  padding:18px 14px 20px;
  position:sticky;top:0;z-index:10;
  background:linear-gradient(to bottom,rgba(0,0,0,0.55),transparent);
  backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);
}
.mcg-back {
  display:flex;align-items:center;justify-content:center;
  width:40px;height:40px;flex-shrink:0;border-radius:50%;
  background:rgba(255,255,255,0.12);border:1px solid rgba(255,255,255,0.18);
  color:#fff;font-size:1.1rem;text-decoration:none;transition:background .2s;
}
.mcg-back:hover{background:rgba(255,255,255,.2);color:#fff}
.mcg-title {
  font-family:'Syne',sans-serif;font-weight:800;
  font-size:1.55rem;color:#ff2d78;
  letter-spacing:-.02em;line-height:1;
}

/* ── Grid ── */
.mcg-grid {
  display:grid;
  grid-template-columns:repeat(var(--cols,2),1fr);
  gap:10px;padding:0 12px;
}

/* ── Card ── */
.mcg-card {
  position:relative;border-radius:16px;overflow:hidden;
  display:block;text-decoration:none;
  background-color:var(--cc,#1a237e);
  border:1px solid rgba(255,255,255,0.12);
  transition:transform .28s cubic-bezier(.34,1.4,.64,1),box-shadow .28s;
  will-change:transform;
  animation:cardIn .5s ease both;
}
.mcg-card:hover{transform:translateY(-5px) scale(1.025);box-shadow:0 18px 50px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.18)}
.mcg-card:active{transform:scale(.96);transition-duration:.1s}

/* Stagger */
.mcg-card:nth-child(1) {animation-delay:.03s}
.mcg-card:nth-child(2) {animation-delay:.07s}
.mcg-card:nth-child(3) {animation-delay:.11s}
.mcg-card:nth-child(4) {animation-delay:.15s}
.mcg-card:nth-child(5) {animation-delay:.18s}
.mcg-card:nth-child(6) {animation-delay:.21s}
.mcg-card:nth-child(7) {animation-delay:.24s}
.mcg-card:nth-child(8) {animation-delay:.27s}
.mcg-card:nth-child(9) {animation-delay:.30s}
.mcg-card:nth-child(10){animation-delay:.33s}
.mcg-card:nth-child(n+11){animation-delay:.36s}
@keyframes cardIn{from{opacity:0;transform:translateY(18px) scale(.95)}to{opacity:1;transform:none}}

/* Media layers */
.mcg-card-img{position:absolute;inset:0;background-size:cover;background-position:center;z-index:0}
.mcg-card-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.mcg-card-trans{position:absolute;inset:0;z-index:1;background:rgba(0,0,0,var(--ct,0));pointer-events:none}
.mcg-card-gradient{
  position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(155deg,rgba(255,255,255,.055) 0%,rgba(255,255,255,0) 40%,rgba(0,0,0,.52) 100%);
}
.mcg-card::before{
  content:'';position:absolute;top:0;left:0;right:0;height:36%;
  background:linear-gradient(180deg,rgba(255,255,255,.09),transparent);
  border-radius:16px 16px 0 0;z-index:3;pointer-events:none;
}

/* Card content */
.mcg-card-body{position:absolute;inset:0;z-index:4;padding:12px 11px 14px;display:flex;flex-direction:column}
.mcg-card-icon{
  width:34px;height:34px;border-radius:10px;
  background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.24);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  display:flex;align-items:center;justify-content:center;margin-bottom:auto;
}
.mcg-card-icon svg{width:16px;height:16px;color:rgba(255,255,255,.9)}
.mcg-card-name{
  font-family:'Syne',sans-serif;font-weight:700;
  font-size:clamp(.78rem,3.5vw,1rem);color:#fff;
  text-shadow:0 1px 8px rgba(0,0,0,.75);line-height:1.2;margin-bottom:3px;word-break:break-word;
}
.mcg-card-count{font-size:clamp(.66rem,2.8vw,.78rem);color:rgba(255,255,255,.62)}

@media(max-width:360px){
  .mcg-grid{gap:8px;padding:0 8px}
  .mcg-card-icon{width:28px;height:28px}
}
