/* Tail Soothe — Global Styles
   Mobile-first, max-width 480px, PC shows mobile style.
   Soothing pink / blue / cream dog & cat theme.
*/

/* ============== 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: #FDF2F8;
  color: #831843;
  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: #F9A8D4;        /* soft pink */
  --c-secondary: #93C5FD;      /* light blue */
  --c-accent: #FEF3C7;         /* cream */
  --c-dark: #831843;           /* rose */
  --c-bg: #FDF2F8;             /* pink cream */
  --c-bg-soft: #FCE7F3;
  --c-text: #831843;
  --c-text-soft: #64748B;
  --c-text-mute: #94A3B8;
  --c-line: #FBCFE8;
  --c-success: #10B981;
  --c-shadow: 0 4px 14px rgba(249, 168, 212, 0.10);
  --c-shadow-strong: 0 10px 30px rgba(131, 24, 67, 0.16);
  --c-radius: 18px;
  --c-radius-sm: 12px;
  --c-radius-lg: 28px;
  --c-grad-hero: linear-gradient(135deg, #F9A8D4, #93C5FD, #C4B5FD);
  --c-grad-soft: linear-gradient(180deg, #FDF2F8 0%, #FEF3C7 100%);
  --c-grad-warm: linear-gradient(135deg, #F9A8D4 0%, #93C5FD 100%);
  --c-grad-soft2: linear-gradient(135deg, #93C5FD 0%, #F9A8D4 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: #FCE7F3;
}
.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(249, 168, 212, 0.08);
  overflow-x: hidden;
}
@media (min-width: 481px) {
  body { background: #FBCFE8; 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.55;
  animation: floatUp linear infinite;
  will-change: transform, opacity;
}
@keyframes floatUp {
  0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-10vh) translateX(40px) rotate(360deg); opacity: 0; }
}

/* ============== Top Nav ============== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 12px 16px;
  background: rgba(240, 253, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.top-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  color: var(--c-dark);
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--c-grad-warm);
  font-size: 18px;
  box-shadow: var(--c-shadow);
}
.logo-text {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  letter-spacing: -0.2px;
}
.top-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-dark);
  background: transparent;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.nav-pill:hover { background: var(--c-accent); }
.nav-pill.active {
  background: var(--c-grad-warm);
  color: #fff;
  box-shadow: 0 2px 8px rgba(249, 168, 212, 0.4);
}
.nav-search {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: transform 0.2s, background 0.2s;
}
.nav-search:hover { background: #FDE68A; transform: scale(1.05); }
.search-drawer {
  position: fixed;
  top: 60px; left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: #fff;
  border-radius: var(--c-radius);
  box-shadow: var(--c-shadow-strong);
  padding: 14px;
  z-index: 60;
  animation: popDown 0.22s ease-out;
}
@keyframes popDown {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.search-drawer input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--c-line);
  border-radius: 999px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.search-drawer input:focus { border-color: var(--c-primary); }
.search-results { margin-top: 10px; max-height: 360px; overflow-y: auto; }
.search-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  transition: background 0.15s;
}
.search-row:hover { background: var(--c-accent); }
.search-row-emoji { font-size: 22px; }
.search-row-name { flex: 1; font-weight: 700; font-size: 14px; }
.search-row-cat { font-size: 11px; color: var(--c-text-mute); padding: 2px 8px; background: var(--c-accent); border-radius: 999px; }
.search-empty { padding: 16px; text-align: center; color: var(--c-text-mute); font-size: 13px; }

/* ============== Hero ============== */
.hero {
  position: relative;
  background: var(--c-grad-hero);
  padding: 36px 20px 40px;
  border-radius: 0 0 32px 32px;
  overflow: hidden;
  color: #fff;
  text-align: center;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 220px; height: 220px;
  top: -60px; right: -60px;
  background: radial-gradient(circle, rgba(255,255,255,0.45), transparent 60%);
  animation: floatY 6s ease-in-out infinite;
}
.hero::after {
  width: 160px; height: 160px;
  bottom: -40px; left: -40px;
  background: radial-gradient(circle, rgba(254, 243, 199, 0.5), transparent 60%);
  animation: floatY 7s ease-in-out infinite reverse;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.hero-paw { font-size: 38px; margin-bottom: 8px; animation: pawPulse 2.4s ease-in-out infinite; }
@keyframes pawPulse {
  0%, 100% { transform: scale(1) rotate(-4deg); }
  50%      { transform: scale(1.08) rotate(4deg); }
}
.hero-title {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 6px rgba(20, 80, 90, 0.25);
  position: relative; z-index: 1;
}
.hero-tagline {
  font-size: 15px;
  margin-top: 6px;
  opacity: 0.95;
  position: relative; z-index: 1;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  padding: 12px 22px;
  background: #fff;
  color: var(--c-dark);
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(20, 80, 90, 0.25);
  position: relative; z-index: 1;
  transition: transform 0.15s;
}
.hero-cta:hover { transform: translateY(-2px); }
.hero-stats {
  display: flex; justify-content: center; gap: 24px;
  margin-top: 18px;
  position: relative; z-index: 1;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 18px; font-weight: 800; }
.hero-stat span { font-size: 11px; opacity: 0.9; }

/* ============== Sections ============== */
.section { padding: 20px 16px 8px; position: relative; z-index: 1; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--c-dark);
  margin-bottom: 12px;
}
.section-title-link {
  font-size: 12px;
  color: var(--c-text-soft);
  font-weight: 700;
}

/* ============== Category pills (horizontal scroll) ============== */
.pill-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 16px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.pill-row::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--c-line);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-dark);
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.cat-pill:hover { transform: translateY(-1px); }
.cat-pill.active {
  background: var(--c-grad-warm);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(249, 168, 212, 0.4);
}

