/* SQUEEZE! (Minecraft mini game): animated logo, homepage card and mini games page section.
   Used on index.html and minecraft-mini-games.html.
   No reduced-motion switch-off on purpose: the owner's Windows has animations off, and this is meant to move. */

/* ---------- the animated logo ----------
   It floats, two neon walls slam in from the sides and squash it ("squeeze!"), it springs back,
   the glow flickers between cyan and orange and a shine runs across it. */
.sq-logo { position: relative; width: min(100%, 520px); }
.sq-logo__float { position: relative; animation: sqFloat 3.4s ease-in-out infinite; }
@keyframes sqFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}
.sq-logo__squish { position: relative; transform-origin: 50% 70%; animation: sqSquish 3.8s cubic-bezier(0.3, 0, 0.3, 1) infinite; }
@keyframes sqSquish {
  0%, 52%, 100% { transform: scale(1, 1); }
  60% { transform: scale(0.84, 1.1); }
  66% { transform: scale(0.84, 1.1); }
  72% { transform: scale(1.08, 0.93); }
  78% { transform: scale(0.97, 1.03); }
  84% { transform: scale(1, 1); }
}
.sq-logo__base { position: relative; z-index: 2; display: block; width: 100%; height: auto; animation: sqGlow 2.4s ease-in-out infinite; }
@keyframes sqGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.65)) drop-shadow(0 0 22px rgba(59, 130, 246, 0.4)); }
  50% { filter: drop-shadow(0 0 10px rgba(251, 146, 60, 0.7)) drop-shadow(0 0 26px rgba(217, 70, 239, 0.45)); }
}
.sq-logo__shine { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.95) 47%, rgba(165, 243, 252, 0.8) 51%, transparent 64%) no-repeat;
  background-size: 260% 100%; background-position: 160% 0; mix-blend-mode: screen;
  -webkit-mask: url("assets/squeeze-logo.webp") center / 100% 100% no-repeat; mask: url("assets/squeeze-logo.webp") center / 100% 100% no-repeat;
  animation: sqShine 3.8s ease-in-out infinite; }
@keyframes sqShine { 0%, 70% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
/* the two neon walls that crush in from the sides, in time with the squash */
.sq-logo__wall { position: absolute; z-index: 4; top: 8%; bottom: 8%; width: 7%; border-radius: 6px; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0 14%, rgba(30, 41, 59, 0.92) 14% 28%);
  animation: sqWallL 3.8s cubic-bezier(0.3, 0, 0.3, 1) infinite; }
