/* =====================================================================
   Dodo Five Funs — Global Design System
   Cute animal / playful style, mobile-first, max-width 480px
   Author: UI Designer (ui agent)
   ===================================================================== */


/* =====================================================================
   1. FONT IMPORTS
   - Fredoka One: display/headlines
   - Nunito: body copy (400 / 600 / 800 weights)
   - System fallbacks if Google Fonts is blocked
   ===================================================================== */

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


/* =====================================================================
   2. DESIGN TOKENS (CSS Custom Properties)
   Every visual value in the project should reference one of these.
   ===================================================================== */

:root {
  /* ---- Color palette ---- */
  --pink:        #FF6B9D;
  --pink-soft:   #FFB3D1;
  --pink-deep:   #E84393;
  --purple:      #6C5CE7;
  --purple-soft: #A29BFE;
  --purple-deep: #4834D4;
  --bg:          #FFF5F8;
  --bg-card:     #FFFFFF;
  --bg-soft:     #FFF0F6;
  --ink:         #1A1A2E;
  --ink-soft:    #4A4A6A;
  --ink-mute:    #8A8AA8;
  --gold:        #FFC93C;
  --gold-soft:   #FFE082;
  --mint:        #4ECDC4;
  --mint-soft:   #80EEDC;
  --coral:       #FF7675;
  --sky:         #74B9FF;
  --lemon:       #FDCB6E;
  --line:        #F0D9E4;
  --line-soft:   #FBEEF4;
  --white:       #FFFFFF;
  --black:       #000000;
  --shadow-rgb:  26, 26, 46;     /* used in rgba() */

  /* ---- Gradients ---- */
  --grad-hero:    linear-gradient(135deg, #FF6B9D 0%, #6C5CE7 100%);
  --grad-pink:    linear-gradient(135deg, #FF6B9D 0%, #FFB3D1 100%);
  --grad-purple:  linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
  --grad-sunny:   linear-gradient(135deg, #FFC93C 0%, #FF7675 100%);
  --grad-mint:    linear-gradient(135deg, #4ECDC4 0%, #74B9FF 100%);
  --grad-card:    linear-gradient(160deg, #FFFFFF 0%, #FFF5F8 100%);
  --grad-cta:     linear-gradient(135deg, #FF6B9D 0%, #FF8FB1 50%, #6C5CE7 100%);
  --grad-text:    linear-gradient(135deg, #FF6B9D 0%, #6C5CE7 100%);

  /* ---- Typography ---- */
  --font-display: 'Fredoka One', 'Fredoka', 'Baloo 2', 'Comic Sans MS', system-ui, sans-serif;
  --font-display-soft: 'Fredoka', 'Fredoka One', 'Baloo 2', 'Comic Sans MS', system-ui, sans-serif;
  --font-body:    'Nunito', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'SFMono-Regular', Menlo, Consolas, monospace;

  /* ---- Type scale (mobile-first) ---- */
  --fs-xs:    12px;
  --fs-sm:    13px;
  --fs-base:  15px;
  --fs-md:    16px;
  --fs-lg:    18px;
  --fs-xl:    22px;
  --fs-2xl:   28px;
  --fs-3xl:   34px;
  --fs-4xl:   42px;
  --fs-display: 48px;

  --lh-tight: 1.15;
  --lh-snug:  1.3;
  --lh-base:  1.55;
  --lh-loose: 1.75;

  --fw-regular: 400;
  --fw-semi:    600;
  --fw-bold:    700;
  --fw-black:   800;

  /* ---- Spacing scale ---- */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  32px;
  --sp-8:  40px;
  --sp-9:  48px;
  --sp-10: 64px;

  /* ---- Radii ---- */
  --r-xs:   6px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  24px;
  --r-3xl:  32px;
  --r-pill: 999px;
  --r-circle: 50%;

  /* ---- Shadows (soft, colorful, playful) ---- */
  --shadow-xs:  0 1px 2px rgba(var(--shadow-rgb), 0.06);
  --shadow-sm:  0 2px 6px rgba(var(--shadow-rgb), 0.08);
  --shadow-md:  0 6px 16px rgba(var(--shadow-rgb), 0.10);
  --shadow-lg:  0 12px 28px rgba(var(--shadow-rgb), 0.14);
  --shadow-xl:  0 20px 40px rgba(var(--shadow-rgb), 0.18);
  --shadow-pink:  0 8px 24px rgba(255, 107, 157, 0.35);
  --shadow-purple: 0 8px 24px rgba(108, 92, 231, 0.35);
  --shadow-gold:   0 6px 18px rgba(255, 201, 60, 0.45);
  --shadow-inset: inset 0 2px 4px rgba(var(--shadow-rgb), 0.06);

  /* ---- Borders ---- */
  --bw:        2px;
  --bw-thick:  3px;
  --bw-dashed: 2px;
  --border-card: var(--bw) solid var(--line);
  --border-dashed: var(--bw-dashed) dashed var(--purple-soft);

  /* ---- Motion timings ---- */
  --dur-instant: 100ms;
  --dur-fast:    200ms;
  --dur-base:    400ms;
  --dur-slow:    800ms;
  --dur-page:    2000ms;
  --dur-loop:    4000ms;

  /* ---- Easings ---- */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce:  cubic-bezier(0.68, -0.55, 0.27, 1.55);
  --ease-soft:    cubic-bezier(0.4, 0, 0.2, 1);

  /* ---- Layout ---- */
  --frame-max:    480px;
  --header-h:     64px;
  --bottom-nav-h: 72px;
  --content-pad:  16px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);

  /* ---- Z-index scale ---- */
  --z-base:    1;
  --z-card:    10;
  --z-sticky:  50;
  --z-nav:     100;
  --z-toast:   200;
  --z-modal:   300;
  --z-tooltip: 400;
}


/* =====================================================================
   3. CSS RESET / BASE
   ===================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  color: var(--ink);
}

p {
  margin: 0;
}

::selection {
  background: var(--pink-soft);
  color: var(--ink);
}


/* =====================================================================
   4. APP FRAME
   - 480px centered on PC, full-width on mobile
   - Soft shadow + rounded corner on PC, no rounding on real mobile
   ===================================================================== */

.app-frame {
  width: 100%;
  max-width: var(--frame-max);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  padding-bottom: calc(var(--bottom-nav-h) + var(--sp-6) + var(--safe-bottom));
}

@media (min-width: 768px) {
  body {
    background: linear-gradient(135deg, #FFE4F0 0%, #E4DBFF 50%, #D9F2FF 100%);
    background-attachment: fixed;
    padding: var(--sp-6) 0;
  }
  .app-frame {
    min-height: calc(100vh - var(--sp-9));
    border-radius: var(--r-3xl);
    box-shadow: var(--shadow-xl);
  }
}

@media (min-width: 1024px) {
  body {
    padding: var(--sp-9) 0;
  }
  .app-frame {
    min-height: calc(100vh - var(--sp-10));
  }
}


/* =====================================================================
   5. CONTAINER / SECTION
   ===================================================================== */

.container {
  width: 100%;
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

.section {
  padding: var(--sp-6) 0;
  position: relative;
}

.section--tight {
  padding: var(--sp-4) 0;
}

.section--loose {
  padding: var(--sp-8) 0;
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--ink);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.section__title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--pink-soft), transparent);
  margin-left: var(--sp-3);
  border-radius: var(--r-pill);
}

.section__subtitle {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  margin-top: -8px;
  margin-bottom: var(--sp-4);
}

.section__divider {
  text-align: center;
  margin: var(--sp-6) 0;
  color: var(--pink);
  font-size: var(--fs-lg);
  letter-spacing: 8px;
}


/* =====================================================================
   6. HEADER
   ===================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--header-h);
  background: var(--grad-hero);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-pad);
  box-shadow: var(--shadow-md);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  color: var(--white);
}

.site-header__logo {
  font-size: var(--fs-2xl);
  animation: ball-bounce 2s var(--ease-bounce) infinite;
  display: inline-block;
}

.site-header__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.site-header__title em {
  font-style: normal;
  color: var(--gold);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.site-header__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-circle);
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  backdrop-filter: blur(8px);
}

.site-header__icon-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.site-header__icon-btn:active {
  transform: scale(0.94);
}


/* =====================================================================
   7. HERO
   ===================================================================== */

.hero {
  position: relative;
  padding: var(--sp-7) var(--content-pad) var(--sp-9);
  background: var(--grad-hero);
  color: var(--white);
  text-align: center;
  overflow: hidden;
  border-radius: 0 0 var(--r-3xl) var(--r-3xl);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 201, 60, 0.20) 0%, transparent 45%);
  pointer-events: none;
  animation: gradient-shift 8s ease-in-out infinite alternate;
}

.hero__eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-3);
  backdrop-filter: blur(6px);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-3);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 2;
}

