@font-face {
  font-family: "Alibaba Sans";
  src: url("https://assets-persist.lovart.ai/agent-static-assets/AlibabaSans-Regular.otf") format("opentype");
  font-weight: 400;
}

@font-face {
  font-family: "Alibaba Sans";
  src: url("https://assets-persist.lovart.ai/agent-static-assets/AlibabaSans-Medium.otf") format("opentype");
  font-weight: 600;
}

@font-face {
  font-family: "Alimama ShuHeiTi";
  src: url("https://assets-persist.lovart.ai/agent-static-assets/AlimamaShuHeiTi-Bold.otf") format("opentype");
  font-weight: 800;
}

:root {
  --blue: #2196f3;
  --bg1: #2d9bf3;
  --bg2: #edf8ff;
  --card: #eef6ff;
  --text: #111827;
  --muted: #4f6d84;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Alibaba Sans", Arial, sans-serif;
  background: linear-gradient(115deg, var(--bg1) 0%, #79bdf4 55%, var(--bg2) 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.app-shell.view-intro {
  height: 100vh;
}

.lang-picker {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 10;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  background: rgba(244, 249, 255, 0.94);
  color: #123a5a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(33, 150, 243, 0.16);
  backdrop-filter: blur(12px);
}

.lang-trigger i {
  color: var(--blue);
  font-size: 17px;
}

.lang-trigger span {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 252px;
  max-height: min(420px, calc(100vh - 84px));
  padding: 8px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(239, 247, 255, 0.96);
  box-shadow: 0 18px 42px rgba(33, 150, 243, 0.2);
  backdrop-filter: blur(16px);
  animation: menuIn 0.18s ease both;
}

.lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  margin-bottom: 6px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: #123a5a;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  box-shadow: 0 5px 12px rgba(33, 150, 243, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.lang-menu button:last-child {
  margin-bottom: 0;
}

.lang-menu button:hover,
.lang-menu button.active {
  border-color: rgba(33, 150, 243, 0.32);
  background: #fff;
  color: var(--blue);
}

.lang-menu i {
  color: var(--blue);
  font-size: 16px;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.intro-screen,
.question-screen,
.generating-screen,
.result-screen {
  width: min(100%, 1420px);
  min-height: 100vh;
  margin: 0 auto;
}

.intro-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  min-height: 0;
  padding: 20px 20px 0;
  overflow: hidden;
  text-align: center;
}

.hero-icon {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  margin-top: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue);
  font-size: 50px;
}

h1,
h2,
h3 {
  font-family: "Alimama ShuHeiTi", "Alibaba Sans", Arial, sans-serif;
}

.intro-screen h1 {
  margin: 25px 0 18px;
  font-size: 26px;
  line-height: 1.2;
}

.intro-copy {
  width: min(420px, 100%);
  margin: 0;
  color: #2d5772;
  font-size: 14px;
  line-height: 1.75;
}

.time-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  margin: 28px 0 28px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(33, 150, 243, 0.12);
  color: var(--blue);
  font-size: 13px;
}

.start-card {
  display: grid;
  place-items: center;
  width: 353px;
  height: clamp(300px, calc(100vh - 350px), 548px);
  max-width: calc(100vw - 40px);
  border: 0;
  border-radius: 22px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 16px 26px rgba(33, 150, 243, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.start-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 36px rgba(33, 150, 243, 0.26);
}

.top-progress {
  position: fixed;
  top: 26px;
  left: 20px;
  right: 20px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
}

.top-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transition: width 0.35s ease;
}

.top-progress b {
  position: fixed;
  top: 3px;
  right: 20px;
  color: #fff;
  font-size: 13px;
}

.question-screen {
  padding: 47px 20px 112px;
}

.question-card {
  position: relative;
  width: 353px;
  max-width: calc(100vw - 40px);
  margin: 0 auto;
}

.question-stage {
  position: relative;
  width: 353px;
  min-height: 620px;
  max-width: calc(100vw - 40px);
  margin: 0 auto;
}

.question-stage .question-card {
  width: 100%;
  max-width: none;
}

.question-card.exit-left,
.question-card.exit-right,
.question-card.enter-right,
.question-card.enter-left {
  position: absolute;
  inset: 0 auto auto 0;
}

