:root {
  --stage-width: 1512;
  --stage-height: 982;
  --bg: #dcdcdc;
  --title: #e863ff;
  --green: #77af05;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
}

#viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1512px;
  height: 982px;
  overflow: hidden;
  background: var(--bg);
  transform: translate(-50%, -50%) scale(var(--stage-scale, 1));
  transform-origin: center center;
}

h1 {
  position: absolute;
  left: 50%;
  top: 16px;
  z-index: 20;
  width: 130px;
  margin: 0;
  transform: translateX(-50%);
  color: var(--title);
  font-size: 24px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  text-shadow: none;
}

.lotus-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 10;
  width: 400px;
  height: 218px;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.lotus,
.lotus-lily {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 400px;
  height: 218px;
  object-fit: cover;
  pointer-events: none;
  filter: drop-shadow(0 0 16px #d4f88b) drop-shadow(0 0 60px rgba(212, 248, 139, 0.5));
}

.lotus {
  z-index: 4;
}

.lotus-lily {
  opacity: 0.05;
}

#stage.is-start .lotus-lily {
  opacity: 1;
}

#stage.is-start .lotus {
  display: none;
}

.stamp-cloud {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.stamp {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stamp-inner {
  flex: none;
  overflow: hidden;
  border: 1px solid rgba(34, 34, 34, 0.04);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
}

.stamp-inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.start-prompt {
  position: absolute;
  left: 50%;
  top: 442px;
  z-index: 20;
  width: 100px;
  margin: 0;
  transform: translateX(-50%);
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.56px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.start-description {
  position: absolute;
  left: calc(50% + 0.5px);
  top: 600px;
  z-index: 20;
  width: 153px;
  margin: 0;
  transform: translateX(-50%);
  color: #989898;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.start-prompt[hidden],
.start-description[hidden] {
  display: none;
}

.description {
  position: absolute;
  left: calc(50% + 0.5px);
  bottom: 365px;
  z-index: 20;
  min-width: 243px;
  max-width: 360px;
  margin: 0;
  transform: translateX(-50%);
  color: var(--green);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  white-space: pre-line;
}

.focus-image {
  position: absolute;
  left: 80px;
  top: 135px;
  z-index: 2;
  width: 400px;
  height: 712px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(34, 34, 34, 0.04);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
}

.focus-image.landscape {
  top: 341px;
  width: 400px;
  height: 300px;
}

.focus-image img,
.item-photo img,
.overlay-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.items {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.item {
  position: absolute;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  cursor: pointer;
  pointer-events: auto;
}

.item-photo {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
  padding: 4px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(34, 34, 34, 0.04);
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
}

.item-photo-inner {
  overflow: hidden;
  border-radius: 4px;
}

.item-label {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
  word-break: break-word;
}

.restart {
  position: absolute;
  left: calc(50% + 0.5px);
  bottom: 22px;
  z-index: 20;
  transform: translateX(-50%);
  color: #bdbdbd;
  font-size: 16px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.restart[hidden] {
  display: none;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: #121212;
  overflow: hidden;
}

.overlay[hidden] {
  display: none;
}

.overlay-image {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 225px;
  height: 400px;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 1px solid rgba(34, 34, 34, 0.04);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
}

.overlay-image.landscape {
  left: 50%;
  top: 50%;
  width: 373px;
  height: 280px;
}

.overlay-items {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.overlay-items .item {
  z-index: 4;
}

.overlay-items .item.dimmed {
  opacity: 0.1;
}

.cd-player {
  position: absolute;
  left: 1068px;
  top: 526px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 360px;
  height: 480px;
  overflow: hidden;
  color: #e863ff;
  font-family: "Crimson Text", Georgia, serif;
  background: rgba(232, 99, 255, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 32px;
  box-shadow:
    inset 0 -4px 40px 4px rgba(255, 255, 255, 0.2),
    inset 0 -4px 8px rgba(232, 99, 255, 0.25),
    0 4px 25px 4px rgba(232, 99, 255, 0.25);
  cursor: pointer;
  pointer-events: auto;
}

.cd-container {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 360px;
  height: 200px;
  overflow: visible;
}

.cd-shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 360px;
  height: 378px;
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(40, 35, 30, 0.5);
  transform: translateX(-50%);
  pointer-events: none;
}

.cd-disc {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 360px;
  height: 378px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0);
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(40, 35, 30, 0.5);
  transform: translateX(-50%) rotate(0deg);
  transform-origin: center center;
}

.cd-disc.is-spinning {
  animation: cd-spin 8s linear infinite;
}

.cd-cover,
.cd-reflection,
.cd-wash,
.cd-center {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cd-cover {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cd-reflection {
  inset: 0;
  box-shadow: inset 0 0 0 rgba(255, 255, 255, 0.2);
}

.cd-wash {
  inset: 0;
  opacity: 0.4;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0) 0 23%, rgba(255, 255, 255, 0.25) 24%, rgba(255, 255, 255, 0) 37%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0.12) 68%, rgba(255, 255, 255, 0.14));
}

.cd-center-large {
  left: 121.5px;
  top: 130.5px;
  width: 117px;
  height: 117px;
  background: linear-gradient(135deg, #fff 0%, #fbfbfb 14.286%, #f8f8f8 28.571%, #f4f4f4 42.857%, #f1f1f1 57.143%, #ededed 71.429%, #eaeaea 85.714%, #e6e6e6 100%);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.08);
}

.cd-center-ring {
  left: 130.5px;
  top: 139.5px;
  width: 99px;
  height: 99px;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 0 0 rgba(200, 200, 200, 0.6);
}

.cd-center-small {
  left: 151.2px;
  top: 160.2px;
  width: 57.6px;
  height: 57.6px;
  background: linear-gradient(135deg, #fff 0%, #fbfbfb 11.111%, #f7f7f7 22.222%, #f3f3f3 33.333%, #efefef 44.444%, #ebebeb 55.556%, #e8e8e8 66.667%, #e4e4e4 77.778%, #e0e0e0 88.889%, #dcdcdc 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.cd-center-hole {
  left: 162.9px;
  top: 171.9px;
  width: 34.2px;
  height: 34.2px;
  background: #fafafa;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.18);
}

.cd-copy {
  position: relative;
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 360px;
  min-height: 0;
  padding: 0 32px 40px;
}

.cd-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 27px;
  height: 40px;
  padding-bottom: 20px;
}

.cd-equalizer span {
  display: block;
  width: 3px;
  flex: 0 0 auto;
  background: rgba(232, 99, 255, 0.5);
  border-radius: 9999px;
}

.cd-equalizer span:nth-child(1) {
  height: 10px;
}

.cd-equalizer span:nth-child(2) {
  height: 18px;
}

.cd-equalizer span:nth-child(3) {
  height: 8px;
}

.cd-equalizer span:nth-child(4) {
  height: 20px;
}

.cd-equalizer span:nth-child(5) {
  height: 12px;
}

.cd-artist,
.cd-song,
.cd-time {
  width: 100%;
  margin: 0;
  letter-spacing: 0;
  text-align: center;
}

.cd-artist {
  overflow: hidden;
  color: #e863ff;
  font-size: 15px;
  font-weight: 400;
  line-height: 22.5px;
  letter-spacing: 0.375px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cd-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 294px;
  padding-top: 4px;
}

.cd-song {
  color: #e863ff;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  white-space: pre-line;
}

.cd-divider {
  width: 32px;
  height: 3px;
  margin: 16px 0;
  background: rgba(232, 99, 255, 0.5);
  border-radius: 9999px;
}

.cd-time {
  color: #e863ff;
  font-size: 18px;
  font-weight: 500;
  line-height: 27px;
  white-space: nowrap;
}

.cd-duration {
  color: rgba(232, 99, 255, 0.5);
}

.youtube-player {
  position: absolute;
  left: -2px;
  top: -2px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.overlay-close {
  position: absolute;
  left: calc(50% + 0.5px);
  bottom: 22px;
  z-index: 5;
  transform: translateX(-50%);
  color: #424242;
  font-size: 16px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 6px 8px rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

@keyframes cd-spin {
  from {
    transform: translateX(-50%) rotate(0deg);
  }

  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .item,
  .stamp {
    transition: opacity 120ms ease;
  }
}