.hero__title span {
  display: inline-block;
  color: var(--gold);
  animation: pulse 2s var(--ease-in-out) infinite;
}

.hero__subtitle {
  font-size: var(--fs-md);
  font-weight: var(--fw-semi);
  opacity: 0.95;
  margin-bottom: var(--sp-5);
  position: relative;
  z-index: 2;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--white);
  color: var(--pink);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  padding: 12px 28px;
  border-radius: var(--r-pill);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: transform var(--dur-fast) var(--ease-bounce), box-shadow var(--dur-fast) var(--ease-out);
  position: relative;
  z-index: 2;
}

.hero__cta:hover {
  transform: translateY(-3px) scale(1.04);
  color: var(--purple);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.hero__cta:active {
  transform: translateY(0) scale(0.98);
}

/* Decorative floating emoji inside hero */
.hero__float {
  position: absolute;
  font-size: 36px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.18));
  pointer-events: none;
  z-index: 1;
}

.hero__float--panda {
  top: 20%;
  left: 8%;
  animation: float-y 4s var(--ease-in-out) infinite;
}

.hero__float--fox {
  top: 35%;
  right: 10%;
  animation: float-y 5s var(--ease-in-out) infinite 0.5s;
}

.hero__float--bunny {
  bottom: 18%;
  left: 18%;
  font-size: 30px;
  animation: float-y 4.5s var(--ease-in-out) infinite 1s;
}

