@font-face {
  font-family: "Bayon";
  src: url("../font/Bayon-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "HONORSansCN-Medium";
  src: url("../font/HONORSansCN-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "HONORSansCN-DemiBold";
  src: url("../font/HONORSansCN-DemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "HONORSansCN-Bold";
  src: url("../font/HONORSansCN-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "HONORSansCN-Heavy";
  src: url("../font/HONORSansCN-Heavy.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
}

:root {
  --primary-green: #52ff7f;
  --text-black: #000000;
  --text-grey: #666666;
  --bg-white: #ffffff;
  --border-grey: #e5e5e5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
}

html {
  font-size: 8.888888vw;
}

@media (min-width: 500px) {
  html {
    font-size: 44.44px;
  }

  #app {
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  }
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: var(--bg-white);
  overflow: hidden;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.screen.active {
  display: flex;
  opacity: 1;
  z-index: 10;
}

.content-wrapper {
  width: 100%;
  height: 100%;
  padding: 0 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

#loading-screen .content-wrapper {
  justify-content: flex-start;
  padding-top: 8.26rem;
  align-items: center;
}

.loading-icon {
  width: 4.5rem;
  height: auto;
  margin-bottom: 1.5rem;
  display: block;
}

.kv-container {
  width: 5.73rem;
  height: auto;
  position: relative;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kv-vs {
  width: 100%;
  height: auto;
  display: block;
  z-index: 1;
}

.kv-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}

.loading-bar-container {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-bar {
  width: 5.14rem;
  height: 0.4rem;
  background-color: transparent;
  border: 0.02rem solid #e5e5e5;
  padding: 0.04rem;
  border-radius: 0.04rem;
  position: relative;
  margin-bottom: 0.3rem;
  box-sizing: border-box;
}

.loading-bar::after {
  content: "";
  display: block;
  width: 0%;
  height: 100%;
  background-image: repeating-linear-gradient(
    90deg,
    var(--primary-green) 0,
    var(--primary-green) 0.12rem,
    transparent 0.12rem,
    transparent 0.18rem
  );
  animation: load 2s ease-in-out forwards;
}

@keyframes load {
  0% {
    width: 0%;
  }
  50% {
    width: 60%;
  }
  100% {
    width: 100%;
  }
}

.loading-text {
  font-size: 0.36rem;
  color: #333;
  font-family: "HONORSansCN-Medium", sans-serif;
  font-weight: 500;
}

.menu-icon {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 0.7rem;
  height: auto;
  cursor: pointer;
  z-index: 20;
}

.drawer-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #5dff7f;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(100%);
  transition: transform 0.4s ease-in-out;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.drawer-menu::-webkit-scrollbar {
  display: none;
}

.drawer-menu.open {
  transform: translateY(0);
}

.close-icon {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 0.55rem;
  height: auto;
  cursor: pointer;
  z-index: 101;
}

.drawer-content {
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.72rem;
  color: #000;
  text-align: left;
  padding: 2.5rem 0.8rem 1rem;
  width: 100%;
  box-sizing: border-box;
  margin: auto 0;
}

.drawer-text {
  margin-bottom: 0.8rem;
  line-height: 1.4;
  font-family: "HONORSansCN-Medium", sans-serif;
  font-weight: 500;
}

#home-screen .content-wrapper {
  justify-content: flex-start;
  padding-top: 3.42rem;
  padding-bottom: 1.95rem;
}

.main-title {
  font-family: "Bayon", sans-serif;
  font-size: 2.72rem;
  line-height: 0.8;
  font-weight: normal;
  text-align: left;
  margin-bottom: 0.2rem;
  letter-spacing: -0.05rem;
  color: var(--text-black);
  width: 100%;
  padding-left: 1rem;
}

.subtitle {
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.44rem;
  font-weight: normal;
  color: var(--text-black);
  margin-bottom: auto;
  text-align: left;
  width: 100%;
  padding-left: 1rem;
}

.primary-btn {
  width: 6.36rem;
  height: 1.48rem;
  background-color: #5dff7f;
  border: none;
  border-radius: 0.4237rem;
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.6rem;
  font-weight: normal;
  color: #000000;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.1s;
  margin-top: auto;
  align-self: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.2rem;
  text-align: center;
  flex-shrink: 0;
}

#save-btn {
  margin-top: 1rem;
  margin-bottom: 0;
}

.primary-btn:active {
  transform: scale(0.98);
}

#question-screen .content-wrapper {
  justify-content: flex-start;
  padding-top: 2.6rem;
  padding-bottom: 1.9rem;
}

.progress-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.2rem;
  background-color: #000612;
  opacity: 1;
}

.progress-indicator::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--progress-width, 0%);
  height: 100%;
  background-color: #5dff7f;
  transition: width 0.3s ease;
}

