@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Color System from Mockup */
  --pink: #FF4F9A;
  --pink-gradient: linear-gradient(135deg, #FF4F9A 0%, #FF2A54 100%);
  --orange: #FF9F1C;
  --orange-gradient: linear-gradient(135deg, #FF9F1C 0%, #FF7B00 100%);
  --yellow: #FFD166;
  --purple: #8A5CFF;
  --purple-gradient: linear-gradient(135deg, #8A5CFF 0%, #6830FF 100%);
  --violet: #4D277E;
  --ink: #2C2352;
  --muted: #7E7696;
  --bg-site: #FAF9FF;
  --border-color: #EADCF1;
  --card-bg: #FFFFFF;
  --shadow: 0 12px 30px rgba(77, 39, 126, 0.06), 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 20px 40px rgba(77, 39, 126, 0.12), 0 0 20px rgba(255, 79, 154, 0.05);
  --max: 1420px;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  color: var(--ink);
  background-color: var(--bg-site);
  overflow-x: hidden;
  line-height: 1.5;
}

h1, h2, h3, h4, .brand span {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Emojis */
.emoji {
  display: inline-block;
  animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px) rotate(-3deg); }
}

/* Sparkles Utility */
.spark {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffd166 40%, transparent 72%);
  pointer-events: none;
  z-index: 9999;
  animation: spark 0.65s ease-out forwards;
}

@keyframes spark {
  to {
    transform: translate(var(--dx), var(--dy)) scale(0);
    opacity: 0;
  }
}

/* Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(77, 39, 126, 0.04);
}

.nav {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 60px;
  width: 160px;
  max-width: none;
  aspect-ratio: 560 / 210;
  object-fit: contain;
}

.navlinks {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.navlinks a {
  font-weight: 700;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--ink);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.navlinks a:hover {
  background: #FFF2F7;
  color: var(--pink);
  transform: translateY(-1px);
}

.navlinks a.active {
  color: var(--pink);
}

.navlinks a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: var(--pink);
  border-radius: 999px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search Box inside Nav */
.searchbox {
  height: 46px;
  border: 1.5px solid var(--border-color);
  border-radius: 999px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  min-width: 240px;
  box-shadow: inset 0 2px 4px rgba(77, 39, 126, 0.02);
  transition: all 0.25s;
}

.searchbox:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(138, 92, 255, 0.15);
}

.searchbox input {
  border: 0;
  outline: 0;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
}

.searchbox input::placeholder {
  color: var(--muted);
}

.lang-select {
  height: 44px;
  border: 1.5px solid var(--border-color);
  border-radius: 999px;
  background: #FFFFFF;
  padding: 0 12px;
  font-weight: 700;
  color: var(--violet);
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-select:focus {
  border-color: var(--purple);
}

/* Buttons */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 20px rgba(255, 79, 154, 0.2);
  background: var(--pink-gradient);
  color: #FFFFFF;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(255, 79, 154, 0.3);
}

.btn:active {
  transform: translateY(0) scale(1);
}

.btn.secondary {
  background: #FFFFFF;
  color: var(--purple);
  border: 2px solid #D9C9FF;
  box-shadow: 0 4px 12px rgba(77, 39, 126, 0.05);
}

.btn.secondary:hover {
  background: #F8F6FF;
  border-color: var(--purple);
  box-shadow: 0 8px 20px rgba(138, 92, 255, 0.15);
}

.btn.small {
  padding: 8px 16px;
  font-size: 13px;
}

.btn.header-play-btn {
  background: var(--pink-gradient);
}

.btn.header-cart-btn {
  background: var(--pink-gradient);
}

.mobile-toggle {
  display: none;
}

/* Background elements (orbs) */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
  animation: orb 16s ease-in-out infinite;
}

.orb.one {
  width: 320px;
  height: 320px;
  background: #FFB3CF;
  left: -80px;
  top: 100px;
}

.orb.two {
  width: 280px;
  height: 280px;
  background: #BDA0FF;
  right: -90px;
  top: 250px;
  animation-delay: -6s;
}

.orb.three {
  width: 220px;
  height: 220px;
  background: #FFE69B;
  left: 60%;
  bottom: -60px;
  animation-delay: -10s;
}

@keyframes orb {
  50% { transform: translate(24px, -36px) scale(1.08); }
}

/* Ad Placements — live Adsterra units, mounted client-side by mountAds() */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px auto;
  max-width: 100%;
}