.sq-logo__wall--l { left: -9%; border: 2px solid #22d3ee; box-shadow: 0 0 12px #22d3ee, 0 0 26px rgba(34, 211, 238, 0.6), inset 0 0 10px rgba(34, 211, 238, 0.6); }
.sq-logo__wall--r { right: -9%; border: 2px solid #f97316; box-shadow: 0 0 12px #f97316, 0 0 26px rgba(249, 115, 22, 0.6), inset 0 0 10px rgba(249, 115, 22, 0.6); animation-name: sqWallR; }
@keyframes sqWallL {
  0%, 46%, 100% { transform: translateX(-30%); opacity: 0; }
  52% { opacity: 1; }
  60%, 66% { transform: translateX(165%); opacity: 1; }
  74% { transform: translateX(40%); opacity: 1; }
  86% { transform: translateX(-30%); opacity: 0; }
}
@keyframes sqWallR {
  0%, 46%, 100% { transform: translateX(30%); opacity: 0; }
  52% { opacity: 1; }
  60%, 66% { transform: translateX(-165%); opacity: 1; }
  74% { transform: translateX(-40%); opacity: 1; }
  86% { transform: translateX(30%); opacity: 0; }
}
/* little speed streaks that fly past behind the logo */
.sq-logo__streaks { position: absolute; inset: 10% -4%; z-index: 0; pointer-events: none; overflow: hidden; }
.sq-logo__streaks i { position: absolute; top: var(--y); left: 0; width: 22%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--c, #67e8f9)); box-shadow: 0 0 8px var(--c, #67e8f9); opacity: 0;
  animation: sqStreak var(--d, 1.4s) linear infinite; animation-delay: var(--dl, 0s); }
@keyframes sqStreak { 0% { transform: translateX(-120%); opacity: 0; } 15% { opacity: 0.9; } 85% { opacity: 0.9; } 100% { transform: translateX(560%); opacity: 0; } }

/* ---------- homepage card ---------- */
.spotlight--squeeze { --accent: 34, 211, 238; }
.spotlight--squeeze .spotlight__badge { background: linear-gradient(90deg, #06b6d4, #7c3aed); border-color: rgba(103, 232, 249, 0.6); color: #fff; }
.spotlight--squeeze .spotlight__tag { border-color: rgba(250, 204, 21, 0.6); color: #fde047; }
.spotlight--squeeze .spotlight__art { object-position: 50% 0%; }
.spotlight--minecraft.spotlight--squeeze .spotlight__cta { border-color: rgba(103, 232, 249, 0.55); background: linear-gradient(135deg, #22d3ee, #2563eb 55%, #c026d3); box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45); }
/* the animated logo sits at the top of the card */
.spotlight--squeeze .sq-logo { position: absolute; z-index: 3; top: 50px; left: 50%; width: 80%; margin-left: -40%; pointer-events: none; }
.spotlight--squeeze .sq-logo__base { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)); }
/* neon side walls on the card itself that pinch in now and then (and close in more on hover) */
.sq-card-walls { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sq-card-walls::before, .sq-card-walls::after { content: ""; position: absolute; top: 0; bottom: 0; width: 10px;
  animation: sqCardPinch 3.8s cubic-bezier(0.3, 0, 0.3, 1) infinite; transition: width 0.4s ease; }
.sq-card-walls::before { left: 0; background: linear-gradient(90deg, rgba(34, 211, 238, 0.85), transparent); box-shadow: 0 0 22px rgba(34, 211, 238, 0.7); }
.sq-card-walls::after { right: 0; background: linear-gradient(270deg, rgba(249, 115, 22, 0.85), transparent); box-shadow: 0 0 22px rgba(249, 115, 22, 0.7); }
@keyframes sqCardPinch { 0%, 50%, 100% { opacity: 0.35; width: 10px; } 60%, 66% { opacity: 1; width: 34px; } 76% { opacity: 0.6; width: 14px; } }
.spotlight--squeeze:hover .sq-card-walls::before, .spotlight--squeeze:hover .sq-card-walls::after { width: 40px; }

/* ---------- mini games page section ---------- */
.mg-game--squeeze { background: radial-gradient(80% 90% at 0% 0%, rgba(34, 211, 238, 0.24), transparent 60%), radial-gradient(70% 80% at 100% 100%, rgba(249, 115, 22, 0.24), transparent 60%), radial-gradient(60% 60% at 100% 0%, rgba(192, 38, 211, 0.22), transparent 60%), #0a0b24; box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.5), 0 30px 70px rgba(0, 0, 0, 0.55); }
/* a neon floor grid rushing toward you behind the card */
.mg-game--squeeze .mg-game__climb { opacity: 0.4;
  background-image: linear-gradient(rgba(34, 211, 238, 0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(192, 38, 211, 0.4) 1px, transparent 1px);
  background-size: 48px 48px; animation: sqGrid 1.6s linear infinite; }
@keyframes sqGrid { to { background-position: 0 48px, 0 0; } }
.mg-game--squeeze .mg-game__poster { box-shadow: 0 0 46px rgba(34, 211, 238, 0.45), 0 0 90px rgba(249, 115, 22, 0.25), 0 24px 50px rgba(0, 0, 0, 0.5); }
.mg-game--squeeze .mg-game__ribbon, .mg-game--squeeze .mg-game__new { color: #0a0b24; background: linear-gradient(90deg, #facc15, #fb923c); box-shadow: 0 0 18px rgba(250, 204, 21, 0.6); }
.mg-game--squeeze .mg-game__feat li::before { background: #22d3ee; box-shadow: 0 0 10px #22d3ee; }
.mg-game--squeeze .mg-game__feat li:nth-child(even)::before { background: #fb923c; box-shadow: 0 0 10px #fb923c; }
.mg-game--squeeze .mg-btn { color: #fff; background: linear-gradient(180deg, #22d3ee, #2563eb); box-shadow: 0 6px 0 #581c87, 0 0 28px rgba(34, 211, 238, 0.55); }
.mg-game--squeeze .mg-btn:active { box-shadow: 0 2px 0 #581c87; }
.mg-game--squeeze .mg-btn__price { background: #0a0b24; color: #fde047; }
.mg-game--squeeze .sq-logo { margin: 22px 0 0; }

/* wall meter: walls with holes rush at the player and they duck or dodge through */
.mg-wall { margin-top: 20px; }
.mg-wall__label { display: flex; justify-content: space-between; font: 10px/1 "Press Start 2P", monospace; color: #a5f3fc; letter-spacing: 0.06em; }
.mg-wall__label span:last-child { color: #fdba74; }
.mg-wall__lane { position: relative; height: 54px; margin-top: 10px; overflow: hidden; border-radius: 8px;
  background: linear-gradient(180deg, #0f172a, #1e1b4b); box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.35); }
.mg-wall__lane::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: repeating-linear-gradient(90deg, #22d3ee 0 18px, #c026d3 18px 36px); animation: sqFloor 0.6s linear infinite; }
@keyframes sqFloor { to { background-position: -36px 0; } }
.mg-wall__player { position: absolute; left: 12%; bottom: 4px; width: 16px; height: 30px; border-radius: 3px; background: linear-gradient(180deg, #a16207 0 30%, #16a34a 30% 70%, #1e3a8a 70%); box-shadow: 0 0 10px rgba(255, 255, 255, 0.35); transform-origin: 50% 100%; transition: transform 0.15s ease; }
.mg-wall__player.is-duck { transform: scaleY(0.5); }
.mg-wall__wall { position: absolute; top: 0; bottom: 4px; width: 14px; left: 100%; border: 2px solid #22d3ee; border-radius: 3px; background: rgba(30, 41, 59, 0.95); box-shadow: 0 0 12px #22d3ee;
  animation: sqWallRun 1.3s linear forwards; }
.mg-wall__wall--low { border-color: #fb923c; box-shadow: 0 0 12px #fb923c; }
/* the hole in each wall: a full-height gap for "go", a low gap for "duck" */
.mg-wall__wall::before { content: ""; position: absolute; left: -3px; right: -3px; bottom: 0; height: 68%; background: #0f172a; border-top: 2px solid #facc15; }
.mg-wall__wall--low::before { height: 36%; }
@keyframes sqWallRun { to { left: -10%; } }
.mg-wall__pop { position: absolute; left: 50%; top: 50%; translate: -50% -50%; white-space: nowrap; font: 13px/1 "Press Start 2P", monospace; color: #fde047; text-shadow: 0 3px 0 #7c2d12, 0 0 16px rgba(250, 204, 21, 0.9); animation: mgPop 1.6s ease-out forwards; pointer-events: none; z-index: 2; }

/* ---------- every homepage Minecraft card: that game's animated logo at the top of the card ----------
   The logo animations themselves come from minigames.css (same as on the mini games page). */
.spot-logo { position: absolute; z-index: 3; top: 50px; left: 50%; width: var(--w, 80%); translate: -50% 0; pointer-events: none; }
.spot-logo > span { display: block; width: 100%; margin: 0; }
.spot-logo span { display: block; }
.spot-logo .mg-ulogo__arrow, .spot-logo .mg-ulogo__shine, .spot-logo .mg-blogo__shine, .spot-logo .mg-flogo__shine, .spot-logo .mg-flogo__halo,
.spot-logo .mg-flogo__star, .spot-logo .mg-blogo__drop, .spot-logo .mg-dlogo__spark, .spot-logo .mg-plogo__eye, .spot-logo .mg-flogo__snow { position: absolute; }
.spot-logo .mg-flogo__lights { display: flex; }
.spot-logo--1up { --w: 82%; top: 54px; }
.spot-logo--drop { --w: 60%; top: 44px; }
.spot-logo--blockout { --w: 80%; top: 52px; }
.spot-logo--frost { --w: 64%; top: 44px; }
.spot-logo--mc { --w: 78%; top: 62px; }
.spot-logo--mc img { display: block; width: 100%; height: auto; transform-origin: 50% 60%;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.75)) drop-shadow(0 0 14px rgba(74, 222, 128, 0.6)) drop-shadow(0 0 30px rgba(74, 222, 128, 0.35));
  animation: spotMcFloat 4.5s ease-in-out infinite; }
@keyframes spotMcFloat {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-8px) rotate(1.2deg); }
}
/* a dark shadow behind each card logo so it reads over the busy posters */
.spot-logo { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 18px rgba(0, 0, 0, 0.6)); }

/* Don't Look Down! logo on the homepage card */
.spot-logo--dld { --w: 84%; top: 46px; }
.spot-logo .dld-logo { width: 100%; margin: 0; }
.spot-logo .dld-logo__rainbow, .spot-logo .dld-logo__tex, .spot-logo .dld-logo__shine, .spot-logo .dld-logo__fall, .spot-logo .dld-logo__fall i, .spot-logo .dld-logo__rainbow i { position: absolute; }
.spot-logo .dld-logo__float, .spot-logo .dld-logo__teeter { position: relative; }
