* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #F8F6F0;
  color: #1E293B;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.app-wrapper {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  position: relative;
}

.view-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* 顶部轻量返回按钮 */
.top-nav-bar {
  margin-bottom: 12px;
}
.back-link-btn {
  background: none;
  border: none;
  color: #64748B;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px 0;
}

/* 状态 1：交付门户首页 */
.portal-header {
  text-align: center;
  margin: 40px 0 28px 0;
}
.portal-badge {
  display: inline-block;
  background: #E2E8F0;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.portal-main-title {
  font-size: 26px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: 0.5px;
}
.portal-sub-title {
  font-size: 13px;
  color: #64748B;
  margin-top: 6px;
}

.portal-cards-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.portal-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid #F1F5F9;
  display: flex;
  flex-direction: column;
}

.card-tag {
  font-size: 11px;
  font-weight: bold;
  color: #E11D48;
  margin-bottom: 4px;
}
.card-heading {
  font-size: 19px;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 8px;
}
.card-desc {
  font-size: 13px;
  color: #64748B;
  line-height: 1.5;
  margin-bottom: 20px;
}

.portal-action-btn {
  width: 100%;
  padding: 13px 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s;
}
.portal-action-btn:active { opacity: 0.85; }
.portal-action-btn.primary {
  background: #E11D48;
  color: #FFFFFF;
  border: none;
}
.portal-action-btn.secondary {
  background: #F1F5F9;
  color: #334155;
  border: none;
}

/* 状态 2：前导首页 */
.intro-hero-box {
  text-align: center;
  margin: 20px 0 24px 0;
}
.hero-emblem {
  font-size: 32px;
  color: #E11D48;
  margin-bottom: 6px;
}
.intro-main-title {
  font-size: 24px;
  font-weight: 900;
  color: #0F172A;
}
.intro-sub-title {
  font-size: 13px;
  color: #64748B;
  margin-top: 6px;
}

.stats-badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.stat-badge-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.stat-badge-val {
  font-size: 17px;
  font-weight: 900;
  color: #1E293B;
}
.stat-badge-lbl {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.intro-notice-box {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 18px;
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.intro-bottom-action {
  margin-top: auto;
  padding: 24px 0 10px 0;
}

/* 状态 3：PPT 查阅瀑布流 */
.ppt-header-box {
  margin-bottom: 16px;
}
.ppt-title {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
}
.ppt-sub {
  font-size: 12px;
  color: #64748B;
  margin-top: 4px;
}

.ppt-waterfall-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 90px;
}
.ppt-slide-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: block;
}
.ppt-download-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 420px;
  margin: 0 auto;
  background: rgba(248, 246, 240, 0.95);
  backdrop-filter: blur(8px);
  padding: 14px 16px;
  box-sizing: border-box;
}
.download-btn-text {
  text-decoration: none;
  display: block;
  text-align: center;
}

/* 状态 4：答题流程 */
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress-inner {
  width: 0%;
  height: 100%;
  background: #E11D48;
  transition: width 0.2s ease;
}
.step-indicator {
  font-size: 13px;
  font-weight: bold;
  color: #94A3B8;
  margin-bottom: 8px;
}
.question-box h2 {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 20px;
  color: #0F172A;
}
.options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.option-card {
  display: flex;
  align-items: flex-start;
  background: #FFFFFF;
  border: 1.5px solid #F1F5F9;
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.option-tag {
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: #F1F5F9;
  color: #64748B;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  margin-right: 12px;
  margin-top: 1px;
}
.option-text { flex: 1; }
.option-card.selected {
  border-color: #E11D48;
  background: #FFF1F2;
}
.option-card.selected .option-tag {
  background: #E11D48;
  color: #FFFFFF;
}

.quiz-nav-bar {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding: 12px 0 20px 0;
}
.nav-btn {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #475569;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.nav-btn:disabled {
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #CBD5E1;
  cursor: not-allowed;
}

/* 状态 5：加载 */
.loading-tip {
  margin-top: 16px;
  color: #64748B;
  font-size: 13px;
  text-align: center;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E2E8F0;
  border-top-color: #E11D48;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 120px auto 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 状态 6：海报与结果 */
.poster-card {
  background: #FAF7F2;
  border-radius: 20px;
  padding: 22px 14px 18px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.header-title {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 16px;
  color: #1E293B;
  letter-spacing: 0.5px;
}
.vs-text { color: #E11D48; }

.vs-cards-row { display: flex; gap: 12px; }
.vs-card {
  flex: 1;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.left-card { background: #F1F5F9; }
.right-card { background: #FFE4E6; }
.card-label { font-size: 12px; color: #64748B; margin-bottom: 6px; font-weight: 500; }
.left-card .card-dim { font-size: 24px; font-weight: 900; color: #1E293B; line-height: 1.2; }
.right-card .card-dim { font-size: 24px; font-weight: 900; color: #E11D48; line-height: 1.2; }

.badge-wrapper { text-align: center; margin: 12px 0 8px 0; }
.diff-badge {
  display: inline-block;
  background: #EFF6FF;
  color: #2563EB;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 16px;
  border-radius: 20px;
}

.radar-title-box { text-align: center; margin-top: 10px; }
.radar-main-title { font-size: 14px; font-weight: 800; color: #1E293B; }
.radar-sub-title { font-size: 11px; color: #94A3B8; margin-top: 2px; }

.analysis-box {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px;
  margin-top: 10px;
}
.persona-tag { font-size: 14px; font-weight: 900; color: #E11D48; }
.quote-text { font-size: 12px; font-weight: 700; color: #1E293B; margin: 6px 0 8px 0; line-height: 1.4; }
.detail-analysis { font-size: 11px; color: #64748B; line-height: 1.6; }
.advice-box { font-size: 11px; color: #D97706; margin-top: 8px; font-weight: 600; }

.action-bar {
  margin: 16px 0 24px 0;
  display: flex;
  gap: 12px;
}
.action-btn-secondary {
  flex: 1;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  color: #475569;
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}
.action-btn-primary {
  flex: 1;
  background: #E11D48;
  color: #FFFFFF;
  border: none;
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}

/* 弹窗及验证码抖动动画 */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}
.modal-card {
  background: #FFFFFF;
  padding: 20px;
  border-radius: 18px;
  max-width: 330px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
}
.modal-close-icon {
  background: none;
  border: none;
  font-size: 20px;
  color: #94A3B8;
  cursor: pointer;
}

.input-wrap {
  position: relative;
  margin-bottom: 8px;
}
.input-wrap input {
  width: 100%;
  padding: 12px 34px 12px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.input-wrap input:focus { border-color: #E11D48; }
.input-wrap input.error { border-color: #EF4444; }
.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #94A3B8;
  cursor: pointer;
}
.error-msg {
  color: #EF4444;
  font-size: 12px;
  margin-bottom: 12px;
  text-align: left;
}

/* 抖动动画 */
.shake-anim {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.modal-tip { font-size: 12px; color: #64748B; margin-bottom: 8px; font-weight: bold; }
#final-poster-img { width: 100%; border-radius: 8px; }
.close-btn {
  margin-top: 10px;
  background: #F1F5F9;
  border: none;
  padding: 8px 24px;
  border-radius: 20px;
  color: #475569;
  font-weight: bold;
  cursor: pointer;
}