@font-face {
  font-family: "League Spartan";
  src: url("../assets/fonts/LeagueSpartan-VariableFont_wght.woff2")
    format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

html {
  font-size: 16px;
  font-size: calc(min(100vw / 80, 100vh / 50));
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  font-family: "League Spartan", sans-serif;
  font-weight: 400;
  overflow: hidden;
}

#container {
  border: none;
  width: 80rem;
  height: 50rem;
  display: flex;
  /*flex-direction: column;
  align-items: center;
  justify-content: center;*/
  box-sizing: border-box;
  position: relative;
  --progress-offset-bottom: 5.0rem;
  --progress-offset-left: 2rem;
  --progress-offset-right: 2rem;
}

#shop {
  width: 80rem;
  height: 50rem;
  background-image: url("rd8-2_Pl3_S03_001_2.jpg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  margin: 0;
  position: relative;
}

#intro-ui {
  position: absolute;
  inset: 0;
  z-index: 220;
}

.avatar-picker {
  position: absolute;
  right: 5rem;
  top: 22rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
}

.avatar-button {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s;
}

.avatar-button:focus-visible {
  outline: 0.3rem solid #faee5e;
  outline-offset: 0.4rem;
  border-radius: 0.6rem;
}

.avatar-button:hover {
  transform: translateY(-0.3rem);
}

.avatar-button img {
  display: block;
  height: 18rem;
  width: auto;
}

#avatar {
  position: absolute;
  z-index: 5;
  height: 8rem;
  width: auto;
  transform: translate(-50%, -80%);
  transition: left 0.4s ease, top 0.4s ease;
  pointer-events: none;
  display: none;
}

.progress {
  position: absolute;
  left: var(--progress-offset-left);
  right: var(--progress-offset-right);
  bottom: var(--progress-offset-bottom);
  z-index: 60;
  display: none;
  gap: 0.6rem;
  align-items: center;
}

.progress__item {
  flex: 1 1 0;
  height: 2.2rem;
  border-radius: 1.2rem;
  border: 0.2rem solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.progress__item--lives {
  gap: 0.3rem;
}

.lives-icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.progress__item.is-done {
  background: rgba(170, 255, 170, 0.9);
  border-color: rgba(0, 120, 0, 0.55);
}

.progress__item.is-current {
  background: rgba(250, 238, 94, 0.95);
  border-color: rgba(0, 0, 0, 0.5);
}

.question {
  position: absolute;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
  width: 3.2rem;
  height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 3rem;
  line-height: 1;
  color: #333;
  left: 52rem;
  top: 15rem;
  background-color: #faee5e;
  cursor: pointer;
  transition: transform 0.2s, opacity 1s;
  opacity: 0;
}

.answered {
  border: 2px solid green;
}

#popup {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  z-index: 100;
  max-width: 30rem;
  width: 80%;
  display: flex;
  flex-direction: column;
}

#popup h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #00699f;
}

.popup-images {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}

.popup-image {
  display: block;
  height: 8.5rem;
  width: auto;
  border-radius: 0.6rem;
}

#popup a.option {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#popup button.close {
  background-color: #f9f9f9;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #333;
}

#popup a:hover {
  background-color: #ececec;
}

#instructions-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  display: none;
  z-index: 200;
  text-align: center;
}

#instructions-content {
  max-width: 40rem;
  padding: 2rem;
}

#instructions-content h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 1.5rem;
}

#instructions-content p {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

#popup a.option.correct {
  background-color: #aaffaa;
  pointer-events: none;
}

#popup a.option.incorrect {
  background-color: #ffaaaa;
  pointer-events: none;
}

#status-overlay {
  position: absolute;
  inset: 0;
  width: 80rem;
  height: 50rem;
  background-color: transparent;
  background-image: url("outro.jpg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  display: none;
  z-index: 300;
  box-sizing: border-box;
}

.status-content {
  position: absolute;
  left: var(--feedback-left, 13rem);
  top: var(--feedback-top, 11rem);
  width: var(--feedback-width, 24rem);
  text-align: left;
}

#status-overlay h2 {
  font-size: 2.2rem;
  margin: 0 0 0.6rem;
  color: #00699f;
}

#status-overlay p {
  font-size: 1.4rem;
  margin: 0 0 1.2rem;
  line-height: 1.4;
  white-space: pre-line;
}

#status-overlay button {
  padding: 0.8rem 2.2rem;
  font-size: 1.5rem;
  background-color: #faee5e;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
  font-weight: 700;
}

.paths-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  display: none;
}

#timer.progress__item--timer {
  min-width: 7.4rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  border-width: 0.25rem;
}

#timer.is-green {
  color: #063a18;
  background: rgba(34, 197, 94, 0.55);
  border-color: rgba(6, 70, 28, 0.6);
}

#timer.is-yellow {
  color: #3b2a00;
  background: rgba(250, 204, 21, 0.65);
  border-color: rgba(122, 91, 0, 0.6);
}

#timer.is-red {
  color: #3b0000;
  background: rgba(239, 68, 68, 0.72);
  border-color: rgba(155, 13, 13, 0.7);
}

@keyframes timer-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.2;
  }
}

#timer.is-blink {
  animation: timer-blink 0.6s steps(2, end) infinite;
}

