.mm-bg { position: absolute; inset: 0; background:
  radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.2), transparent 40%),
  radial-gradient(circle at 88% 85%, rgba(129, 140, 248, 0.22), transparent 45%),
  linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 3.2cqw 3.2cqw,
  linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 3.2cqw 3.2cqw,
  #06090e; }

/* Welcome */
.mm-welcome { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 4cqw; width: 100%; padding: 0 7cqw; text-align: left; }
.mm-welcome-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 2.6cqh; }
.mm-welcome .gt-badge { font-size: 1.2cqw; }
.mm-welcome h1 { font-size: 4.6cqw; line-height: 1.08; letter-spacing: -0.02em; }
.mm-welcome h1 .gradient-text { display: inline; }
.mm-welcome p { font-size: 1.7cqw; color: var(--text-muted); max-width: 40ch; }
.mm-welcome .gt-btn { font-size: 1.7cqw; }
.mm-deck { position: relative; height: 34cqw; border: 0; background: none; cursor: pointer; }
.mm-deck-card { position: absolute; left: 50%; top: 50%; width: 17cqw; height: 24cqw; margin: -12cqw 0 0 -8.5cqw; }
.mm-deck-card, .mm-card .back {
  border-radius: 1.4cqw;
  background:
    radial-gradient(circle at 50% 42%, rgba(56, 189, 248, 0.28), transparent 55%),
    linear-gradient(160deg, #13203a, #0a0f1d);
  border: 0.18cqw solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 1.6cqw 4cqw rgba(0, 0, 0, 0.5), 0 0 2cqw rgba(56, 189, 248, 0.2);
}
.mm-deck-card::after, .mm-card .back::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: url("../../assets/logo-128.webp") center / contain no-repeat;
  filter: drop-shadow(0 0 1cqw rgba(56, 189, 248, 0.6));
}
.mm-deck-card.c1 { transform: rotate(-16deg) translate(-4cqw, 1cqw); opacity: 0.6; }
.mm-deck-card.c2 { transform: rotate(-6deg) translate(-1cqw, 0); opacity: 0.85; }
.mm-deck-card.c3 { transform: rotate(7deg) translate(2.4cqw, -0.6cqw); animation: floaty 3.5s ease-in-out infinite; }
.mm-deck-card.c3 > span { position: absolute; left: 8%; right: 8%; top: 9%; font: 600 1.25cqw var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; text-align: left; }
.mm-deck-card.c3::after { top: 58%; }
@keyframes floaty { 50% { transform: rotate(7deg) translate(2.4cqw, -1.8cqw); } }

/* Game */
.mm-top { position: absolute; top: 3cqh; left: 3cqw; right: 3cqw; display: flex; align-items: center; gap: 2cqw; }
.mm-brand { display: flex; align-items: center; gap: 0.8cqw; font-weight: 800; font-size: 2cqw; margin-right: auto; }
.mm-brand img { width: 4.2cqw; height: 4.2cqw; }
.mm-brand b { color: var(--primary); }
.mm-counter { display: flex; align-items: center; gap: 1cqw; padding: 0.7cqw 0.8cqw 0.7cqw 1.4cqw; border-radius: 1cqw; background: rgba(10, 15, 29, 0.8); border: 1px solid rgba(56, 189, 248, 0.3); font: 600 1.15cqw var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); }
.mm-counter b { font: 800 2.6cqw var(--font-main); color: var(--text-main); background: #06090e; border-radius: 0.6cqw; padding: 0.1cqw 0.9cqw; min-width: 4.4cqw; text-align: center; letter-spacing: 0; }
.mm-counter.small b { font-size: 2cqw; min-width: 3.4cqw; }
.mm-grid { position: absolute; top: 17cqh; bottom: 6cqh; left: 50%; transform: translateX(-50%); width: 72cqw; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1.6cqw; }
.mm-card { position: relative; border: 0; background: none; padding: 0; perspective: 120cqw; cursor: pointer; }
.mm-card .inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(.3, 1.3, .5, 1); }
.mm-card.open .inner, .mm-card.matched .inner { transform: rotateY(180deg); }
.mm-card .back, .mm-card .front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mm-card:hover:not(.open):not(.matched) .back { border-color: var(--primary); box-shadow: 0 0 3cqw rgba(56, 189, 248, 0.4); }
.mm-card .front {
  transform: rotateY(180deg);
  border-radius: 1.4cqw;
  padding: 1.2cqw;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; text-align: left;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.98), rgba(10, 15, 29, 0.98));
  border: 0.18cqw solid var(--c, var(--primary));
  box-shadow: 0 0 2.4cqw color-mix(in srgb, var(--c, #38bdf8) 35%, transparent);
}
.mm-card .ic { width: 4.8cqw; height: 4.8cqw; border-radius: 1cqw; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #38bdf8) 16%, transparent); color: var(--c, var(--primary)); }
.mm-card .ic svg { width: 2.8cqw; height: 2.8cqw; fill: currentColor; }
.mm-card h3 { font-size: 1.55cqw; line-height: 1.15; color: var(--text-main); }
.mm-card .tag { font: 500 0.95cqw var(--font-mono); color: var(--text-muted); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.4cqw; padding: 0.2cqw 0.5cqw; background: rgba(6, 9, 14, 0.6); }
.mm-card.matched .front { animation: matchGlow 0.9s ease; }
.mm-card.wrong .inner { animation: shake 0.4s ease; }
@keyframes matchGlow { 40% { box-shadow: 0 0 5cqw var(--c, #38bdf8); transform: rotateY(180deg) scale(1.06); } }
@keyframes shake { 25% { translate: -0.5cqw 0; } 75% { translate: 0.5cqw 0; } }

/* Result */
.mm-result { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 4cqw; align-items: center; width: 100%; padding: 0 6cqw; text-align: left; }
.mm-result-copy { display: flex; flex-direction: column; gap: 2.4cqh; align-items: flex-start; }
.mm-result h2 { font-size: 6.4cqw; line-height: 1; }
#resultLine { font-size: 2cqw; }
#resultLine b { color: var(--accent); }
.mm-cta { font-size: 1.5cqw; color: var(--text-muted); max-width: 40ch; }
.mm-result-actions { display: flex; gap: 1.2cqw; flex-wrap: wrap; }
.mm-result-actions .gt-btn { font-size: 1.4cqw; }
.mm-countdown { font: 500 1.1cqw var(--font-mono); color: var(--text-muted); }
.mm-showcase { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2cqw; }
.mm-showcase .mm-card { grid-column: span 2; height: 15cqw; cursor: default; animation: rise 0.6s backwards; }
.mm-showcase .mm-card:nth-child(4) { grid-column: 2 / span 2; }
@keyframes rise { from { opacity: 0; transform: translateY(3cqh); } }
