/* WillowinWorld CSS: shared game-page content blocks, related worlds, facts and assets. */
.game-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 24px;
  align-items: stretch;
}

.game-page-grid > * {
  min-width: 0;
}

.game-page-updates {
  grid-column: 1 / -1;
  padding: clamp(24px, 4vw, 38px);
}

.game-page-updates h2 {
  margin: 8px 0 22px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.update-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.update-list li {
  min-height: 170px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--paper) 18%, var(--line));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(138deg, color-mix(in srgb, var(--paper) 7%, transparent), transparent 44%),
    repeating-linear-gradient(118deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 14px),
    var(--surface);
}

.update-list :is(span, time) {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 900;
}

.update-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.update-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.56;
}

.game-page-section,
.press-kit-section {
  grid-column: 1 / -1;
  padding: clamp(24px, 4vw, 38px);
}

.game-page-section h2,
.press-kit-section h2 {
  margin: 8px 0 22px;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.detail-grid,
.press-kit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.detail-card {
  min-height: 172px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--paper) 18%, var(--line));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(138deg, color-mix(in srgb, var(--paper) 7%, transparent), transparent 44%),
    repeating-linear-gradient(118deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 14px),
    var(--surface);
}

.detail-card h3 {
  margin-bottom: 10px;
  font-size: 1.06rem;
}

.detail-card p,
.press-kit-section p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.related-worlds {
  position: relative;
  overflow: hidden;
}

.related-worlds::after {
  content: "";
  position: absolute;
  inset: auto 4% -34% 52%;
  height: 240px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--cyan) 18%, transparent), transparent 68%),
    radial-gradient(ellipse at 35% 42%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 62%);
  filter: blur(24px);
  pointer-events: none;
}

.related-worlds > * {
  position: relative;
  z-index: 1;
}

.related-worlds-copy {
  max-width: 980px;
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.72;
}

.related-world-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.related-world-link {
  min-height: 238px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--cyan) 18%, var(--line));
  border-radius: 18px;
  color: var(--text);
  text-decoration: none;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--paper) 9%, transparent), transparent 58%),
    repeating-linear-gradient(118deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 14px),
    color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease), box-shadow .24s var(--ease);
}

.related-world-link:hover,
.related-world-link:focus-visible {
  outline: none;
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cyan) 44%, var(--line));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--cyan) 13%, transparent), transparent 58%),
    repeating-linear-gradient(118deg, rgba(255,255,255,0.052) 0 1px, transparent 1px 14px),
    color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.related-world-link.is-primary {
  border-color: color-mix(in srgb, var(--cyan) 38%, var(--line));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--cyan) 16%, transparent), transparent 58%),
    repeating-linear-gradient(118deg, rgba(255,255,255,0.052) 0 1px, transparent 1px 14px),
    color-mix(in srgb, var(--surface) 88%, transparent);
}

.related-world-kicker {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--cyan) 36%, var(--line));
  border-radius: 999px;
  color: color-mix(in srgb, var(--cyan) 82%, var(--text));
  background: color-mix(in srgb, var(--cyan) 9%, transparent);
  font-size: 0.76rem;
  font-weight: 900;
}

.related-world-link strong {
  font-size: clamp(1.16rem, 1.45vw, 1.34rem);
  line-height: 1.05;
}

.related-world-link p {
  margin: 12px 0 auto;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.58;
}

.related-world-meta {
  display: block;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: color-mix(in srgb, var(--text) 76%, var(--cyan));
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
}

.game-page-facts,
.press-kit-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.game-page-facts div,
.press-kit-facts div {
  display: grid;
  gap: 4px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.game-page-facts div:last-child,
.press-kit-facts div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.game-page-facts dt,
.press-kit-facts dt {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-page-facts dd,
.press-kit-facts dd {
  margin: 0;
  color: var(--text);
  font-weight: 820;
}

.asset-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.asset-link {
  position: relative;
  min-height: 172px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--paper) 18%, var(--line));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, transparent), color-mix(in srgb, var(--surface-strong) 88%, transparent));
  box-shadow: var(--shadow-soft);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}