.hero__float--star {
  top: 14%;
  right: 22%;
  font-size: 24px;
  color: var(--gold);
  animation: float-y 3.5s var(--ease-in-out) infinite 0.2s;
}

.hero__float--heart {
  bottom: 28%;
  right: 14%;
  font-size: 22px;
  color: var(--gold-soft);
  animation: float-y 5.5s var(--ease-in-out) infinite 1.5s;
}


/* =====================================================================
   8. CATEGORY ROW (horizontal scroll pills)
   ===================================================================== */

.category-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--content-pad);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  border-radius: var(--r-pill);
  border: var(--bw) solid var(--line);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  scroll-snap-align: start;
  white-space: nowrap;
}

.category-pill:hover {
  border-color: var(--pink);
  color: var(--pink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.category-pill--active,
.category-pill.is-active {
  background: var(--grad-cta);
  color: var(--white);
  border-color: transparent;
  box-shadow: var(--shadow-pink);
}

.category-pill__icon {
  font-size: var(--fs-md);
  line-height: 1;
}


/* =====================================================================
   9. GAME GRID + GAME CARD
   ===================================================================== */

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  padding: 0 var(--content-pad);
}

@media (max-width: 360px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}

.game-card {
  background: var(--grad-card);
  border-radius: var(--r-xl);
  border: var(--bw) solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  text-decoration: none;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-bounce), box-shadow var(--dur-base) var(--ease-out);
  cursor: pointer;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-cta);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.game-card:hover,
.game-card.is-hovered {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--pink-soft);
}

.game-card:hover::before,
.game-card.is-hovered::before {
  opacity: 1;
}

.game-card:active {
  transform: translateY(-2px) scale(0.98);
}

.game-card__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--grad-sunny);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  overflow: hidden;
  box-shadow: var(--shadow-inset);
}

