:root {
  --c-bg: #302f2c;
  --c-fg: #F3F3E8;
  --c-mid: #707067;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
  background-color: var(--c-bg);
  color: var(--c-fg);
  overflow-x: hidden;
  overscroll-behavior-y: none;
  font-family: Arial, sans-serif;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  color: var(--c-bg);
  background-color: var(--c-fg);
  font-size: 1em;
  width: 2em;
  border-radius: 0.125em;
  display: flex;
  justify-content: center;
  align-items: center;
}

#app {
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#app::-webkit-scrollbar {
    display: none;
}

.slide {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.emoji {
  text-shadow: 0 0 3px var(--c-fg), 0 0 3px var(--c-fg), 0 0 3px var(--c-fg);
}

.big {
  font-size: 30vmin;
}

.slots {
  margin-bottom: 0.25em;
}

.slots .emoji {
  display: inline-block;
  font-size: 0.25em;
  opacity: 0.25;
  margin: 0 0.2em;
}

.slots .emoji.filled {
  opacity: 1;
}

.progress-container {
  width: 50vmin;
  height: 2vmin;
  background-color: var(--c-mid);
  border-radius: 1vmin;
  margin-bottom: 0.5em;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--c-fg);
  width: 0%;
}

.catch-wrapper {
  position: relative;
  width: 50vmin;
  margin-bottom: 0.5em;
}

.catch-container {
  width: 100%;
  height: 4vmin;
  background-color: var(--c-mid);
  border-radius: 2vmin;
  position: relative;
  overflow: hidden;
}

.catch-finger {
  position: absolute;
  bottom: 100%;
  transform: translateX(-50%);
  font-size: 4vmin;
  padding-bottom: 0.5vmin;
  pointer-events: none;
}

.catch-target {
  position: absolute;
  height: 100%;
  background-color: rgba(255, 255, 0, 0.2);
  border: 2px dashed var(--c-fg);
  box-sizing: border-box;
  border-radius: 1vmin;
}

.catch-indicator {
  position: absolute;
  height: 100%;
  width: 1vmin;
  background-color: var(--c-fg);
  transform: translateX(-50%);
}

.slot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.1em;
}

.home {
  font-size: 4em;
  text-align: center;
}

.home h1 {
  font-size: 1em;
}

.home h4 {
  color: #707067;
}

.cta {
  margin: 1em 0px;
  border: none;
  background: transparent;
  font-size: 2em;
  width: auto;
}

.hud {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1;
  font-size: 5vmin;
  text-shadow: 0 0 3px #222, 0 0 5px #222, 0 0 20px #555;
}

.inventory-hud {
  position: fixed;
  bottom: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 15px;
  z-index: 1;
}

.inventory-item {
  position: relative;
  font-size: 6vmin;
  transition: filter 0.2s ease-out;
}

.inventory-item.arriving {
  filter: grayscale(100%) opacity(50%);
}

.badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background-color: var(--c-fg);
  color: var(--c-bg);
  font-size: 0.4em;
  border-radius: 50%;
  width: 1.5em;
  height: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.circular-progress {
  width: 8.75vmin;
  height: 8.75vmin;
  position: absolute;
  pointer-events: none;
  transform: rotate(-90deg);
}

.flying-coins-layer,
.flying-items-layer {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100;
}

.flying-coin {
  position: fixed;
  font-size: 5vmin;
  pointer-events: none;
  z-index: 100;
  margin-left: -2.5vmin;
  margin-top: -2.5vmin;
  text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.flying-item {
  position: fixed;
  font-size: 6vmin;
  pointer-events: none;
  z-index: 100;
  margin-left: -3vmin;
  margin-top: -3vmin;
  text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.flying-item-inner {
  animation-name: flying-wobble;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

@keyframes flying-wobble {
  0% { transform: translateX(0) rotate(0deg); }
  15% { transform: translateX(-2vmin) rotate(-15deg); }
  30% { transform: translateX(2vmin) rotate(15deg); }
  45% { transform: translateX(-2vmin) rotate(-15deg); }
  60% { transform: translateX(2vmin) rotate(15deg); }
  75% { transform: translateX(-1vmin) rotate(-7deg); }
  85% { transform: translateX(0.5vmin) rotate(3deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

.ghost-layer {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100;
}

.ghost-wrapper {
  position: fixed;
  pointer-events: none;
  z-index: 100;
  animation: ghost-float 2s ease-out forwards;
}

.ghost-emoji {
  font-size: 10vmin;
  margin-left: -5vmin;
  margin-top: -5vmin;
  animation: ghost-wobble 0.4s ease-in-out infinite alternate;
}

@keyframes ghost-float {
  0% { opacity: 0.9; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20vmin); }
}

@keyframes ghost-wobble {
  0% { transform: translateX(-2vmin); }
  100% { transform: translateX(2vmin); }
}

.star-layer, .cloud-layer {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100;
}

.star-wrapper {
  position: fixed;
  font-size: 5vmin;
  margin-left: -2.5vmin;
  margin-top: -2.5vmin;
  animation: star-rise 0.2s ease-out forwards;
}

@keyframes star-rise {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  100% { transform: translateY(var(--target-y)) scale(1); opacity: 1; }
}

.cloud-wrapper {
  position: fixed;
  font-size: 6vmin;
  margin-left: -3vmin;
  margin-top: -3vmin;
  opacity: 0.8;
  animation: cloud-float 1s ease-in forwards;
}

.cloud-inner {
  animation: cloud-wobble 0.4s ease-in-out infinite alternate;
}

@keyframes cloud-float {
  0% { opacity: 0.8; transform: translateY(0) scale(0.8); }
  100% { opacity: 0; transform: translateY(-10vmin) scale(1.2); }
}

@keyframes cloud-wobble {
  0% { transform: translateX(-2vmin); }
  100% { transform: translateX(2vmin); }
}

@media (min-width: 768px) {
  #app {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    scroll-snap-type: none;
  }
  .slide {
    height: 50vh;
    scroll-snap-align: none;
  }
  .slide.home {
    grid-column: 1 / -1;
    height: 100vh;
  }
  .big {
    font-size: 15vmin;
  }
  .progress-container,
  .catch-wrapper {
    width: 25vmin;
  }
  .circular-progress {
    width: 4.375vmin;
    height: 4.375vmin;
  }
  .ghost-emoji {
    font-size: 5vmin;
    margin-left: -2.5vmin;
    margin-top: -2.5vmin;
  }
}
