:root {
  --ink: #151229;
  --paper: #fff9ea;
  --yellow: #ffe144;
  --orange: #ff7b31;
  --cyan: #00d4ff;
  --green: #57e36d;
  --pink: #ff49a7;
  --violet: #7048ff;
  --blue: #1d7cff;
  --shadow: 0 18px 0 rgba(21, 18, 41, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Fredoka", Arial, sans-serif;
  background:
    linear-gradient(135deg, rgba(255, 225, 68, 0.95) 0 18%, transparent 18% 100%),
    linear-gradient(315deg, rgba(0, 212, 255, 0.28) 0 22%, transparent 22% 100%),
    var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 76vh;
  padding: 22px clamp(18px, 4vw, 64px) 52px;
  background:
    radial-gradient(circle at 16px 16px, rgba(21, 18, 41, 0.17) 0 4px, transparent 5px) 0 0 / 34px 34px,
    linear-gradient(126deg, #ff49a7 0%, #ff7b31 31%, #ffe144 56%, #00d4ff 100%);
  border-bottom: 10px solid var(--ink);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  background:
    linear-gradient(45deg, transparent 0 45%, var(--ink) 46% 52%, transparent 53% 100%) 0 0 / 74px 74px,
    linear-gradient(-45deg, transparent 0 45%, #fff 46% 52%, transparent 53% 100%) 0 0 / 96px 96px;
}

.topbar,
.play-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.35rem);
  text-shadow: 2px 2px 0 var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  color: var(--ink);
  font-family: "Bangers", Impact, sans-serif;
  font-size: 2rem;
  background: var(--yellow);
  border: 4px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
  text-shadow: none;
  transform: rotate(-5deg);
}

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav-pills a,
.secondary-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 5px 5px 0 var(--ink);
}

.nav-pills a {
  background: rgba(255, 255, 255, 0.88);
}

.hero-copy {
  width: min(980px, 100%);
  margin: clamp(52px, 9vw, 104px) auto 0;
  text-align: center;
}

.kicker,
.section-kicker {
  margin: 0;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 2px 2px 0 var(--ink);
}

.hero h1 {
  margin: 10px auto 16px;
  max-width: 980px;
  color: #fff;
  font-family: "Bangers", Impact, sans-serif;
  font-size: clamp(4.2rem, 14vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow:
    5px 5px 0 var(--ink),
    10px 10px 0 rgba(21, 18, 41, 0.22);
}

.hero-lead {
  width: min(700px, 100%);
  margin: 0 auto;
  font-size: clamp(1.1rem, 2.4vw, 1.55rem);
  font-weight: 700;
  line-height: 1.35;
  color: #211a43;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.primary-action {
  background: var(--green);
}

.secondary-action {
  background: #fff;
}

.compact {
  min-height: 40px;
  padding: 8px 14px;
}

.hero-art {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.hero-art-one {
  top: 120px;
  left: max(18px, 5vw);
  width: 78px;
  aspect-ratio: 1;
  background: var(--green);
  border: 5px solid var(--ink);
  clip-path: polygon(50% 0, 61% 34%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 34%);
  animation: wiggle 3.4s ease-in-out infinite;
}

.hero-art-two {
  right: max(16px, 7vw);
  bottom: 48px;
  width: 118px;
  height: 72px;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 18px, #fff 18px 36px);
  border: 5px solid var(--ink);
  transform: rotate(7deg);
}

.category-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 20px clamp(18px, 4vw, 64px);
  background: var(--ink);
}

.category-strip span {
  flex: 0 0 auto;
  padding: 11px 16px;
  color: var(--ink);
  font-weight: 700;
  background: var(--yellow);
  border: 3px solid #fff;
  border-radius: 8px;
}

.games-section {
  padding: clamp(34px, 7vw, 76px) clamp(18px, 4vw, 64px) 90px;
  background:
    linear-gradient(90deg, rgba(255, 73, 167, 0.14), transparent 28% 72%, rgba(87, 227, 109, 0.18)),
    #fff9ea;
}

.section-heading {
  width: min(1180px, 100%);
  margin: 0 auto 24px;
}

.section-kicker {
  color: var(--pink);
  text-shadow: none;
}

.section-heading h2,
.play-title h1 {
  margin: 4px 0 0;
  font-family: "Bangers", Impact, sans-serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.game-card {
  position: relative;
  aspect-ratio: 1;
  min-height: 0;
  overflow: hidden;
  border: 5px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow), 7px 7px 0 var(--ink);
}

.live-card {
  display: block;
  background: #16122a;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.live-card:hover,
.live-card:focus-visible {
  transform: translateY(-7px) rotate(-1deg);
  box-shadow: 0 26px 0 rgba(21, 18, 41, 0.12), 7px 7px 0 var(--ink);
  outline: none;
}

.live-card iframe {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 200%;
  border: 0;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: top left;
  filter: saturate(1.18) contrast(1.08);
}

.live-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(21, 18, 41, 0.9) 100%);
}

.live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  background: var(--green);
  border: 3px solid var(--ink);
  border-radius: 8px;
}

