/* Companion Joy — Global Styles
   Mobile-first, max-width 480px, PC shows mobile style.
   Sunny yellow / coral / sky blue / leafy green / cream palette.
*/

/* ============== Reset & Base ============== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #FEFCE8;
  color: #16A34A;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* ============== CSS Variables ============== */
:root {
  --c-primary: #FACC15;        /* sunny yellow */
  --c-secondary: #FB7185;      /* coral */
  --c-accent: #38BDF8;         /* sky blue */
  --c-dark: #16A34A;           /* leafy green */
  --c-bg: #FEFCE8;             /* cream background */
  --c-bg-soft: #FEF9C3;
  --c-text: #166534;
  --c-text-soft: #15803D;
  --c-text-mute: #84CC16;
  --c-line: #FDE68A;
  --c-success: #16A34A;
  --c-shadow: 0 4px 14px rgba(250, 204, 21, 0.18);
  --c-shadow-strong: 0 10px 30px rgba(22, 163, 74, 0.18);
  --c-radius: 18px;
  --c-radius-sm: 12px;
  --c-radius-lg: 28px;
  --c-grad-hero: linear-gradient(135deg, #FACC15 0%, #FB7185 55%, #38BDF8 100%);
  --c-grad-soft: linear-gradient(180deg, #FEFCE8 0%, #FDE68A 100%);
  --c-grad-warm: linear-gradient(135deg, #FACC15 0%, #FB7185 100%);
  --c-grad-soft2: linear-gradient(135deg, #FB7185 0%, #FACC15 100%);
  --c-grad-cool: linear-gradient(135deg, #38BDF8 0%, #16A34A 100%);
  --max-w: 480px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
}

/* ============== Layout Shell (PC shows mobile style) ============== */
html, body {
  background: #FEF3C7;
}
.app {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--c-bg);
  position: relative;
  box-shadow: 0 0 60px rgba(250, 204, 21, 0.18);
  overflow-x: hidden;
}
@media (min-width: 481px) {
  body { background: #FDE68A; padding: 20px 0; }
  .app { border-radius: 24px; min-height: calc(100vh - 40px); }
}

/* ============== Floating particles ============== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  font-size: 22px;
  opacity: 0.6;
  animation: floatUp linear infinite;
  will-change: transform, opacity;
}
@keyframes floatUp {
  0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  100% { transform: translateY(-10vh) translateX(40px) rotate(360deg); opacity: 0; }
}

/* ============== Top Nav ============== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(254, 252, 232, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.08);
}
.top-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--c-dark);
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 22px;
  background: var(--c-grad-hero);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(251, 113, 133, 0.35);
  animation: logoPop 3s ease-in-out infinite;
}
@keyframes logoPop {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(3deg); }
}
.logo-text {
  font-size: 17px;
  letter-spacing: -0.01em;
  font-weight: 800;
}
.top-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-soft);
  border-radius: 999px;
  transition: all 0.18s ease;
}
.nav-pill:hover { background: var(--c-bg-soft); color: var(--c-dark); }
.nav-pill.active {
  background: var(--c-grad-warm);
  color: #fff;
  box-shadow: 0 4px 12px rgba(251, 113, 133, 0.35);
}
.nav-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: var(--c-bg-soft);
  color: var(--c-dark);
  border-radius: 50%;
  transition: all 0.18s ease;
}
.nav-search:hover { background: var(--c-line); transform: scale(1.06); }

/* ============== Search Drawer ============== */
.search-drawer {
  position: sticky;
  top: 60px;
  z-index: 25;
  padding: var(--space-3) var(--space-4);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.1);
}
.search-drawer[hidden] { display: none; }
.search-drawer input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 2px solid var(--c-line);
  border-radius: 999px;
  background: #fff;
  outline: none;
  transition: border-color 0.18s ease;
}
.search-drawer input:focus { border-color: var(--c-primary); }
.search-results {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.search-empty {
  color: var(--c-text-soft);
  font-size: 14px;
  padding: 8px;
  text-align: center;
}
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--c-bg-soft);
  transition: background 0.18s ease;
}
.search-row:hover { background: var(--c-line); }
.search-row-emoji {
  font-size: 22px;
  width: 30px;
  text-align: center;
}
.search-row-name {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
  color: var(--c-dark);
}
.search-row-cat {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--c-text-soft);
  font-weight: 700;
}

/* ============== Hero ============== */
.hero {
  position: relative;
  padding: 32px 20px 36px;
  text-align: center;
  background: var(--c-grad-hero);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.18), transparent 35%);
  pointer-events: none;
  z-index: -1;
}
.hero-paw {
  font-size: 64px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
  animation: heroFloat 3.5s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-12px) rotate(4deg); }
}
.hero-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.12);
  font-family: 'Fredoka', 'Nunito', sans-serif;
}
.hero-tagline {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.95;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.hero-cta {
  display: inline-block;
  padding: 12px 26px;
  background: #fff;
  color: var(--c-dark);
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transition: transform 0.18s ease;
}
.hero-cta:hover { transform: translateY(-2px) scale(1.02); }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.hero-stat strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-stat span {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

/* ============== Sections ============== */
.section {
  padding: 22px 16px 8px;
}
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 800;
  color: var(--c-dark);
  margin-bottom: 14px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  letter-spacing: -0.01em;
}
.section-title-link {
  font-size: 12px;
  color: var(--c-text-soft);
  font-weight: 700;
}
.section-title-link:hover { color: var(--c-secondary); }

/* ============== Pill row (categories) ============== */
.pill-row {
  display: flex;
  gap: 8px;
  padding: 6px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pill-row::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-soft);
  background: #fff;
  border: 2px solid var(--c-line);
  border-radius: 999px;
  transition: all 0.18s ease;
}
.cat-pill:hover {
  border-color: var(--c-primary);
  color: var(--c-dark);
}
.cat-pill.active {
  background: var(--c-grad-warm);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(251, 113, 133, 0.35);
}

