@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --site-bg: #eaf7ff;
  --site-surface: #fff;
  --site-text: #14284c;
  --site-muted: #526482;
  --site-primary: #ff8a00;
  --site-primary-dark: #092552;
  --site-primary-light: #d8f5ff;
  --site-line: #b7d7ec;
  --site-shadow: 4px 5px 0 #092552;
  font-family: "Inter", Arial, sans-serif;
  color: var(--site-text);
  background: var(--site-bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

.platform-home {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 18%, rgb(255 191 0 / 18%) 0 5px, transparent 6px),
    radial-gradient(circle at 92% 28%, rgb(0 179 255 / 16%) 0 7px, transparent 8px),
    linear-gradient(135deg, transparent 0 48%, rgb(9 37 82 / 3%) 48% 52%, transparent 52%) 0 0 / 34px 34px,
    var(--site-bg);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 4px solid #00b7ee;
  background: rgb(9 37 82 / 94%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

@supports not ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .site-header {
    background: #092552;
  }
}

.site-header-inner {
  display: flex;
  width: min(1100px, 92%);
  min-height: 78px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0.9rem 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--site-text);
  text-decoration: none;
}

.site-brand-logo {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
  padding: 4px;
  filter: brightness(0) invert(1);
}

.site-brand-name {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.site-brand-name .site-brand-amp {
  color: #ffb400;
}

.site-brand-name small {
  display: block;
  margin-top: 0.2rem;
  color: #7fe4ff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.88rem;
  font-weight: 650;
}

.site-navigation a {
  color: #fff;
  text-decoration: none;
}

.site-navigation a:hover {
  color: #ffbd28;
}

.site-current-game {
  padding-left: 22px;
  border-left: 2px solid rgb(127 228 255 / 38%);
  color: #7fe4ff;
  font-weight: 750;
}

.game-catalog {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) 0;
}

.catalog-header {
  max-width: 720px;
  margin-bottom: 42px;
}

.catalog-eyebrow,
.player-count {
  margin: 0 0 12px;
  color: var(--site-primary);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.catalog-header h1 {
  margin: 0 0 18px;
  color: var(--site-primary-dark);
  font-size: clamp(2.15rem, 5vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 900;
}

.catalog-header > p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--site-muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  justify-items: start;
}

.game-card,
.mode-card {
  overflow: hidden;
  border: 3px solid var(--site-primary-dark);
  border-radius: 22px;
  background: var(--site-surface);
  box-shadow: var(--site-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.game-card {
  width: min(100%, 360px);
}

.game-card:hover,
.mode-card:hover {
  border-color: var(--site-primary-dark);
  box-shadow: 5px 6px 0 #00aee8;
  transform: translate(-3px, -3px) rotate(-0.35deg);
}

.game-card-content {
  padding: 28px;
}

.game-card-content h2,
.mode-card h2 {
  margin: 0 0 10px;
  color: var(--site-primary-dark);
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.game-card-content > p:not(.player-count),
.mode-card > p {
  margin: 0 0 24px;
  color: var(--site-muted);
  line-height: 1.6;
}

.game-card-content > p:not(.player-count) {
  min-height: 0;
}

.play-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 3px solid var(--site-primary-dark);
  border-radius: 12px;
  color: var(--site-primary-dark);
  background: linear-gradient(#ffd43b, #ff9500);
  box-shadow: 2px 3px 0 var(--site-primary-dark);
  font-weight: 900;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.play-link:hover {
  border-color: var(--site-primary-dark);
  background: linear-gradient(#ffe363, #ffad18);
  box-shadow: 1px 2px 0 var(--site-primary-dark);
  filter: saturate(1.08);
  transform: translate(2px, 2px);
}

.play-link:focus-visible,
.site-brand:focus-visible,
.site-navigation a:focus-visible,
.back-link:focus-visible {
  outline: 3px solid rgb(58 133 113 / 28%);
  outline-offset: 3px;
}

.launch-page {
  max-width: 1100px;
}

.launch-game-logo {
  display: block;
  width: min(520px, 88vw);
  height: auto;
  max-height: 250px;
  margin: -14px 0 -28px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 12px 16px rgb(16 40 63 / 14%));
  transform: translateX(-10.5%);
}

.launch-page .catalog-header {
  margin-bottom: 18px;
}

.launch-page .catalog-eyebrow {
  margin-bottom: 8px;
}

.launch-page .catalog-header h1 {
  margin-bottom: 12px;
}

.live-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 28px;
  width: fit-content;
  padding: 10px 16px;
  border: 2px solid var(--site-primary-dark);
  border-radius: 999px;
  color: var(--site-primary-dark);
  background: rgb(255 255 255 / 78%);
  box-shadow: 2px 3px 0 rgb(9 37 82 / 18%);
  font-size: 0.86rem;
  font-weight: 700;
}

.live-stats[hidden] {
  display: none;
}

.live-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.live-stats strong {
  color: var(--site-primary-dark);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.16rem;
  border-radius: 50%;
  background: #2ca66f;
  box-shadow: 0 0 0 3px rgb(44 166 111 / 14%);
}

.back-link {
  display: inline-block;
  margin-bottom: 30px;
  color: var(--site-primary-dark);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
}

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

.launch-page.is-invited {
  max-width: 560px;
}

.invite-grid {
  grid-template-columns: minmax(0, 1fr);
}

.invite-grid .mode-card {
  min-height: 0;
}

.mode-card {
  display: flex;
  min-height: 370px;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
}

.mode-card:nth-child(1) { background: #fff7cf; }
.mode-card:nth-child(2) { background: #e1f8ff; }
.mode-card:nth-child(3) { background: #f0e8ff; }

.mode-icon {
  display: grid;
  min-width: 48px;
  min-height: 48px;
  margin-bottom: 24px;
  place-items: center;
  border: 3px solid var(--site-primary-dark);
  border-radius: 14px;
  color: var(--site-primary-dark);
  background: #ffba18;
  box-shadow: 2px 3px 0 var(--site-primary-dark);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.mode-card > .play-link {
  margin-top: auto;
}

.room-form {
  display: grid;
  width: 100%;
  gap: 14px;
  margin-top: auto;
}

.room-form label {
  display: grid;
  gap: 7px;
  color: var(--site-primary-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.room-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 3px solid var(--site-primary-dark);
  border-radius: 11px;
  color: var(--site-text);
  background: #fff;
}

.room-form input:focus {
  border-color: #00aee8;
  outline: 4px solid rgb(0 174 232 / 18%);
}

.room-form input[name="code"] {
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.room-form .play-link {
  border: 0;
  cursor: pointer;
}

.room-form .play-link:disabled {
  cursor: wait;
  opacity: 0.55;
}

.form-message {
  min-height: 1.5em;
  margin: 20px 0 0;
  color: #a12f28;
  font-weight: 700;
}

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

  .mode-card {
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .launch-game-logo {
    width: min(410px, 100%);
    margin-top: -6px;
  }

  .site-header-inner {
    min-height: auto;
  }

  .site-brand-logo {
    width: 50px;
    height: 50px;
  }

  .site-current-game {
    display: none;
  }

  .site-navigation {
    display: none;
  }

  .catalog-header {
    margin-bottom: 30px;
  }

  .mode-card,
  .game-card-content {
    padding: 23px;
  }
}
