* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f6f8ff;
  color: #17203a;
}

.app {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.top h1 {
  margin: 0;
}

.top p {
  margin: 4px 0 0;
}

.panel {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.progress-wrap {
  margin-top: 10px;
  height: 12px;
  background: #e6e9f7;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6a6cff, #00bcd4);
}

.character img {
  width: 180px;
  height: 260px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid #dce1ff;
  background: #f8f9ff;
}

.task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4e8fa;
  border-radius: 10px;
  margin-top: 8px;
}

.task.done {
  opacity: 0.65;
  text-decoration: line-through;
}

.task button {
  border: none;
  background: #4e62ff;
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.task button:disabled {
  background: #95a0e6;
  cursor: not-allowed;
}

.xp-badge {
  font-size: 12px;
  background: #e9eeff;
  padding: 4px 8px;
  border-radius: 999px;
}

.reward-item {
  border: 1px solid #e4e8fa;
  border-radius: 10px;
  padding: 10px;
  margin-top: 8px;
  background: #fafbff;
}

#levelUpRewardText {
  font-weight: 700;
  color: #3146df;
}

.reset {
  background: #fff;
  border: 1px solid #d1d8f9;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  z-index: 10;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  width: min(560px, calc(100vw - 30px));
}

.evolution {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.evolution img {
  width: 100%;
  max-width: 170px;
  height: 220px;
  object-fit: contain;
  border: 2px solid #dce1ff;
  border-radius: 10px;
  justify-self: center;
  background: #f8f9ff;
}

.arrow {
  font-size: 30px;
  font-weight: 700;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}
