@-webkit-keyframes anim {
  0%   { -webkit-transform: translateY(10px) }
  50% { -webkit-transform: translateY(-10px) }
  100% { -webkit-transform: translateY(10px) }
}
@-moz-keyframes anim {
  0%   { -moz-transform: translateY(10px) }
  50% { -moz-transform: translateY(-10px) }
  100% { -moz-transform: translateY(10px) }
}
@-o-keyframes anim {
  0%   { -o-transform: translateY(10px) }
  50% { -o-transform: translateY(-10px) }
  100% { -o-transform: translateY(10px) }
}
@keyframes anim {
  0%   { transform: translateY(10px) }
  50% { transform: translateY(-10px) }
  100% { transform: translateY(10px) }
}

@-webkit-keyframes animbg {
  0%   { -webkit-transform: translateY(5px) }
  50% { -webkit-transform: translateY(-5px) }
  100% { -webkit-transform: translateY(5px) }
}
@-moz-keyframes animbg {
  0%   { -moz-transform: translateY(5px) }
  50% { -moz-transform: translateY(-5px) }
  100% { -moz-transform: translateY(5px) }
}
@-o-keyframes animbg {
  0%   { -o-transform: translateY(5px) }
  50% { -o-transform: translateY(-5px) }
  100% { -o-transform: translateY(5px) }
}
@keyframes animbg {
  0%   { transform: translateY(5px) }
  50% { transform: translateY(-5px) }
  100% { transform: translateY(5px) }
}

@keyframes starDrift {
  0% { background-position: center 0; }
  100% { background-position: center 48px; }
}

@keyframes titleArrival {
  0% {
    opacity: 0;
    transform: translateY(-18px) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes menuArrival {
  0% {
    opacity: 0;
    transform: translateY(26px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes prismFlow {
  0% {
    transform: translate3d(-2%, -1%, 0) rotate(0deg) scale(1.08);
    filter: blur(28px) grayscale(1) contrast(1.42);
  }
  50% {
    transform: translate3d(2%, 2%, 0) rotate(7deg) scale(1.18);
    filter: blur(34px) grayscale(1) contrast(1.68);
  }
  100% {
    transform: translate3d(-2%, -1%, 0) rotate(0deg) scale(1.08);
    filter: blur(28px) grayscale(1) contrast(1.42);
  }
}

@keyframes prismSweep {
  0% {
    transform: translate3d(-16%, 8%, 0) rotate(-12deg) scale(1);
    opacity: 0.16;
  }
  46% {
    transform: translate3d(10%, -6%, 0) rotate(10deg) scale(1.1);
    opacity: 0.3;
  }
  100% {
    transform: translate3d(-16%, 8%, 0) rotate(-12deg) scale(1);
    opacity: 0.16;
  }
}

* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html, body {
  overflow: hidden;
  font-family: 'BebasNeueRegular', arial, sans-serif;
  background: #030406;
}

#global {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background: url('bg.jpg') no-repeat center center fixed;
  background-color: #030406;
  overflow: hidden;
  text-align: center;
  -moz-background-size: cover;
  -webkit-background-size: cover;
  -ms-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
}

#global:before {
  position: absolute;
  inset: 0;
  display: block;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.14) 44%, rgba(0, 0, 0, 0.78) 100%),
    radial-gradient(ellipse at 50% 62%, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.06) 44%, rgba(0, 0, 0, 0) 72%);
  pointer-events: none;
}

#prism-gradient {
  position: absolute;
  inset: -18%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.62;
}

#prism-gradient:before,
#prism-gradient:after {
  position: absolute;
  inset: 0;
  display: block;
  content: "";
  will-change: transform, opacity, filter;
}

#prism-gradient:before {
  background:
    conic-gradient(from 214deg at 50% 52%,
      rgba(255, 255, 255, 0) 0deg,
      rgba(255, 255, 255, 0.16) 32deg,
      rgba(255, 255, 255, 0.03) 62deg,
      rgba(255, 255, 255, 0.28) 91deg,
      rgba(255, 255, 255, 0.02) 136deg,
      rgba(255, 255, 255, 0.2) 176deg,
      rgba(255, 255, 255, 0.04) 228deg,
      rgba(255, 255, 255, 0.22) 284deg,
      rgba(255, 255, 255, 0) 360deg),
    radial-gradient(circle at 44% 48%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 36%),
    radial-gradient(ellipse at 60% 68%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 44%);
  animation: prismFlow 18s ease-in-out infinite;
}

