* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f4f4;
  font-family: Arial, Helvetica, sans-serif;
  color: #050505;
}

.app {
  width: 100vw;
  min-height: 100vh;
}

.screen {
  display: none;
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #fff;
  padding: 80px 90px;
}

.screen.active {
  display: block;
}

button {
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-weight: 700;
  padding: 16px 58px;
  box-shadow: 0 6px 8px #0002;
  cursor: pointer;
}

.home {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 70px;
}

.home.active {
  display: flex;
}

.home-left {
  position: relative;
}

.avatar {
  position: absolute;
  top: 55px;
  right: 70px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.avatar:hover {
  transform: scale(1.05);
}

.eyebrow {
  font-weight: 700;
  font-size: 14px;
}

.home h1 {
  font-size: 54px;
  line-height: 1.08;
  margin: 14px 0 28px;
}

.line {
  width: 70px;
  height: 3px;
  background: #000;
  margin-bottom: 26px;
}

.desc {
  color: #888;
  font-size: 15px;
  line-height: 1.25;
}

.features {
  width: 410px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 7px 25px #0002;
  margin: 45px 0 35px;
  padding: 24px 18px;
  display: flex;
  justify-content: space-around;
  text-align: center;
  font-size: 12px;
}

.circle-icon {
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  background: #000;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.start-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.start-area button {
  margin: 0;
}

.start-area small {
  margin-top: 12px;
  text-align: center;
  color: #aaa;
}

.path-card {
  width: 430px;
  background: #fff;
  border-radius: 34px;
  box-shadow: 0 7px 25px #0002;
  padding: 28px;
}

.path-card h3 {
  font-size: 15px;
  margin: 0 0 18px;
}

.path-card h3 span {
  background: #000;
  color: #fff;
  border-radius: 50%;
  padding: 8px;
  margin-right: 16px;
}

.path-list {
  border-radius: 28px;
  border: 1px solid #eee;
  padding: 22px 0 10px;
}

.path-list div {
  position: relative;
  padding-left: 80px;
  margin: 0 0 30px;
  color: #888;
}

.path-list i {
  position: absolute;
  left: 30px;
  top: 0;
  width: 22px;
  height: 22px;
  background: #ddd;
  border-radius: 50%;
}

.path-list i::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 22px;
  width: 2px;
  height: 47px;
  background: #eee;
}

.path-list div:last-child i::after {
  display: none;
}

.path-list b {
  font-size: 14px;
  color: #9b9b9b;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.path-list b:hover {
  color: #000;
}

.path-list b:hover .arrow-link {
  transform: translateX(4px);
}

.arrow-link {
  transition: 0.2s;
}

.path-list p {
  font-size: 12px;
  color: #d0d0d0;
  margin: 7px 0;
}

.top-step {
  position: relative;
  margin: 0 auto 35px;
  width: 440px;
  display: grid;
  grid-template-columns: 36px 1fr 36px 1fr 36px 1fr 36px;
  align-items: center;
  text-align: center;
}

.top-step > span:not(.dot) {
  height: 2px;
  background: #888;
}

.dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #777;
  display: grid;
  place-items: center;
  background: #fff;
  font-weight: 700;
}

.dot.on {
  background: #000;
  color: #fff;
  border-color: #000;
}

.top-step p {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  font-weight: 700;
}

.big-card {
  width: 830px;
  min-height: 440px;
  margin: 80px auto 0;
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 5px 22px #0002;
  padding: 60px;
}

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.intro-card h2 {
  font-size: 30px;
}

.large-icon {
  font-size: 48px;
  margin: 36px;
}

.intro-card p {
  max-width: 610px;
  text-align: left;
  font-size: 14px;
}

.next {
  position: absolute;
  right: 150px;
  bottom: 70px;
}

.overview-card {
  text-align: center;
}

.overview-card h2 {
  font-size: 32px;
}

.muted {
  color: #999;
}

.overview-inner {
  margin-top: 45px;
  border-radius: 28px;
  box-shadow: 0 6px 24px #0002;
  padding: 35px;
  display: flex;
  justify-content: space-around;
  text-align: left;
}