.game-card__thumb--pink    { background: var(--grad-pink); }
.game-card__thumb--purple  { background: var(--grad-purple); }
.game-card__thumb--mint    { background: var(--grad-mint); }
.game-card__thumb--sunny   { background: var(--grad-sunny); }

.game-card__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--gold);
  color: var(--ink);
  font-size: 10px;
  font-weight: var(--fw-black);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-gold);
}

.game-card__badge--hot {
  background: var(--coral);
  color: var(--white);
}

.game-card__badge--new {
  background: var(--mint);
  color: var(--white);
}

.game-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: var(--lh-snug);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.game-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  font-weight: var(--fw-semi);
}

.game-card__plays {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}


/* =====================================================================
   10. STAR RATING
   ===================================================================== */

.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--fs-sm);
  line-height: 1;
}

.star-rating__star {
  color: var(--line);
  font-size: 1em;
  transition: color var(--dur-fast) var(--ease-out);
}

.star-rating__star--filled,
.star-rating__star.is-filled {
  color: var(--gold);
  text-shadow: 0 1px 2px rgba(255, 201, 60, 0.4);
}

.star-rating__star--half {
  background: linear-gradient(90deg, var(--gold) 50%, var(--line) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.star-rating__value {
  margin-left: 4px;
  color: var(--ink-soft);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
}

.star-rating--sm { font-size: var(--fs-xs); }
.star-rating--md { font-size: var(--fs-sm); }
.star-rating--lg { font-size: var(--fs-lg); }


/* =====================================================================
   11. BUTTONS
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  letter-spacing: 0.3px;
  cursor: pointer;
  border: var(--bw) solid transparent;
  transition: transform var(--dur-fast) var(--ease-bounce),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--sm  { padding: 8px 16px;  font-size: var(--fs-sm); }
.btn--md  { padding: 12px 22px; font-size: var(--fs-md); }
.btn--lg  { padding: 16px 28px; font-size: var(--fs-lg); }
.btn--block { display: flex; width: 100%; }

.btn-primary {
  background: var(--grad-cta);
  color: var(--white);
  box-shadow: var(--shadow-pink);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 107, 157, 0.5);
  color: var(--white);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--white);
  color: var(--purple);
  border-color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--purple);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--pink);
  border-color: var(--pink-soft);
}

.btn-ghost:active {
  transform: scale(0.98);
}


/* =====================================================================
   12. FORMS
   ===================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--sp-4);
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--ink-soft);
  padding-left: 4px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: var(--fs-md);
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--ink-mute);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--pink);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: var(--lh-base);
}

.form-help {
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  padding-left: 4px;
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--coral);
  font-weight: var(--fw-bold);
  padding-left: 4px;
  display: none;
}

.form-group.has-error .form-input,
.form-group.has-error .form-textarea {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 118, 117, 0.15);
}

.form-group.has-error .form-error {
  display: block;
}


/* =====================================================================
   13. COMMENT
   ===================================================================== */

.comment-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: 0 var(--content-pad);
}

.comment {
  display: flex;
  gap: var(--sp-3);
  background: var(--bg-card);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.comment:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}

.comment__avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-circle);
  background: var(--grad-sunny);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-inset);
}

.comment__avatar--pink    { background: var(--grad-pink); }
.comment__avatar--purple  { background: var(--grad-purple); }
.comment__avatar--mint    { background: var(--grad-mint); }
.comment__avatar--sunny   { background: var(--grad-sunny); }

.comment__body {
  flex: 1;
  min-width: 0;
}

.comment__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.comment__name {
  font-family: var(--font-display-soft);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--ink);
}

.comment__date {
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  margin-left: auto;
}

.comment__text {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-base);
  word-wrap: break-word;
}


/* =====================================================================
   14. BOTTOM NAV (fixed)
   ===================================================================== */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-top: var(--bw) solid var(--line);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  z-index: var(--z-nav);
  box-shadow: 0 -4px 18px rgba(var(--shadow-rgb), 0.06);
}