.game-info {
  position: absolute;
  inset-inline: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  gap: 3px;
  color: #fff;
  text-shadow: 2px 2px 0 var(--ink);
}

.game-info strong,
.coming-card strong {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.05;
}

.game-info small,
.coming-card small {
  font-size: 0.95rem;
  font-weight: 700;
}

.coming-card {
  display: grid;
  align-content: end;
  gap: 4px;
  padding: 18px;
  color: #fff;
  text-shadow: 2px 2px 0 var(--ink);
}

.coming-card.blue {
  background: linear-gradient(135deg, #1d7cff, #00d4ff);
}

.coming-card.green {
  background: linear-gradient(135deg, #02a95c, #57e36d);
}

.coming-card.pink {
  background: linear-gradient(135deg, #ff49a7, #ff7b31);
}

.coming-card.violet {
  background: linear-gradient(135deg, #7048ff, #211a43);
}

.shape-sun,
.shape-steps,
.shape-bolt,
.shape-grid {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 82px;
  height: 82px;
  border: 5px solid var(--ink);
  background: var(--yellow);
}

.shape-sun {
  clip-path: polygon(50% 0, 61% 28%, 91% 15%, 73% 43%, 100% 50%, 73% 57%, 91% 85%, 61% 72%, 50% 100%, 39% 72%, 9% 85%, 27% 57%, 0 50%, 27% 43%, 9% 15%, 39% 28%);
}

.shape-steps {
  background: repeating-linear-gradient(0deg, var(--yellow) 0 18px, var(--orange) 18px 36px);
}

.shape-bolt {
  background: var(--cyan);
  clip-path: polygon(48% 0, 92% 0, 61% 38%, 100% 38%, 39% 100%, 50% 55%, 12% 55%);
}

.shape-grid {
  background:
    linear-gradient(90deg, transparent 0 43%, var(--ink) 43% 52%, transparent 52% 100%),
    linear-gradient(0deg, transparent 0 43%, var(--ink) 43% 52%, transparent 52% 100%),
    var(--yellow);
}

.play-body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.35) 0 5px, transparent 6px) 0 0 / 38px 38px,
    linear-gradient(135deg, #7048ff, #ff49a7 45%, #ff7b31);
}

.play-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  padding: 10px clamp(10px, 2vw, 18px);
  background: linear-gradient(180deg, rgba(21, 18, 41, 0.42), rgba(21, 18, 41, 0));
}

.fit-body .play-header {
  background: linear-gradient(180deg, rgba(21, 18, 41, 0.72), rgba(21, 18, 41, 0));
}

.play-header .brand {
  font-size: 1rem;
}

.play-header .brand-mark {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 1.55rem;
}

.play-page {
  display: grid;
  gap: 0;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 8px 12px 12px;
}

.play-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.play-title .section-kicker {
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--ink);
}

.game-frame-wrap {
  width: calc(100vw - 24px);
  height: calc(100vh - 20px);
  height: calc(100dvh - 20px);
  min-height: 0;
  overflow: hidden;
  background: #110d25;
  border: 6px solid var(--ink);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--ink), 0 26px 0 rgba(21, 18, 41, 0.18);
}

.game-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  overflow: hidden;
}

.educabit-ad-slot {
  width: min(100%, 970px);
  min-height: 90px;
  margin: 0 auto;
  overflow: hidden;
  border: 3px solid rgba(21, 18, 41, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 5px 5px 0 rgba(21, 18, 41, 0.72);
}

.camino-ads-body {
  overflow: auto;
}

.camino-ads-body .play-page {
  min-height: 100vh;
  padding-top: 64px;
  grid-template-rows: 1fr auto;
  gap: 12px;
}

.camino-ads-body .game-frame-wrap {
  height: calc(100vh - 84px);
  height: calc(100dvh - 84px);
}

.fit-frame-wrap {
  position: relative;
}

.fit-frame-wrap .game-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--fit-width, 1366px);
  height: var(--fit-height, 1473px);
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%) scale(var(--fit-scale, 0.5));
  transform-origin: center center;
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(-10deg) scale(1);
  }

  50% {
    transform: rotate(8deg) scale(1.08);
  }
}

@media (max-width: 740px) {
  .hero {
    min-height: 72vh;
    padding-top: 16px;
  }

  .topbar,
  .play-header {
    align-items: flex-start;
  }

  .nav-pills {
    display: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .hero-copy {
    margin-top: 56px;
    text-align: left;
  }

  .hero h1 {
    font-size: clamp(4rem, 21vw, 7rem);
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .game-card {
    border-width: 4px;
  }

  .game-info,
  .coming-card {
    inset-inline: 10px;
    bottom: 10px;
  }

  .shape-sun,
  .shape-steps,
  .shape-bolt,
  .shape-grid {
    width: 54px;
    height: 54px;
  }

  .game-frame-wrap {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    height: calc(100dvh - 12px);
    min-height: 0;
    border-width: 4px;
  }

  .play-page {
    padding: 6px;
  }

  .play-header .brand {
    font-size: 0.94rem;
  }

  .play-header .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 1.35rem;
  }
}
