/* ==========================================================================
   Zoomie Joy - H5 Mini Game Portal
   Global Stylesheet (mobile-first, single breakpoint)
   Author: Zoomie Joy
   ========================================================================== */

:root {
  --color-primary: #FF6B35;
  --color-primary-dark: #E5562A;
  --color-secondary: #FFC93C;
  --color-accent: #1FAB89;
  --color-accent-dark: #17876D;
  --color-bg: #FFF8F0;
  --color-bg-card: #FFFFFF;
  --color-text: #1A1A2E;
  --color-text-soft: #4A4A68;
  --color-text-muted: #8C8CA8;
  --color-border: #F0E5D8;
  --color-danger: #E94560;
  --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FFC93C 100%);
  --gradient-accent: linear-gradient(135deg, #1FAB89 0%, #FFC93C 100%);
  --gradient-sunset: linear-gradient(135deg, #FF6B35 0%, #FF8E53 50%, #FFC93C 100%);
  --gradient-night: linear-gradient(135deg, #1A1A2E 0%, #2D2D5F 100%);
  --shadow-sm: 0 2px 6px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 8px 24px rgba(255, 107, 53, 0.18);
  --shadow-xl: 0 12px 40px rgba(26, 26, 46, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --grid-cols: 2;
  --gap-md: 12px;
  --gap-lg: 20px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 20px;
  --space-xl: 32px;
  --font-display: "Fredoka One", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 100%;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  padding-bottom: 70px; /* room for sticky bottom ad */
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ==========================================================================
   Layout
   ========================================================================== */
main, .page, .container {
  max-width: var(--max-w);
  margin: 0;
  padding: 0 16px;
}

main { padding-bottom: var(--space-xl); }

/* ==========================================================================
   Top Navigation
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 16px;
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.nav__title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--color-text);
  line-height: 1;
}

.nav__title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__pills {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav__pills::-webkit-scrollbar { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-soft);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--color-border);
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.2s ease, color 0.2s ease;
}
.pill:active { transform: scale(0.96); }
.pill--active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.nav__search {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  min-width: 90px;
}
.nav__search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--color-text);
  width: 100%;
  min-width: 60px;
}
.nav__search-icon {
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
  margin-right: 4px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  margin: 14px 0 18px;
  padding: 28px 20px 32px;
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(2px);
  pointer-events: none;
}
.hero::before {
  width: 200px; height: 200px;
  top: -60px; right: -40px;
  animation: float 8s ease-in-out infinite;
}
.hero::after {
  width: 140px; height: 140px;
  bottom: -40px; left: -20px;
  animation: float 6s ease-in-out infinite reverse;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  background: rgba(255, 255, 255, 0.22);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.05;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.hero__title span {
  display: inline-block;
  animation: bounce 1.6s ease-in-out infinite;
}
.hero__title span:nth-child(2) { animation-delay: 0.1s; }
.hero__title span:nth-child(3) { animation-delay: 0.2s; }
.hero__title span:nth-child(4) { animation-delay: 0.3s; }
.hero__title span:nth-child(5) { animation-delay: 0.4s; }
.hero__title span:nth-child(6) { animation-delay: 0.5s; }

.hero__sub {
  font-size: 15px;
  opacity: 0.95;
  margin-bottom: 16px;
  max-width: 90%;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--color-primary);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}
.hero__cta:active { transform: scale(0.96); }

.hero__sparkle {
  position: absolute;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 12px #fff;
  animation: sparkle 2.4s ease-in-out infinite;
}
.hero__sparkle:nth-child(1) { top: 18%; left: 70%; }
.hero__sparkle:nth-child(2) { top: 60%; left: 80%; animation-delay: 0.6s; }
.hero__sparkle:nth-child(3) { top: 40%; left: 20%; animation-delay: 1.2s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-20px) rotate(15deg); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.4); }
}

/* ==========================================================================
   Section heading
   ========================================================================== */
.section { margin: 24px 0; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section__title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--color-text);
}
.section__link {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ==========================================================================
   Category pills
   ========================================================================== */
.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  margin: 0 -16px 8px;
  padding-left: 16px;
  padding-right: 16px;
}
.cats::-webkit-scrollbar { display: none; }

.cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  color: var(--color-text-soft);
  border: 1.5px solid var(--color-border);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.cat:active { transform: scale(0.95); }
.cat--active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}
.cat__emoji { font-size: 16px; }

/* ==========================================================================
   Game Card Grid (2 col)
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: var(--gap-md);
}

.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  border: 1px solid rgba(240, 229, 216, 0.6);
}
.card:hover, .card:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card:active { transform: scale(0.98); }

.card__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--gradient-primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card__icon-emoji {
  font-size: 64px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
}

.card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.card__badge--hot { background: var(--color-danger); }
.card__badge--new { background: var(--color-accent); }
.card__badge--top { background: var(--color-secondary); color: #5C3A00; }

.card__rating {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  backdrop-filter: blur(4px);
}
.card__rating-star { color: var(--color-secondary); }

.card__body {
  padding: 10px 12px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card__name {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__sub {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 600;
}
.card__plays::before { content: "▶ "; color: var(--color-primary); }
.card__likes::before { content: "♥ "; color: var(--color-danger); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.btn--primary:hover { box-shadow: 0 12px 28px rgba(255, 107, 53, 0.28); }
.btn--ghost {
  background: #fff;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 13px; }

/* ==========================================================================
   Ad Slots
   ========================================================================== */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  background: linear-gradient(135deg, #FFF3E0, #FFF8F0);
  border: 1.5px dashed rgba(255, 107, 53, 0.25);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-align: center;
  padding: 8px;
  min-height: 90px;
}
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--billboard { min-height: 250px; }
.ad-slot--rectangle { min-height: 250px; }
.ad-slot--halfpage { min-height: 600px; }
.ad-slot--mobile-leaderboard { min-height: 50px; }
.ad-slot__label { opacity: 0.7; }

/* Sticky bottom anchor ad */
.ad-anchor {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255, 248, 240, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
  padding: 8px 12px 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding-bottom: calc(8px + var(--safe-bottom));
}
.ad-anchor.is-open { transform: translateY(0); }
.ad-anchor__slot {
  flex: 1;
  min-height: 50px;
  background: linear-gradient(135deg, #FFE0B2, #FFF3E0);
  border: 1.5px dashed rgba(255, 107, 53, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0;
}
.ad-anchor__close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  font-size: 14px;
  flex-shrink: 0;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 12px 0 8px;
}
.crumbs a { color: var(--color-text-soft); font-weight: 600; }
.crumbs a:hover { color: var(--color-primary); }
.crumbs__sep { opacity: 0.5; }
.crumbs__current { color: var(--color-text); font-weight: 700; }

/* ==========================================================================
   Detail page
   ========================================================================== */
.detail-hero {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 14px;
}
.detail-hero::before {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  top: -50px; right: -40px;
  animation: float 9s ease-in-out infinite;
}
.detail-hero__row {
  display: flex;
  gap: 14px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.detail-hero__icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.detail-hero__icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero__icon .card__icon-emoji { font-size: 56px; }
.detail-hero__title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 6px;
}
.detail-hero__sub {
  font-size: 13px;
  opacity: 0.95;
  margin-bottom: 10px;
}
.detail-hero__stats {
  display: flex;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  flex-wrap: wrap;
}
.detail-hero__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.22);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.detail-hero__stat span { font-size: 14px; }

.detail__play {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}
.detail__play .btn { flex: 1; }

.panel {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 14px 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.panel__title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.panel__title::before {
  content: "";
  width: 4px; height: 18px;
  background: var(--gradient-primary);
  border-radius: 2px;
}
.panel p {
  font-size: 14px;
  color: var(--color-text-soft);
  line-height: 1.6;
}
.panel__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel__list li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--color-text-soft);
  line-height: 1.5;
  align-items: flex-start;
}
.panel__list li::before {
  counter-increment: step;
  content: counter(step);
  background: var(--gradient-primary);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.panel__list { counter-reset: step; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: #FFF3E0;
  color: var(--color-primary-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Comments */
.comments__item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-border);
  display: flex;
  gap: 10px;
}
.comments__item:last-child { border-bottom: none; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.avatar--text { font-size: 14px; font-family: var(--font-display); }
.comments__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.comments__name { font-weight: 800; font-size: 13px; color: var(--color-text); }
.comments__date { font-size: 11px; color: var(--color-text-muted); }
.comments__stars { color: var(--color-secondary); font-size: 12px; letter-spacing: 1px; }
.comments__text {
  font-size: 13px;
  color: var(--color-text-soft);
  line-height: 1.5;
}

.stars { color: var(--color-secondary); letter-spacing: 1px; font-size: 13px; }
.stars__off { color: #E2D7C5; }

/* ==========================================================================
   Play page
   ========================================================================== */
.play-shell {
  margin: 12px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  position: relative;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-xl);
}
.play-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}
.play-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  z-index: 1;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  flex-direction: column;
  gap: 16px;
  color: #fff;
}
.play-loader.is-hidden { opacity: 0; visibility: hidden; }
.play-loader__ball {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 22px rgba(255, 255, 255, 0); }
  100% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.play-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.play-info__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  color: #fff;
  overflow: hidden;
}
.play-info__icon img { width: 100%; height: 100%; object-fit: cover; }
.play-info__name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--color-text);
  margin-bottom: 2px;
}
.play-info__sub { font-size: 12px; color: var(--color-text-muted); }
.play-info__btn { margin-left: auto; flex-shrink: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--gradient-night);
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 16px 24px;
  margin: 32px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 16px;
}
.footer__col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}
.footer__col p {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.footer__brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer__brand span { font-family: var(--font-display); font-size: 16px; color: #fff; }
.footer__list { display: flex; flex-direction: column; gap: 6px; }
.footer__list a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}
.footer__list a:hover { color: var(--color-secondary); }
.footer__bottom {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}
.footer__bottom a { color: var(--color-secondary); }

/* ==========================================================================
   List page toolbar
   ========================================================================== */
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  position: sticky;
  top: 56px;
  z-index: 20;
  background: var(--color-bg);
  padding: 8px 0;
}
.list-toolbar__select {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%238C8CA8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 28px;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: flex; flex-direction: column; gap: 12px; }
.form__group { display: flex; flex-direction: column; gap: 4px; }
.form__label { font-size: 12px; font-weight: 700; color: var(--color-text-soft); }
.form__input, .form__textarea {
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form__input:focus, .form__textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.16);
}
.form__textarea { min-height: 110px; resize: vertical; }