.asset-link:hover,
.asset-link:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cyan) 52%, var(--line));
  outline: none;
}

.asset-link img {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.asset-link strong {
  display: block;
}

.asset-link span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.game-detail-page :is(.game-detail-nav a, .game-theme-toggle, .asset-link, .related-world-link, .game-footer a):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--game-accent) 82%, white);
  outline-offset: 3px;
}

.game-detail-page #download-assets .asset-list {
  grid-auto-columns: minmax(210px, 238px);
  grid-auto-flow: column;
  grid-template-columns: none;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scrollbar-color: var(--game-accent) transparent;
  scroll-padding-inline: 4px;
  scroll-snap-type: x proximity;
}

.game-detail-page #download-assets .asset-link {
  min-width: 210px;
  scroll-snap-align: start;
}

.game-detail-page #download-assets .asset-link img {
  width: auto;
  max-width: 100%;
  height: 76px;
  object-fit: contain;
}

.game-footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(54px, 8vw, 92px);
  padding: 28px 0 34px;
  border-top: 1px solid color-mix(in srgb, var(--paper) 20%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
}

.game-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.game-footer-copy {
  max-width: 600px;
}

.game-footer-copy strong,
.game-footer-copy span {
  display: block;
}

.game-footer-copy strong {
  margin-bottom: 5px;
  font-size: 1rem;
}

.game-footer-copy span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.game-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
}

.game-footer-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 820;
}

.game-footer-nav a:hover {
  color: var(--text);
}

/* Verified build stories: shared structure, game-specific art direction. */
.game-proof-section {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game-accent) 18%, var(--surface-strong)), color-mix(in srgb, var(--game-accent-2) 10%, var(--surface)) 58%, var(--surface-strong));
  box-shadow: 0 8px 0 color-mix(in srgb, var(--game-accent) 26%, transparent);
}

.game-proof-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, color-mix(in srgb, var(--paper) 10%, transparent), transparent 32% 72%, color-mix(in srgb, var(--game-accent) 10%, transparent));
}

.game-proof-section > * {
  position: relative;
  z-index: 1;
}

.game-proof-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
}

.proof-copy {
  min-width: 0;
}

.proof-kicker,
.proof-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.proof-kicker {
  margin-bottom: 18px;
  padding: 8px 12px;
  color: color-mix(in srgb, var(--text) 82%, var(--game-accent));
  background: color-mix(in srgb, var(--game-accent) 14%, transparent);
}

.proof-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--game-accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--game-accent) 74%, transparent);
}

.proof-copy h2 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.3vw, 3.45rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.proof-copy > p {
  max-width: 64ch;
  margin: 0;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.68;
  text-wrap: pretty;
}

.proof-status {
  margin-top: 22px;
  padding: 10px 13px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
}

.proof-status b {
  color: color-mix(in srgb, var(--text) 74%, var(--game-accent));
}

.proof-visual {
  min-width: 0;
}

.proof-facts {
  display: flex;
  margin-top: clamp(28px, 4vw, 46px);
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--paper) 22%, var(--line));
}

.proof-facts article {
  min-width: 0;
  flex: 1 1 0;
  padding: 2px clamp(14px, 2.4vw, 26px);
  border-inline-start: 1px solid color-mix(in srgb, var(--paper) 18%, var(--line));
}

.proof-facts article:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.proof-facts article:last-child {
  padding-inline-end: 0;
}

.proof-facts strong,
.proof-facts span {
  display: block;
}

.proof-facts strong {
  margin-bottom: 7px;
  color: var(--text);
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  line-height: 1.22;
}

.proof-facts span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.nature-proof-frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.nature-proof-frame,
.container-showcase figure,
.world-filmstrip figure {
  margin: 0;
}

.nature-proof-frame {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--game-accent) 20%, transparent);
}

.nature-proof-frame:last-child {
  transform: translateY(22px);
}

.nature-proof-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.nature-proof-frame figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.nature-proof-frame figcaption strong {
  color: var(--text);
}

.candy-container-section,
.ball-world-section {
  margin-top: clamp(26px, 4vw, 42px);
}

