* {
  box-sizing: border-box;
}

html {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fc;
  color: #172033;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 5% 5%, #eaf1ff 0, transparent 28%),
    radial-gradient(circle at 95% 15%, #f0eaff 0, transparent 25%),
    #f7f8fc;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid #e5e9f1;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo,
.footer-logo {
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -1.5px;
  color: #2563eb;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-links a {
  color: #526078;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 13px;
  border-radius: 10px;
  transition: .2s ease;
}

.nav-links a:hover {
  background: #eef3ff;
  color: #2563eb;
}

.search-form {
  display: flex;
  margin-left: auto;
  gap: 6px;
}

.search-form input {
  width: 190px;
  border: 1px solid #dfe4ed;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}

.search-form input:focus {
  border-color: #2563eb;
}

.search-form button {
  border: 0;
  border-radius: 12px;
  background: #172033;
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.search-form.large {
  margin: 22px 0 0;
  max-width: 680px;
}

.search-form.large input {
  width: 100%;
  font-size: 16px;
}


/* =========================================================
   DYNAMIC HERO
   ========================================================= */

.hero {
  margin: 30px 0 50px;
  min-height: 390px;
  padding: 55px;
  border-radius: 30px;
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;

  background:
    linear-gradient(120deg, #eaf1ff 0%, #f2f4ff 55%, #ebe5ff 100%);

  border: 1px solid #dfe6f5;
}

/* decorative floating circles */

.hero::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  right: 80px;
  top: -110px;
  background: rgba(37, 99, 235, .08);
}

.hero::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 35%;
  right: -45px;
  bottom: -70px;
  background: rgba(124, 58, 237, .10);
  transform: rotate(25deg);
}

.hero > div {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: .98;
  margin: 10px 0 20px;
  letter-spacing: -3px;
  max-width: 700px;
}

.hero p {
  max-width: 650px;
  font-size: 18px;
  color: #536078;
  margin: 0 0 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.7px;
  color: #2563eb;
  background: rgba(255,255,255,.65);
  border: 1px solid #d9e2f5;
  border-radius: 999px;
  padding: 7px 11px;
}


/* =========================================================
   BUTTON
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff !important;
  text-decoration: none;
  border: 0;
  border-radius: 11px;
  padding: 12px 18px;
  font-weight: 800;
  margin-top: 8px;
  transition:
    transform .2s ease,
    box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .20);
}

.btn.secondary {
  background: #e8ecf3;
  color: #172033 !important;
  box-shadow: none;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  margin: 55px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.section-head > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -1px;
}

.section-head p {
  margin: 0;
  color: #7a8598;
  font-size: 14px;
}

.section-head a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}


/* =========================================================
   DYNAMIC GAME GRID
   ========================================================= */

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}


/* =========================================================
   GAME CARD
   ========================================================= */

.game-card {
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 18px;
  overflow: hidden;
  position: relative;

  box-shadow: 0 3px 12px rgba(23, 32, 51, .04);

  transition:
    transform .25s cubic-bezier(.2,.8,.2,1),
    box-shadow .25s ease,
    border-color .25s ease;
}

.game-card:hover {
  transform: translateY(-7px);
  border-color: #d3daf0;
  box-shadow:
    0 16px 35px rgba(23, 32, 51, .12),
    0 3px 8px rgba(23, 32, 51, .05);
}

.game-card a {
  text-decoration: none;
  color: inherit;
}


/* image */

.game-card > a:first-child {
  display: block;
  overflow: hidden;
}

.game-card img,
.thumb-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #e9edf5;
}

.game-card img {
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}

.game-card:hover img {
  transform: scale(1.08);
}

.thumb-placeholder {
  display: grid;
  place-items: center;
  color: #8390a5;
  font-weight: 800;
}


/* card body */

.game-card-body {
  padding: 15px 16px 17px;
}

.game-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.35;
}

.game-card span {
  font-size: 13px;
  color: #77839a;
}


/* =========================================================
   FEATURED / FIRST CARD EFFECT
   ========================================================= */

.game-grid .game-card:first-child {
  box-shadow: 0 5px 18px rgba(37, 99, 235, .08);
}

.game-grid .game-card:first-child::after {
  content: "FEATURED";
  position: absolute;
  top: 10px;
  left: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .8px;
  padding: 5px 8px;
  border-radius: 6px;
}


/* =========================================================
   PAGE HEADING
   ========================================================= */

.page-heading {
  padding: 50px 0 35px;
  position: relative;
}

