Game — Mobile Casual / Puzzle Landing
A bright, bouncy landing page for a fictional mobile match-3 puzzle game. Features a glossy hero with a CSS-drawn phone mockup showing animated candy gameplay, chunky App Store and Google Play download buttons, a star-rating and animated download count-up, a playful feature trio with bouncing icons, an adventure-map progress teaser with a filling bar, a daily-bonus rewards streak, and a swappable phone-screen demo. Friendly candy palette with squishy button micro-interactions.
MCP
Code
:root {
--bg: #fff7fb;
--bg-2: #ffeef6;
--panel: #ffffff;
--panel-2: #fff2f8;
--text: #2a2140;
--muted: #7b738f;
--line: rgba(42, 33, 64, 0.10);
--line-2: rgba(42, 33, 64, 0.16);
--accent: #ff5ea0;
--accent-2: #ffd02e;
--accent-3: #48d1ff;
--success: #56d364;
--r-sm: 10px;
--r-md: 18px;
--r-lg: 28px;
--r-pill: 999px;
--shadow: 0 14px 30px rgba(255, 94, 160, 0.18);
--shadow-sm: 0 6px 16px rgba(42, 33, 64, 0.10);
--glow: 0 0 0 4px rgba(255, 94, 160, 0.18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
font-family: "Inter", system-ui, sans-serif;
background:
radial-gradient(1100px 600px at 85% -10%, var(--bg-2), transparent 60%),
radial-gradient(900px 500px at -5% 20%, #eef9ff, transparent 55%),
var(--bg);
color: var(--text);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow-x: hidden;
}
h1, h2, h3, h4, .brand-name, .dl-num, .game-shuffle, .store-txt strong {
font-family: "Baloo 2", "Inter", sans-serif;
letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
:focus-visible {
outline: none;
box-shadow: var(--glow);
border-radius: var(--r-sm);
}
/* floating background blobs */
.blob {
position: fixed;
border-radius: 50%;
filter: blur(60px);
opacity: 0.5;
z-index: 0;
pointer-events: none;
}
.blob-a { width: 360px; height: 360px; top: -80px; right: -60px; background: #ffd6e8; animation: float 9s ease-in-out infinite; }
.blob-b { width: 300px; height: 300px; bottom: 10%; left: -80px; background: #d7f1ff; animation: float 11s ease-in-out infinite reverse; }
.blob-c { width: 240px; height: 240px; top: 45%; right: 12%; background: #fff0c2; animation: float 13s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-26px) translateX(14px); } }
/* layout */
main { position: relative; z-index: 1; }
section { max-width: 1120px; margin: 0 auto; padding: 64px 22px; }
/* topbar */
.topbar {
position: sticky;
top: 0;
z-index: 30;
display: flex;
align-items: center;
gap: 16px;
max-width: 1120px;
margin: 0 auto;
padding: 14px 22px;
backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; }
.brand-mark {
display: grid; place-items: center;
width: 38px; height: 38px;
font-size: 20px;
background: linear-gradient(135deg, var(--accent), #ff9ac6);
border-radius: 12px;
box-shadow: var(--shadow-sm);
transform: rotate(-6deg);
}
.brand-name { font-size: 20px; font-weight: 800; }
.brand-accent { color: var(--accent); }
.nav { display: flex; gap: 22px; margin-left: 14px; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--accent); }
.topbar .btn-mini { margin-left: auto; }
/* buttons */
.btn {
border: none;
cursor: pointer;
font-family: "Baloo 2", sans-serif;
font-weight: 700;
color: #fff;
background: linear-gradient(135deg, var(--accent), #ff86bb);
border-radius: var(--r-pill);
box-shadow: 0 8px 0 #e23d83, var(--shadow);
transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #e23d83, var(--shadow); }
.btn-mini { padding: 9px 18px; font-size: 14px; }
.btn-big { padding: 15px 28px; font-size: 17px; }
.squish { animation: squish 0.32s ease; }
@keyframes squish {
0% { transform: scale(1); }
35% { transform: scale(0.9, 1.08); }
70% { transform: scale(1.06, 0.94); }
100% { transform: scale(1); }
}
/* pills */
.pill {
display: inline-flex; align-items: center;
padding: 7px 15px;
font-size: 13px; font-weight: 700;
color: var(--accent);
background: #ffe4f0;
border-radius: var(--r-pill);
}
.pill-sky { color: #1796c9; background: #d9f3ff; }
.pill-yellow { color: #a9750a; background: #fff1c6; }
/* hero */
.hero {
display: grid;
grid-template-columns: 1.05fr 0.95fr;
gap: 48px;
align-items: center;
padding-top: 36px;
}
.hero-copy h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.06; margin: 16px 0 14px; }
.hero-copy .hl { color: var(--accent); position: relative; }
.hero-copy .hl::after {
content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px;
background: var(--accent-2); opacity: 0.55; border-radius: 6px; z-index: -1;
}
.lede { font-size: 17px; color: var(--muted); max-width: 46ch; margin: 0 0 22px; }
.ratings { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.rating-block, .dl-block { display: flex; flex-direction: column; gap: 3px; }
.stars { color: var(--accent-2); font-size: 19px; letter-spacing: 2px; }
.stars .half { color: #e9d9a0; }
.rating-meta { font-size: 13px; color: var(--muted); font-weight: 500; }
.rating-meta strong { color: var(--text); }
.divider { width: 1px; height: 38px; background: var(--line-2); }
.dl-num { font-size: 24px; font-weight: 800; color: var(--accent-3); }
/* store buttons */
.store-row { display: flex; gap: 14px; flex-wrap: wrap; }
.store-row-center { justify-content: center; }
.store-btn {
display: inline-flex; align-items: center; gap: 11px;
padding: 12px 22px;
background: var(--text);
color: #fff;
border: none; cursor: pointer;
border-radius: var(--r-md);
box-shadow: 0 8px 0 #1a1430;
transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}
.store-btn:hover { filter: brightness(1.12); }
.store-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #1a1430; }
.store-ico { font-size: 24px; }
.store-txt { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-txt small { font-size: 11px; opacity: 0.8; }
.store-txt strong { font-size: 17px; }
.store-btn-light { background: #fff; color: var(--text); box-shadow: 0 8px 0 #ffd0e4; }
.store-btn-light:active { box-shadow: 0 3px 0 #ffd0e4; }
.fineprint { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
/* phone mockup */
.hero-phone { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.phone {
position: relative;
width: 280px;
background: #1c1530;
border-radius: 40px;
padding: 12px;
box-shadow: 0 30px 60px rgba(42, 33, 64, 0.28), inset 0 0 0 2px rgba(255,255,255,0.06);
animation: bobble 6s ease-in-out infinite;
}
@keyframes bobble { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(0.4deg); } }
.phone-notch {
position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
width: 92px; height: 18px; background: #1c1530; border-radius: 0 0 14px 14px; z-index: 3;
}
.phone-screen {
background: linear-gradient(180deg, #ffe9f4, #e8f7ff);
border-radius: 30px;
padding: 26px 14px 14px;
display: flex; flex-direction: column; gap: 10px;
min-height: 440px;
}
.game-hud { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hud-chip {
display: inline-flex; align-items: center; gap: 4px;
font-size: 12px; font-weight: 700; color: var(--text);
background: #fff; padding: 5px 9px; border-radius: var(--r-pill);
box-shadow: var(--shadow-sm);
}
.hud-chip:first-child { color: var(--accent); }
.hud-score { font-size: 12px; color: var(--muted); font-weight: 600; }
.hud-score strong { display: block; font-family: "Baloo 2", sans-serif; font-size: 16px; color: var(--text); }
/* candy grid */
.grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
background: rgba(255,255,255,0.55);
padding: 8px;
border-radius: var(--r-md);
box-shadow: inset 0 2px 8px rgba(42,33,64,0.08);
}
.tile {
aspect-ratio: 1;
border-radius: 12px;
display: grid; place-items: center;
font-size: 17px;
cursor: pointer;
border: none;
background: #fff;
box-shadow: inset 0 -3px 0 rgba(0,0,0,0.10), 0 2px 4px rgba(42,33,64,0.10);
transition: transform 0.14s ease;
}
.tile:hover { transform: scale(1.08); }
.tile.pop { animation: pop 0.4s ease; }
@keyframes pop {
0% { transform: scale(1); }
40% { transform: scale(0.2) rotate(40deg); opacity: 0.3; }
60% { transform: scale(1.25) rotate(-10deg); opacity: 1; }
100% { transform: scale(1); }
}
.tile.c1 { background: #ffe0ec; }
.tile.c2 { background: #fff4cf; }
.tile.c3 { background: #d9f3ff; }
.tile.c4 { background: #e2ffe6; }
.tile.c5 { background: #efe1ff; }
.game-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.goal { font-size: 12px; color: var(--muted); font-weight: 600; }
.goal strong { color: var(--accent); }
.game-shuffle {
border: none; cursor: pointer;
font-size: 12px; font-weight: 700; color: #fff;
background: linear-gradient(135deg, var(--accent-3), #7ee0ff);
padding: 7px 12px; border-radius: var(--r-pill);
box-shadow: 0 4px 0 #2bb0e0;
transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.game-shuffle:active { transform: translateY(3px); box-shadow: 0 1px 0 #2bb0e0; }
.screen-dots { display: flex; gap: 8px; }
.dot {
border: none; cursor: pointer;
font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: 13px;
color: var(--muted); background: #fff;
padding: 7px 16px; border-radius: var(--r-pill);
box-shadow: var(--shadow-sm);
transition: all 0.15s ease;
}
.dot.is-active { color: #fff; background: var(--accent); }
/* features */
.features h2, .rewards h2 { text-align: center; font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 36px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feat-card {
background: var(--panel);
border-radius: var(--r-lg);
padding: 30px 24px;
text-align: center;
box-shadow: var(--shadow);
border: 2px solid transparent;
transition: transform 0.18s ease, border-color 0.18s ease;
}
.feat-card:hover, .feat-card:focus-visible {
transform: translateY(-6px);
border-color: var(--accent);
}
.feat-ico {
width: 76px; height: 76px; margin: 0 auto 16px;
display: grid; place-items: center;
font-size: 36px;
background: linear-gradient(135deg, #fff2f8, #e8f7ff);
border-radius: 24px;
box-shadow: inset 0 0 0 2px #fff, var(--shadow-sm);
}
.feat-card:hover .bouncy { animation: bounce 0.6s ease; }
@keyframes bounce {
0%,100% { transform: translateY(0); }
30% { transform: translateY(-12px) scale(1.05); }
60% { transform: translateY(2px) scale(0.97); }
}
.feat-card h3 { margin: 0 0 8px; font-size: 20px; }
.feat-card p { margin: 0; color: var(--muted); font-size: 15px; }
/* levels */
.levels { padding-bottom: 64px; }
.levels-inner {
display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center;
background: var(--panel);
border-radius: var(--r-lg);
padding: 40px;
box-shadow: var(--shadow);
}
.levels-copy h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 14px 0 12px; }
.levels-copy p { color: var(--muted); margin: 0 0 22px; }
.progress-wrap { background: var(--panel-2); border-radius: var(--r-md); padding: 18px; }
.progress-top { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.progress-top span:last-child { color: var(--accent); }
.bar { height: 16px; background: #ffe1ee; border-radius: var(--r-pill); overflow: hidden; box-shadow: inset 0 2px 4px rgba(42,33,64,0.10); }
.bar-fill {
height: 100%; width: 0;
background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3));
border-radius: var(--r-pill);
transition: width 1.4s cubic-bezier(.22,1,.36,1);
}
.progress-stats { display: flex; justify-content: space-between; margin-top: 16px; text-align: center; }
.progress-stats strong { display: block; font-family: "Baloo 2", sans-serif; font-size: 20px; color: var(--text); }
.progress-stats small { font-size: 11px; color: var(--muted); }
.level-pearls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pearl {
position: relative; aspect-ratio: 1;
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
border-radius: 22px;
background: var(--panel-2);
box-shadow: var(--shadow-sm);
font-weight: 800;
}
.pearl span { font-family: "Baloo 2", sans-serif; font-size: 22px; }
.pearl em { font-style: normal; font-size: 12px; color: var(--accent-2); }
.pearl.done { background: linear-gradient(135deg, #fff6da, #ffe9d2); }
.pearl.now { background: linear-gradient(135deg, var(--accent), #ff9ac6); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.pearl.now em { color: #fff; }
.pearl.locked { color: var(--muted); opacity: 0.7; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,94,160,0.5); } 50% { box-shadow: 0 0 0 10px rgba(255,94,160,0); } }
/* rewards */
.rewards-card {
display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
background: linear-gradient(135deg, #fff2c6, #ffe2ee);
border-radius: var(--r-lg);
padding: 44px;
box-shadow: var(--shadow);
}
.rewards-copy h2 { text-align: left; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 14px 0 12px; }
.rewards-copy p { color: #6c5d4d; margin: 0 0 22px; }
.streak { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.streak li {
display: flex; flex-direction: column; align-items: center; gap: 4px;
background: #fff; border-radius: var(--r-md); padding: 12px 6px;
box-shadow: var(--shadow-sm);
opacity: 0.65;
}
.streak li small { font-size: 11px; font-weight: 700; color: var(--muted); }
.streak li span { font-size: 24px; }
.streak li.claimed { opacity: 1; }
.streak li.claimed::after { content: "✓"; position: absolute; }
.streak li.today { opacity: 1; outline: 3px solid var(--accent); transform: scale(1.04); animation: pulse 1.6s ease-in-out infinite; }
.streak li.legendary { opacity: 1; background: linear-gradient(135deg, #fff0b0, #ffd86b); grid-column: span 1; }
/* cta band */
.cta-band {
text-align: center;
background: linear-gradient(135deg, var(--accent), #ff86bb 60%, var(--accent-3));
color: #fff;
border-radius: var(--r-lg);
margin: 0 auto 64px;
padding: 54px 22px;
box-shadow: var(--shadow);
}
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 8px; }
.cta-band p { margin: 0 0 26px; opacity: 0.95; font-size: 17px; }
/* footer */
.footer { position: relative; z-index: 1; background: var(--text); color: #cfc7e0; }
.footer-top {
max-width: 1120px; margin: 0 auto; padding: 48px 22px 30px;
display: grid; grid-template-columns: 1fr 2fr; gap: 36px;
}
.brand-foot .brand-name, .brand-foot { color: #fff; }
.foot-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.foot-links h4 { color: #fff; margin: 0 0 12px; font-size: 15px; }
.foot-links a { display: block; padding: 5px 0; font-size: 14px; color: #cfc7e0; }
.foot-links a:hover { color: var(--accent); }
.footer-bot {
max-width: 1120px; margin: 0 auto; padding: 20px 22px;
border-top: 1px solid rgba(255,255,255,0.1);
display: flex; justify-content: space-between; align-items: center; gap: 12px;
font-size: 13px; flex-wrap: wrap;
}
.foot-social { display: flex; gap: 14px; font-size: 18px; }
/* toast */
.toast-wrap {
position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
display: flex; flex-direction: column; gap: 10px; z-index: 100; align-items: center;
}
.toast {
background: var(--text); color: #fff;
font-weight: 600; font-size: 14px;
padding: 12px 20px; border-radius: var(--r-pill);
box-shadow: var(--shadow);
animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.9); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
/* responsive */
@media (max-width: 880px) {
.hero { grid-template-columns: 1fr; text-align: center; }
.hero-copy .lede { margin-inline: auto; }
.ratings, .store-row { justify-content: center; }
.levels-inner, .rewards-card { grid-template-columns: 1fr; }
.nav { display: none; }
}
@media (max-width: 520px) {
section { padding: 44px 16px; }
.feat-grid { grid-template-columns: 1fr; }
.ratings { flex-direction: column; gap: 12px; }
.divider { display: none; }
.store-btn { flex: 1; justify-content: center; }
.levels-inner, .rewards-card { padding: 26px 20px; }
.level-pearls { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.footer-top { grid-template-columns: 1fr; }
.foot-links { grid-template-columns: 1fr 1fr; }
.footer-bot { flex-direction: column; text-align: center; }
.streak { grid-template-columns: repeat(4, 1fr); }
.phone { width: 250px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; }
}(function () {
"use strict";
/* ---------- toast helper ---------- */
var toastWrap = document.getElementById("toastWrap");
function toast(msg) {
if (!toastWrap) return;
var el = document.createElement("div");
el.className = "toast";
el.textContent = msg;
toastWrap.appendChild(el);
setTimeout(function () {
el.classList.add("out");
setTimeout(function () { el.remove(); }, 320);
}, 2200);
}
/* ---------- squish on press + optional toast ---------- */
document.querySelectorAll("[data-squish]").forEach(function (btn) {
btn.addEventListener("click", function () {
btn.classList.remove("squish");
// reflow to restart animation
void btn.offsetWidth;
btn.classList.add("squish");
var msg = btn.getAttribute("data-toast");
if (msg) toast(msg);
});
btn.addEventListener("animationend", function () {
btn.classList.remove("squish");
});
});
/* ---------- candy grid ---------- */
var grid = document.getElementById("grid");
var scoreEl = document.getElementById("score");
var CANDIES = [
{ c: "c1", e: "🍓" },
{ c: "c2", e: "🍋" },
{ c: "c3", e: "🫐" },
{ c: "c4", e: "🍏" },
{ c: "c5", e: "🍇" }
];
var COLS = 6, ROWS = 6;
var score = 12480;
function randCandy() { return CANDIES[Math.floor(Math.random() * CANDIES.length)]; }
function makeTile() {
var k = randCandy();
var t = document.createElement("button");
t.className = "tile " + k.c;
t.type = "button";
t.textContent = k.e;
t.tabIndex = -1;
t.addEventListener("click", function () { popTile(t); });
return t;
}
function buildGrid() {
if (!grid) return;
grid.innerHTML = "";
for (var i = 0; i < COLS * ROWS; i++) grid.appendChild(makeTile());
}
function setTile(t) {
var k = randCandy();
t.className = "tile " + k.c;
t.textContent = k.e;
}
function bumpScore(n) {
score += n;
if (scoreEl) scoreEl.textContent = score.toLocaleString();
}
function popTile(t) {
t.classList.remove("pop");
void t.offsetWidth;
t.classList.add("pop");
bumpScore(40 + Math.floor(Math.random() * 60));
setTimeout(function () { setTile(t); }, 200);
}
buildGrid();
/* ---------- ambient auto-bounce of random tiles ---------- */
var autoTimer = setInterval(function () {
if (!grid || document.hidden) return;
var tiles = grid.querySelectorAll(".tile");
if (!tiles.length) return;
var pick = tiles[Math.floor(Math.random() * tiles.length)];
pick.classList.remove("pop");
void pick.offsetWidth;
pick.classList.add("pop");
setTimeout(function () { setTile(pick); }, 200);
}, 1100);
/* ---------- shuffle button ---------- */
var shuffle = document.getElementById("shuffle");
if (shuffle) {
shuffle.addEventListener("click", function () {
grid.querySelectorAll(".tile").forEach(function (t, idx) {
setTimeout(function () { popTile(t); }, idx * 14);
});
toast("Board shuffled! 🔀");
});
}
/* ---------- download count-up (on view) ---------- */
var dlEl = document.getElementById("dlCount");
function formatBig(n) {
if (n >= 1e6) return (n / 1e6).toFixed(1).replace(/\.0$/, "") + "M";
if (n >= 1e3) return Math.round(n / 1e3) + "K";
return String(n);
}
function countUp(el) {
var target = parseInt(el.getAttribute("data-target"), 10) || 0;
var dur = 1600, start = null;
function step(ts) {
if (start === null) start = ts;
var p = Math.min((ts - start) / dur, 1);
var eased = 1 - Math.pow(1 - p, 3);
el.textContent = formatBig(Math.floor(eased * target));
if (p < 1) requestAnimationFrame(step);
else el.textContent = formatBig(target);
}
requestAnimationFrame(step);
}
/* ---------- progress bar fill + count-up via observer ---------- */
var barFill = document.getElementById("barFill");
var dlDone = false, barDone = false;
if ("IntersectionObserver" in window) {
var io = new IntersectionObserver(function (entries) {
entries.forEach(function (en) {
if (!en.isIntersecting) return;
if (en.target === dlEl && !dlDone) { dlDone = true; countUp(dlEl); }
if (en.target === barFill && !barDone) { barDone = true; barFill.style.width = "68%"; }
});
}, { threshold: 0.4 });
if (dlEl) io.observe(dlEl);
if (barFill) io.observe(barFill);
} else {
if (dlEl) countUp(dlEl);
if (barFill) barFill.style.width = "68%";
}
/* ---------- swappable phone screen ---------- */
var SCREENS = [
{
build: function (scr) {
scr.innerHTML = MATCH_HTML;
grid = scr.querySelector("#grid");
scoreEl = scr.querySelector("#score");
buildGrid();
var sh = scr.querySelector("#shuffle");
if (sh) sh.addEventListener("click", function () {
grid.querySelectorAll(".tile").forEach(function (t, idx) {
setTimeout(function () { popTile(t); }, idx * 14);
});
toast("Board shuffled! 🔀");
});
}
},
{
build: function (scr) {
scr.innerHTML =
'<div class="game-hud"><div class="hud-chip">🗺</div><div class="hud-score">Adventure <strong>Berry Beach</strong></div><div class="hud-chip">⭐ 612</div></div>' +
'<div class="map-mini">' +
['done','done','done','now','locked','locked','locked','locked','locked']
.map(function (s, i) { return '<span class="map-node ' + s + '">' + (s === 'now' ? '📍' : (s === 'locked' ? '🔒' : (i + 1))) + '</span>'; })
.join('') +
'</div>' +
'<div class="game-foot"><div class="goal">Next: <strong>District 5</strong></div></div>';
}
},
{
build: function (scr) {
scr.innerHTML =
'<div class="game-hud"><div class="hud-chip">🎁</div><div class="hud-score">Daily <strong>Rewards</strong></div><div class="hud-chip">🔥 4</div></div>' +
'<div class="reward-mini">' +
['🍬','💰','🪄','🎁','🍭','💎','👑'].map(function (e, i) {
var cls = i < 3 ? 'got' : (i === 3 ? 'cur' : '');
return '<span class="rw-node ' + cls + '"><b>D' + (i + 1) + '</b>' + e + '</span>';
}).join('') +
'</div>' +
'<div class="game-foot"><div class="goal">Day 7: <strong>Legendary 👑</strong></div></div>';
}
}
];
var phoneScreen = document.querySelector(".phone-screen");
var MATCH_HTML = phoneScreen ? phoneScreen.innerHTML : "";
// inject mini-screen styles once
var style = document.createElement("style");
style.textContent =
".map-mini{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;flex:1;align-content:center;padding:8px}" +
".map-node{aspect-ratio:1;display:grid;place-items:center;border-radius:18px;font-weight:800;font-family:'Baloo 2',sans-serif;background:#fff;box-shadow:0 4px 10px rgba(42,33,64,.12)}" +
".map-node.done{background:linear-gradient(135deg,#fff6da,#ffe9d2)}" +
".map-node.now{background:linear-gradient(135deg,#ff5ea0,#ff9ac6);color:#fff;animation:pulse 1.6s ease-in-out infinite}" +
".map-node.locked{opacity:.55}" +
".reward-mini{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;flex:1;align-content:center;padding:8px}" +
".rw-node{display:flex;flex-direction:column;align-items:center;gap:2px;background:#fff;border-radius:14px;padding:8px 4px;font-size:20px;box-shadow:0 4px 10px rgba(42,33,64,.12);opacity:.6}" +
".rw-node b{font-size:10px;color:#7b738f}" +
".rw-node.got{opacity:1}" +
".rw-node.cur{opacity:1;outline:2px solid #ff5ea0;animation:pulse 1.6s ease-in-out infinite}";
document.head.appendChild(style);
var dots = document.querySelectorAll(".dot");
dots.forEach(function (dot) {
dot.addEventListener("click", function () {
var idx = parseInt(dot.getAttribute("data-screen"), 10) || 0;
dots.forEach(function (d) {
var on = d === dot;
d.classList.toggle("is-active", on);
d.setAttribute("aria-selected", on ? "true" : "false");
});
if (phoneScreen && SCREENS[idx]) SCREENS[idx].build(phoneScreen);
});
});
window.addEventListener("beforeunload", function () { clearInterval(autoTimer); });
})();<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Jellybop Saga — Match • Pop • Win</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="blob blob-a" aria-hidden="true"></div>
<div class="blob blob-b" aria-hidden="true"></div>
<div class="blob blob-c" aria-hidden="true"></div>
<header class="topbar">
<a class="brand" href="#" aria-label="Jellybop Saga home">
<span class="brand-mark" aria-hidden="true">🍬</span>
<span class="brand-name">Jellybop<span class="brand-accent">Saga</span></span>
</a>
<nav class="nav" aria-label="Primary">
<a href="#features">Features</a>
<a href="#levels">Levels</a>
<a href="#rewards">Rewards</a>
</nav>
<button class="btn btn-mini" data-squish data-toast="Pre-registration is open! 🎉">Pre-register</button>
</header>
<main>
<section class="hero" id="top">
<div class="hero-copy">
<span class="pill">⭐ New season: Berry Beach</span>
<h1>Match, pop & <span class="hl">blast</span> your way to the top!</h1>
<p class="lede">Thousands of juicy puzzles, adorable characters and sweet rewards. Jellybop Saga is the cosiest match-3 adventure on your phone — free to play, easy to love.</p>
<div class="ratings">
<div class="rating-block">
<div class="stars" aria-label="Rated 4.8 out of 5 stars">★★★★<span class="half">★</span></div>
<div class="rating-meta"><strong>4.8</strong> · 2.1M reviews</div>
</div>
<div class="divider" aria-hidden="true"></div>
<div class="dl-block">
<div class="dl-num"><span id="dlCount" data-target="58400000">0</span>+</div>
<div class="rating-meta">Downloads worldwide</div>
</div>
</div>
<div class="store-row">
<button class="store-btn" data-squish data-toast="Opening the App Store… 🍎">
<span class="store-ico" aria-hidden="true">🍎</span>
<span class="store-txt"><small>Download on the</small><strong>App Store</strong></span>
</button>
<button class="store-btn" data-squish data-toast="Opening Google Play… 🤖">
<span class="store-ico" aria-hidden="true">▶</span>
<span class="store-txt"><small>Get it on</small><strong>Google Play</strong></span>
</button>
</div>
<p class="fineprint">Free to play · In-app purchases · Ages 4+</p>
</div>
<div class="hero-phone">
<div class="phone" role="img" aria-label="Phone showing Jellybop Saga gameplay">
<div class="phone-notch" aria-hidden="true"></div>
<div class="phone-screen">
<div class="game-hud">
<div class="hud-chip">❤ <span>5</span></div>
<div class="hud-score">Score <strong id="score">12,480</strong></div>
<div class="hud-chip">⏱ <span>0:42</span></div>
</div>
<div class="grid" id="grid" aria-hidden="true"></div>
<div class="game-foot">
<div class="goal">🎯 Collect <strong>×12</strong></div>
<button class="game-shuffle" id="shuffle" data-squish>Shuffle 🔀</button>
</div>
</div>
</div>
<div class="screen-dots" role="tablist" aria-label="Screen preview">
<button class="dot is-active" role="tab" aria-selected="true" data-screen="0">Match</button>
<button class="dot" role="tab" aria-selected="false" data-screen="1">Map</button>
<button class="dot" role="tab" aria-selected="false" data-screen="2">Rewards</button>
</div>
</div>
</section>
<section class="features" id="features" aria-labelledby="feat-h">
<h2 id="feat-h">Why players can't put it down</h2>
<div class="feat-grid">
<article class="feat-card" tabindex="0">
<div class="feat-ico bouncy" aria-hidden="true">🍭</div>
<h3>5,000+ levels</h3>
<p>Brand-new puzzles every week across candy beaches, jelly jungles and frosty peaks.</p>
</article>
<article class="feat-card" tabindex="0">
<div class="feat-ico bouncy" aria-hidden="true">🤝</div>
<h3>Play with friends</h3>
<p>Send lives, climb the weekly leaderboard and team up in cosy guild events.</p>
</article>
<article class="feat-card" tabindex="0">
<div class="feat-ico bouncy" aria-hidden="true">🪄</div>
<h3>Sweet boosters</h3>
<p>Rainbow bombs, jelly swaps and lucky spins to blast through the trickiest boards.</p>
</article>
</div>
</section>
<section class="levels" id="levels" aria-labelledby="lv-h">
<div class="levels-inner">
<div class="levels-copy">
<span class="pill pill-sky">🗺 Adventure map</span>
<h2 id="lv-h">Your sweet journey, level by level</h2>
<p>Travel a candy-coated world map, unlock new districts and watch your stars stack up. Every cleared board takes you one hop closer to the legendary Jelly Crown.</p>
<div class="progress-wrap">
<div class="progress-top"><span>District 4 · Berry Beach</span><span id="pctLabel">68%</span></div>
<div class="bar"><div class="bar-fill" id="barFill"></div></div>
<div class="progress-stats">
<div><strong>247</strong><small>Levels cleared</small></div>
<div><strong>612</strong><small>Stars earned</small></div>
<div><strong>#1,204</strong><small>Global rank</small></div>
</div>
</div>
</div>
<ul class="level-pearls" aria-label="Recent levels">
<li class="pearl done"><span>1</span><em>★★★</em></li>
<li class="pearl done"><span>2</span><em>★★★</em></li>
<li class="pearl done"><span>3</span><em>★★☆</em></li>
<li class="pearl now"><span>4</span><em>Now</em></li>
<li class="pearl locked"><span>5</span><em>🔒</em></li>
<li class="pearl locked"><span>6</span><em>🔒</em></li>
</ul>
</div>
</section>
<section class="rewards" id="rewards" aria-labelledby="rw-h">
<div class="rewards-card">
<div class="rewards-copy">
<span class="pill pill-yellow">🎁 Daily bonus</span>
<h2 id="rw-h">Log in. Spin. Win sweets every day!</h2>
<p>Seven days of goodies — boosters, gold and a guaranteed legendary on day 7. Don't break your streak!</p>
<button class="btn btn-big" data-squish data-toast="Daily reward collected! +50 gold 💰">Claim today's reward</button>
</div>
<ol class="streak" aria-label="Daily reward streak">
<li class="claimed"><small>Day 1</small><span>🍬</span></li>
<li class="claimed"><small>Day 2</small><span>💰</span></li>
<li class="claimed"><small>Day 3</small><span>🪄</span></li>
<li class="today"><small>Day 4</small><span>🎁</span></li>
<li><small>Day 5</small><span>🍭</span></li>
<li><small>Day 6</small><span>💎</span></li>
<li class="legendary"><small>Day 7</small><span>👑</span></li>
</ol>
</div>
</section>
<section class="cta-band">
<h2>Ready to start popping?</h2>
<p>Join 58 million players. It's free, it's sweet, it's waiting.</p>
<div class="store-row store-row-center">
<button class="store-btn store-btn-light" data-squish data-toast="Opening the App Store… 🍎">
<span class="store-ico" aria-hidden="true">🍎</span>
<span class="store-txt"><small>Download on the</small><strong>App Store</strong></span>
</button>
<button class="store-btn store-btn-light" data-squish data-toast="Opening Google Play… 🤖">
<span class="store-ico" aria-hidden="true">▶</span>
<span class="store-txt"><small>Get it on</small><strong>Google Play</strong></span>
</button>
</div>
</section>
</main>
<footer class="footer">
<div class="footer-top">
<div class="brand brand-foot">
<span class="brand-mark" aria-hidden="true">🍬</span>
<span class="brand-name">Jellybop<span class="brand-accent">Saga</span></span>
</div>
<nav class="foot-links" aria-label="Footer">
<div><h4>Game</h4><a href="#features">Features</a><a href="#levels">Levels</a><a href="#rewards">Rewards</a></div>
<div><h4>Studio</h4><a href="#top">About Sugarloom</a><a href="#top">Careers</a><a href="#top">Press kit</a></div>
<div><h4>Support</h4><a href="#top">Help centre</a><a href="#top">Privacy</a><a href="#top">Terms</a></div>
</nav>
</div>
<div class="footer-bot">
<span>© 2026 Sugarloom Studios. A fictional game for demo purposes.</span>
<span class="foot-social"><a href="#top" aria-label="Discord">💬</a><a href="#top" aria-label="YouTube">▶</a><a href="#top" aria-label="Instagram">📸</a></span>
</div>
</footer>
<div class="toast-wrap" id="toastWrap" aria-live="polite" aria-atomic="true"></div>
<script src="script.js"></script>
</body>
</html>Mobile Casual / Puzzle Landing
A cheerful, glossy landing page for Jellybop Saga, a fictional mobile match-3 game from the made-up studio Sugarloom. The hero pairs punchy bouncy-sans headlines with a CSS-drawn phone mockup: inside the device, a live 6×6 candy grid pops and refills its tiles on a loop, while a HUD tracks score, lives and time. Big chunky App Store and Google Play buttons sit beside a star-rating block and a download counter that counts up to 58M the moment it scrolls into view.
Below the fold, a feature trio shows bouncing emoji icons on hover, an adventure-map section animates a candy-coloured progress bar and a row of level “pearls”, and a daily-bonus band lays out a seven-day reward streak ending in a legendary crown. Every button has a squishy press animation and most fire a friendly toast, so nothing is a dead control.
The whole thing is vanilla HTML, CSS and JS — no frameworks or build step. JavaScript drives the auto-bouncing gameplay tiles, the scroll-triggered count-up and bar fill, the squish-and-toast helper, and a swappable phone screen that flips between the Match, Map and Rewards previews via the tabs under the device. It responds cleanly down to ~360px and respects prefers-reduced-motion.
Illustrative UI only — fictional games, studios, characters, and data. Not engine integrations.