/* ============================================================
   CANDY POP STICKER — homepage theme
   ============================================================ */

:root {
  --pink: #ff3d9a;
  --pink-dk: #c2007f;
  --lime: #b6ff2e;
  --lime-dk: #6fa300;
  --orange: #ff8a1e;
  --orange-dk: #d95f00;
  --purple: #9b3dff;
  --purple-dk: #6a00c2;
  --yellow: #ffe14d;
  --ink: #1a1a1a;
  --paper: #fff8ec;
  --card: #ffffff;
  --outline: 3px solid var(--ink);
  --outline-thick: 5px solid var(--ink);
  --shadow-pop: 4px 4px 0 var(--ink);
  --shadow-pop-lg: 6px 6px 0 var(--ink);
  --radius: 18px;
  --font: -apple-system, "Segoe UI Rounded", "Segoe UI", "Century Gothic", Verdana, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[v-cloak] { opacity: 0; }

a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; }
img { display: block; max-width: 100%; }

body {
  background-image:
    radial-gradient(circle, rgba(0,0,0,0.05) 1.5px, transparent 1.6px);
  background-size: 14px 14px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--pink);
  border-bottom: var(--outline-thick);
}

.topbar-logo {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  text-shadow: 2px 2px 0 var(--ink);
}

.topbar-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: var(--outline);
  background: var(--yellow);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-pop);
}
.topbar-search-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* ---------- Category tabs ---------- */
.cat-tabs {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--outline);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tabs-inner {
  display: inline-flex;
  gap: 8px;
  padding: 10px 12px;
}

.cat-tab {
  flex: 0 0 auto;
  border: var(--outline);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-pop);
  transition: transform .1s;
}
.cat-tab:active { transform: translate(2px, 2px); box-shadow: none; }
.cat-tab.active {
  background: var(--lime);
  box-shadow: var(--shadow-pop);
}

/* ---------- Search bar ---------- */
.search-bar-wrap {
  position: sticky;
  top: 64px;
  z-index: 41;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--purple);
  border-bottom: var(--outline-thick);
}

.search-input {
  flex: 1;
  border: var(--outline);
  border-radius: 14px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
}
.search-input:focus { outline: none; }

.search-cancel {
  border: var(--outline);
  border-radius: 14px;
  background: var(--yellow);
  padding: 9px 14px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: var(--shadow-pop);
}

/* ---------- Loading ---------- */
.loading-full {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.loading-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 6px solid var(--ink);
  border-top-color: var(--pink);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Section header ---------- */
.sec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 14px 10px;
}
.sec-label {
  display: inline-block;
  font-size: 16px;
  font-weight: 900;
  padding: 6px 14px;
  border: var(--outline);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-pop);
  transform: rotate(-1deg);
}
.sec-label-pink { background: var(--pink); color: #fff; }
.sec-label-lime { background: var(--lime); color: var(--ink); }
.sec-label-orange { background: var(--orange); color: #fff; }
.sec-label-purple { background: var(--purple); color: #fff; }

.sec-more {
  border: var(--outline);
  border-radius: 12px;
  background: var(--yellow);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: var(--shadow-pop);
}
.sec-more:active { transform: translate(2px, 2px); box-shadow: none; }

.sec-cnt {
  border: var(--outline);
  border-radius: 12px;
  background: var(--lime);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

/* ============================================================
   HERO — comic panel with speech bubble
   ============================================================ */
.pop-hero-sec { padding: 14px; }

.pop-hero {
  position: relative;
  display: block;
  border: var(--outline-thick);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: var(--shadow-pop-lg);
  overflow: hidden;
}

.pop-hero-burst {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--yellow);
  color: var(--ink);
  border: var(--outline);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  transform: rotate(12deg);
  box-shadow: var(--shadow-pop);
}

.pop-hero-img {
  height: 180px;
  overflow: hidden;
  background: #000;
  border-bottom: var(--outline-thick);
}
.pop-hero-img img { width: 100%; height: 100%; object-fit: cover; }

.pop-hero-body { padding: 16px; position: relative; }

.pop-hero-bubble {
  display: inline-block;
  background: #fff;
  color: var(--ink);
  border: var(--outline);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.pop-hero-title {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 6px;
  text-shadow: 2px 2px 0 var(--ink);
}

.pop-hero-desc {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
  opacity: 0.95;
}

.pop-hero-go {
  display: inline-block;
  background: var(--lime);
  color: var(--ink);
  border: var(--outline);
  border-radius: 12px;
  padding: 6px 16px;
  font-weight: 900;
  font-size: 14px;
  box-shadow: var(--shadow-pop);
}

/* ============================================================
   1) HOT — candy burst circular buttons
   ============================================================ */
.burst-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  padding: 10px 16px 20px;
}

.burst-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 84px;
}

.burst-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: var(--outline);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  background: #fff;
}
.burst-0 .burst-circle { background: var(--pink); }
.burst-1 .burst-circle { background: var(--lime); }
.burst-2 .burst-circle { background: var(--orange); }

.burst-item:nth-child(odd) .burst-circle { width: 88px; height: 88px; }

.burst-circle img { width: 100%; height: 100%; object-fit: cover; }

.burst-nm {
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

/* ============================================================
   2) SPOTLIGHT — sticker strip list
   ============================================================ */
.sticker-list { padding: 4px 14px 20px; display: flex; flex-direction: column; gap: 10px; }

.sticker-row {
  position: relative;
  display: block;
  background: #fff;
  border: var(--outline);
  border-radius: 14px;
  padding: 10px 14px 10px 38px;
  box-shadow: var(--shadow-pop);
}
.sticker-row:nth-child(even) { background: var(--yellow); }

.sticker-dot {
  position: absolute;
  left: 10px;
  top: 10px;
  color: var(--pink-dk);
  font-size: 16px;
}

.sticker-nm { font-size: 14px; font-weight: 900; display: block; }
.sticker-cat {
  display: inline-block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--purple);
  border-radius: 10px;
  padding: 1px 8px;
}
.sticker-desc { font-size: 12px; font-weight: 600; margin: 4px 0 0; color: #444; }

/* ============================================================
   3) RIBBON FEED — diagonal ribbon banners
   ============================================================ */
.ribbon-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 14px 20px;
  scrollbar-width: none;
}
.ribbon-row::-webkit-scrollbar { display: none; }

.ribbon-card { flex: 0 0 128px; }

.ribbon-img {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 16px;
  border: var(--outline);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.ribbon-img img { width: 100%; height: 100%; object-fit: cover; }

.ribbon-tag {
  position: absolute;
  top: 10px;
  left: -30px;
  width: 140px;
  transform: rotate(-45deg);
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  padding: 3px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.ribbon-nm { font-size: 12px; font-weight: 800; text-align: center; margin: 6px 0 0; }

/* ============================================================
   4) GUMBALL MACHINE — wrapped circle grid
   ============================================================ */
.gumball-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 10px 16px 20px;
  background: radial-gradient(circle, rgba(155,61,255,0.12) 2px, transparent 2.2px);
  background-size: 16px 16px;
  border-radius: var(--radius);
  margin: 0 14px 20px;
  border: var(--outline);
}

.gumball-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
}

.gumball-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: var(--outline);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-pop);
}
.gumball-img img { width: 100%; height: 100%; object-fit: cover; }