/* ==========================================================================
   Privacy / Terms / Contact
   ========================================================================== */
.legal { font-size: 14px; color: var(--color-text-soft); line-height: 1.7; }
.legal h2 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--color-text);
  margin: 22px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--color-primary);
}
.legal h2:first-child { margin-top: 4px; }
.legal h3 {
  font-size: 15px;
  color: var(--color-text);
  margin: 16px 0 6px;
  font-weight: 800;
}
.legal p { margin-bottom: 10px; }
.legal ul { padding-left: 20px; margin-bottom: 10px; }
.legal ul li { list-style: disc; margin-bottom: 4px; }
.legal a { color: var(--color-primary); font-weight: 700; }

/* ==========================================================================
   404
   ========================================================================== */
.error-page {
  text-align: center;
  padding: 40px 20px;
}
.error-page__code {
  font-family: var(--font-display);
  font-size: 80px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}
.error-page__title { font-family: var(--font-display); font-size: 22px; margin-bottom: 6px; }
.error-page__sub { color: var(--color-text-soft); margin-bottom: 18px; }

/* ==========================================================================
   Loading overlay (global)
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__ball {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.4);
  animation: pulse 1.4s ease-in-out infinite;
}
.loader__text {
  font-family: var(--font-display);
  color: var(--color-text);
  letter-spacing: 0.5px;
  font-size: 16px;
}

/* ==========================================================================
   Empty state
   ========================================================================== */
.empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--color-text-muted);
  font-size: 14px;
}
.empty__emoji { font-size: 40px; margin-bottom: 6px; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 12px; }
.mt-md { margin-top: 12px; }
.mt-lg { margin-top: 20px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 12px; }
.mb-lg { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-soft { color: var(--color-text-soft); }
.hidden { display: none !important; }

/* ==========================================================================
   Small screen (< 540px) — minor adjustments
   ========================================================================== */
@media (max-width: 539px) {
  .nav { padding: 8px 12px; }
  .nav__title { font-size: 16px; }
  .pill { padding: 5px 11px; font-size: 12px; }
  .nav__search { min-width: 70px; padding: 5px 8px; }
  main, .page, .container { padding: 0 12px; }
  .hero { padding: 24px 16px 28px; }
  .hero__title { font-size: 26px; }
  .hero__sub { font-size: 14px; }
  .section__title { font-size: 18px; }
  .card__name { font-size: 13px; }
  .card__sub { font-size: 11px; }
  .list-toolbar { top: 52px; }
  .detail-hero__title { font-size: 20px; }
  .detail-hero__icon { width: 80px; height: 80px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col:first-child { grid-column: span 2; }
  .ad-slot--billboard, .ad-slot--rectangle, .ad-slot--halfpage { min-height: 220px; }
}