.col {
  width: 30%;
  border-right: 1px solid #ddd;
}

.col:last-child {
  border: 0;
}

.col h4 {
  font-size: 15px;
}

.col ul {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  color: #999;
  font-size: 13px;
}

.col li {
  margin: 24px 0;
}

.col li::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #888;
  margin-right: 24px;
  vertical-align: middle;
}

.arrow {
  position: absolute;
  right: 70px;
  top: 50%;
  width: 58px;
  height: 58px;
  padding: 0;
  font-size: 40px;
}

.learn-head {
  text-align: center;
}

.learn-dots {
  margin: 0 auto;
  width: 400px;
  display: flex;
  align-items: center;
}

.learn-dots i {
  flex: 1;
  height: 2px;
  background: #ddd;
}

.learn-dots b {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ddd;
  color: #fff;
  display: grid;
  place-items: center;
}

.learn-dots b.done {
  background: #000;
}

.learn-head p {
  font-weight: 700;
}

.step-card {
  width: 820px;
  min-height: 560px;
  margin: 55px auto;
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 45px 70px 55px;
}

.progress {
  width: 340px;
  height: 6px;
  border-radius: 999px;
  background: #ececec;
  margin: 0 auto 50px;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: #8c8c8c;
  border-radius: 999px;
}

.progress .p1 {
  width: 33.333%;
}

.progress .p2 {
  width: 66.666%;
}

.progress .p3 {
  width: 100%;
}

.iconbox {
  width: 150px;
  height: 150px;
  border: 3px solid #14364f;
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 58px;
  margin-bottom: 42px;
}

.step-card h2 {
  width: 100%;
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  word-break: keep-all;
}

.step-card p {
  width: 100%;
  margin: 0;
  color: #8d8d8d;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.small-start {
  position: absolute;
  right: 160px;
  bottom: 100px;
  padding: 14px 32px;
}

.game {
  padding-top: 100px;
}

.sort-list {
  width: 590px;
  margin: 70px auto 10px;
}

.game-item {
  height: 145px;
  border-radius: 28px;
  box-shadow: 0 6px 24px #0002;
  background: #fff;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 22px 45px;
  position: relative;
}

.answer-input {
  position: absolute;
  left: -26px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 15px #0002;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  outline: none;
}

.game-item .mini-icon {
  width: 120px;
  height: 100px;
  border: 3px solid #123044;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 42px;
}

.game-item b {
  font-size: 18px;
  line-height: 1.1;
  max-width: 330px;
}

.hint {
  text-align: center;
  font-weight: 700;
}

.submit {
  position: absolute;
  right: 110px;
  bottom: 80px;
}

.result {
  display: none;
  align-items: center;
  justify-content: center;
}

.result.active {
  display: flex;
}

.result-card {
  width: 850px;
  height: 430px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 6px 24px #0002;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.glow {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.glow span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  border: 4px solid;
  font-size: 28px;
  font-weight: 900;
}

.green {
  background: #eaffea;
  box-shadow: 0 0 70px 55px #14bf1420;
}

.red {
  background: #fff0f0;
  box-shadow: 0 0 70px 55px #ff111120;
}

.green-text {
  color: #18a818;
  font-weight: 700;
}

.red-text {
  color: red;
  font-weight: 700;
}

.result-card h3 {
  margin: 0 0 10px;
}

.result-card button {
  margin-top: 35px;
  min-width: 190px;
}

.disabled {
  background: #ddd;
  color: #aaa;
  cursor: not-allowed;
}

.final-intro .clip {
  font-size: 75px;
  margin-bottom: 35px;
}

.final-game-screen {
  padding-top: 80px;
}

.final-title {
  text-align: center;
  font-size: 22px;
}

.undo-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  margin-left: 8px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  vertical-align: middle;
  cursor: pointer;
}

.undo-btn:hover {
  background: #000;
  color: #fff;
}

.final-game-area {
  width: 1000px;
  margin: 35px auto 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 36px;
}

.final-list,
.answer-list {
  width: 470px;
  height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 6px 24px #0002;
  padding: 24px;
  scrollbar-width: thin;
}