.question-card.exit-left {
  animation: exitLeft 0.64s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.question-card.exit-right {
  animation: exitRight 0.64s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.question-card.enter-right {
  animation: enterRight 0.64s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.question-card.enter-left {
  animation: enterLeft 0.64s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.question-card h2 {
  margin: 0 0 15px;
  font-size: 19px;
  line-height: 1.35;
}

.mode-label {
  margin: 0 0 22px;
  color: #3f6278;
  font-size: 12px;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(244, 249, 255, 0.88);
  color: #303942;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.option.selected {
  border-color: var(--blue);
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(33, 150, 243, 0.18);
}

.emoji {
  width: 23px;
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
}

.bottom-nav {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 8;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
}

.back-btn,
.next-btn {
  height: 50px;
  border: 0;
  border-radius: 999px;
}

.back-btn {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  font-size: 22px;
}

.back-btn:disabled {
  opacity: 0.7;
}

.next-btn {
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(33, 150, 243, 0.24);
}

.next-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.generating-screen {
  display: grid;
  place-content: center;
  padding: 24px;
  color: #fff;
}

.loader-ring {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  border: 4px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.generating-screen h2 {
  margin: 0 0 20px;
  font-size: 28px;
  text-align: center;
}

.check-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 800;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(42px);
  animation: checkIn 0.52s ease forwards;
}

.check-list i {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  color: #61c994;
  font-size: 15px;
}

@keyframes checkIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.result-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 56px;
}

.result-screen h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  font-size: 24px;
}

.target {
  font-size: 29px;
}

.segment {
  margin: -8px 0 28px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(33, 150, 243, 0.1);
  color: var(--blue);
  font-size: 12px;
}

.plan-card,
.email-card {
  width: 353px;
  max-width: calc(100vw - 40px);
  border-radius: 16px;
  background: rgba(244, 249, 255, 0.9);
}

.plan-card {
  padding: 20px 20px 10px;
}

.plan-card section {
  position: relative;
  padding-left: 24px;
  padding-bottom: 18px;
}

.plan-card section::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: rgba(33, 150, 243, 0.3);
}

.plan-card section:last-child::before {
  display: none;
}

.plan-card h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 11px -24px;
  color: var(--blue);
  font-size: 15px;
}

.plan-card h3 i {
  font-size: 11px;
}

.plan-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #313b45;
  font-size: 13px;
}

.email-card {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: 23px 20px 30px;
  text-align: center;
}

.email-card p {
  margin: 0;
  font-weight: 800;
}

.email-card input {
  height: 44px;
  padding: 0 16px;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  outline: 0;
  background: #fff;
}

.email-card input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.15);
}

.email-card em {
  color: #e5484d;
  font-size: 12px;
  font-style: normal;
}

.email-card button {
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(33, 150, 243, 0.24);
}

.screen-enter {
  animation: fadeUp 0.34s ease both;
}

.slide-in-right {
  animation: slideInRight 0.36s ease both;
}

.slide-in-left {
  animation: slideInLeft 0.36s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(70px);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-70px);
  }
}

@keyframes exitLeft {
  to {
    opacity: 0;
    transform: translateX(-88px);
  }
}

@keyframes exitRight {
  to {
    opacity: 0;
    transform: translateX(88px);
  }
}

@keyframes enterRight {
  from {
    opacity: 0;
    transform: translateX(88px);
  }
}

@keyframes enterLeft {
  from {
    opacity: 0;
    transform: translateX(-88px);
  }
}

@media (max-width: 640px) {
  .intro-screen {
    padding-top: 18px;
  }

  .hero-icon {
    width: 82px;
    height: 82px;
    font-size: 42px;
  }

  .intro-screen h1 {
    font-size: 23px;
  }

  .start-card {
    height: clamp(260px, calc(100vh - 300px), 430px);
  }

  .question-screen {
    padding-top: 58px;
  }

  .option {
    min-height: 52px;
  }

  .lang-picker {
    top: 34px;
    right: 20px;
  }

  .lang-trigger {
    max-width: calc(100vw - 40px);
  }
}
