:root {
  --card-width: 160px;
  --card-aspect: 1/1.5;
  --front-color: #fa6496;
  --back-color: #ff9cbd;
  --card-border-radius: .75rem;
  --bg-color: #1a1a1e;
}

*, *::after, *::before {
  box-sizing: border-box;
}

#shower {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#block {
  position: absolute;
  width: 150px;
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: crimson;
  display: flex;
  align-items: center;
  justify-content: center;
}

#launcher {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg-color);
  overflow: hidden;
  perspective: 1000px;
}

#bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-image: url('./assets/sunflower_field.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 105%;
  transition: opacity 2s ease-in-out;
  pointer-events: none;
}

#acrylic {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

#holder {
  perspective: 1000px;
  transform-style: preserve-3d;
  transform-origin: center;
  position: absolute;
  width: var(--card-width);
  aspect-ratio: var(--card-aspect);
  transition-property: left, rotate;
  transition-duration: 0.5s;
  transition-timing-function: ease-in-out;
  /* top: calc(50% - var(--card-width) * 1.5 / 2);
  left: calc(50% - var(--card-width) / 2); */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.face {
  position: absolute;
  left: 0;
  width: var(--card-width);
  aspect-ratio: var(--card-aspect);
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.5s ease-in-out;
}

#still {
  transform-origin: left;
  transform: rotateY(-10deg);
}

#cover {
  transform-origin: right;
  transform: rotateY(150deg);
  left: -100%;
  cursor: pointer;
}

.front, .back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: center;
  backface-visibility: hidden;
}

.front {
  background-color: var(--front-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.front > .text {
  color: white;
  font-size: 20px;
  user-select: none;
  width: 100%;
  display: flex;
  justify-content: space-between;
}

#cover > .front {
  padding-left: 4px;
}

#still > .front {
  padding-right: 4px;
}

.back {
  background-color: var(--back-color);
  transform: rotateY(180deg);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  gap: .5rem;
}

#cover > .front, #still > .back {
  border-start-start-radius: var(--card-border-radius);
  border-end-start-radius: var(--card-border-radius);
}

#cover > .back, #still > .front {
  border-start-end-radius: var(--card-border-radius);
  border-end-end-radius: var(--card-border-radius);
}

.shadow {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
}

#cover > .front > .shadow {
  background: linear-gradient(270deg,rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
  right: 0;
}

#still > .front > .shadow {
  background: linear-gradient(90deg,rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 75%);
  left: 0;
}

#explosion {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100vh;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -50%);
  z-index: 999;
  pointer-events: none;
  opacity: 0;
}

#credits {
  width: 100%;
  height: 100%;
  justify-content: space-between;
  align-items: flex-end;
  display: flex;
  color: white;
  opacity: 0.05;
  pointer-events: none;
}

#eyes {
  aspect-ratio: 1;
  width: 30px;
}

.divider {
  height: 5px;
}