@media (min-width: 768px) {
  .bottom-nav {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: var(--frame-max);
    max-width: calc(100vw - var(--sp-9));
    border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  }
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-mute);
  text-decoration: none;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding: 8px 0;
  position: relative;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.bottom-nav__item:hover {
  color: var(--pink);
  transform: translateY(-2px);
}

.bottom-nav__icon {
  font-size: 22px;
  line-height: 1;
  transition: transform var(--dur-fast) var(--ease-bounce);
}

.bottom-nav__item:hover .bottom-nav__icon {
  transform: scale(1.15);
}

.bottom-nav__item.is-active,
.bottom-nav__item--active {
  color: var(--pink);
}

.bottom-nav__item.is-active::before,
.bottom-nav__item--active::before {
  content: '';
  position: absolute;
  top: 6px;
  width: 28px;
  height: 4px;
  background: var(--grad-cta);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-pink);
  animation: pulse 2s var(--ease-in-out) infinite;
}


/* =====================================================================
   15. LOADER (pulsing ball)
   ===================================================================== */

.loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  background: var(--grad-hero);
  color: var(--white);
  z-index: var(--z-modal);
  text-align: center;
  padding: var(--sp-6);
  transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base) var(--ease-out);
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__ball {
  width: 64px;
  height: 64px;
  border-radius: var(--r-circle);
  background: var(--grad-sunny);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), inset -8px -8px 16px rgba(0, 0, 0, 0.15);
  animation: ball-bounce 1.2s var(--ease-in-out) infinite, pulse 2s var(--ease-in-out) infinite;
  position: relative;
}

.loader__ball::after {
  content: '';
  position: absolute;
  top: 14%;
  left: 18%;
  width: 22%;
  height: 22%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--r-circle);
  filter: blur(2px);
}

.loader__text {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: pulse 1.5s var(--ease-in-out) infinite;
}

.loader__sub {
  font-size: var(--fs-sm);
  opacity: 0.85;
  font-weight: var(--fw-semi);
}

.loader--inline {
  position: relative;
  inset: auto;
  min-height: 200px;
  background: transparent;
  color: var(--pink);
}

.loader--inline .loader__ball {
  width: 40px;
  height: 40px;
}


/* =====================================================================
   16. PARTICLES (floating emoji backdrop)
   ===================================================================== */

.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  bottom: -40px;
  font-size: 22px;
  opacity: 0.6;
  animation: particle-rise linear infinite;
  will-change: transform, opacity;
}

.particle--lg { font-size: 32px; opacity: 0.45; }
.particle--sm { font-size: 16px; opacity: 0.75; }

.particle--p1  { left:  4%; animation-duration: 14s; animation-delay:  0s; }
.particle--p2  { left: 14%; animation-duration: 18s; animation-delay: -3s; }
.particle--p3  { left: 24%; animation-duration: 12s; animation-delay: -6s; }
.particle--p4  { left: 34%; animation-duration: 20s; animation-delay: -1s; }
.particle--p5  { left: 44%; animation-duration: 16s; animation-delay: -8s; }
.particle--p6  { left: 54%; animation-duration: 22s; animation-delay: -4s; }
.particle--p7  { left: 64%; animation-duration: 13s; animation-delay: -10s; }
.particle--p8  { left: 74%; animation-duration: 19s; animation-delay: -2s; }
.particle--p9  { left: 84%; animation-duration: 15s; animation-delay: -7s; }
.particle--p10 { left: 94%; animation-duration: 17s; animation-delay: -5s; }


/* =====================================================================
   17. AD SLOT
   ===================================================================== */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  margin: var(--sp-5) var(--content-pad);
  padding: var(--sp-4);
  background: repeating-linear-gradient(
    45deg,
    var(--bg-soft),
    var(--bg-soft) 12px,
    var(--bg-card) 12px,
    var(--bg-card) 24px
  );
  border: var(--border-dashed);
  border-radius: var(--r-lg);
  color: var(--ink-mute);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.ad-slot::before {
  content: 'Ad';
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--purple-soft);
  color: var(--white);
  font-size: 9px;
  font-weight: var(--fw-black);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  letter-spacing: 0.5px;
}

