/* ════════════════════════════════════════════════════
   MILO & WILLOW — Kids CSS
   Extra playful styles for kids.miloandwillow.com
   ════════════════════════════════════════════════════ */

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

:root {
  --navy:   #1B4F8A;
  --blue:   #42B8EC;
  --yellow: #FFE020;
  --green:  #6BCB77;
  --coral:  #FF6B6B;
  --purple: #A855F7;
  --orange: #FF9500;
  --pink:   #FF69B4;
  --teal:   #20C997;
  --bg:     #EFF8FF;
  --white:  #FFFFFF;
  --text:   #1B3A5C;
  --radius: 24px;
  --header-h: 120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Star cursor trail ── */
@keyframes star-fade {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(2); }
}
.star-trail {
  position: fixed; pointer-events: none; z-index: 9999;
  animation: star-fade .5s forwards;
  font-size: 20px;
}

/* ══════════════════════════════
   KIDS HEADER
   ══════════════════════════════ */
.kids-header {
  position: sticky; top: 0; z-index: 200;
  height: var(--header-h);
  background: linear-gradient(135deg, #1B4F8A 0%, #42B8EC 100%);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 12px;
  box-shadow: 0 4px 24px rgba(27,79,138,.4);
}

.kids-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
}
.kids-logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
  animation: wobble 3s ease-in-out infinite;
}
@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}
.kids-logo-badge {
  background: var(--green);
  color: var(--navy);
  font-size: 13px; font-weight: 900;
  padding: 3px 12px; border-radius: 20px;
  align-self: center;
}

.kids-nav {
  display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: none; flex: 1;
}
.kids-nav::-webkit-scrollbar { display: none; }

.kids-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 18px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  border-radius: 18px;
  transition: all .2s;
  white-space: nowrap; flex-shrink: 0;
}
.kids-nav a .nav-icon { font-size: 26px; }
.kids-nav a:hover,
.kids-nav a.active {
  background: rgba(255,255,255,.22);
  color: #fff;
  transform: translateY(-2px);
}
.kids-nav a.active { background: var(--yellow); color: var(--navy); }

.kids-header-right {
  margin-left: auto; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}

/* ══════════════════════════════
   KIDS HERO
   ══════════════════════════════ */
.kids-hero {
  position: relative;
  background: linear-gradient(150deg, #1B4F8A 0%, #42B8EC 70%, #6BCB77 100%);
  padding: 60px 32px;
  text-align: center;
  overflow: hidden;
}
.kids-hero h1 {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(40px, 8vw, 80px);
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 4px 20px rgba(0,0,0,.2), 4px 4px 0 rgba(0,0,0,.1);
  margin-bottom: 12px;
}
.kids-hero h1 .yellow { color: var(--yellow); }
.kids-hero p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(255,255,255,.9);
  font-weight: 700;
  margin-bottom: 32px;
}
.kids-hero-tiles {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; max-width: 800px; margin: 0 auto;
}

/* ══════════════════════════════
   KIDS NAV TILES
   ══════════════════════════════ */
.kids-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: rgba(255,255,255,.92);
  border-radius: 24px;
  padding: 22px 28px;
  text-decoration: none;
  min-width: 120px;
  transition: all .25s;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border: 3px solid transparent;
}
.kids-tile:hover {
  transform: translateY(-8px) scale(1.05);
  border-color: var(--yellow);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.kids-tile-icon { font-size: 40px; }
.kids-tile-label {
  font-family: 'Luckiest Guy', cursive;
  font-size: 14px;
  color: var(--navy);
  letter-spacing: .5px;
  text-align: center;
}

/* ══════════════════════════════
   KIDS PAGE SECTIONS
   ══════════════════════════════ */
.kids-section { padding: 48px 24px; }

.kids-section-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(28px, 5vw, 48px);
  color: var(--navy);
  letter-spacing: 1.5px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
}
.kids-section-title::after {
  content: '';
  display: block;
  width: 80px; height: 6px;
  background: var(--yellow);
  border-radius: 3px;
  margin: 10px auto 0;
}

/* Video cards */
.kids-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1100px; margin: 0 auto;
}

.kids-ep-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transition: all .25s;
  text-decoration: none;
  display: flex; flex-direction: column;
  border: 3px solid transparent;
}
.kids-ep-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  border-color: var(--yellow);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.kids-ep-thumb {
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  position: relative;
}
.kids-ep-thumb .play-btn {
  position: absolute;
  width: 44px; height: 44px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  transition: transform .2s;
}
.kids-ep-card:hover .play-btn { transform: scale(1.2); }
.kids-ep-body { padding: 14px; }
.kids-ep-num {
  font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--blue); margin-bottom: 4px;
}
.kids-ep-title { font-weight: 900; font-size: 14px; color: var(--text); }