.final-card,
.answer-slot {
  height: 92px;
  min-height: 92px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 18px #0002;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid transparent;
}

.final-card {
  cursor: grab;
}

.final-card:hover {
  border-color: #1e9bff;
  box-shadow: 0 0 18px #1e9bff50;
}

.final-card.dragging {
  opacity: 0.45;
}

.answer-slot {
  justify-content: flex-start;
  gap: 18px;
}

.answer-slot span {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
}

.answer-slot .final-card {
  flex: 1;
  min-height: auto;
  height: auto;
  margin: 0;
  padding: 12px;
  font-size: 12px;
}

.slot-hover {
  border: 2px solid #1e9bff !important;
  box-shadow: 0 0 18px #1e9bff50 !important;
}

.bluehint {
  text-align: center;
  color: #168be8;
  font-weight: 700;
  margin-top: 24px;
}

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  background: red;
  animation: fall 3s linear infinite;
}

.confetti span:nth-child(1) { left: 5%; background: #ff3b30; animation-delay: 0s; }
.confetti span:nth-child(2) { left: 10%; background: #ffcc00; animation-delay: 0.2s; }
.confetti span:nth-child(3) { left: 15%; background: #34c759; animation-delay: 0.4s; }
.confetti span:nth-child(4) { left: 20%; background: #007aff; animation-delay: 0.1s; }
.confetti span:nth-child(5) { left: 25%; background: #ff2d55; animation-delay: 0.6s; }
.confetti span:nth-child(6) { left: 30%; background: #af52de; animation-delay: 0.3s; }
.confetti span:nth-child(7) { left: 35%; background: #ff9500; animation-delay: 0.7s; }
.confetti span:nth-child(8) { left: 40%; background: #5ac8fa; animation-delay: 0.5s; }
.confetti span:nth-child(9) { left: 45%; background: #ff3b30; animation-delay: 0.2s; }
.confetti span:nth-child(10) { left: 50%; background: #ffcc00; animation-delay: 0.8s; }
.confetti span:nth-child(11) { left: 55%; background: #34c759; animation-delay: 0.4s; }
.confetti span:nth-child(12) { left: 60%; background: #007aff; animation-delay: 0.1s; }
.confetti span:nth-child(13) { left: 65%; background: #ff2d55; animation-delay: 0.7s; }
.confetti span:nth-child(14) { left: 70%; background: #af52de; animation-delay: 0.5s; }
.confetti span:nth-child(15) { left: 75%; background: #ff9500; animation-delay: 0.3s; }
.confetti span:nth-child(16) { left: 80%; background: #5ac8fa; animation-delay: 0.9s; }
.confetti span:nth-child(17) { left: 85%; background: #ff3b30; animation-delay: 0.6s; }
.confetti span:nth-child(18) { left: 90%; background: #ffcc00; animation-delay: 0.2s; }
.confetti span:nth-child(19) { left: 95%; background: #34c759; animation-delay: 0.4s; }
.confetti span:nth-child(20) { left: 98%; background: #007aff; animation-delay: 0.8s; }

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .screen {
    padding: 50px 20px;
  }

  .home.active {
    flex-direction: column;
  }

  .big-card,
  .step-card,
  .result-card {
    width: 90%;
  }

  .path-card,
  .features {
    width: 90%;
  }

  .next {
    right: 40px;
  }

  .submit {
    right: 40px;
  }

  .top-step {
    width: 360px;
  }

  .final-game-area {
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .final-list,
  .answer-list {
    width: 90%;
  }
}

/* navigation buttons */
.nav-button {
  position: fixed;
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 0;
  background: #fff;
  color: #000;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.nav-button.show {
  display: flex;
}

.nav-home {
  left: 70px;
  top: 60px;
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.nav-back {
  left: 70px;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translateY(-50%);
  font-size: 42px;
  line-height: 1;
}

.nav-button:hover {
  background: #000;
  color: #fff;
}

@media (max-width: 900px) {
  .nav-home {
    left: 24px;
    top: 24px;
  }

  .nav-back {
    left: 24px;
  }
}
