* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f4f1;
  --white: #ffffff;
  --black: #181817;
  --dark: #242422;
  --gray: #73716c;
  --light-gray: #e5e2dc;
  --border: #dedbd4;
  --surface: #ffffff;
  --shadow: rgba(0, 0, 0, .1);
  --max: 1180px;
}

html.dark {
  --bg: #171817;
  --white: #242523;
  --black: #f4f2ed;
  --gray: #aaa9a2;
  --light-gray: #333430;
  --border: #3b3c38;
  --surface: #242523;
  --shadow: rgba(0, 0, 0, .32);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--black);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}


/* HEADER */

.header {
  width: min(var(--max), calc(100% - 48px));
  min-height: 88px;
  margin: auto;

  display: flex;
  align-items: center;

  border-bottom: 1px solid var(--border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: .2s ease;
}

.theme-toggle:hover {
  border-color: var(--black);
  color: var(--black);
}

.theme-icon {
  font-size: 15px;
  line-height: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;

  font-size: 15px;
  font-weight: 900;
  letter-spacing: .05em;
}

.logo-icon {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border-radius: 50%;
  border: 2px solid var(--black);

  font-size: 10px;
  font-weight: 900;
}

nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
  margin-right: 30px;
}

nav a {
  color: var(--gray);
  font-size: 13px;
  font-weight: 700;

  transition: .2s ease;
}

nav a:hover {
  color: var(--black);
}

.header-btn {
  padding: 13px 20px;

  background: var(--black);
  color: white;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 800;

  transition: .2s ease;
}

.header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, .13);
}


/* HERO */

.hero {
  width: min(var(--max), calc(100% - 48px));
  min-height: 600px;
  margin: auto;

  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.hero-content {
  max-width: 600px;
}

.badge,
.eyebrow {
  color: #77746e;

  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
}

.badge {
  display: inline-block;

  padding: 8px 12px;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: var(--surface);
}

.hero h1 {
  margin: 25px 0;

  font-size: clamp(62px, 7vw, 94px);
  line-height: .9;

  letter-spacing: -.07em;
}

.hero h1 span {
  color: var(--gray);
}

.hero-content > p {
  max-width: 520px;

  color: var(--gray);

  line-height: 1.8;
  font-size: 15px;
}

.hero-actions {
  margin-top: 32px;

  display: flex;
  align-items: center;
  gap: 25px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  padding: 15px 21px;

  background: var(--black);
  color: white;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 900;

  transition: .25s ease;
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(0,0,0,.15);
}

.secondary-btn {
  color: var(--gray);

  font-size: 12px;
  font-weight: 800;

  transition: .2s ease;
}

.secondary-btn:hover {
  color: var(--black);
  transform: translateX(4px);
}


/* HERO DECORATION */

.hero-decoration {
  position: relative;
  height: 430px;
}

.circle-decoration {
  position: absolute;

  width: 350px;
  height: 350px;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  background: #e8e5df;

  animation: pulse 5s infinite ease-in-out;
}

.floating-box {
  position: absolute;
  z-index: 3;

  min-width: 190px;

  padding: 20px;

  background: var(--surface);

  border: 1px solid var(--border);

  box-shadow: 0 20px 50px var(--shadow);

  display: flex;
  flex-direction: column;

  animation: float 5s infinite ease-in-out;
}

.floating-box small {
  color: var(--gray);

  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
}

.floating-box strong {
  margin-top: 7px;

  font-size: 17px;
}

.floating-box span {
  margin-top: 4px;

  color: var(--gray);

  font-size: 11px;
}

.box-one {
  top: 45px;
  left: 20px;
}

.box-two {
  top: 175px;
  right: 10px;

  animation-delay: -1.5s;
}

.box-three {
  bottom: 30px;
  left: 80px;

  animation-delay: -3s;
}


/* SEARCH */

.search-section {
  width: min(var(--max), calc(100% - 48px));
  margin: 30px auto 80px;
}

.search-box {
  height: 65px;

  display: flex;
  align-items: center;
  gap: 15px;

  padding: 0 22px;

  background: var(--surface);

  border: 1px solid var(--border);

  box-shadow: 0 10px 30px rgba(0,0,0,.03);
}

.search-icon {
  color: var(--gray);
  font-size: 28px;
}

.search-box input {
  width: 100%;

  border: 0;
  outline: 0;

  background: transparent;

  font-size: 14px;
  color: var(--black);
}

.search-box input::placeholder {
  color: #aaa7a0;
}


/* CATEGORIES */

.categories-section {
  width: min(var(--max), calc(100% - 48px));
  margin: auto auto 55px;
}

.section-top {
  display: flex;
  justify-content: space-between;
}

.section-top h2,
.games-heading h2 {
  margin: 10px 0 0;

  font-size: clamp(38px, 5vw, 58px);
  line-height: 1;

  letter-spacing: -.06em;
}

.category-list {
  margin-top: 40px;

  display: flex;
  gap: 10px;

  flex-wrap: wrap;
}

.category {
  padding: 11px 17px;

  border: 1px solid var(--border);

  background: transparent;

  color: var(--gray);

  cursor: pointer;

  border-radius: 999px;

  font-size: 11px;
  font-weight: 800;

  transition: .2s ease;
}

.category:hover,
.category.active {
  background: var(--black);
  border-color: var(--black);
  color: white;
}


/* GAMES */

.games-section {
  width: min(var(--max), calc(100% - 48px));
  margin: auto auto 150px;
}

.games-heading {
  margin-bottom: 35px;

  display: flex;
  align-items: end;
  justify-content: space-between;
}

#gameCount {
  color: var(--gray);

  font-size: 11px;
  font-weight: 800;
}