/* Color-coded episode backgrounds */
.ep-bg-1  { background: linear-gradient(135deg, #42B8EC, #1B4F8A); }
.ep-bg-2  { background: linear-gradient(135deg, #FFE020, #FF9500); }
.ep-bg-3  { background: linear-gradient(135deg, #6BCB77, #20C997); }
.ep-bg-4  { background: linear-gradient(135deg, #A855F7, #6C3DE0); }
.ep-bg-5  { background: linear-gradient(135deg, #FF6B6B, #FF4500); }
.ep-bg-6  { background: linear-gradient(135deg, #FF69B4, #C71585); }

/* ══════════════════════════════
   GAMES SECTION
   ══════════════════════════════ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1000px; margin: 0 auto;
}

.game-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
  transition: all .25s;
  cursor: pointer;
  border: 3px solid transparent;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--yellow);
  box-shadow: 0 20px 48px rgba(0,0,0,.15);
}
.game-banner {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  position: relative;
}
.game-body { padding: 22px; }
.game-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: 24px; color: var(--navy);
  letter-spacing: .5px; margin-bottom: 6px;
}
.game-desc { font-size: 14px; color: var(--muted); font-weight: 600; line-height: 1.5; margin-bottom: 16px; }
.btn-play-game {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 22px;
  font-family: 'Luckiest Guy', cursive;
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
}
.btn-play-game:hover { background: var(--blue); transform: scale(1.05); }

/* Memory game grid */
.memory-game {
  display: none;
  max-width: 600px; margin: 32px auto 0;
  text-align: center;
}
.memory-game.active { display: block; }
.memory-stats {
  display: flex; gap: 24px; justify-content: center; margin-bottom: 24px;
}
.mem-stat {
  background: #fff;
  border-radius: 12px; padding: 12px 20px;
  font-weight: 900; font-size: 16px; color: var(--navy);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.mem-stat span { color: var(--blue); font-size: 22px; }
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.mem-card {
  aspect-ratio: 1;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  cursor: pointer;
  transition: all .3s;
  border: 3px solid transparent;
  user-select: none;
}
.mem-card.face-down .card-content { opacity: 0; }
.mem-card.face-up { background: #fff; border-color: var(--blue); }
.mem-card.matched { background: linear-gradient(135deg, var(--green), #3cbf6e); border-color: var(--green); animation: matched-pop .4s; }
@keyframes matched-pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* Tic Tac Toe */
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 280px; margin: 0 auto;
}
.ttt-cell {
  aspect-ratio: 1;
  background: #fff;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border: 3px solid #E2E8F0;
}
.ttt-cell:hover:empty { background: var(--bg); border-color: var(--blue); }
.ttt-cell.x-cell { border-color: var(--coral); background: #FFF5F5; }
.ttt-cell.o-cell { border-color: var(--blue);  background: #EDF6FF; }

/* ══════════════════════════════
   CRAFTS / DOWNLOADS
   ══════════════════════════════ */
.crafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1000px; margin: 0 auto;
}
.craft-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transition: all .25s;
  text-decoration: none;
  border: 3px solid transparent;
}
.craft-card:hover {
  transform: translateY(-6px);
  border-color: var(--yellow);
  box-shadow: 0 16px 40px rgba(0,0,0,.15);
}
.craft-thumb {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}
.craft-body { padding: 18px; }
.craft-title { font-family: 'Luckiest Guy', cursive; font-size: 18px; color: var(--navy); margin-bottom: 4px; letter-spacing: .5px; }
.craft-desc { font-size: 13px; color: var(--muted); font-weight: 600; }
.craft-dl {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 900; font-size: 12px;
  padding: 6px 14px; border-radius: 20px;
  margin-top: 10px;
}

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */
@media (max-width: 700px) {
  .kids-hero-tiles .kids-tile { min-width: 100px; padding: 16px 18px; }
  .kids-tile-icon { font-size: 32px; }
  .memory-grid { grid-template-columns: repeat(4, 1fr); }
  .mem-card { font-size: 24px; }
}

/* Narrow phones: the full-size header (matched to the main site) doesn't leave
   room for the nav links, which collapse to 0 width without this. */
@media (max-width: 600px) {
  .kids-header { height: 64px; padding: 0 14px; gap: 8px; }
  .kids-logo-img { height: 44px; }
  .kids-logo-badge { font-size: 10px; padding: 2px 8px; }
  .kids-nav a { padding: 6px 10px; font-size: 10px; }
  .kids-nav a .nav-icon { font-size: 18px; }
}

/* ══════════════════════════════
   RELEASE GATING — locked "Coming <date>" cards (kids pages)
   ══════════════════════════════ */
.mw-locked { cursor: default !important; }
.mw-locked .kids-ep-thumb > *:not(.mw-lock-veil),
.mw-locked .kara-emoji-big, .mw-locked .kara-ep-tag { filter: grayscale(1) brightness(.95); opacity: .55; }
.mw-lock-veil {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(15,42,72,.30); z-index: 3;
}
.mw-lock-veil .mw-lock-ic { font-size: 40px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.mw-coming {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 900; font-size: 13px; color: #5C82A0;
  background: #EFF8FF; border-radius: 999px; padding: 8px 14px; margin-top: 6px;
}
.mw-coming::before { content: '🔒'; font-size: 13px; }