/* ============== Game grid (always 2 columns) ============== */
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 12px;
}
.game-card {
  background: #fff;
  border-radius: var(--c-radius);
  overflow: hidden;
  box-shadow: var(--c-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.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;
  overflow: hidden;
}
.game-card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.game-card:hover .game-card-cover img { transform: scale(1.05); }
.game-card-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(131, 24, 67, 0.10));
  pointer-events: none;
}
.game-card-emoji {
  font-size: 72px;
  filter: drop-shadow(0 4px 8px rgba(20, 80, 90, 0.2));
}
.game-card-pill {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--c-dark);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 1;
}
.game-card-body { padding: 10px 12px 12px; }
.game-card-title {
  font-size: 14px; font-weight: 800;
  color: var(--c-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-card-subtitle {
  font-size: 11px; color: var(--c-text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.game-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--c-text-soft);
}
.game-card-rating { display: inline-flex; align-items: center; gap: 2px; }
.game-card-rating em { font-style: normal; font-weight: 800; color: var(--c-dark); margin-left: 2px; }
.star { color: #F59E0B; font-size: 12px; }
.star.half {
  background: linear-gradient(90deg, #F59E0B 50%, #F1F1F1 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.game-card-plays { font-size: 10px; font-weight: 700; }

/* ============== Ad Slots ============== */
.ad-slot {
  margin: 12px 16px;
  background: #FDF2F8;
  border: 1.5px dashed var(--c-line);
  border-radius: var(--c-radius-sm);
  min-height: 90px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 10px;
}
.ad-label {
  font-size: 9px;
  color: var(--c-text-mute);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.sticky-ad {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  background: #fff;
  border-top: 1px solid var(--c-line);
  z-index: 100;
  transition: transform 0.3s, opacity 0.3s;
  box-shadow: 0 -4px 16px rgba(249, 168, 212, 0.12);
}
.sticky-ad.collapsed { transform: translate(-50%, calc(100% - 12px)); opacity: 0.85; }
.sticky-ad:hover { transform: translate(-50%, 0); opacity: 1; }
.sticky-ad-inner {
  padding: 6px 8px;
  display: flex; align-items: center; justify-content: center;
  min-height: 50px;
  position: relative;
}
.sticky-ad-close {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: var(--c-accent);
  border-radius: 50%;
  font-size: 16px; line-height: 1;
  color: var(--c-dark);
  z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
}
.sticky-ad.collapsed .sticky-ad-close { transform: translateY(-32px); }
.sticky-ad.collapsed .ad-label { display: none; }

/* ============== Detail page ============== */
.detail-hero {
  position: relative;
  background: var(--c-grad-hero);
  padding: 24px 16px 32px;
  border-radius: 0 0 28px 28px;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.detail-hero-cover {
  width: 140px; height: 140px;
  margin: 0 auto 14px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(20, 80, 90, 0.3);
  background: #fff;
}
.detail-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 26px;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(20, 80, 90, 0.25);
}
.detail-hero-sub {
  font-size: 14px; opacity: 0.95; margin-top: 4px;
}
.detail-stats {
  display: flex; justify-content: center; gap: 22px;
  margin-top: 14px;
}
.detail-stat {
  text-align: center; font-size: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.detail-stat strong { font-size: 16px; }
.detail-stat .stat-label { font-size: 10px; opacity: 0.9; }

.detail-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--c-dark);
  font-weight: 800;
  font-size: 11px;
  border-radius: 999px;
}

.play-cta-wrap { padding: 16px 16px 0; }
.play-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 16px;
  background: var(--c-grad-warm);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(249, 168, 212, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.play-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(249, 168, 212, 0.5); }

.detail-section { padding: 18px 16px 4px; }
.detail-section h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--c-dark);
  margin-bottom: 8px;
}
.detail-desc {
  font-size: 14px;
  color: var(--c-text-soft);
  line-height: 1.65;
}
.howto-list {
  display: flex; flex-direction: column; gap: 8px;
}
.howto-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 14px;
  font-size: 13px;
  color: var(--c-text-soft);
  box-shadow: var(--c-shadow);
}
.howto-list .num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-grad-warm);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tag-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tag-chip {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  background: var(--c-accent);
  color: var(--c-dark);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
}

.share-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.share-btn {
  flex: 1;
  min-width: 80px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 10px;
  background: #fff;
  border: 1.5px solid var(--c-line);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-dark);
  transition: background 0.15s, transform 0.15s;
}
.share-btn:hover { background: var(--c-accent); transform: translateY(-1px); }