.games-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 18px;
}

.game-card {
  overflow: hidden;

  background: var(--surface);

  border: 1px solid var(--border);

  transition:
    transform .3s ease,
    box-shadow .3s ease;
}

.game-card:hover {
  transform: translateY(-7px);

  box-shadow: 0 25px 55px var(--shadow);
}


/* GAME IMAGE */

.game-image {
  height: 205px;

  position: relative;

  display: grid;
  place-items: center;

  overflow: hidden;
}

.donate-image {
  background:
    linear-gradient(135deg, #20201f, #44433f);
}

.pop-image {
  background:
    linear-gradient(135deg, #d9d5cd, #eeeae3);
}

.spin-image {
  background:
    linear-gradient(135deg, #bdb9b1, #e5e2db);
}

.taskbux-image {
  background:
    linear-gradient(135deg, #163c36, #4a9a75);
}

.rbxrise-image {
  background:
    linear-gradient(135deg, #39205b, #b55e9a);
}

.bloxearn-image {
  background:
    linear-gradient(135deg, #123b61, #4b9cd3);
}

.bloxtask-image {
  background:
    linear-gradient(135deg, #5c2d18, #d18a3f);
}

.game-image::after {
  content: "";

  position: absolute;

  width: 180px;
  height: 180px;

  border: 1px solid rgba(255,255,255,.25);

  border-radius: 50%;

  animation: imageCircle 7s linear infinite;
}

.game-logo {
  width: 85px;
  height: 85px;

  position: relative;
  z-index: 2;

  display: grid;
  place-items: center;

  background: white;
  color: var(--black);

  border-radius: 22px;

  font-size: 21px;
  font-weight: 900;

  box-shadow: 0 20px 40px rgba(0,0,0,.15);

  transform: rotate(-5deg);
}

.game-tag {
  position: absolute;

  top: 15px;
  left: 15px;
  z-index: 3;

  padding: 7px 10px;

  background: rgba(255,255,255,.9);

  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}


/* GAME CONTENT */

.game-content {
  padding: 25px;
}

.game-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.game-top h3 {
  margin: 0;

  font-size: 21px;
  letter-spacing: -.03em;
}

.creator {
  display: block;

  margin-top: 5px;

  color: var(--gray);

  font-size: 10px;
}

.rating {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 50%;

  font-size: 12px;
}

.game-content > p {
  min-height: 72px;

  margin: 20px 0;

  color: var(--gray);

  font-size: 12px;
  line-height: 1.7;
}

.game-footer {
  padding-top: 17px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-top: 1px solid var(--border);

  color: var(--gray);

  font-size: 10px;
}

.play-btn {
  padding: 9px 13px;

  background: var(--black);
  color: white;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 900;

  transition: .2s ease;
}

.play-btn:hover {
  transform: translateY(-2px);
}


/* NO RESULTS */

.no-results {
  display: none;

  padding: 80px 20px;

  text-align: center;
}

.no-results div {
  font-size: 60px;
  font-weight: 900;
}

.no-results h3 {
  margin-bottom: 5px;
}

.no-results p {
  color: var(--gray);
}


/* INFO */

.info-section {
  width: min(var(--max), calc(100% - 48px));
  margin: auto auto 150px;

  padding: 90px 0;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.info-section h2 {
  margin: 15px 0 0;

  font-size: clamp(43px, 5vw, 64px);
  line-height: .95;

  letter-spacing: -.06em;
}

.info-section > p {
  align-self: end;

  max-width: 500px;

  color: var(--gray);

  line-height: 1.8;
}


/* CTA */

.cta {
  width: min(var(--max), calc(100% - 48px));

  margin: auto auto 150px;

  padding: 110px 30px;

  text-align: center;

  background: var(--black);
  color: white;
}

.cta .eyebrow {
  color: #aaa7a0;
}

.cta h2 {
  margin: 15px 0 30px;

  font-size: clamp(48px, 7vw, 80px);

  line-height: .92;
  letter-spacing: -.065em;
}

.cta .primary-btn {
  background: white;
  color: var(--black);
}


/* FOOTER */

footer {
  width: min(var(--max), calc(100% - 48px));

  margin: auto;

  padding: 35px 0;

  display: flex;
  align-items: center;
  gap: 40px;

  border-top: 1px solid var(--border);

  color: var(--gray);

  font-size: 10px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
}

.footer-logo div:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-logo strong {
  color: var(--black);
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.footer-links a:hover {
  color: var(--black);
}


/* ANIMATIONS */

.reveal {
  opacity: 0;

  transform: translateY(30px);

  transition:
    opacity .8s ease,
    transform .8s ease;
}

.reveal.visible {
  opacity: 1;

  transform: translateY(0);
}

.delay-1 {
  transition-delay: .12s;
}

.delay-2 {
  transition-delay: .24s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-14px) rotate(-2deg);
  }

}

@keyframes pulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.08);
  }

}

@keyframes imageCircle {

  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }

}


/* MOBILE */

@media (max-width: 850px) {

  .header {
    flex-wrap: wrap;
    padding: 18px 0;
  }

  nav {
    order: 3;

    width: 100%;

    margin: 15px 0 0;

    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;

    padding: 80px 0;
  }

  .hero-decoration {
    height: 390px;
  }

  .games-grid {
    grid-template-columns: 1fr 1fr;
  }

  .info-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }

}


/* SMALL MOBILE */

@media (max-width: 550px) {

  .header,
  .hero,
  .search-section,
  .categories-section,
  .games-section,
  .info-section,
  .cta,
  footer {
    width: calc(100% - 28px);
  }

  .header-btn {
    display: none;
  }

  .theme-label {
    display: none;
  }

  nav {
    gap: 15px;
  }

  nav a {
    font-size: 11px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-decoration {
    transform: scale(.9);
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .games-heading {
    align-items: start;
    flex-direction: column;
    gap: 15px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    margin-left: 0;
  }

}