
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #14213d;
  --muted: #68758d;
  --blue: #3568f5;
  --pale: #eef4ff;
  --line: #e7ecf4;
  --bg: #fbfcff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
}

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

/* HEADER */

.site-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7%;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk';
  font-size: 21px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--blue);
  color: white;
}

.site-header nav {
  display: flex;
  gap: 30px;
  color: #58657d;
  font-size: 14px;
  font-weight: 600;
}

.header-cta {
  background: #f0f4ff;
  color: var(--blue);
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

/* HERO */

.hero {
  min-height: 475px;
  padding: 65px 8%;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 30px;
  background: radial-gradient(
    circle at 78% 45%,
    #e4edff 0,
    #f3f7ff 34%,
    #fbfcff 72%
  );
}

.hero-copy {
  max-width: 570px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.7px;
  font-weight: 800;
  color: var(--blue);
}

.hero h1 {
  font: 700 clamp(42px, 5vw, 65px)/1.04 'Space Grotesk';
  letter-spacing: -2.8px;
  margin: 20px 0;
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero-copy > p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 460px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  margin-top: 17px;
  background: var(--blue);
  color: #fff;
  border-radius: 12px;
  padding: 15px 20px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 9px 22px #3568f533;
}

.hero-note {
  margin-top: 23px;
  color: #78849a;
  font-size: 12px;
}

/* HERO GRAPHICS */

.hero-art {
  height: 315px;
  position: relative;
  display: grid;
  place-items: center;
}

.float-card {
  position: absolute;
  background: #fff;
  border: 1px solid #e8edfa;
  border-radius: 19px;
  box-shadow: 0 18px 45px #203c781c;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.card-time {
  width: 220px;
  left: calc(50% - 110px);
  top: 65px;
  z-index: 2;
  transform: rotate(-5deg);
}

.mini-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #7e8ba5;
  font-weight: 800;
}

.card-time strong {
  font: 700 42px 'Space Grotesk';
  color: var(--blue);
  margin: 6px 0;
}

.card-time strong span {
  font-size: 20px;
}

.float-card small {
  font-size: 11px;
  color: #8390a5;
}

.card-target {
  right: 0;
  top: 20px;
  transform: rotate(8deg);
  align-items: center;
}

.target-icon {
  font-size: 38px;
  color: #ff9b52;
}

.float-card b {
  font-size: 11px;
  letter-spacing: 1px;
  margin: 5px 0;
}

.card-memory {
  left: 0;
  bottom: 23px;
  transform: rotate(6deg);
}

.memory-dots {
  display: flex;
  gap: 5px;
}

.memory-dots i {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  background: #8b75f7;
}

.memory-dots i:nth-child(2) {
  background: #ffb65c;
}

.memory-dots i:nth-child(3) {
  background: #5bc9a5;
}

.memory-dots i:nth-child(4) {
  background: #5f91f8;
}

/* GAME LIBRARY */