#prism-gradient:after {
  inset: 12% -6%;
  background:
    linear-gradient(112deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.18) 28%,
      rgba(255, 255, 255, 0.02) 38%,
      rgba(255, 255, 255, 0.24) 52%,
      rgba(255, 255, 255, 0.02) 63%,
      rgba(255, 255, 255, 0.16) 78%,
      rgba(255, 255, 255, 0) 100%);
  filter: blur(18px) grayscale(1);
  animation: prismSweep 14s ease-in-out infinite;
}

#title {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 52%;
  left: 0;
  z-index: 2;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  opacity: 0;
  animation: titleArrival 900ms ease 180ms forwards;
}

#spacex-logo {
  display: block;
  width: min(52vw, 560px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.74));
  pointer-events: none;
}

@media (max-width: 760px) {
  #spacex-logo {
    width: min(78vw, 480px);
  }

  #menu {
    font-size: 1.45em;
  }
}

#menucontainer {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 18%;
  left: 0;
  z-index: 3;
  opacity: 0;
  animation: menuArrival 850ms ease 420ms forwards;
}

#menu {
  position: relative;
  display: block;
  width: 100%;
  max-width: 460px;
  margin: auto;
  text-align: center;
  font-size: 1.52em;
  font-family: 'BebasNeueRegular', arial, sans-serif;
  text-transform: uppercase;
  color: #eef3f5;
}

#menu div {
  padding: 0.02em 0 0 0;
  margin: 0.015em 0;
  cursor: pointer;
  -moz-text-shadow: 0 12px 26px rgba(0,0,0,0.46);
  -webkit-text-shadow: 0 12px 26px rgba(0,0,0,0.46);
  text-shadow: 0 12px 26px rgba(0,0,0,0.46);
  -webkit-transform-origin-y: 50%;
  -webkit-transition: -webkit-transform 0.2s, color 0.2s, opacity 0.2s;
  -webkit-transform: translateZ(0px) scaleY(0.8);
  transform-origin-y: 50%;
  transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  transform: translateZ(0px) scaleY(0.8);
  background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjQwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjUiLz4KICAgIDxzdG9wIG9mZnNldD0iNjAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuNSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
  background: none;
}

#wallet-status {
  color: rgba(245, 255, 249, 0.58);
  font-size: 0.82em;
  pointer-events: none;
}

#menu div:hover {
  color: #ffffff;
  -webkit-transform: scaleY(1.0);
  transform: scaleY(1.1);
}

#start {
  font-size: 2.12em;
  color: #f5fff9;
}

#start.connecting {
  color: rgba(245, 255, 249, 0.58);
  pointer-events: none;
}

#start:hover {
  color: #ffffff !important;
}

.home-panel {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 4, 6, 0.62);
}

.panel-inner {
  width: min(620px, 88vw);
  max-height: min(760px, 86vh);
  overflow: auto;
  padding: 30px 34px 28px;
  color: #f5fff9;
  font-family: Arial, sans-serif;
  background: rgba(3, 4, 6, 0.82);
  border: 1px solid rgba(245, 255, 249, 0.16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.panel-inner h2 {
  margin: 0 0 22px;
  font-family: 'BebasNeueRegular', arial, sans-serif;
  font-size: 3.2em;
  font-weight: normal;
  line-height: 1;
}

.panel-inner p {
  margin: 0 0 16px;
  color: rgba(245, 255, 249, 0.78);
  font-size: 15px;
  line-height: 1.45;
}

.faq-controls {
  margin: 0 0 18px;
  color: rgba(245, 255, 249, 0.8);
  font-size: 15px;
  line-height: 1.45;
}

.faq-controls > b {
  display: block;
  margin: 0 0 10px;
  color: #f5fff9;
}

.faq-controls p {
  margin: 12px 0 0;
}

.kbd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 5px 0;
}

.kbd-label {
  flex: 0 0 104px;
  color: rgba(245, 255, 249, 0.58);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  color: #f5fff9;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(8, 10, 13, 0.76);
  border: 1px solid rgba(245, 255, 249, 0.26);
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.42),
    0 8px 22px rgba(0, 0, 0, 0.28);
}

#leaderboard-status {
  min-height: 18px;
}

.panel-inner ol {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.panel-inner li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 255, 249, 0.12);
  font-size: 16px;
}

.panel-inner b {
  color: #f5fff9;
}