/* ============== Game Card Grid (always 2 cols) ============== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 0 16px;
}
.game-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--c-radius);
  overflow: hidden;
  box-shadow: var(--c-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid var(--c-line);
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--c-shadow-strong);
}
.game-card-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-grad-hero);
  overflow: hidden;
}
.game-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-card-emoji {
  font-size: 64px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
}
.game-card-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.92);
  color: var(--c-dark);
  border-radius: 999px;
}
.game-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.game-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-dark);
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card-subtitle {
  font-size: 11px;
  color: var(--c-text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  min-height: 30px;
}
.game-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.game-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--c-dark);
}
.game-card-rating em {
  margin-left: 4px;
  color: var(--c-text-soft);
  font-style: normal;
  font-size: 10px;
}
.star { color: var(--c-line); }
.star.filled { color: var(--c-primary); }
.star.half {
  background: linear-gradient(90deg, var(--c-primary) 50%, var(--c-line) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.game-card-plays {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text-soft);
}

/* ============== Ad Slots ============== */
.ad-slot {
  margin: 18px 16px;
  padding: 12px;
  text-align: center;
  background: var(--c-bg-soft);
  border: 1px dashed var(--c-line);
  border-radius: var(--c-radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}
.ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-mute);
  font-weight: 700;
}

/* ============== Empty State ============== */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--c-text-soft);
}
.empty-state-emoji {
  font-size: 48px;
  margin-bottom: 8px;
}

/* ============== Detail Page ============== */
.detail-hero {
  padding: 24px 16px 18px;
  text-align: center;
  background: var(--c-grad-hero);
  color: #fff;
  position: relative;
  isolation: isolate;
}
.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 40%);
  z-index: -1;
}
.detail-hero-cover {
  width: 130px;
  height: 130px;
  margin: 0 auto 14px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border: 4px solid #fff;
  animation: heroFloat 4s ease-in-out infinite;
}
.detail-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-hero h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  text-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.detail-hero-sub {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 10px;
}
.detail-pill {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.detail-stats {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.detail-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}
.detail-stat strong {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 2px;
}
.stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.stat-label .star { font-size: 11px; }

.play-cta-wrap {
  padding: 0 16px;
  margin-top: -22px;
  position: relative;
  z-index: 5;
}
.play-cta {
  display: block;
  text-align: center;
  padding: 16px 24px;
  background: var(--c-grad-warm);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(251, 113, 133, 0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  letter-spacing: 0.01em;
  font-family: 'Fredoka', 'Nunito', sans-serif;
}
.play-cta:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 36px rgba(251, 113, 133, 0.55);
}
.play-cta:active { transform: scale(0.98); }

.detail-section {
  padding: 22px 16px 8px;
}
.detail-section h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-dark);
  margin-bottom: 12px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  letter-spacing: -0.01em;
}
.detail-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-text-soft);
}