.ad-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.65;
}

.ad-mount {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #FFF9FC;
}

.ad-mount:empty {
  border: 1.5px dashed var(--border-color);
}

.ad-mount iframe {
  max-width: 100%;
}

.ad-top {
  max-width: 728px;
}

.ad-top .ad-mount {
  min-height: 50px;
  width: 100%;
  max-width: 728px;
}

.ad-side .ad-mount {
  width: 300px;
  height: 250px;
}

.ad-native {
  margin: 22px auto;
  width: 100%;
}

.ad-native .ad-mount {
  min-height: 90px;
  width: 100%;
  background: transparent;
}

.ad-native .ad-mount:empty {
  border: none;
}

.ad-skyscraper {
  margin: 20px auto 0;
}

.leader-ad {
  margin: 10px 0 18px;
}

/* Hero Section */
.hero-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 16px;
}

.hero-card {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 440px;
  background: linear-gradient(135deg, #DEF5FF 0%, #C3EBFF 100%);
}

.hero-banner-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-characters-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 60%;
  max-height: 80%;
  object-fit: contain;
  z-index: 2;
}

.hero-card img.hero-banner-img ~ .hero-content {
  z-index: 10;
}

.hero-content {
  position: absolute;
  left: 48px;
  top: 48px;
  bottom: 48px;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
}

.hero-content .hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-content .hero-badge-pill {
  background: #FFFFFF;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 850;
  color: var(--violet);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-content h1 {
  font-size: clamp(38px, 4.5vw, 62px);
  margin-bottom: 12px;
  color: #FFFFFF;
  line-height: 1.05;
  text-shadow: 0 4px 8px rgba(44, 35, 82, 0.25), 0 2px 0 var(--purple);
}

.hero-content p {
  font-size: 20px;
  font-weight: 700;
  color: var(--violet);
  margin-bottom: 28px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Promo Card inside sidebar */
.promo-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s;
}

.promo-card:hover {
  transform: translateY(-2px);
}

.promo-card.why-play {
  background: linear-gradient(135deg, #F8F6FF 0%, #FFFFFF 100%);
  border-color: #D9C9FF;
}

.merch-promo-card {
  padding: 0;
  overflow: hidden;
}

.merch-promo-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
}

.why-play-card {
  padding: 0;
  overflow: hidden;
}

.why-play-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
}

