:root {
  --g: #ffd54a;
  --o: #ff7a00;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #07080c;
  overflow: hidden;
  font-family: Bungee, Impact, sans-serif;
  color: #fff;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

#app {
  position: relative;
  overflow: hidden;
  background: #000;
}

#c {
  width: 100%;
  height: 100%;
  display: block;
}

.hide {
  display: none !important;
}

.btn {
  font: inherit;
  font-size: 1.3em;
  letter-spacing: 0.04em;
  color: #3b1700;
  border: 0;
  border-radius: 0.7em;
  padding: 0.55em 1.6em;
  cursor: pointer;
  background: linear-gradient(#fff2a8, #ffc21f 45%, #ff8a00);
  box-shadow:
    0 0.35em 0 #9a4300,
    0 0.6em 0.9em #0009,
    inset 0 0.1em 0 #fff9;
  text-shadow: 0 0.06em 0 #fff8;
  transition:
    transform 0.08s,
    box-shadow 0.08s;
  margin: 0.35em;
  min-width: 9em;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(0.3em);
  box-shadow:
    0 0.05em 0 #9a4300,
    0 0.2em 0.4em #0009,
    inset 0 0.1em 0 #fff9;
}

.btn.blue {
  color: #fff;
  background: linear-gradient(#9fe0ff, #2f9bff 45%, #1850d8);
  box-shadow:
    0 0.35em 0 #0c2a82,
    0 0.6em 0.9em #0009,
    inset 0 0.1em 0 #fff9;
  text-shadow: 0 0.06em 0 #0006;
}

.btn.blue:active {
  box-shadow:
    0 0.05em 0 #0c2a82,
    0 0.2em 0.4em #0009;
}

.btn.dark {
  color: #fff;
  background: linear-gradient(#6b7388, #363c4d 50%, #1f2330);
  box-shadow:
    0 0.35em 0 #0b0d14,
    0 0.6em 0.9em #0009,
    inset 0 0.1em 0 #fff4;
  text-shadow: none;
}

#ui {
  position: absolute;
  inset: 0;
}

.scr {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, #0000 30%, #000a);
}

#lg {
  width: 52%;
  filter: drop-shadow(0 0.4em 0.6em #000a);
  animation: fl 3s ease-in-out infinite;
}

@keyframes fl {
  50% {
    transform: translateY(-0.4em) scale(1.02);
  }
}

.hint {
  font-size: 0.62em;
  opacity: 0.8;
  text-align: center;
  line-height: 1.7;
  margin: 0.6em 2em 0;
  text-shadow: 0 0.1em 0.2em #000;
}

h2 {
  font-size: 1.9em;
  margin: 0.2em 0 0.4em;
  color: var(--g);
  text-shadow:
    0 0.1em 0 #9a4300,
    0 0.2em 0.5em #000;
}

#grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.7em;
  width: 92%;
}

.card {
  position: relative;
  aspect-ratio: 3/4.1;
  border-radius: 0.8em;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(#3a4466, #12162a);
  border: 0.18em solid #8d98c8;
  box-shadow:
    0 0.3em 0 #0a0d1c,
    0 0.6em 1em #000a;
  transition: transform 0.15s;
}

.card:hover {
  transform: translateY(-0.3em) scale(1.03);
}

.card.on {
  border-color: var(--g);
  box-shadow:
    0 0 1.4em var(--cc),
    0 0.3em 0 #0a0d1c;
}

.card img {
  position: absolute;
  left: 50%;
  bottom: 22%;
  height: 68%;
  transform: translateX(-50%);
  filter: drop-shadow(0 0.3em 0.3em #000a);
}

.card p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.5em 0 0.3em;
  text-align: center;
  font-size: 0.8em;
  background: linear-gradient(#0000, #000c 40%);
}

.card s {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 0.28em;
  background: #0008;
  border-radius: 1em;
  text-decoration: none;
}

.card s i {
  display: block;
  height: 100%;
  border-radius: 1em;
  background: linear-gradient(90deg, #ffe36b, #ff6a00);
}

.card s:nth-of-type(1) {
  bottom: 7%;
}

.card s:nth-of-type(2) {
  bottom: 3.5%;
}

.modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000a;
  z-index: 9;
}

.panel {
  min-width: 22em;
  padding: 1.6em 2em;
  text-align: center;
  border-radius: 1.2em;
  background: linear-gradient(#2c3558, #141a33);
  border: 0.22em solid transparent;
  background-clip: padding-box;
  position: relative;
  box-shadow:
    0 0 0 0.22em #ffcf4a,
    0 0 0 0.4em #8a4a00,
    0 1.2em 2.5em #000;
  animation: pp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.panel:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1em;
  background: linear-gradient(#fff3, #0000 40%);
  pointer-events: none;
}

@keyframes pp {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

.panel h2 {
  font-size: 2.2em;
}

.panel p {
  margin: 0.2em 0 1em;
  font-size: 0.9em;
}

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pl {
  position: absolute;
  top: 2.2%;
  width: 39%;
}

.pl.l {
  left: 2.5%;
}

.pl.r {
  right: 2.5%;
  text-align: right;
}

.pl b {
  font-size: 1.05em;
  text-shadow: 0 0.1em 0.15em #000;
}

.bar {
  position: relative;
  height: 1.5em;
  margin-top: 0.1em;
  border-radius: 0.4em;
  background: #000b;
  border: 0.18em solid #fff;
  box-shadow:
    0 0.2em 0.5em #000a,
    inset 0 0 0.5em #000;
  overflow: hidden;
  transform: skewX(-12deg);
}

.r .bar {
  transform: skewX(12deg) scaleX(-1);
}

.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
}

.fl {
  width: 100%;
  background: linear-gradient(#fff7a8, #ffd400 40%, #ff9a00 41%, #e04a00);
  transition: width 0.08s;
}

.tr {
  width: 100%;
  background: #fff;
  transition: width 0.5s 0.45s;
}

.bar:after {
  content: "";
  position: absolute;
  inset: 0 0 55% 0;
  background: linear-gradient(#fffa, #fff0);
}

.mt {
  height: 0.55em;
  margin-top: 0.3em;
  width: 70%;
  border-radius: 0.3em;
  background: #000a;
  border: 0.12em solid #9ad;
  overflow: hidden;
  transform: skewX(-12deg);
}

.r .mt {
  margin-left: 30%;
  transform: skewX(12deg) scaleX(-1);
}

.mt i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(#aef, #27f);
}

.mt.full i {
  background: linear-gradient(#fff, #f5f);
  animation: bl 0.4s infinite alternate;
}

@keyframes bl {
  to {
    filter: brightness(1.6);
  }
}

.pip {
  margin-top: 0.3em;
  font-size: 1.1em;
  letter-spacing: 0.15em;
  color: #ffd54a;
  text-shadow: 0 0.1em 0.2em #000;
  min-height: 1.2em;
}

#tm {
  position: absolute;
  left: 50%;
  top: 1.6%;
  transform: translateX(-50%);
  width: 3em;
  height: 3em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  background: radial-gradient(#fff 5%, #ffcc33 30%, #c65a00 75%);
  color: #3b1700;
  border: 0.12em solid #fff;
  box-shadow:
    0 0.15em 0 #7a3600,
    0 0.3em 0.6em #000a;
}

#bn {
  position: absolute;
  left: 0;
  right: 0;
  top: 36%;
  text-align: center;
  font-size: 5em;
  color: #ffe36b;
  text-shadow:
    0 0.06em 0 #b23d00,
    0 0.12em 0 #6a2200,
    0 0.3em 0.5em #000;
  -webkit-text-stroke: 0.03em #5a1c00;
  opacity: 0;
}

#bn.go {
  animation: bn 1.1s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}

@keyframes bn {
  0% {
    transform: scale(3);
    opacity: 0;
  }
  25% {
    transform: scale(1);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0;
  }
}

.cb {
  position: absolute;
  top: 24%;
  font-size: 2em;
  color: #ffe36b;
  text-shadow:
    0 0.08em 0 #b23d00,
    0 0.2em 0.3em #000;
  opacity: 0;
}

.cb.go {
  animation: cb 0.8s ease-out forwards;
}

#cb0 {
  left: 6%;
}

#cb1 {
  right: 6%;
}

@keyframes cb {
  0% {
    transform: scale(1.8) rotate(-6deg);
    opacity: 1;
  }
  20% {
    transform: scale(1) rotate(-6deg);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.sm {
  position: absolute;
  bottom: 2%;
  right: 1.5%;
  display: flex;
  gap: 0.4em;
  pointer-events: auto;
}

.sm .btn {
  min-width: 0;
  font-size: 0.8em;
  padding: 0.3em 0.8em;
  margin: 0;
}

#tp {
  position: absolute;
  inset: auto 0 3% 0;
  display: flex;
  justify-content: space-between;
  padding: 0 2%;
  pointer-events: none;
  opacity: 0.85;
}

#tp b {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8em;
  height: 2.8em;
  margin: 0.2em;
  border-radius: 50%;
  background: linear-gradient(#fff6, #fff2);
  border: 0.15em solid #fffb;
  font-size: 1.1em;
  box-shadow: 0 0.2em 0.4em #0008;
  touch-action: none;
}
