* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {

  --bg: #080b14;
  --panel: #111726;
  --text: #f7f8fc;
  --muted: #929bb0;
  --purple: #8b5cf6;
  --cyan: #22d3ee;
  --gold: #facc15;

}

html {
  scroll-behavior: smooth;
}

body {

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: #f5f7fb;
  color: #111827;

}


/* HEADER */

.topbar {

  height: 72px;

  padding:
    0 6%;

  display: flex;

  align-items: center;

  justify-content: space-between;

  background:
    rgba(8, 11, 20, .96);

  color: white;

  position: sticky;

  top: 0;

  z-index: 50;

  border-bottom:
    1px solid #ffffff12;

  backdrop-filter:
    blur(15px);

}

.brand {

  color: white;

  text-decoration: none;

  font-size: 20px;

  font-weight: 950;

}

.brand span {
  color: #a78bfa;
}

.topbar nav {

  display: flex;

  gap: 28px;

}

.topbar nav a {

  color: #c9cfdd;

  text-decoration: none;

  font-size: 14px;

  font-weight: 700;

}

.top-points {

  background: #ffffff10;

  border:
    1px solid #ffffff16;

  padding:
    9px 13px;

  border-radius: 12px;

}


/* HERO */

.hero {

  min-height: 470px;

  padding:
    75px 8%;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 40px;

  color: white;

  background:

    radial-gradient(
      circle at 80% 15%,
      #4c1d95 0,
      transparent 28%
    ),

    radial-gradient(
      circle at 20% 100%,
      #164e63 0,
      transparent 30%
    ),

    #080b14;

}

.hero-copy {
  max-width: 700px;
}

.eyebrow,
.section-kicker {

  font-size: 11px;

  letter-spacing: 2px;

  font-weight: 900;

  color: #8b5cf6;

}

.hero h1 {

  font-size:
    clamp(48px, 8vw, 84px);

  line-height: .94;

  letter-spacing: -4px;

  margin: 18px 0;

}

.hero h1 span {
  color: #c4b5fd;
}

.hero p {

  max-width: 590px;

  color: #aeb6c8;

  font-size: 18px;

  line-height: 1.7;

  margin-bottom: 28px;

}

.primary {

  display: inline-flex;

  border: 0;

  border-radius: 11px;

  padding:
    13px 19px;

  background: #8b5cf6;

  color: white;

  font-weight: 900;

  text-decoration: none;

  cursor: pointer;

}

.primary:hover {
  filter: brightness(1.1);
}


/* HERO CARD */

.hero-card {

  width: 260px;

  padding: 28px;

  border:
    1px solid #ffffff18;

  background: #ffffff09;

  border-radius: 24px;

  display: flex;

  align-items: center;

  gap: 18px;

}

.orb {

  width: 70px;

  height: 70px;

  border-radius: 20px;

  display: grid;

  place-items: center;

  font-size: 35px;

  background: #ffffff10;

}

.hero-card small {

  display: block;

  color: #9ca3af;

}

.hero-card strong {

  font-size: 40px;

}


/* PROFILE */

.profile-wrap {

  padding:
    45px 8%;

  background: white;

}

.profile {

  max-width: 1050px;

  margin: auto;

  padding: 28px;

  border:
    1px solid #e7eaf0;

  border-radius: 22px;

  display: grid;

  grid-template-columns:
    1fr 1.4fr;

  gap: 25px;

  align-items: center;

}

.profile h2 {
  margin: 7px 0;
}

.profile p {

  color: #6b7280;

  line-height: 1.5;

}

.profile form {

  display: grid;

  grid-template-columns:
    1fr 1fr auto;

  gap: 10px;

}

.profile input {

  padding: 13px;

  border:
    1px solid #d9dee8;

  border-radius: 10px;

  font: inherit;

  outline: none;

}

.profile input:focus {
  border-color: #8b5cf6;
}

