/* link.shattergrounds.com - the page behind the game's invite links (see README.md). The game's look: its blue
   gradient, its drifting logo pattern, Anton for titles and buttons, the yellow button. */

@font-face {
  font-family: "Anton";
  src: url("/assets/anton.woff2") format("woff2");
  font-display: swap;
}

:root {
  --blue-a: #2979ff;
  --blue-b: #0045ba;
  --navy: #0a2463;
  --navy-deep: #061a4a;
  --panel: rgba(4, 22, 74, 0.55);
  --panel-edge: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.78);
  --yellow-a: #ffe066;
  --yellow-b: #ffb703;
  --yellow-edge: #c97a00;
  --store: #ffffff;
  --store-text: #0a2463;
  --store-edge: #b9c6e6;
  --radius: 26px;
  --title-font: "Anton", "Arial Narrow", Impact, system-ui, sans-serif;
  --body-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

/* The colour behind everything: what shows past the gradient when a long page scrolls or bounces. */
html { background: var(--blue-b); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(135deg, var(--blue-a) 0%, var(--blue-b) 100%);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The logo pattern of the game's backgrounds: white at 7%, the grid turned 4 degrees, drifting slowly. */
.pattern {
  position: fixed;
  inset: -50%;
  z-index: 0;
  pointer-events: none;
  background-image: url("/assets/pattern.png");
  background-size: 350px 500px;
  opacity: 0.07;
  transform: rotate(4deg);
  animation: drift 60s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 700px 1000px; }
}

@media (prefers-reduced-motion: reduce) {
  .pattern { animation: none; }
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 2px solid var(--panel-edge);
  box-shadow: 0 18px 50px rgba(0, 12, 50, 0.45);
  text-align: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; }
.brand-mark { width: 72px; height: 72px; filter: drop-shadow(0 4px 0 var(--navy-deep)); }
.brand-name {
  font-family: var(--title-font);
  font-size: 30px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 3px 0 var(--navy-deep);
}

.title {
  margin: 0 0 6px;
  font-family: var(--title-font);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.12;
  text-transform: uppercase;
  text-shadow: 0 3px 0 var(--navy-deep);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.subtitle { margin: 0 0 18px; color: var(--text-soft); text-wrap: balance; }
.subtitle:empty { display: none; }

.code {
  margin: 0 0 20px;
  padding: 12px 14px 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.25);
}
.code-label {
  display: block;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-soft);
}
.code-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; flex-wrap: wrap; }
.code-value {
  font-family: var(--title-font);
  font-size: 46px;
  letter-spacing: 6px;
  line-height: 1.1;
  user-select: all;
  -webkit-user-select: all;
}
.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  font: 600 15px var(--body-font);
  cursor: pointer;
}
.code-copy:hover { background: rgba(255, 255, 255, 0.24); }
.code-copy:focus-visible, .btn:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }

.actions { display: flex; flex-direction: column; gap: 12px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 18px 12px;
  border-radius: 16px;
  font-family: var(--title-font);
  font-size: 22px;
  letter-spacing: 0.5px;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(3px); }

/* The game's yellow button: a lighter top, a darker lip underneath. */
.btn-primary {
  color: var(--navy);
  background: linear-gradient(180deg, var(--yellow-a) 0%, var(--yellow-b) 100%);
  box-shadow: 0 5px 0 var(--yellow-edge), 0 10px 18px rgba(0, 10, 40, 0.35);
}
.btn-primary:active { box-shadow: 0 2px 0 var(--yellow-edge), 0 6px 12px rgba(0, 10, 40, 0.35); }

.btn-store {
  color: var(--store-text);
  background: var(--store);
  box-shadow: 0 5px 0 var(--store-edge), 0 10px 18px rgba(0, 10, 40, 0.3);
  font-size: 19px;
}
.btn-store:active { box-shadow: 0 2px 0 var(--store-edge), 0 6px 12px rgba(0, 10, 40, 0.3); }

.soon { margin: 4px 0 0; color: var(--text-soft); font-weight: 600; }

.desktop { margin-top: 18px; color: var(--text-soft); }
.desktop p { margin: 0 0 14px; }
.qr {
  display: inline-block;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  line-height: 0;
}
.qr svg { width: 200px; height: 200px; display: block; }

.hint { margin: 18px 0 0; font-size: 14px; color: var(--text-soft); }
.hint:empty { display: none; }

.footer {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.noscript { position: relative; z-index: 1; }

[hidden] { display: none !important; }

@media (max-width: 360px) {
  .card { padding: 22px 16px 18px; }
  .title { font-size: 26px; }
  .code-value { font-size: 38px; letter-spacing: 4px; }
  .btn { font-size: 19px; }
}