.current-step {
  display: none;
}

.question-title {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  width: 100%;
  text-align: left;
  color: var(--text-black);
}

.options-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: auto;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 0 0.3rem;
  width: 9.2rem;
  height: 1.55rem;
  border-radius: 0.42rem;
  border: 0.02rem solid #b4b4b4;
  background-color: transparent;
  opacity: 1;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
  box-sizing: border-box;
}

.option-item.selected {
  background-color: #5dff7f;
  border-color: #5dff7f;
  border-radius: 0.4237rem;
  box-shadow: none;
}

.option-item.selected .option-letter,
.option-item.selected .option-text {
  color: #000000;
}

.option-letter {
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.66rem;
  font-weight: normal;
  margin-right: 0.2rem;
  color: var(--text-black);
  min-width: 0.6rem;
  transition: color 0.2s;
}

.option-text {
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.45rem;
  line-height: 1.3;
  font-weight: normal;
  color: #333;
  transition: color 0.2s;
  flex: 1;
  white-space: normal;
}

.secondary-btn {
  width: 6.36rem;
  height: 1.48rem;
  border-radius: 0.4237rem;
  border: 0.02rem solid #b4b4b4;
  background-color: #fff;
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.6rem;
  font-weight: normal;
  color: #ccc;
  margin-top: 0.5rem;
  cursor: not-allowed;
  transition:
    background-color 0.3s,
    color 0.3s,
    border-color 0.3s,
    transform 0.1s;
  opacity: 1;
  box-shadow: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.2rem;
  text-align: center;
}

.secondary-btn:not(:disabled) {
  background-color: #5dff7f;
  color: #000000;
  border-color: #5dff7f;
  cursor: pointer;
}

.secondary-btn:not(:disabled):active {
  transform: scale(0.98);
}

#result-screen {
  background-color: var(--res-bg, #effedd);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#result-screen::-webkit-scrollbar {
  display: none;
}

#result-screen.active {
  display: flex;
}

#result-screen .content-wrapper {
  justify-content: flex-start;
  padding-top: 1.2rem;
  padding-bottom: 0;
  align-items: flex-start;
  text-align: left;
  height: auto;
  min-height: 100%;
}

#result-screen .content-wrapper::after {
  content: "";
  display: block;
  width: 100%;
  min-height: 0.8rem;
  flex-shrink: 0;
}

.result-title {
  font-family: "HONORSansCN-Heavy", sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--res-title, #ff99d8);
  line-height: 1;
}

.result-subtitle {
  font-family: "HONORSansCN-Heavy", sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--res-title, #ff99d8);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.degree-label {
  font-family: "HONORSansCN-Bold", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--res-text-main, #83b04d);
}

.degree-value {
  font-family: "HONORSansCN-Heavy", sans-serif;
  font-size: 1.38rem;
  font-weight: 900;
  color: var(--res-title, #ff99d8);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.result-description {
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.45rem;
  font-weight: 500;
  color: var(--res-text-main, #83b04d);
  line-height: 1.4;
  margin-bottom: 0.6rem;
  margin-top: 0.35rem;
}

.comparison-title {
  font-family: "HONORSansCN-Bold", sans-serif;
  font-size: 0.44rem;
  font-weight: 700;
  color: var(--res-text-sub, #9aab85);
  margin-bottom: 0.1rem;
  margin-top: 0.6rem;
}

.comparison-text {
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.36rem;
  font-weight: 500;
  color: var(--res-text-sub, #9aab85);
  line-height: 1.4;
  margin-bottom: 0.8rem;
}

.advice-title {
  font-family: "HONORSansCN-Bold", sans-serif;
  font-size: 0.44rem;
  font-weight: 700;
  color: var(--res-text-sub, #9aab85);
  margin-bottom: 0.1rem;
}

.advice-content p {
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.36rem;
  font-weight: 500;
  color: var(--res-text-sub, #9aab85);
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.divider {
  width: 100%;
  height: 0.02rem;
  min-height: 1px;
  background-color: var(--res-divider, #587246);
  opacity: 0.5;
  margin: 0;
}

.result-footer {
  margin-top: 0.6rem;
  padding-top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.footer-text {
  text-align: left;
}

.footer-text p {
  font-family: "HONORSansCN-Medium", sans-serif;
  font-size: 0.34rem;
  font-weight: 500;
  color: var(--res-text-main, #84b14f);
  line-height: 1.4;
  margin: 0;
}

.qr-code {
  width: 1.8rem;
  height: 1.8rem;
  background-color: transparent;
  border-radius: 0.1rem;
}
