:root {
  --bg-top: #DDF2FF; --bg-mid: #F4F0FF; --bg-bot: #FFF7E8;
  --ink: #27224B; --ink-soft: #5B557E; --white: #FFFFFF;
  --shadow-soft: 0 14px 34px rgba(45, 34, 102, 0.12);
  --shadow-hover: 0 22px 44px rgba(45, 34, 102, 0.18);
  --radius-xl: 32px; --radius-pill: 999px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  font-family: 'Nunito', 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(165deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bot) 100%);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
  overflow-x: hidden; touch-action: manipulation;
}
.sky-backdrop { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.cloud { position: absolute; background: rgba(255,255,255,0.72); border-radius: 999px; filter: blur(0.5px); }
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud-1 { width: 170px; height: 54px; top: 6%; left: -30px; animation: drift 34s linear infinite; }
.cloud-1::before { width: 76px; height: 76px; top: -34px; left: 26px; }
.cloud-1::after { width: 56px; height: 56px; top: -22px; right: 26px; }
.cloud-2 { width: 140px; height: 46px; top: 18%; right: -20px; animation: driftReverse 42s linear infinite; opacity: 0.65; }
.cloud-2::before { width: 64px; height: 64px; top: -28px; left: 22px; }
.cloud-2::after { width: 48px; height: 48px; top: -18px; right: 20px; }
.sparkle-dot { position: absolute; border-radius: 50%; opacity: 0.5; animation: floatBob 6s ease-in-out infinite; }
.dot-1 { width: 18px; height: 18px; background: #FFD166; top: 14%; left: 22%; }
.dot-2 { width: 14px; height: 14px; background: #FF6B8B; top: 28%; right: 16%; animation-delay: 1.5s; }
.dot-3 { width: 22px; height: 22px; background: #6EE7B7; bottom: 18%; left: 10%; animation-delay: 3s; }
.dot-4 { width: 16px; height: 16px; background: #A78BFA; bottom: 24%; right: 12%; animation-delay: 2s; }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(60px); } }
@keyframes driftReverse { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-50px); } }
@keyframes floatBob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14px) scale(1.1); } }
.app-shell {
  position: relative; z-index: 1; max-width: 1140px; margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  min-height: 100dvh; display: flex; flex-direction: column;
}
.top-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.brand-lockup { display: flex; align-items: center; gap: 16px; }
.brand-badge {
  width: 68px; height: 68px; border-radius: 22px;
  background: linear-gradient(155deg, #4FACFE 0%, #7C5CFA 100%);
  box-shadow: 0 8px 0 #5639C9, 0 14px 26px rgba(92,65,214,0.28);
  display: grid; place-items: center; flex-shrink: 0; border: 4px solid #FFFFFF;
}
.brand-badge svg { width: 44px; height: 44px; }
.brand-text h1 { margin: 0; font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.05; font-weight: 700; color: var(--ink); }
.studio-byline {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 12px;
  border-radius: var(--radius-pill); background: rgba(255,255,255,0.82);
  border: 2px solid rgba(124,92,250,0.16); font-size: 14px; font-weight: 800; color: #5B46C6;
}
.icon-pill-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: var(--radius-pill); border: 3px solid #FFFFFF; background: rgba(255,255,255,0.9);
  color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
  box-shadow: 0 5px 0 #D6D3F0, 0 8px 18px rgba(45,34,102,0.1);
}
.icon-pill-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #D6D3F0; }
.icon-pill-btn[aria-pressed="false"] { opacity: 0.72; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-pill {
  min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill); border: 3px solid #FFFFFF;
  background: rgba(255,255,255,0.8); color: var(--ink-soft); font-family: inherit; font-size: 16px;
  font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 rgba(91,85,126,0.16);
}
.filter-pill.active { background: linear-gradient(180deg, #5BB8FF 0%, #3B82F6 100%); color: #FFFFFF; box-shadow: 0 4px 0 #1D4ED8; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 26px; align-items: stretch; }
@media (min-width: 740px) and (max-width: 1180px) { .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
.game-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-xl);
  background: var(--white); border: 5px solid #FFFFFF; box-shadow: var(--shadow-soft);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease; user-select: none;
}
.game-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow-hover); }
.game-card:active { transform: translateY(2px) scale(0.985); }
.card-stage { position: relative; padding: 18px 18px 8px; display: flex; align-items: center; justify-content: center; min-height: 225px; overflow: hidden; }
.card-svg { width: 100%; max-width: 340px; height: auto; display: block; filter: drop-shadow(0 8px 14px rgba(45,34,102,0.1)); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.game-card:hover .card-svg { transform: scale(1.05) translateY(-3px); }
.card-badges { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.badge-chip { padding: 6px 13px; border-radius: var(--radius-pill); background: rgba(255,255,255,0.92); font-size: 13px; font-weight: 900; box-shadow: 0 4px 10px rgba(45,34,102,0.1); }
.recent-chip { padding: 6px 12px; border-radius: var(--radius-pill); background: #FEF08A; color: #854D0E; font-size: 12px; font-weight: 900; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; gap: 10px; background: #FFFFFF; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-title { margin: 0; font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-size: clamp(24px, 2.6vw, 29px); font-weight: 700; color: var(--ink); }
.age-chip { padding: 5px 11px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 800; white-space: nowrap; }
.card-tagline { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 700; color: var(--ink-soft); flex: 1; }
.play-cta { margin-top: 8px; min-height: 56px; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #FFFFFF; font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-size: 21px; font-weight: 700; }
.play-cta svg { width: 22px; height: 22px; }
.coming-soon-card { border: 4px dashed rgba(124,92,250,0.28); border-radius: var(--radius-xl); background: rgba(255,255,255,0.56); padding: 28px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; min-height: 260px; }
.coming-soon-icon { width: 74px; height: 74px; border-radius: 24px; background: linear-gradient(145deg, #FEF08A, #FDBA74); display: grid; place-items: center; font-size: 36px; }
.coming-soon-card h3 { margin: 0; font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-size: 24px; color: var(--ink); }
.coming-soon-card p { margin: 0; max-width: 260px; font-size: 15px; font-weight: 700; color: var(--ink-soft); line-height: 1.45; }
.pwa-tip { margin-top: 26px; padding: 14px 18px; border-radius: 22px; background: rgba(255,255,255,0.85); border: 3px solid #FFFFFF; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pwa-tip[hidden] { display: none; }
.pwa-tip-text { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 800; color: var(--ink); }
.pwa-tip-actions { display: flex; align-items: center; gap: 8px; }
.pwa-install-btn { min-height: 42px; padding: 0 18px; border-radius: var(--radius-pill); border: none; background: linear-gradient(180deg, #34D399 0%, #10B981 100%); color: #FFFFFF; font-family: inherit; font-size: 15px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #047857; }
.pwa-dismiss-btn { min-height: 42px; padding: 0 14px; border-radius: var(--radius-pill); border: none; background: rgba(91,85,126,0.12); color: var(--ink-soft); font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.site-footer { margin-top: auto; padding-top: 28px; text-align: center; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