.gumball-nm { font-size: 10px; font-weight: 800; text-align: center; }

/* ============================================================
   5)/9) COMIC PANEL GRID — thick black gutters
   ============================================================ */
.panel-grid, .adv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--ink);
  border: var(--outline-thick);
  border-radius: var(--radius);
  margin: 0 14px 20px;
  overflow: hidden;
  padding: 6px;
}

.panel-item, .adv-item {
  position: relative;
  display: block;
  background: #fff;
}

.panel-img, .adv-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.panel-img img { width: 100%; height: 100%; object-fit: cover; }

.panel-pow {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  transform: rotate(-10deg);
}
.panel-pow-2 { background: var(--lime); left: 6px; right: auto; transform: rotate(8deg); }

.panel-nm, .adv-nm {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
  margin: 0;
  background: #fff;
}

/* ============================================================
   6) PUZZLE — outlined candy card row
   ============================================================ */
.candy-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 14px 20px;
  scrollbar-width: none;
}
.candy-row::-webkit-scrollbar { display: none; }

.candy-card { flex: 0 0 110px; text-align: center; }

.candy-img {
  width: 110px;
  height: 110px;
  border-radius: 50% 50% 50% 8px;
  border: var(--outline);
  overflow: hidden;
  background: var(--lime);
  box-shadow: var(--shadow-pop);
}
.candy-img img { width: 100%; height: 100%; object-fit: cover; }

.candy-nm { font-size: 12px; font-weight: 800; margin: 6px 0 0; }

/* ============================================================
   7) KIDS — bouncy bubble grid
   ============================================================ */
.kids-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 4px 14px 20px;
}

.kids-card { text-align: center; }

.kids-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: var(--outline);
  overflow: hidden;
  background: var(--orange);
  box-shadow: var(--shadow-pop);
}
.kids-img img { width: 100%; height: 100%; object-fit: cover; }

.kids-nm { font-size: 11px; font-weight: 800; margin: 4px 0 0; }

/* ============================================================
   8) SPORTS — tilted alternating rows
   ============================================================ */
.tilt-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 20px; }

.tilt-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: var(--outline);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-pop);
  transform: rotate(-0.6deg);
}
.tilt-row.rev { flex-direction: row-reverse; transform: rotate(0.6deg); background: var(--yellow); }

.tilt-img {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  overflow: hidden;
}
.tilt-img img { width: 100%; height: 100%; object-fit: cover; }