.promo-title {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--pink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.promo-card p {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 16px;
}

.promo-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-card li {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-card li::before {
  content: '✅';
  font-size: 12px;
}

/* Sections & Headers */
.section {
  padding: 32px 0 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 10px;
}

.section h2 {
  font-size: 26px;
  color: var(--violet);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-head .view-all-link {
  font-size: 14px;
  font-weight: 800;
  color: var(--pink);
  transition: color 0.2s;
}

.section-head .view-all-link:hover {
  color: var(--ink);
}

/* Grids */
.grid {
  display: grid;
  gap: 20px;
}

.game-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.universe-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.character-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* Cards Base */
.card {
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
  transform: translateY(-8px) rotate(var(--tilt, 0deg));
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 79, 154, 0.3);
}

.thumb {
  aspect-ratio: 16 / 10;
  background: #FFF9FC;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .thumb img {
  transform: scale(1.06);
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: var(--pink);
  color: #FFFFFF;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(255, 79, 154, 0.3);
}

.badge.soon {
  background: var(--muted);
  box-shadow: none;
}

.badge.play {
  background: var(--purple);
  box-shadow: 0 4px 10px rgba(138, 92, 255, 0.3);
}

/* -------- Coming soon (not-yet-built games) -------- */
.card.coming-soon .thumb img {
  filter: grayscale(0.9) brightness(0.94);
  opacity: 0.55;
}
.card.coming-soon:hover .thumb img { transform: none; }
.card.coming-soon .game-title { color: var(--muted); }
.card.coming-soon .rating { opacity: 0.6; }
.soon-sticker {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  background: rgba(44, 35, 82, 0.86);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: 12px;
  z-index: 3;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.btn.disabled {
  background: var(--muted);
  color: #fff;
  cursor: not-allowed;
  opacity: 0.8;
  box-shadow: none;
  pointer-events: none;
}
.soon-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.soon-note a { color: var(--purple); font-weight: 700; }
.soon-hero {
  text-align: center;
  max-width: 560px;
  margin: 48px auto;
  padding: 44px 28px;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 28px;
  box-shadow: 0 14px 44px rgba(44, 35, 82, 0.08);
}
.soon-hero-emoji { font-size: 62px; line-height: 1; }
.soon-hero h1 { margin: 14px 0 6px; color: var(--ink); }
.soon-hero p { color: var(--muted); line-height: 1.55; }
.soon-hero-tag {
  display: inline-block;
  background: var(--muted);
  color: #fff;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  margin: 0 0 14px;
}

/* -------- Build-time (pre-hydration / no-JS) SEO content -------- */
.crumbs { font-size: 13px; color: var(--muted); margin: 16px 0; }
.crumbs a { color: var(--purple); text-decoration: none; }
.seo-article, .seo-hero { max-width: 820px; margin: 12px auto 40px; }
.seo-article h1, .seo-hero h1 { color: var(--ink); margin: 12px 0; }
.seo-article h2 { color: var(--ink); margin: 24px 0 8px; font-size: 20px; }
.seo-article .lead, .seo-hero .lead { font-size: 17px; color: var(--muted); line-height: 1.6; }
.seo-article img { margin: 8px 0 18px; }
.game-facts { list-style: none; padding: 0; display: grid; gap: 6px; }
.game-facts li { color: var(--ink); }
.seo-hero dl dt, .seo-article dl dt { color: var(--ink); margin-top: 14px; }
.seo-hero dl dd, .seo-article dl dd { color: var(--muted); margin: 4px 0 0; line-height: 1.55; }

.game-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
  font-family: 'Fredoka', sans-serif;
}

.card:hover .game-title {
  color: var(--pink);
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 750;
  color: var(--muted);
}

.rating {
  color: #FFB000;
  font-weight: 800;
}

/* Universe Card */
.universe-card img {
  height: 160px;
  width: 100%;
  object-fit: cover;
  border-bottom: 1.5px solid var(--border-color);
}

.universe-card h3 {
  padding: 16px 18px 2px;
  font-size: 18px;
  color: var(--violet);
}

.universe-card p {
  padding: 0 18px 18px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

/* Circular Character Card (Matching Mockup) */
.character-card {
  text-align: center;
  padding: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.character-card:hover {
  transform: translateY(-6px);
  box-shadow: none;
}

.character-card img {
  border-radius: 50%;
  aspect-ratio: 1;
  width: 100px;
  margin: 0 auto;
  border: 4px solid #FFFFFF;
  box-shadow: 0 8px 20px rgba(77, 39, 126, 0.1);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.character-card:hover img {
  transform: scale(1.08);
  border-color: var(--pink);
  box-shadow: 0 12px 24px rgba(255, 79, 154, 0.2);
}

.character-card strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 15px;
  font-family: 'Fredoka', sans-serif;
}

.character-card .meta {
  display: none; /* Hide games count for circular layout */
}

/* Character Bio Cards Grid */
.bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.character-bio-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.character-bio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow), var(--purple));
  border-radius: 28px 28px 0 0;
}

.character-bio-card:hover {
  transform: translateY(-6px) rotate(0.5deg);
  box-shadow: var(--shadow-hover);
  border-color: var(--pink);
}

.bio-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-top: 8px;
}

.bio-portrait {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--pink);
  box-shadow: 0 8px 20px rgba(255, 79, 154, 0.15);
  object-fit: contain;
  background: #FFF9FC;
  flex-shrink: 0;
}

.bio-title-area {
  flex: 1;
}

.bio-name {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  color: var(--violet);
  margin-bottom: 4px;
}

.bio-role {
  font-size: 14px;
  font-weight: 700;
  color: var(--pink);
  background: rgba(255, 79, 154, 0.1);
  padding: 4px 12px;
  border-radius: 99px;
  display: inline-block;
}

.bio-zodiac {
  font-size: 28px;
  flex-shrink: 0;
}

.bio-story {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 600;
}

.bio-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bio-detail {
  background: linear-gradient(135deg, #FAF9FF 0%, #FFF5F8 100%);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid var(--border-color);
}

.bio-detail-label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.bio-detail-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

/* Page Hero layout */
.page-hero {
  margin: 20px 0 28px;
  border-radius: 32px;
  min-height: 240px;
  background: var(--pink-gradient);
  padding: 48px;
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.page-hero p {
  font-size: 18px;
  font-weight: 700;
  max-width: 800px;
  opacity: 0.95;
}

/* Merch Shop Specific Styles */
.shop-hero-section {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  min-height: 300px;
  margin: 20px 0 0;
}

.shop-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.shop-hero-characters {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 50%;
  max-height: 90%;
  object-fit: contain;
  z-index: 2;
}

.shop-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250,249,255,0.95) 0%, rgba(250,249,255,0.7) 50%, transparent 100%);
  display: flex;
  align-items: center;
  z-index: 3;
}