/* ============== Comments ============== */
.comments-list { display: flex; flex-direction: column; gap: 10px; }
.comment {
  display: flex; gap: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--c-shadow);
}
.comment-avatar {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px var(--c-line);
}
.comment-body { flex: 1; min-width: 0; }
.comment-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 4px;
}
.comment-name { font-weight: 800; font-size: 13px; color: var(--c-dark); }
.comment-stars { font-size: 11px; }
.comment-date { font-size: 10px; color: var(--c-text-mute); }
.comment-text {
  font-size: 13px;
  color: var(--c-text-soft);
  line-height: 1.5;
}
.comment-text.featured {
  color: var(--c-dark);
  font-weight: 600;
}
.comment.featured {
  border: 1.5px solid var(--c-primary);
}

/* ============== Play page ============== */
.play-shell {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--c-bg);
}
.play-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  background: rgba(240, 253, 250, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; z-index: 30;
}
.play-bar-title {
  font-weight: 800; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  background: var(--c-accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.full-btn {
  padding: 6px 12px;
  background: var(--c-grad-warm);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.game-stage {
  position: relative;
  flex: 1;
  background: var(--c-grad-soft);
  overflow: hidden;
}
.game-iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
.game-loader {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--c-grad-soft);
  z-index: 5;
  transition: opacity 0.4s;
}
.game-loader.hidden { opacity: 0; pointer-events: none; }
.pulse-loader {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.pulse-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c-primary);
  animation: pulse 1.2s ease-in-out infinite;
}
.pulse-dot:nth-child(2) { animation-delay: 0.15s; background: var(--c-secondary); }
.pulse-dot:nth-child(3) { animation-delay: 0.3s; background: var(--c-accent); }
@keyframes pulse {
  0%, 100% { transform: scale(0.7); opacity: 0.6; }
  50%      { transform: scale(1.15); opacity: 1; }
}
.loader-text { font-weight: 800; color: var(--c-dark); }
.loader-sub { font-size: 11px; color: var(--c-text-mute); margin-top: 4px; }
.loader-progress {
  margin-top: 12px;
  width: 200px; height: 6px;
  background: rgba(249, 168, 212, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.loader-progress-fill {
  width: 0%; height: 100%;
  background: var(--c-grad-warm);
  animation: fillProgress 3.5s linear forwards;
}
@keyframes fillProgress {
  to { width: 100%; }
}

/* ============== Privacy / Terms / Contact ============== */
.legal-page {
  padding: 20px 16px 24px;
}
.legal-page h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--c-dark);
  margin-bottom: 6px;
}
.legal-page h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--c-dark);
  margin-top: 18px;
  margin-bottom: 6px;
}
.legal-page h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-text-soft);
  margin-top: 12px;
  margin-bottom: 4px;
}
.legal-page p, .legal-page li {
  font-size: 13px;
  color: var(--c-text-soft);
  line-height: 1.7;
  margin-bottom: 6px;
}
.legal-page ul { padding-left: 18px; list-style: disc; }