.ad-slot--sm { min-height: 90px;  margin: var(--sp-3) var(--content-pad); }
.ad-slot--md { min-height: 250px; }
.ad-slot--lg { min-height: 600px; }

.ad-slot__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink-mute);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
  text-transform: none;
  letter-spacing: 0;
}

.ad-slot__placeholder-icon {
  font-size: 28px;
  opacity: 0.6;
}


/* =====================================================================
   18. TOAST / NOTIFICATION
   ===================================================================== */

.toast {
  position: fixed;
  top: calc(var(--header-h) + var(--sp-3));
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: var(--z-toast);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-bounce),
              visibility var(--dur-base) var(--ease-out);
  max-width: calc(var(--frame-max) - var(--sp-7));
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast--success { background: linear-gradient(135deg, var(--mint), var(--mint-soft)); }
.toast--error   { background: linear-gradient(135deg, var(--coral), #FFA8A8); }
.toast--info    { background: var(--grad-cta); }
.toast__icon {
  font-size: var(--fs-md);
}


/* =====================================================================
   19. FOOTER
   ===================================================================== */

.site-footer {
  background: var(--white);
  border-top: var(--bw) solid var(--line);
  padding: var(--sp-6) var(--content-pad) var(--sp-7);
  text-align: center;
  margin-top: var(--sp-7);
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--ink);
  margin-bottom: var(--sp-2);
}

.site-footer__brand span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-footer__tag {
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  margin-bottom: var(--sp-4);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.site-footer__link {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.site-footer__link:hover {
  background: var(--bg-soft);
  color: var(--pink);
}

.site-footer__copy {
  font-size: var(--fs-xs);
  color: var(--ink-mute);
  margin-top: var(--sp-3);
}

.site-footer__emojis {
  font-size: var(--fs-md);
  letter-spacing: 6px;
  margin: var(--sp-2) 0;
  opacity: 0.7;
}


/* =====================================================================
   20. DETAIL PAGE LAYOUT HELPERS
   ===================================================================== */

.game-hero {
  position: relative;
  background: var(--grad-sunny);
  border-radius: 0 0 var(--r-3xl) var(--r-3xl);
  padding: var(--sp-7) var(--content-pad) var(--sp-6);
  text-align: center;
  overflow: hidden;
  color: var(--white);
}

.game-hero__icon {
  font-size: 80px;
  display: inline-block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
  animation: float-y 3s var(--ease-in-out) infinite;
}

.game-hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  margin: var(--sp-3) 0 var(--sp-2);
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.game-hero__subtitle {
  font-size: var(--fs-md);
  font-weight: var(--fw-semi);
  opacity: 0.95;
  margin-bottom: var(--sp-3);
}

.game-hero__meta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0 var(--content-pad);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-card);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  transition: all var(--dur-fast) var(--ease-out);
}

.tag:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--white);
  transform: translateY(-1px);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: 0 var(--content-pad);
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: var(--bg-card);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  border: var(--bw) solid var(--line);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-base);
}

.steps-list li::before {
  content: counter(step);
  counter-increment: step;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--r-circle);
  background: var(--grad-cta);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps-list {
  counter-reset: step;
}

.description-block {
  background: var(--bg-card);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin: 0 var(--content-pad);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-loose);
}


/* =====================================================================
   21. GAME PLAY PAGE (iframe host)
   ===================================================================== */

.play-screen {
  position: relative;
  width: 100%;
  height: 100vh;
  background: var(--ink);
  overflow: hidden;
}

.play-screen__iframe {
  width: 100%;
  height: calc(100vh - 60px);
  border: 0;
  display: block;
}

.play-screen__bar {
  height: 60px;
  background: var(--grad-hero);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-pad);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--fs-md);
}

.play-screen__back {
  color: var(--white);
  text-decoration: none;
  font-size: var(--fs-md);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* =====================================================================
   22. 404 PAGE
   ===================================================================== */

.error-page {
  text-align: center;
  padding: var(--sp-9) var(--content-pad);
}

.error-page__emoji {
  font-size: 96px;
  display: inline-block;
  animation: float-y 2s var(--ease-in-out) infinite;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin: var(--sp-3) 0;
}

.error-page__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-2);
}