.howto-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.howto-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--c-text-soft);
  line-height: 1.55;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.howto-list .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 800;
  background: var(--c-grad-warm);
  color: #fff;
  border-radius: 50%;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-chip {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  background: var(--c-bg-soft);
  color: var(--c-dark);
  border-radius: 999px;
  border: 1px solid var(--c-line);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share-btn {
  flex: 1 1 calc(50% - 4px);
  text-align: center;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  color: var(--c-dark);
  border: 1px solid var(--c-line);
  border-radius: 12px;
  transition: background 0.18s ease, transform 0.12s ease;
  cursor: pointer;
}
.share-btn:hover { background: var(--c-bg-soft); }
.share-btn:active { transform: scale(0.97); }

/* ============== Comments ============== */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comment {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.comment.featured {
  background: linear-gradient(135deg, rgba(250,204,21,0.18), rgba(251,113,133,0.12));
  border-color: var(--c-primary);
}
.comment-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--c-bg-soft);
  border-radius: 50%;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 4px;
}
.comment-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--c-dark);
  margin-right: 8px;
}
.comment-stars { font-size: 11px; }
.comment-date {
  font-size: 11px;
  color: var(--c-text-mute);
  font-weight: 600;
}
.comment-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--c-text-soft);
}
.comment-text.featured { color: var(--c-dark); font-weight: 600; }

/* ============== Footer ============== */
.site-footer {
  margin-top: 32px;
  padding: 26px 20px 90px;
  background: var(--c-bg-soft);
  border-top: 1px solid var(--c-line);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--c-dark);
  font-size: 16px;
}
.footer-tagline {
  font-size: 12px;
  color: var(--c-text-soft);
  font-weight: 600;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  margin-top: 4px;
}
.footer-links a {
  color: var(--c-text-soft);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--c-line);
  text-underline-offset: 3px;
}
.footer-links a:hover { color: var(--c-secondary); text-decoration-color: var(--c-secondary); }
.dot { color: var(--c-text-mute); }
.footer-contact {
  font-size: 12px;
  color: var(--c-text-soft);
  font-weight: 600;
}
.footer-contact a { color: var(--c-dark); font-weight: 800; }
.footer-copy {
  font-size: 11px;
  color: var(--c-text-mute);
  margin-top: 4px;
}

/* ============== Sticky Bottom Ad ============== */
.sticky-ad {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 20;
  border-top: 1px solid var(--c-line);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.sticky-ad.collapsed {
  transform: translateX(-50%) translateY(calc(100% - 36px));
}
.sticky-ad-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  min-height: 56px;
  gap: 8px;
}
.sticky-ad-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--c-text-soft);
  background: var(--c-bg-soft);
  border-radius: 50%;
  z-index: 2;
}
.sticky-ad-close:hover { background: var(--c-line); color: var(--c-dark); }
.sticky-ad::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(180deg, var(--c-bg-soft), var(--c-bg-soft));
  z-index: 1;
  pointer-events: none;
  display: none;
}
.sticky-ad.collapsed::before { display: block; }
.sticky-ad.collapsed .sticky-ad-inner {
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
  min-height: 0;
}
.sticky-ad:not(.collapsed) .sticky-ad-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255,255,255,0.9);
}
.sticky-ad:not(.collapsed)::after {
  content: 'Tap × to close';
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 9px;
  color: var(--c-text-mute);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
}