.page-heading h1 {
  font-size: 46px;
  line-height: 1.05;
  margin: 7px 0 12px;
  letter-spacing: -2px;
}

.page-heading > p {
  max-width: 750px;
  color: #637087;
  font-size: 16px;
}


/* =========================================================
   BREADCRUMBS
   ========================================================= */

.breadcrumbs {
  display: flex;
  gap: 9px;
  padding: 22px 0 8px;
  color: #7a8598;
  font-size: 13px;
}

.breadcrumbs a {
  color: #2563eb;
  text-decoration: none;
}


/* =========================================================
   CATEGORY PAGE
   ========================================================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}


/* =========================================================
   GAME PAGE
   ========================================================= */

.game-heading {
  padding: 25px 0 18px;
}

.game-heading h1 {
  margin: 5px 0 0;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -1.5px;
}

.game-player {
  background: #111827;
  border-radius: 20px;
  overflow: hidden;
  min-height: 500px;
  display: grid;
  place-items: center;
  box-shadow:
    0 15px 40px rgba(23, 32, 51, .12);
}

.game-player iframe {
  display: block;
  width: 100%;
  height: 650px;
  border: 0;
}

.external-game {
  color: #fff;
  text-align: center;
  padding: 70px;
}


/* =========================================================
   CONTENT
   ========================================================= */

.content-section {
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 17px;
  padding: 27px;
  margin: 22px 0;
  box-shadow: 0 3px 12px rgba(23, 32, 51, .03);
}

.content-section h2 {
  margin-top: 0;
}

.content-section p {
  color: #536078;
}

.content-section details {
  border-top: 1px solid #edf0f5;
  padding: 15px 0;
}

.content-section summary {
  font-weight: 700;
  cursor: pointer;
}

.empty {
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 18px;
  padding: 60px;
  text-align: center;
  margin: 35px 0;
}

.result-count {
  color: #66738a;
}

.prose {
  max-width: 900px;
}

.prose h2 {
  margin-top: 35px;
}


/* =========================================================
   NORMAL FOOTER
   ========================================================= */

.site-footer {
  margin-top: 70px;
  background: #ffffff;
  color: #66738a;
  border-top: 1px solid #e5e9f1;
  padding: 42px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-grid h3 {
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 12px;
}

.footer-grid a {
  display: block;
  margin: 6px 0;
  color: #66738a;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-grid a:hover {
  color: #2563eb;
}

.footer-logo {
  color: #2563eb;
}

.copyright {
  border-top: 1px solid #e8ebf2;
  margin-top: 30px;
  padding-top: 18px;
  font-size: 13px;
  color: #7a8598;
}


/* Mobile */

@media (max-width: 700px) {
  .site-footer {
    margin-top: 55px;
    padding: 38px 0 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
}

@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav {
    gap: 15px;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    padding: 8px 9px;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .container {
    width: min(100% - 22px, 1200px);
  }

  .nav {
    min-height: 64px;
    gap: 10px;
  }

  .nav-links {
    display: none;
  }

  .logo {
    font-size: 23px;
  }

  .search-form {
    margin-left: auto;
  }

  .search-form input {
    width: 115px;
  }

  .hero {
    min-height: 350px;
    padding: 38px 25px;
    margin-top: 22px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 40px;
    letter-spacing: -2px;
  }

  .hero p {
    font-size: 16px;
  }

  .section {
    margin: 42px 0;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head > div {
    display: block;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .section-head p {
    margin-top: 3px;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .game-card {
    border-radius: 14px;
  }

  .game-card-body {
    padding: 11px 12px 13px;
  }

  .game-card h3 {
    font-size: 15px;
  }

  .game-card span {
    font-size: 12px;
  }

  .page-heading {
    padding: 35px 0 25px;
  }

  .page-heading h1 {
    font-size: 35px;
  }

  .game-heading h1 {
    font-size: 33px;
  }

  .game-player {
    min-height: 330px;
    border-radius: 14px;
  }

  .game-player iframe {
    height: 430px;
  }

  .content-section {
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 420px) {

  .search-form input {
    width: 92px;
  }

  .search-form button {
    padding: 9px 10px;
  }

  .hero {
    padding: 32px 21px;
  }

  .hero h1 {
    font-size: 35px;
  }

  .game-grid {
    gap: 9px;
  }

  .game-grid .game-card:first-child::after {
    font-size: 8px;
    padding: 4px 6px;
  }

}