.game-section {
  padding: 65px 8% 75px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.section-heading h2 {
  font: 700 34px 'Space Grotesk';
  margin: 9px 0;
}

.section-heading p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

.game-count {
  font-size: 12px;
  color: #77839a;
  background: #f0f3f9;
  padding: 8px 12px;
  border-radius: 20px;
}

.filters {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.filter {
  border: 1px solid var(--line);
  background: white;
  color: #66738a;
  padding: 9px 15px;
  border-radius: 30px;
  font: 600 12px 'DM Sans';
  cursor: pointer;
}

.filter.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.game-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: .2s;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px #1e315014;
}

.game-cover {
  height: 155px;
  display: grid;
  place-items: center;
  position: relative;
}

.theme-blue {
  background: linear-gradient(135deg, #dce8ff, #a9c4ff);
}

.theme-purple {
  background: linear-gradient(135deg, #eee4ff, #c6b0ff);
}

.theme-orange {
  background: linear-gradient(135deg, #fff0d9, #ffc77f);
}

.theme-green {
  background: linear-gradient(135deg, #ddf8ed, #9fe2c7);
}

.theme-pink {
  background: linear-gradient(135deg, #ffe5ef, #ffb9d1);
}

.cover-emoji {
  font-size: 57px;
}

.cover-tag {
  position: absolute;
  top: 13px;
  left: 13px;
  background: #ffffffc9;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}

.game-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px;
}

.game-card h3 {
  font: 700 17px 'Space Grotesk';
  margin: 0 0 5px;
}

.game-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.play-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff3ff;
  color: var(--blue);
  font-size: 18px;
}

/* EMPTY LIBRARY */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  background: #fff;
  border: 1px dashed #ccd6e8;
  border-radius: 20px;
  padding: 55px 20px;
}

.empty-icon {
  font-size: 38px;
}

.empty-state h3 {
  font: 700 19px 'Space Grotesk';
  margin: 13px 0 7px;
}

.empty-state p {
  font-size: 13px;
  color: var(--muted);
}

/* FEATURES */

.feature-strip {
  margin: 0 8% 65px;
  background: #f0f4fc;
  border-radius: 18px;
  padding: 25px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-strip > div {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 10px;
  align-items: center;
}

.feature-icon {
  grid-row: span 2;
  font-size: 25px;
}

.feature-strip b {
  font-size: 13px;
}

.feature-strip small {
  font-size: 11px;
  color: var(--muted);
}

/* FOOTER */

footer {
  border-top: 1px solid var(--line);
  padding: 25px 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8993a5;
  font-size: 11px;
}

.footer-brand {
  font-size: 15px;
  color: var(--ink);
}

.footer-brand .brand-mark {
  width: 27px;
  height: 27px;
}

/* GAME PAGE */

.game-shell {
  max-width: 1050px;
  margin: 35px auto 70px;
  padding: 0 22px;
}

.back-link {
  font-size: 12px;
  color: var(--blue);
  font-weight: 700;
}

.game-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 27px 0;
}

.game-title-row h1 {
  font: 700 36px 'Space Grotesk';
  margin: 7px 0;
}

.game-title-row p {
  color: var(--muted);
  font-size: 14px;
}

.game-pill {
  font-size: 10px;
  background: #edf2ff;
  color: var(--blue);
  padding: 9px 12px;
  border-radius: 20px;
  font-weight: 800;
}

.game-frame-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-height: 440px;
}

.game-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
}

.frame-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.frame-note a {
  color: var(--blue);
  font-weight: 700;
}

/* MOBILE */

@media (max-width: 760px) {
  .site-header {
    height: 66px;
  }

  .site-header nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 55px;
    padding-bottom: 35px;
  }

  .hero-art {
    height: 260px;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .game-cover {
    height: 125px;
  }

  .game-card-body {
    padding: 13px;
  }

  .feature-strip {
    grid-template-columns: 1fr;
  }

  .game-frame-wrap iframe {
    height: 570px;
  }
}

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

  .game-cover {
    height: 145px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .section-heading h2 {
    font-size: 29px;
  }

  footer {
    gap: 12px;
    flex-wrap: wrap;
  }

  .game-title-row h1 {
    font-size: 29px;
  }
}

/* PLAYHOUSE IMPROVEMENTS */

/* GAME LOADING STATE */

.loading-state {
  min-height: 440px;
  display: grid;
  place-items: center;
  padding: 25px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  background: #f8faff;
}

/* GAME FRAME */

.game-frame-wrap iframe {
  background: #fff;
  max-width: 100%;
}

/* KEYBOARD ACCESSIBILITY */

a:focus-visible,
button:focus-visible {
  outline: 3px solid #ff9b52;
  outline-offset: 4px;
}

/* BUTTON INTERACTION */

.primary-button,
.header-cta,
.filter {
  transition: background .2s ease, transform .2s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
}

/* MOBILE GAME PAGE */

@media (max-width: 600px) {
  .game-shell {
    margin-top: 22px;
    padding: 0 14px;
  }

  .game-title-row {
    align-items: flex-start;
    gap: 12px;
  }

  .game-frame-wrap {
    border-radius: 12px;
    min-height: 350px;
  }

  .game-frame-wrap iframe {
    height: 570px;
  }

  .loading-state {
    min-height: 350px;
  }
}

/* PLAYHOUSE GAME THUMBNAILS */

.game-cover {
  overflow: hidden;
  isolation: isolate;
}

.game-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  transition: transform .35s ease;
}

.game-card:hover .game-thumbnail {
  transform: scale(1.06);
}

/* Keep category label visible over the image */

.cover-tag {
  z-index: 2;
}

/* Hide the emoji when a thumbnail is available */

.game-cover:has(.game-thumbnail) .cover-emoji {
  display: none;
}

/* Improve image display on smaller screens */

@media (max-width: 760px) {
  .game-cover {
    height: 145px;
  }
}

@media (max-width: 430px) {
  .game-cover {
    height: 175px;
  }
}