/* ============== Play Page ============== */
.play-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #FEFCE8;
}
.play-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--c-grad-hero);
  color: #fff;
  flex-shrink: 0;
}
.back-btn, .full-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255,255,255,0.22);
  color: #fff;
  border-radius: 999px;
  transition: background 0.18s ease;
}
.back-btn:hover, .full-btn:hover { background: rgba(255,255,255,0.35); }
.play-bar-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-stage {
  position: relative;
  flex: 1;
  background: var(--c-bg);
  overflow: hidden;
}
.game-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 2;
  background: var(--c-bg);
  padding: 24px;
  text-align: center;
  transition: opacity 0.4s ease;
}
.game-loader.hidden { opacity: 0; pointer-events: none; }
.pulse-loader {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.pulse-dot {
  width: 14px;
  height: 14px;
  background: var(--c-primary);
  border-radius: 50%;
  animation: pulseDot 1.2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.6);
}
.pulse-dot:nth-child(2) {
  background: var(--c-secondary);
  box-shadow: 0 0 12px rgba(251, 113, 133, 0.6);
  animation-delay: 0.2s;
}
.pulse-dot:nth-child(3) {
  background: var(--c-accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  animation-delay: 0.4s;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(0.6); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 1; }
}
.loader-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--c-dark);
}
.loader-sub {
  font-size: 13px;
  color: var(--c-text-soft);
  font-weight: 600;
}
.loader-progress {
  width: 220px;
  height: 6px;
  background: var(--c-line);
  border-radius: 999px;
  overflow: hidden;
}
.loader-progress-fill {
  width: 40%;
  height: 100%;
  background: var(--c-grad-warm);
  border-radius: 999px;
  animation: loaderBar 1.4s ease-in-out infinite;
}
@keyframes loaderBar {
  0% { transform: translateX(-100%); width: 40%; }
  50% { width: 60%; }
  100% { transform: translateX(280%); width: 40%; }
}
.game-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #FEFCE8;
}

/* ============== Privacy / Terms / Contact ============== */
.legal-hero {
  padding: 28px 20px;
  text-align: center;
  background: var(--c-grad-hero);
  color: #fff;
}
.legal-hero h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  margin-bottom: 4px;
}
.legal-hero p {
  font-size: 13px;
  opacity: 0.95;
  font-weight: 600;
}
.legal-body {
  padding: 22px 18px 8px;
}
.legal-body h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--c-dark);
  margin: 18px 0 8px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--c-text-soft);
  margin-bottom: 8px;
}
.legal-body ul { padding-left: 18px; list-style: disc; }
.legal-body ul li { margin-bottom: 4px; }
.legal-body strong { color: var(--c-dark); }
.legal-body a { color: var(--c-secondary); text-decoration: underline; }

.contact-card {
  margin: 18px 16px;
  padding: 22px 18px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--c-radius);
  text-align: center;
  box-shadow: var(--c-shadow);
}
.contact-card .emoji {
  font-size: 56px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}
.contact-card h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-dark);
  margin-bottom: 6px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
}
.contact-card p {
  font-size: 13px;
  color: var(--c-text-soft);
  line-height: 1.55;
  margin-bottom: 14px;
}
.contact-email {
  display: inline-block;
  padding: 12px 22px;
  background: var(--c-grad-warm);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(251, 113, 133, 0.4);
  transition: transform 0.18s ease;
}
.contact-email:hover { transform: translateY(-2px); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 16px;
}
.faq-item {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.faq-q {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-dark);
  margin-bottom: 4px;
}
.faq-a {
  font-size: 13px;
  color: var(--c-text-soft);
  line-height: 1.55;
}

/* ============== 404 ============== */
.error-hero {
  padding: 48px 20px 30px;
  text-align: center;
  background: var(--c-grad-hero);
  color: #fff;
}
.error-emoji {
  font-size: 84px;
  animation: heroFloat 3.5s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.18));
}
.error-code {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-top: 4px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  text-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.error-title {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
  font-family: 'Fredoka', 'Nunito', sans-serif;
}
.error-sub {
  font-size: 14px;
  opacity: 0.95;
  margin-top: 6px;
  font-weight: 600;
}
.error-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 18px 8px;
}
.error-btn {
  display: block;
  text-align: center;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.18s ease;
}
.error-btn.primary {
  background: var(--c-grad-warm);
  color: #fff;
  box-shadow: 0 8px 22px rgba(251, 113, 133, 0.4);
}
.error-btn.secondary {
  background: #fff;
  color: var(--c-dark);
  border: 2px solid var(--c-line);
}
.error-btn:hover { transform: translateY(-2px); }

/* ============== Helpers ============== */
.spacer-bottom {
  height: 90px;
  width: 100%;
}
.center-text { text-align: center; }
.muted { color: var(--c-text-mute); }

/* ============== Animations ============== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-3px); }
  40%, 80% { transform: translateX(3px); }
}

/* ============== Print ============== */
@media print {
  .sticky-ad, .ad-slot, .particles, .top-nav, .site-footer, .nav-search, .play-cta { display: none; }
  .app { box-shadow: none; }
}