.panel-close {
  width: 100%;
  padding: 12px 16px;
  color: #f5fff9;
  font: 1.45em 'BebasNeueRegular', arial, sans-serif;
  text-transform: uppercase;
  background: linear-gradient(90deg, rgba(245, 255, 255, 0.18), rgba(130, 145, 165, 0.16));
  border: 0;
  cursor: pointer;
}

#step-2 {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: black;
  vertical-align: bottom;
  text-align: center;
  padding: 20px;
  color: white;
  font-size: 2em;
  background-repeat: no-repeat;
  background-position: center center;
  -moz-background-size: 60% auto;
  -webkit-background-size: 60% auto;
  -ms-background-size: 60% auto;
  -o-background-size: 60% auto;
  background-size: 60% auto;
}

#step-4 {
  position: absolute;
  inset: 0;
}

#game-home {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 10001;
  min-width: 96px;
  padding: 10px 16px 8px;
  color: #f5fff9;
  font: 1.25em 'BebasNeueRegular', arial, sans-serif;
  text-transform: uppercase;
  background: rgba(3, 4, 6, 0.58);
  border: 0;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

#game-home:hover {
  background: rgba(245, 255, 249, 0.12);
}

#game-playerbar {
  position: absolute;
  top: 22px;
  left: 138px;
  z-index: 10001;
  display: grid;
  grid-template-columns: 130px 150px 110px;
  gap: 1px;
  color: rgba(245, 255, 249, 0.9);
  font-family: Arial, sans-serif;
  background: rgba(245, 255, 249, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.game-stat {
  min-height: 58px;
  padding: 11px 14px 9px;
  background: rgba(3, 4, 6, 0.64);
  backdrop-filter: blur(10px);
}

.game-stat span {
  display: block;
  margin: 0 0 4px;
  color: rgba(245, 255, 249, 0.52);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-stat b {
  display: block;
  color: #f5fff9;
  font-size: 18px;
  line-height: 1.05;
  white-space: nowrap;
}

.game-stat-primary b {
  font: 2.1em 'BebasNeueRegular', arial, sans-serif;
  line-height: 0.88;
}

#game-leaderboard {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 10001;
  width: min(390px, 34vw);
  min-height: 360px;
  padding: 20px 22px 18px;
  color: rgba(245, 255, 249, 0.88);
  font-family: Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(245, 255, 249, 0.08), rgba(245, 255, 249, 0.02)),
    rgba(3, 4, 6, 0.66);
  border: 1px solid rgba(245, 255, 249, 0.12);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

#game-leaderboard h2 {
  margin: 0 0 14px;
  font: 2.05em 'BebasNeueRegular', arial, sans-serif;
  font-weight: normal;
  line-height: 1;
  text-transform: uppercase;
}

#game-leaderboard ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

#game-leaderboard li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(245, 255, 249, 0.09);
  font-size: 13px;
  line-height: 1.2;
}

#game-leaderboard li:first-child {
  color: #ffffff;
}

#game-leaderboard b {
  color: #f5fff9;
  white-space: nowrap;
}

#game-leaderboard-status {
  margin: 14px 0 0;
  color: rgba(245, 255, 249, 0.48);
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  #title {
    animation-delay: 180ms;
  }

  #menucontainer {
    animation-delay: 420ms;
  }

  #game-leaderboard {
    top: auto;
    right: 12px;
    bottom: 18px;
    width: min(300px, 62vw);
    min-height: 260px;
    padding: 10px 12px;
  }

  #game-playerbar {
    top: 74px;
    left: 12px;
    grid-template-columns: 1fr;
    width: min(180px, 34vw);
  }

  .game-stat {
    min-height: auto;
    padding: 8px 10px;
  }
}

#ctrl-help {
  display: none;
}

#step-3 {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: black;
}

#step-3 #progressbar {
  position: absolute;
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  width: 0%;
  background: white;
}

#step-5 {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: black;
  text-align: center;
  padding: 100px 20px;
  color: white;
  font-size: 2em;
}

#step-5 #time {
  font-size: 4em
}

#leapinfo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.8);
  color: white;
  text-align: center;
  font-size: 3em;
  padding-top: 200px;
  z-index: 999999;
}

#credits {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  background: black;
  overflow-y: auto;
  text-align: center;
  color: white;
  font-size: 1.1em;
  padding: 40px 20px;
}

#credits h3 {
  font-size: 2em;
  color: #666;
}

#credits b {
  font-size: 1.2em;
  color: #bbb;
}

#credits h4 {
  color: #555;
  font-size: 1.2em;
}