.tilt-body { flex: 1; min-width: 0; }
.tilt-nm { font-size: 14px; font-weight: 900; margin: 0; }
.tilt-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--purple);
  border-radius: 8px;
  padding: 1px 7px;
  margin: 3px 0;
}
.tilt-desc { font-size: 11px; font-weight: 600; margin: 0; color: #444; }

/* ============================================================
   10) RACING — bold banner sticker
   ============================================================ */
.banner-single {
  position: relative;
  display: block;
  margin: 4px 14px 20px;
  border-radius: var(--radius);
  border: var(--outline-thick);
  overflow: hidden;
  box-shadow: var(--shadow-pop-lg);
  height: 160px;
}
.banner-single img { width: 100%; height: 100%; object-fit: cover; }

.banner-ovl {
  position: absolute;
  left: 0; bottom: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  padding: 14px;
  color: #fff;
}
.banner-badge {
  display: inline-block;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 6px;
}
.banner-title { font-size: 18px; font-weight: 900; margin: 0 0 4px; }
.banner-desc { font-size: 12px; font-weight: 600; margin: 0; opacity: 0.9; }

/* ============================================================
   11) GIRL — sweetheart list
   ============================================================ */
.sweet-list { display: flex; flex-direction: column; gap: 10px; padding: 4px 14px 20px; }

.sweet-row {
  display: flex;
  gap: 12px;
  background: #fff;
  border: var(--outline);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow-pop);
}

.sweet-img {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  overflow: hidden;
  background: var(--pink);
}
.sweet-img img { width: 100%; height: 100%; object-fit: cover; }

.sweet-body { flex: 1; min-width: 0; }
.sweet-nm { font-size: 14px; font-weight: 900; margin: 0 0 3px; }
.sweet-desc { font-size: 11px; font-weight: 600; margin: 0; color: #444; }

/* ============================================================
   12) ARCADE — stacked candy coins
   ============================================================ */
.coin-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 4px 14px 20px;
}

.coin-card {
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: var(--outline);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  background: var(--yellow);
}
.coin-card:nth-child(2) { transform: translateY(-10px); background: var(--lime); }
.coin-card img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   ALL GAMES — bold outlined card grid
   ============================================================ */
.all-sec { padding-bottom: 10px; }

.all-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 4px 14px 10px;
}

.agcard, .gcard {
  background: #fff;
  border: var(--outline);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  transition: transform .1s;
}
.agcard:active, .gcard:active { transform: translate(2px, 2px); box-shadow: none; }

.agcard-img, .gcard-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--lime);
  overflow: hidden;
}
.agcard-img img, .gcard-img img { width: 100%; height: 100%; object-fit: cover; }

.agcard-nm, .gcard-nm {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 8px;
  margin: 0;
  text-align: center;
}

.more-wrap, .loadmore-wrap { display: flex; justify-content: center; padding: 6px 14px 24px; }

.more-btn, .loadmore-btn {
  border: var(--outline);
  border-radius: 16px;
  background: var(--pink);
  color: #fff;
  padding: 10px 26px;
  font-weight: 900;
  font-size: 14px;
  box-shadow: var(--shadow-pop);
}
.more-btn:active, .loadmore-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* ============================================================
   FILTER / SEARCH RESULTS
   ============================================================ */
.filter-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
}

.filter-back {
  border: var(--outline);
  border-radius: 12px;
  background: var(--yellow);
  padding: 6px 12px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: var(--shadow-pop);
}

.filter-title { flex: 1; font-size: 16px; font-weight: 900; }

.filter-cnt {
  border: var(--outline);
  border-radius: 12px;
  background: var(--purple);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.grid-sec { padding-bottom: 10px; }
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 4px 14px 10px;
}

.empty-msg {
  text-align: center;
  padding: 40px 14px;
  font-weight: 800;
  color: #888;
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 22px 14px 90px;
  font-size: 12px;
  font-weight: 700;
  color: #555;
}
.site-footer a { text-decoration: underline; }

/* ---------- Back to top ---------- */
.totop-btn {
  position: fixed;
  right: 16px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: var(--outline);
  background: var(--lime);
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  box-shadow: var(--shadow-pop);
  z-index: 45;
}
.totop-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* ============================================================
   RESPONSIVE — tablet / desktop
   ============================================================ */
@media (min-width: 640px) {
  .all-grid, .games-grid { grid-template-columns: repeat(4, 1fr); }
  .kids-grid { grid-template-columns: repeat(6, 1fr); }
  .panel-grid, .adv-grid { grid-template-columns: repeat(4, 1fr); }
  .pop-hero-img { height: 240px; }
}

@media (min-width: 900px) {
  .all-grid, .games-grid { grid-template-columns: repeat(6, 1fr); }
  .pop-hero { display: flex; }
  .pop-hero-img { width: 45%; height: auto; border-bottom: none; border-right: var(--outline-thick); }
  .pop-hero-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
}