.error-page__text {
  color: var(--ink-soft);
  margin-bottom: var(--sp-5);
}


/* =====================================================================
   23. KEYFRAMES (Motion Vocabulary)
   ===================================================================== */

@keyframes float-y {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.06); opacity: 0.92; }
}

@keyframes ball-bounce {
  0%, 100% { transform: translateY(0)   scale(1, 1);    animation-timing-function: var(--ease-in-out); }
  30%      { transform: translateY(-26px) scale(0.92, 1.05); animation-timing-function: var(--ease-in-out); }
  55%      { transform: translateY(0)   scale(1.05, 0.92); animation-timing-function: var(--ease-in-out); }
  80%      { transform: translateY(-8px) scale(0.97, 1.03); animation-timing-function: var(--ease-in-out); }
}

@keyframes gradient-shift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

@keyframes particle-rise {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(-50vh) rotate(180deg) scale(1);
    opacity: 0.8;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg) scale(0.6);
    opacity: 0;
  }
}

@keyframes scroll-reveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hover-lift {
  0%   { transform: translateY(0)    scale(1); }
  100% { transform: translateY(-6px) scale(1.02); }
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes spin-slow {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-6deg); }
  75%      { transform: rotate(6deg);  }
}


/* =====================================================================
   24. SCROLL-REVEAL (data-attribute based, no JS)
   ===================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}


/* =====================================================================
   25. UTILITY CLASSES
   ===================================================================== */

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { flex-direction: column; }
.gap-1       { gap: var(--sp-1); }
.gap-2       { gap: var(--sp-2); }
.gap-3       { gap: var(--sp-3); }
.gap-4       { gap: var(--sp-4); }
.mt-2        { margin-top: var(--sp-2); }
.mt-3        { margin-top: var(--sp-3); }
.mt-4        { margin-top: var(--sp-4); }
.mb-2        { margin-bottom: var(--sp-2); }
.mb-3        { margin-bottom: var(--sp-3); }
.mb-4        { margin-bottom: var(--sp-4); }
.mb-5        { margin-bottom: var(--sp-5); }

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

.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.marquee__track {
  display: flex;
  gap: var(--sp-5);
  flex-shrink: 0;
  animation: marquee 30s linear infinite;
  padding-right: var(--sp-5);
}

.spin-slow {
  animation: spin-slow 16s linear infinite;
}

.shimmer {
  background: linear-gradient(90deg, var(--line-soft) 0%, var(--line) 50%, var(--line-soft) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}


/* =====================================================================
   26. RESPONSIVE BREAKPOINTS
   - Default: mobile-first (<= 480px)
   - 768px: tablet (centered app frame)
   - 1024px: desktop (more padding)
   ===================================================================== */

@media (min-width: 480px) {
  :root {
    --content-pad: 20px;
  }
  .hero__title { font-size: var(--fs-4xl); }
  .section__title { font-size: var(--fs-2xl); }
}

@media (min-width: 768px) {
  :root {
    --content-pad: 24px;
  }
  .hero {
    padding: var(--sp-8) var(--content-pad) var(--sp-9);
  }
  .game-card__title { font-size: var(--fs-md); }
  .game-card__thumb { font-size: 72px; }
}

@media (min-width: 1024px) {
  :root {
    --content-pad: 28px;
  }
  .hero__title { font-size: var(--fs-display); }
}


/* =====================================================================
   27. REDUCED MOTION
   Honor user preference. Disable transforms / keyframe animations.
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}


/* =====================================================================
   28. PRINT
   ===================================================================== */

@media print {
  .site-header,
  .bottom-nav,
  .particles,
  .ad-slot,
  .loader,
  .toast {
    display: none !important;
  }
  .app-frame {
    box-shadow: none;
  }
  body {
    background: white;
  }
}


/* =====================================================================
   29. END OF FILE
   ===================================================================== */