.shop-hero-text {
  max-width: 50%;
  padding: 40px;
  z-index: 10;
}

.shop-hero-text h1 {
  color: var(--pink);
  text-shadow: none;
}

.shop-hero-text p {
  color: var(--violet);
}

.shop-hero-badges {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.shop-hero-badge {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.shop-limited-drop-banner {
  margin-top: 16px;
  border-radius: 16px;
  overflow: hidden;
}

.shop-limited-drop-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Category Tabs Bar */
.shop-categories-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.shop-tab {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.shop-tab:hover {
  background: #FFF2F7;
  border-color: rgba(255, 79, 154, 0.4);
  color: var(--pink);
  transform: translateY(-1px);
}

.shop-tab.active {
  background: var(--pink);
  color: #FFFFFF;
  border-color: var(--pink);
  box-shadow: 0 6px 16px rgba(255, 79, 154, 0.25);
}

.shop-tab .new-dot {
  background: #FF2A54;
  color: #FFFFFF;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 900;
  text-transform: uppercase;
}

/* Shop Layout with Sidebar */
.shop-layout, .catalog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filters {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 104px;
  z-index: 10;
}

.filters h3 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.field {
  margin-bottom: 20px;
  border-bottom: 1px solid #FAF6FC;
  padding-bottom: 16px;
}

.field:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.field label {
  display: block;
  font-weight: 850;
  color: var(--violet);
  margin-bottom: 10px;
  font-size: 14px;
}

.field select {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 12px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  background: #FFFFFF;
}

.field input[type="text"] {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  outline: none;
}

/* Checkbox Style inside Filters */
.field .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 6px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
  cursor: pointer;
}

.field .price-range-slider {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field .price-range-slider input[type="range"] {
  accent-color: var(--pink);
  cursor: pointer;
}

.field .price-values {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--muted);
}

.filters .btn.clear-filters {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

/* Shop Products Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.count {
  font-weight: 850;
  color: var(--violet);
  font-size: 15px;
}

.sort-select {
  height: 42px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 12px;
  font-weight: 750;
  color: var(--violet);
  background-color: #FFFFFF;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

/* Product Card design */
.product-img {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #FFF8FD 0%, #FFF0F7 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1.5px solid var(--border-color);
  padding: 12px;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.06) rotate(1deg);
}

.product-card .card-body {
  padding: 16px;
  gap: 6px;
}

.product-card .product-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  font-family: 'Fredoka', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card:hover .product-title {
  color: var(--pink);
}

.product-card .product-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.product-card .stars {
  color: #FFB000;
  font-size: 13px;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  border-top: 1px solid #FAF6FC;
  padding-top: 10px;
}

.price {
  color: var(--pink);
  font-size: 18px;
  font-weight: 900;
  font-family: 'Fredoka', sans-serif;
}

.product-card .add-cart {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(255, 79, 154, 0.15);
}

/* Merch Promo Banner bottom */
.merch-promo-banner {
  background: linear-gradient(135deg, #FFF0F7 0%, #FAF0FF 100%);
  border: 1.5px dashed var(--pink);
  border-radius: 28px;
  padding: 24px 32px;
  margin: 40px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.bundle-banner-img {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
  object-fit: cover;
  z-index: 1;
}

.merch-promo-left {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
}

.save-badge-img {
  height: 80px;
  width: auto;
  flex-shrink: 0;
}

.merch-promo-badge {
  background: var(--pink);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 900;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
  box-shadow: 0 6px 14px rgba(255, 79, 154, 0.25);
  flex-shrink: 0;
}

.merch-promo-text {
  background: rgba(255,255,255,0.8);
  padding: 12px 16px;
  border-radius: 16px;
}

.merch-promo-text h3 {
  font-size: 18px;
  color: var(--pink);
  margin-bottom: 2px;
}

.merch-promo-text p {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 700;
}

.merch-promo-banner .btn {
  z-index: 2;
}

/* Detail & Play Pages */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.detail-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 32px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.detail-card h1 {
  color: var(--violet);
  font-size: 40px;
  margin-bottom: 12px;
  text-shadow: none;
}

.detail-card p {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.6;
}

.detail-img {
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1.5px solid var(--border-color);
  aspect-ratio: 16 / 10;
}

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

.play-shell {
  background: #120A24;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(18, 10, 36, 0.4);
}

.game-canvas {
  height: 520px;
  background: radial-gradient(circle at center, #351C62 0%, #110724 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: #FFFFFF;
  position: relative;
}

.game-canvas h2 {
  font-size: 36px;
  margin-bottom: 8px;
  z-index: 5;
}

.game-canvas p {
  font-size: 16px;
  max-width: 580px;
  opacity: 0.85;
  margin-bottom: 24px;
  z-index: 5;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  right: 24px;
  top: 104px;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(77, 39, 126, 0.2);
  z-index: 2000;
  padding: 24px;
  transform: translateX(calc(100% + 50px));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1.5px solid #FAF6FC;
  padding: 12px 0;
}

.cart-item img {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  object-fit: cover;
}

.cart-item .meta {
  justify-content: flex-start;
  gap: 12px;
  margin-top: 4px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 16px;
  margin: 20px 0;
  color: var(--violet);
  font-family: 'Fredoka', sans-serif;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 30px);
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty {
  padding: 40px;
  text-align: center;
  border: 2px dashed var(--border-color);
  border-radius: 20px;
  color: var(--muted);
  font-weight: 750;
  font-size: 14px;
}

/* Newsletter Section */
.newsletter {
  position: relative;
  background: linear-gradient(135deg, #8A5CFF 0%, #C145FF 50%, #FF4F9A 100%);
  color: #FFFFFF;
  margin-top: 40px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.newsletter-strip-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.3;
}

.newsletter .inner {
  position: relative;
  z-index: 2;
}

.newsletter .inner {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
  padding: 28px 36px;
  flex-wrap: wrap;
}

.newsletter h3 {
  font-size: 24px;
  margin-bottom: 2px;
}

.newsletter p {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 700;
}

.newsletter-form {
  display: flex;
  min-width: 440px;
  gap: 8px;
}

.newsletter input[type="email"] {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  flex: 1;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  font-size: 14px;
  color: var(--ink);
}

.newsletter button.btn-subscribe {
  background: var(--yellow);
  color: #3C2459;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(255, 209, 102, 0.25);
}

.newsletter button.btn-subscribe:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 209, 102, 0.4);
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 12px;
  margin-left: 20px;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #FFFFFF;
}

.social-icon:hover {
  background: #FFFFFF;
  color: var(--pink);
  transform: scale(1.1);
}

/* Footer Section */
.footer {
  position: relative;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.footer-full-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
  z-index: 0;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 32px;
}

.footer img {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

.footer p {
  font-weight: 700;
  font-size: 13.5px;
  max-width: 240px;
}

.footer h4 {
  color: var(--violet);
  margin-bottom: 16px;
  font-size: 16px;
}

.footer a {
  display: block;
  font-weight: 700;
  margin: 8px 0;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--pink);
}

.footer-love-card {
  background: #FFF2F7;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 79, 154, 0.15);
  text-align: center;
  font-size: 13px;
  font-weight: 750;
  color: var(--pink);
}

.copyright {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--border-color);
  margin-top: 36px;
  padding-top: 20px;
  font-size: 13.5px;
  font-weight: 750;
}

.copyright strong {
  color: var(--violet);
}

/* Leaderboard Page row */
.leader-row {
  display: grid;
  grid-template-columns: 60px 1fr 120px 120px;
  gap: 16px;
  align-items: center;
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 14px 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.leader-row:hover {
  transform: translateX(4px);
  border-color: var(--purple);
}

.rank {
  font-size: 24px;
  font-weight: 900;
  color: var(--pink);
  font-family: 'Fredoka', sans-serif;
}

.ad-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.ad-map-card {
  background: #FFFFFF;
  border-radius: 24px;
  border: 1.5px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow);
}

.ad-map-card h3 {
  color: var(--violet);
  margin-top: 0;
  margin-bottom: 8px;
}

.ad-map-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.ad-map-card .ad-slot {
  margin: 14px auto 0;
}

/* This page documents true unit pixel sizes (e.g. 728x90) on purpose — on
   narrow screens let the oversized preview scroll horizontally within its
   own card instead of stretching the page. */
.ad-map-card .ad-mount {
  max-width: 100%;
  overflow-x: auto;
}

.ad-map-status {
  margin-top: 14px;
  font-weight: 800;
  color: #10b981;
  font-size: 14px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 9999;
  background: #FFFFFF;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--pink);
}

/* Responsive Media Queries */
/* Logo + 7 nav links + search + language + cart + play button genuinely
   don't fit below ~1510px — switch to the hamburger menu earlier than the
   1180px content-grid breakpoint so the header never gets crushed. */
@media (max-width: 1550px) {
  .navlinks {
    display: none;
  }
  .mobile-toggle {
    display: inline-flex;
    background: none;
    border: 1.5px solid var(--border-color);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--violet);
  }
}

@media (max-width: 1180px) {
  .game-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-wrap {
    grid-template-columns: 1fr;
  }
  .side-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  
  /* Mobile drawer list */
  #mobilePanel {
    background: #FFFFFF;
    border-bottom: 1.5px solid var(--border-color);
    padding: 12px 24px;
  }
  
  #mobilePanel .chip-row {
    margin: 0;
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .container {
    padding: 0 16px;
  }
  .nav {
    height: auto;
    min-height: 80px;
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .brand img {
    height: 52px;
    width: 139px;
  }
  .nav-actions {
    flex-wrap: wrap;
  }
  .searchbox {
    order: 2;
    flex-basis: 100%;
    min-width: 100%;
    margin-top: 10px;
  }
  .hero-card {
    min-height: 480px;
  }
  .hero-content {
    left: 24px;
    right: 24px;
    top: 24px;
    bottom: 24px;
  }
  .hero-content h1 {
    font-size: 34px;
  }
  .hero-content p {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .game-grid, .product-grid, .universe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .character-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bio-grid {
    grid-template-columns: 1fr;
  }
  .catalog-layout, .shop-layout, .detail-layout {
    grid-template-columns: 1fr;
  }
  .filters {
    position: static;
  }
  .side-stack {
    grid-template-columns: 1fr;
  }
  .newsletter .inner, .copyright {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .newsletter-form {
    min-width: 100%;
    width: 100%;
    flex-direction: column;
  }
  .newsletter input[type="email"] {
    width: 100%;
    border-radius: 99px;
  }
  .newsletter button.btn-subscribe {
    width: 100%;
    margin-top: 8px;
  }
  .social-icons {
    margin-left: 0;
    margin-top: 16px;
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ad-map-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Skyscrapers ride next to the sticky desktop filters column — once that
     column goes static/full-width on mobile a 160×600/160×300 slot no longer
     earns its keep, so skip mounting it (mountAds() checks computed display). */
  .ad-skyscraper {
    display: none;
  }
  .play-shell {
    min-height: 400px;
  }
  .game-canvas {
    height: 400px;
  }
  .merch-promo-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .merch-promo-left {
    flex-direction: column;
  }
  .bio-header {
    flex-direction: column;
    text-align: center;
  }
  .bio-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .game-grid, .product-grid, .universe-grid {
    grid-template-columns: 1fr;
  }
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bio-grid {
    grid-template-columns: 1fr;
  }
  .page-hero {
    padding: 24px;
    min-height: 180px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn {
    justify-content: center;
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .leader-row {
    grid-template-columns: 44px 1fr;
  }
  .hide-sm {
    display: none;
  }
  .bio-portrait {
    width: 64px;
    height: 64px;
  }
  .bio-name {
    font-size: 20px;
  }
  /* 468px is wider than most phones — skip it below this breakpoint rather
     than letting it overflow (mountAds() checks computed display). */
  .ad-b468x60 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Mochi Mango Game Engine
   ============================================================ */
.play-heading{font-size:26px;font-weight:900;margin:0 0 12px;color:var(--ink)}
.game-stage-shell{padding:0!important;overflow:hidden;border-radius:24px;background:#0b0714;
  box-shadow:0 18px 50px rgba(0,0,0,.35);border:1.5px solid var(--border-color)}
.game-stage{position:relative;width:100%;aspect-ratio:3/4;max-height:78vh;
  margin:0 auto;user-select:none;-webkit-user-select:none;touch-action:none}
@media(min-width:900px){.game-stage{aspect-ratio:4/5}}
.mma-canvas{display:block;width:100%;height:100%;border-radius:22px;background:#120a20}
.mma-hud{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;
  align-items:flex-start;padding:12px 16px;pointer-events:none;z-index:3}
.mma-hud-left{display:flex;flex-direction:column;gap:4px;align-items:flex-start}
.mma-score{font-weight:900;font-size:22px;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.5);
  background:rgba(0,0,0,.28);padding:4px 14px;border-radius:999px;backdrop-filter:blur(4px)}
.mma-combo{font-weight:900;font-size:14px;color:#fff;background:linear-gradient(135deg,#ff4f9a,#ffbd2e);
  padding:2px 10px;border-radius:999px;box-shadow:0 3px 10px rgba(255,79,154,.4);animation:mmaPop .25s ease}
.mma-combo:empty{display:none}
.mma-hud-right{display:flex;align-items:center;gap:8px}
.mma-powers{display:flex;gap:4px}
.mma-pw{font-size:17px;background:rgba(0,0,0,.28);border-radius:50%;width:30px;height:30px;
  display:flex;align-items:center;justify-content:center;animation:mmaFloat 2s ease-in-out infinite}
.mma-lives{font-size:18px;letter-spacing:1px}
.mma-keyart{width:100%;max-width:270px;border-radius:16px;margin-bottom:12px;box-shadow:0 10px 30px rgba(0,0,0,.45)}
.mma-medal{font-size:64px;line-height:1;animation:mmaFloat 2.6s ease-in-out infinite;filter:drop-shadow(0 6px 14px rgba(0,0,0,.4))}
.mma-mute{pointer-events:auto;border:none;background:rgba(0,0,0,.3);color:#fff;
  width:38px;height:38px;border-radius:50%;font-size:18px;cursor:pointer;line-height:1}
.mma-mute:hover{background:rgba(0,0,0,.5)}
.mma-overlay{position:absolute;inset:0;display:none;align-items:center;justify-content:center;
  z-index:5;background:rgba(10,6,20,.55);backdrop-filter:blur(6px);border-radius:22px;padding:20px}
.mma-overlay.show{display:flex}
.mma-panel{text-align:center;color:#fff;max-width:340px;animation:mmaPop .4s cubic-bezier(.34,1.56,.64,1)}
@keyframes mmaPop{from{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}
.mma-hero{font-size:72px;line-height:1;filter:drop-shadow(0 6px 14px rgba(0,0,0,.4));animation:mmaFloat 2.6s ease-in-out infinite}
@keyframes mmaFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
.mma-panel h2{font-size:28px;font-weight:900;margin:8px 0}
.mma-panel p{opacity:.9;font-weight:600;margin:0 0 16px;font-size:15px;line-height:1.5}
.mma-final b{font-size:24px;color:#ffd166}
.mma-btn{border:none;background:linear-gradient(135deg,#FF4F9A,#FF2A54);color:#fff;font-weight:900;
  font-size:18px;padding:14px 34px;border-radius:999px;cursor:pointer;box-shadow:0 10px 26px rgba(255,42,84,.45);
  transition:transform .15s}
.mma-btn:hover{transform:translateY(-2px) scale(1.04)}
.mma-best{margin-top:14px;font-weight:800;opacity:.85;font-size:14px}
.play-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}

/* ============================================================
   LAYOUT FIXES & POLISH
   ============================================================ */

/* Game card thumb — ensure images always fill properly */
.thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #FFF9FC 0%, #FFF0F7 100%);
  overflow: hidden;
  position: relative;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.thumb img:not([src]),
.thumb img[src=""],
.thumb img[src*="undefined"] {
  display: none;
}
.thumb::after {
  content: '🎮';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.08;
  pointer-events: none;
}

/* Game card body — tighter, cleaner */
.game-card .card-body {
  padding: 14px 16px;
}
.game-title {
  font-size: 15px;
  line-height: 1.2;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  min-height: 36px;
}

/* Product images — contain to show full product */
.product-img {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #FFF8FD 0%, #FFF0F7 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1.5px solid var(--border-color);
  padding: 8px;
}
.product-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.4s ease;
}

/* Character bio portraits — proper circle crop */
.bio-portrait {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center top !important;
  border: 4px solid var(--pink) !important;
  box-shadow: 0 8px 20px rgba(255, 79, 154, 0.15);
  flex-shrink: 0;
  background: #FFF9FC;
}

/* Character card icons — proper circle */
.character-card img {
  border-radius: 50%;
  aspect-ratio: 1;
  width: 100%;
  max-width: 100px;
  margin: 0 auto;
  border: 4px solid #FFFFFF;
  box-shadow: 0 8px 20px rgba(77, 39, 126, 0.1);
  object-fit: cover;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hero section — single clean image fills container */
.hero-card {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 440px;
  background: linear-gradient(135deg, #DEF5FF 0%, #C3EBFF 100%);
}
.hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
}

/* Shop hero — proper image fit */
.shop-hero-section {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  min-height: 280px;
  margin: 20px 0 0;
}
.shop-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.shop-hero-characters {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  max-width: 45%;
  max-height: 85%;
  object-fit: contain;
  z-index: 2;
}

/* Detail page images */
.detail-img {
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1.5px solid var(--border-color);
  aspect-ratio: 16 / 10;
}
.detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Promo card images — fill the card */
.merch-promo-card,
.why-play-card {
  padding: 0;
  overflow: hidden;
  position: relative;
}
.merch-promo-img,
.why-play-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
  object-fit: cover;
}

/* Newsletter strip — proper background */
.newsletter-strip-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.25;
}

/* Footer background */
.footer-full-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.08;
  z-index: 0;
}

/* Bundle banner image */
.bundle-banner-img {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 50%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.6;
}

/* Game stage — ensure proper sizing */
.game-stage-shell {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 24px;
  background: #0b0714;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  border: 1.5px solid var(--border-color);
  position: relative;
}
.game-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 78vh;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
@media (min-width: 900px) {
  .game-stage { aspect-ratio: 4 / 5; }
}

/* Card hover — more polish */
.card:hover {
  transform: translateY(-6px) rotate(var(--tilt, 0deg));
  box-shadow: 0 20px 40px rgba(77, 39, 126, 0.15), 0 0 0 1px rgba(255, 79, 154, 0.2);
  border-color: rgba(255, 79, 154, 0.3);
}
.card:hover .thumb img,
.card:hover .product-img img {
  transform: scale(1.08);
}

/* Badge — better visibility */
.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: var(--pink);
  color: #FFFFFF;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(255, 79, 154, 0.3);
  backdrop-filter: blur(4px);
}

/* Section spacing — tighter */
.section { padding: 28px 0 12px; }
.section-head { margin-bottom: 16px; padding-bottom: 8px; }
.section h2 { font-size: 24px; }

/* Grid gaps — consistent */
.grid { gap: 16px; }
.game-grid { gap: 16px; }
.product-grid { gap: 16px; }

/* Bio grid — better card sizing */
.bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}
.character-bio-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

/* New power-up icons */
.mma-pw {
  font-size: 16px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mmaFloat 2s ease-in-out infinite;
}

/* Play page heading */
.play-heading {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 10px;
  color: var(--ink);
  font-family: 'Fredoka', sans-serif;
}

/* Game stage canvas — rounded */
.mma-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: #120a20;
}

/* Responsive fixes */
@media (max-width: 1180px) {
  .game-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .game-grid,
  .product-grid,
  .universe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .character-grid { grid-template-columns: repeat(3, 1fr); }
  .bio-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 360px; }
  .hero-content { left: 20px; right: 20px; top: 20px; bottom: 20px; }
  .hero-content h1 { font-size: 30px; }
  .game-stage { aspect-ratio: 3 / 4; }
}

@media (max-width: 520px) {
  .game-grid,
  .product-grid,
  .universe-grid {
    grid-template-columns: 1fr;
  }
  .character-grid { grid-template-columns: repeat(2, 1fr); }
  .bio-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 300px; }
  .hero-content h1 { font-size: 26px; }
  .hero-content p { font-size: 14px; }
  .section { padding: 20px 0 8px; }
  .section h2 { font-size: 20px; }
  .bio-portrait { width: 64px !important; height: 64px !important; }
  .bio-name { font-size: 18px; }
  .bio-details { grid-template-columns: 1fr; }
  .play-heading { font-size: 20px; }
  .game-stage { aspect-ratio: 3 / 4; max-height: 70vh; }
}

/* Smooth transitions everywhere */
.card,
.btn,
.shop-tab,
.promo-card,
.character-bio-card,
.leader-row,
.ad-map-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Focus states for accessibility */
.btn:focus-visible,
.shop-tab:focus-visible,
.searchbox:focus-within,
a:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

/* Loading state for images */
img {
  background: linear-gradient(135deg, #FFF9FC 0%, #F5F0FA 100%);
}
img[src*=".svg"],
img[src*=".jpg"],
img[src*=".png"] {
  background: transparent;
}
