/* Space Zombies VR on a page: the game's dusk sky, its ringed planet, the moon-dust yard,
   and its menu panel (cream card, thick ink outline, hard ink shadow, chunky coloured chips). */

@font-face {
  font-family: "Bangers";
  src: url("fonts/Bangers-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #17142b;
  --cream: #f5ecd8;
  --cream-dark: #e9dcc0;
  --teal: #3ec8c2;
  --purple: #7b63cc;
  --navy: #2e3561;
  --orange: #f0862c;
  --rust: #c9483a;
  --yellow: #f7c948;
  --lime: #b6e636;
  --moon: #e4def0;
  --comic: "Bangers", "Impact", "Arial Black", sans-serif;
}

* { box-sizing: border-box; }

html { background: #4a33a6; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Stars over the dusk sky: purple at the top, pink and peach at the horizon. */
  background:
    radial-gradient(1.5px 1.5px at 12% 8%, #fff 99%, transparent),
    radial-gradient(1px 1px at 27% 22%, #fff 99%, transparent),
    radial-gradient(2px 2px at 44% 6%, #fff 99%, transparent),
    radial-gradient(1px 1px at 61% 17%, #fff 99%, transparent),
    radial-gradient(1.5px 1.5px at 83% 11%, #fff 99%, transparent),
    radial-gradient(1px 1px at 93% 28%, #fff 99%, transparent),
    radial-gradient(1px 1px at 6% 34%, #fff 99%, transparent),
    radial-gradient(1.5px 1.5px at 72% 36%, #fff 99%, transparent),
    linear-gradient(180deg, #4a33a6 0%, #6a46b8 30%, #b25aa8 58%, #ec7f8c 78%, #f6a77e 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* The ringed planet, drawn in CSS, hanging in the sky behind the page. */
.planet {
  position: fixed;
  top: 40px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background:
    repeating-linear-gradient(-18deg,
      #e0662f 0 26px, #f39a3c 26px 44px, #c9483a 44px 62px, #f6b45a 62px 74px);
  z-index: 0;
  pointer-events: none;
}
.planet::after {
  content: "";
  position: absolute;
  left: -38%;
  top: 38%;
  width: 176%;
  height: 26%;
  border-radius: 50%;
  border: 9px solid #f6d6a8;
  outline: 4px solid var(--ink);
  outline-offset: -2px;
  box-shadow: 0 0 0 4px #9b7fd6, inset 0 0 0 4px #9b7fd6;
  transform: rotate(-18deg);
}
.moon {
  position: fixed;
  top: 330px;
  left: 4%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 35%, #fbf6ee, #cdbfe0 70%);
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 18px 40px;
}

.logo {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto -8px;
  filter: drop-shadow(0 6px 0 rgba(23, 20, 43, 0.35));
}

/* The game's menu panel. */
.panel {
  background: var(--cream);
  border: 5px solid var(--ink);
  border-radius: 6px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: 30px 34px 34px;
}

h1, h2 {
  font-family: var(--comic);
  font-weight: normal;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

h1 {
  font-size: 3.2em;
  margin: 0 0 6px;
  color: var(--lime);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-2deg);
  transform-origin: left center;
}

/* Section headings are the menu's chunky buttons, each in one of its colours. */
h2 {
  display: inline-block;
  font-size: 1.55em;
  margin: 1.5em 0 0.45em;
  padding: 6px 16px 3px;
  color: #fff;
  background: var(--teal);
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-1deg);
}
h2:nth-of-type(4n+2) { background: var(--purple); transform: rotate(0.8deg); }
h2:nth-of-type(4n+3) { background: var(--orange); transform: rotate(-0.6deg); }
h2:nth-of-type(4n+4) { background: var(--navy); transform: rotate(1deg); }

p { margin: 0.6em 0; }

a {
  color: #5b3fc0;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
a:hover { color: var(--rust); }

strong { color: var(--rust); }

/* The "NOW PLAYING" tag under the game's panel. */
.tag {
  display: inline-block;
  margin: 2px 0 10px;
  padding: 4px 14px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800;
  font-size: 0.85em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
}

/* The short version, as a comic burst. */
.burst {
  margin: 20px 0 6px;
  padding: 16px 20px;
  background: var(--lime);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  font-family: var(--comic);
  font-size: 1.7em;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-align: center;
  transform: rotate(1deg);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0.6em 0;
}
ul li {
  position: relative;
  padding: 8px 12px 8px 46px;
  margin: 8px 0;
  background: var(--cream-dark);
  border: 3px solid var(--ink);
  border-radius: 4px;
}
ul li::before {
  content: "\2715";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--rust);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
}

/* A small chip button, like the menu's BACK. */
.back {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 14px;
  background: var(--purple);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  color: #fff;
  font-family: var(--comic);
  font-size: 1.15em;
  font-weight: normal;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.back:hover { color: #fff; background: var(--teal); transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }

.button {
  display: inline-block;
  margin: 6px 0;
  padding: 10px 24px 6px;
  background: var(--teal);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  color: #fff;
  font-family: var(--comic);
  font-size: 1.6em;
  font-weight: normal;
  letter-spacing: 0.05em;
  text-decoration: none;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
}
.button:hover { color: #fff; background: var(--orange); transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }

.small { font-size: 0.88em; opacity: 0.8; }

/* The moon-dust yard the page stands on. */
.ground {
  position: relative;
  z-index: 1;
  height: 120px;
  margin-top: 10px;
  background:
    radial-gradient(ellipse 60px 14px at 18% 55%, #c9c0dc 98%, transparent),
    radial-gradient(ellipse 34px 9px at 47% 30%, #c9c0dc 98%, transparent),
    radial-gradient(ellipse 80px 16px at 78% 62%, #c9c0dc 98%, transparent),
    radial-gradient(ellipse 26px 7px at 90% 25%, #c9c0dc 98%, transparent),
    var(--moon);
  border-top: 5px solid var(--ink);
}
.ground p {
  margin: 0;
  padding-top: 46px;
  text-align: center;
  font-size: 0.85em;
  color: #5a5272;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .planet { width: 190px; height: 190px; right: -70px; top: 20px; }
  .moon { display: none; }
  .panel { padding: 22px 18px 26px; box-shadow: 7px 7px 0 var(--ink); }
  h1 { font-size: 2.5em; }
  h2 { font-size: 1.35em; }
  .burst { font-size: 1.35em; }
}