.form-msg {

  grid-column: 1 / -1;

  font-weight: 700;

}


/* STATS */

.stats {

  padding:
    28px 8%;

  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap: 16px;

  background: #f8f9fc;

}

.stat {

  background: white;

  border:
    1px solid #e8ebf1;

  border-radius: 18px;

  padding: 20px;

  display: grid;

  grid-template-columns:
    35px 1fr;

  column-gap: 8px;

}

.stat span {

  grid-row: 1 / 3;

  font-size: 25px;

}

.stat small {

  color: #8992a5;

  font-size: 10px;

  letter-spacing: 1.5px;

  font-weight: 900;

}

.stat b {
  font-size: 28px;
}


/* SECTIONS */

.section {

  padding:
    75px 8%;

  max-width: 1300px;

  margin: auto;

}

.section-head {

  display: flex;

  justify-content: space-between;

  align-items: end;

  margin-bottom: 28px;

}

.section-head h2 {

  font-size: 36px;

  margin-top: 7px;

}

.section-head > p {
  color: #6b7280;
}


/* GAMES */

.game-grid {

  display: grid;

  grid-template-columns:
    repeat(5, 1fr);

  gap: 15px;

}

.game-tile {

  min-height: 205px;

  text-align: left;

  border:
    1px solid #e4e8ef;

  border-radius: 20px;

  background: white;

  padding: 22px;

  cursor: pointer;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  transition: .2s;

  box-shadow:
    0 8px 25px #11182708;

}

.game-tile:hover {

  transform:
    translateY(-5px);

  border-color: #b9a5ff;

  box-shadow:
    0 15px 35px #8b5cf625;

}

.tile-icon {

  font-size: 40px;

  margin-bottom: 22px;

}

.game-tile b {
  font-size: 18px;
}

.game-tile small {

  color: #737c8d;

  line-height: 1.4;

  margin-top: 7px;

}

.game-tile em {

  font-style: normal;

  color: #7c3aed;

  font-weight: 900;

  font-size: 11px;

  margin-top: auto;

}


/* ADS */

.ad-block {

  padding:
    28px 8%;

  background: white;

  text-align: center;

}

.ad-label {

  font-size: 9px;

  letter-spacing: 2px;

  color: #9ca3af;

  margin-bottom: 8px;

}

.ad-slot {

  min-height: 105px;

  max-width: 728px;

  margin: auto;

  border:
    1px dashed #cdd3df;

  background: #fafbfc;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  color: #9aa2b1;

}

.ad-slot span {
  font-weight: 800;
}

.ad-slot small {
  margin-top: 5px;
}

.compact {
  min-height: 72px;
}


/* LEADERBOARD */

.leaderboard {

  background: white;

  border:
    1px solid #e7eaf0;

  border-radius: 18px;

  overflow: hidden;

}

.leader-row {

  display: grid;

  grid-template-columns:
    55px 1fr 100px 100px;

  padding:
    15px 20px;

  border-bottom:
    1px solid #edf0f4;

  align-items: center;

}

.leader-row:last-child {
  border: 0;
}

.rank {

  font-weight: 900;

  color: #7c3aed;

}

.leader-name {
  font-weight: 800;
}

.leader-row small {
  color: #7b8495;
}

.leader-row strong {
  text-align: right;
}


/* MODAL */

.modal {

  position: fixed;

  inset: 0;

  background: #02040acc;

  z-index: 100;

  display: none;

  align-items: center;

  justify-content: center;

  padding: 18px;

}

.modal.open {
  display: flex;
}

.modal-panel {

  width:
    min(850px, 100%);

  max-height: 94vh;

  overflow: auto;

  background: #101625;

  color: white;

  border:
    1px solid #ffffff18;

  border-radius: 25px;

  padding: 25px;

  position: relative;

}

.close {

  position: absolute;

  right: 18px;

  top: 14px;

  border: 0;

  background: #ffffff10;

  color: white;

  width: 38px;

  height: 38px;

  border-radius: 10px;

  font-size: 25px;

  cursor: pointer;

}