.candy-container-section h3,
.ball-world-section h3,
.paint-recipe-board h3 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.candy-container-section > p,
.ball-world-section > p,
.paint-recipe-board > p {
  max-width: 68ch;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.58;
}

.container-showcase {
  display: grid;
  grid-auto-columns: minmax(116px, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding: 0 0 12px;
  scrollbar-color: var(--game-accent) transparent;
  scroll-snap-type: x proximity;
}

.container-showcase figure {
  min-width: 116px;
  overflow: hidden;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  scroll-snap-align: start;
}

.container-showcase img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.container-showcase figcaption {
  padding: 9px 10px 11px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.paint-recipe-board {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 14px;
  color: #f7fbff;
  background:
    linear-gradient(142deg, rgba(17, 28, 56, 0.96), rgba(24, 18, 55, 0.96) 58%, rgba(4, 42, 66, 0.96));
  box-shadow: 0 6px 0 color-mix(in srgb, var(--game-accent) 24%, transparent);
}

.paint-recipe-board > p {
  max-width: 38ch;
  color: #c9dbed;
}

.paint-recipe-slots {
  display: flex;
  gap: 10px;
  margin: 24px 0;
}

.paint-recipe-slot {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.22);
}

.paint-recipe-slot.is-red {
  background: #ff4f73;
}

.paint-recipe-slot.is-blue {
  background: #35c8ff;
}

.paint-recipe-slot.is-yellow {
  background: #ffe24b;
}

.paint-recipe-output {
  display: grid;
  max-width: 44%;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.paint-recipe-output small {
  color: #9fb9d3;
  font-weight: 800;
}

.paint-recipe-output strong {
  font-size: clamp(1.3rem, 2.1vw, 1.8rem);
}

.paint-recipe-output span {
  color: #c9dbed;
  line-height: 1.5;
}

.paint-recipe-board img {
  position: absolute;
  right: 1%;
  bottom: -3%;
  width: min(46%, 380px);
  max-height: 76%;
  object-fit: contain;
  filter: drop-shadow(0 14px 10px rgba(0, 0, 0, 0.28));
}

.world-filmstrip {
  display: grid;
  grid-auto-columns: minmax(170px, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-color: var(--game-accent) transparent;
  scroll-snap-type: x proximity;
}

.world-filmstrip figure {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-radius: 12px;
  background: #091426;
  scroll-snap-align: start;
}

.world-filmstrip img {
  width: 100%;
  height: 100%;
  min-height: 270px;
  object-fit: cover;
  transition: transform .55s var(--ease);
}

.world-filmstrip figure:hover img {
  transform: scale(1.035);
}

.world-filmstrip figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 38px 13px 13px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(transparent, rgba(2, 8, 20, 0.9));
}

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

  .proof-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 20px;
  }

  .proof-facts article:nth-child(odd) {
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .paint-recipe-board {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .game-proof-section {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .proof-copy h2 {
    font-size: clamp(2rem, 9.5vw, 2.7rem);
  }

  .proof-facts {
    grid-template-columns: 1fr;
  }

  .proof-facts article,
  .proof-facts article:nth-child(odd) {
    padding: 14px 0 0;
    border-inline-start: 0;
    border-top: 1px solid color-mix(in srgb, var(--paper) 18%, var(--line));
  }

  .proof-facts article:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .nature-proof-frames {
    gap: 8px;
  }

  .nature-proof-frame:last-child {
    transform: translateY(12px);
  }

  .nature-proof-frame figcaption {
    display: grid;
    gap: 3px;
  }

  .container-showcase {
    grid-auto-columns: 44%;
  }

  .paint-recipe-board {
    min-height: 520px;
  }

  .paint-recipe-output {
    max-width: 100%;
  }

  .paint-recipe-board img {
    right: 4%;
    width: 88%;
    max-height: 42%;
  }

  .world-filmstrip {
    grid-auto-columns: 72%;
  }

  .game-footer-inner {
    display: grid;
  }

  .game-footer-nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-filmstrip img {
    transition: none;
  }
}