/* ============== Contact form ============== */
.contact-form {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 16px;
}
.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--c-dark);
  margin-bottom: 4px;
}
.form-row input, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--c-line);
  border-radius: 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--c-primary); }
.form-row textarea { min-height: 120px; resize: vertical; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px;
  background: var(--c-grad-warm);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(249, 168, 212, 0.35);
  transition: transform 0.15s;
  border: 0;
  cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); }

/* ============== 404 ============== */
.notfound {
  text-align: center;
  padding: 40px 24px;
}
.notfound-emoji { font-size: 80px; margin-bottom: 12px; }
.notfound h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 60px;
  font-weight: 800;
  background: var(--c-grad-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.notfound p { font-size: 14px; color: var(--c-text-soft); margin-top: 8px; }
.notfound .play-cta { margin-top: 22px; max-width: 240px; margin-left: auto; margin-right: auto; }

/* ============== Footer ============== */
.site-footer {
  margin-top: 32px;
  padding: 28px 16px 100px;
  background: linear-gradient(180deg, transparent, var(--c-accent));
  text-align: center;
  position: relative;
  z-index: 1;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px; font-weight: 800;
  color: var(--c-dark);
}
.footer-tagline {
  font-size: 12px;
  color: var(--c-text-soft);
  margin-top: 4px;
}
.footer-links {
  margin-top: 14px;
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  gap: 4px;
  font-size: 12px;
}
.footer-links a {
  color: var(--c-text-soft);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.footer-links a:hover { background: rgba(255, 255, 255, 0.6); }
.footer-links .dot { color: var(--c-text-mute); }
.footer-contact {
  font-size: 11px; color: var(--c-text-soft);
  margin-top: 12px;
}
.footer-contact a { color: var(--c-primary); font-weight: 700; }
.footer-copy {
  font-size: 10px; color: var(--c-text-mute);
  margin-top: 8px;
}

/* ============== Loading pulse (generic) ============== */
.page-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 0;
}
.page-loader .pulse-loader { margin-bottom: 10px; }

/* ============== Empty state ============== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-text-mute);
}
.empty-state-emoji { font-size: 60px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ============== Helper utility ============== */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* ============== Animations ============== */
.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============== Detail page brand-friendly extra spacing ============== */
.detail-section h2:first-of-type { margin-top: 6px; }
.detail-section + .detail-section { border-top: 1px dashed var(--c-line); margin-top: 8px; }

/* ============== Stars (5-star rating display) ============== */
.stars-display { display: inline-flex; gap: 1px; }
.stars-display .star { color: #F59E0B; }
.stars-display .star.empty { color: #E2E8F0; }

/* ============== Related games section spacing ============== */
.detail-section .game-grid { padding: 0; }

/* ============== Responsive (PC shows mobile style — only minor tweaks) ============== */
@media (max-width: 380px) {
  .hero-title { font-size: 28px; }
  .game-card-emoji { font-size: 60px; }
  .detail-hero h1 { font-size: 22px; }
  .top-nav { padding: 10px 12px; }
  .nav-pill { padding: 5px 10px; font-size: 12px; }
  .game-card-body { padding: 8px 10px 10px; }
  .section-title { font-size: 16px; }
}

/* ============== Tablet fine-tune (still mobile style) ============== */
@media (min-width: 481px) and (max-width: 768px) {
  .hero { padding: 44px 28px 48px; }
  .hero-title { font-size: 36px; }
  .hero-tagline { font-size: 16px; }
  .game-card-title { font-size: 15px; }
  .game-card-subtitle { font-size: 12px; }
  .detail-hero h1 { font-size: 30px; }
  .detail-hero-sub { font-size: 15px; }
  .detail-desc { font-size: 15px; }
}

/* ============== Larger desktops — keep mobile-style centered ============== */
@media (min-width: 1024px) {
  .app { box-shadow: 0 8px 40px rgba(20, 80, 90, 0.10); }
  .top-nav { padding: 14px 20px; }
  .hero-title { font-size: 38px; }
}

/* ============== Print fallback (clean print of articles) ============== */
@media print {
  .top-nav, .particles, .sticky-ad, .ad-slot, .play-bar, .game-stage, .site-footer { display: none !important; }
  body { background: #fff; }
  .app { max-width: 100%; box-shadow: none; }
  .legal-page h1, .legal-page h2 { color: #000; }
  a { text-decoration: underline; }
}

/* ============== Reduced motion respect ============== */
@media (prefers-reduced-motion: reduce) {
  .particle, .hero::before, .hero::after, .hero-paw, .pulse-dot, .loader-progress-fill {
    animation: none !important;
  }
  .game-card, .play-cta, .btn-primary, .nav-pill, .game-card-cover img {
    transition: none !important;
  }
}

/* ============== Dark mode hint (optional, not enforced) ============== */
@media (prefers-color-scheme: dark) {
  /* Currently site remains light for friendliness; placeholder for future. */
}

/* ============== Accessibility focus rings ============== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, .nav-pill:focus-visible, .cat-pill:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

/* ============== Smooth scrolling for in-page anchors ============== */
html { scroll-behavior: smooth; }

/* ============== Tag chip variations ============== */
.tag-chip.featured {
  background: var(--c-grad-warm);
  color: #fff;
}

/* ============== Pill (category) variants ============== */
.cat-pill[data-cat="all"]::before { content: "✨ "; }
.cat-pill[data-cat="relaxing"]::before { content: "🛁 "; }
.cat-pill[data-cat="puzzle"]::before { content: "🧩 "; }
.cat-pill[data-cat="skill"]::before { content: "🎯 "; }
.cat-pill[data-cat="adventure"]::before { content: "🌿 "; }
.cat-pill[data-cat="music"]::before { content: "🎵 "; }
.cat-pill[data-cat="arcade"]::before { content: "🕹️ "; }
.cat-pill[data-cat="racing"]::before { content: "🏁 "; }
.cat-pill.active::before { content: ""; }

/* ============== Hero pet emoji large ============== */
.hero-paw {
  display: inline-block;
  font-size: 44px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
}

/* ============== Section title accent line ============== */
.section-title::before {
  content: "";
  display: inline-block;
  width: 5px; height: 18px;
  background: var(--c-grad-warm);
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: -2px;
}

/* ============== Detail hero specific gradient overlay ============== */
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 50%);
  pointer-events: none;
}

/* ============== Form helper ============== */
.form-row .hint { font-size: 11px; color: var(--c-text-mute); margin-top: 4px; }

/* ============== Comment avatar variations ============== */
.comment-avatar.av-1 { background: #FBCFE8; }
.comment-avatar.av-2 { background: #FEF3C7; }
.comment-avatar.av-3 { background: #DBEAFE; }
.comment-avatar.av-4 { background: #FCE7F3; }

/* ============== Sticky ad close hover ============== */
.sticky-ad-close:hover { background: #FDE68A; }

/* ============== Search row hover transition ============== */
.search-row { transition: background 0.18s, transform 0.18s; }
.search-row:hover { transform: translateX(2px); }

/* ============== Game card focus state ============== */
.game-card:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* ============== Inline icon helper ============== */
.icon { display: inline-block; vertical-align: -2px; margin-right: 4px; }

/* ============== Subtle hover lift for cards ============== */
.game-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }

/* ============== Pulse animation for play CTA ============== */
.play-cta {
  animation: ctaPulse 2.8s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(249, 168, 212, 0.45); }
  50%      { box-shadow: 0 6px 24px rgba(147, 197, 253, 0.55); }
}

/* ============== Wider pill button for mobile ============== */
.btn-primary { width: 100%; }
.contact-form .btn-primary { width: 100%; }

/* ============== Legal link styling ============== */
.legal-page a { color: var(--c-primary); font-weight: 700; }
.legal-page a:hover { text-decoration: underline; }

/* ============== Final 5-star rating color ============== */
.comment-stars .star.empty { color: #E2E8F0; }

/* ============== Mobile-only margin helper ============== */
@media (max-width: 480px) {
  .ad-slot { margin: 10px 14px; }
  .section { padding: 16px 14px 4px; }
  .game-grid { padding: 0 14px 8px; }
}