.modal-head {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding-right: 45px;

}

.modal-head h2 {

  font-size: 32px;

  margin-top: 5px;

}

.session-score {

  background: #ffffff0d;

  padding: 10px 13px;

  border-radius: 10px;

  color: #aab2c3;

}

.session-score b {

  color: white;

  margin-left: 5px;

}


/* GAME AREA */

.stage {

  min-height: 300px;

  background: #0a0f1b;

  border:
    1px solid #1f2937;

  border-radius: 18px;

  padding: 22px;

  position: relative;

}

.stage-center {

  min-height: 300px;

  display: grid;

  place-items: center;

  text-align: center;

}

.big-action {

  border: 0;

  background: #8b5cf6;

  color: white;

  border-radius: 50%;

  width: 130px;

  height: 130px;

  font-size: 28px;

  font-weight: 950;

  cursor: pointer;

}

.coin,
.target {

  position: absolute;

  border: 0;

  background: transparent;

  font-size: 40px;

  cursor: pointer;

}

.stage-info {

  display: flex;

  justify-content: space-between;

  margin-bottom: 14px;

  color: #aab2c3;

}


/* MEMORY */

.memory-grid {

  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap: 10px;

  max-width: 480px;

  margin: auto;

}

.memory-card {

  height: 70px;

  border: 0;

  border-radius: 12px;

  background: #282f42;

  color: white;

  font-size: 28px;

  cursor: pointer;

}

.memory-card.open,
.memory-card.matched {

  background: #8b5cf6;

}


/* REACTION */

.reaction-pad {

  height: 300px;

  border-radius: 15px;

  display: grid;

  place-items: center;

  background: #334155;

  color: white;

  font-size: 25px;

  font-weight: 900;

  cursor: pointer;

}

.reaction-pad.go {
  background: #16a34a;
}


/* GUESS */

.guess-form {

  text-align: center;

  padding: 45px 10px;

}

.guess-form input {

  padding: 14px;

  border-radius: 10px;

  border:
    1px solid #334155;

  background: #0b101c;

  color: white;

  width: 180px;

}

.guess-form button {

  padding: 14px 18px;

  border: 0;

  border-radius: 10px;

  background: #22d3ee;

  color: #061018;

  font-weight: 900;

  cursor: pointer;

}

.game-message {

  text-align: center;

  min-height: 25px;

  color: #cbd5e1;

  margin-top: 12px;

}


/* FOOTER */

footer {

  padding:
    50px 8%;

  background: #080b14;

  color: white;

  display: flex;

  justify-content: space-between;

  gap: 30px;

}

footer p {

  color: #8f98aa;

  margin-top: 8px;

}

footer small {
  color: #778092;
}


/* MOBILE */

@media(max-width: 950px) {

  .game-grid {

    grid-template-columns:
      repeat(2, 1fr);

  }

  .profile {

    grid-template-columns:
      1fr;

  }

  .profile form {

    grid-template-columns:
      1fr;

  }

  .stats {

    grid-template-columns:
      repeat(2, 1fr);

  }

  .hero-card {
    display: none;
  }

}


@media(max-width: 600px) {

  .topbar nav {
    display: none;
  }

  .hero {

    min-height: 430px;

    padding:
      55px 6%;

  }

  .hero h1 {
    letter-spacing: -2px;
  }

  .section {

    padding:
      55px 5%;

  }

  .game-grid {

    grid-template-columns:
      1fr;

  }

  .stats {

    padding:
      20px 5%;

  }

  .leader-row {

    grid-template-columns:
      40px 1fr 75px 75px;

  }

  .leader-row strong {
    font-size: 13px;
  }

  .memory-card {
    height: 60px;
  }

  .modal-panel {
    padding: 18px;
  }

  .modal-head h2 {
    font-size: 25px;
  }

}