/* ============================================
   MBTI Test — Results Page
   ============================================ */

/* ---- 类型徽章 ---- */
.result-badge {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-md);
}

/* ---- 形象图头像 ---- */
.result-avatar {
  width: 200px;
  height: auto;
  margin: 0 auto var(--space-md);
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: avatarPulse 3s ease-in-out infinite;
}

.result-avatar__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
}

@keyframes avatarPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.result-type-code {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0.08em;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-xs);
}

.result-nickname {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.result-group {
  font-size: var(--text-sm);
  font-weight: 500;
}

/* ---- 描述卡片 ---- */
.result-description {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.result-description p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ---- 维度条 ---- */
.dimension-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.dimension-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.dimension-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
}

.dimension-label {
  font-weight: 500;
}

.dimension-label.active {
  color: var(--text-primary);
}

.dimension-label.inactive {
  color: var(--text-muted);
}

.dimension-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}

.dimension-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-out);
  will-change: width;
}

.dimension-bar__fill--ei { background: var(--color-ei); }
.dimension-bar__fill--sn { background: var(--color-sn); }
.dimension-bar__fill--tf { background: var(--color-tf); }
.dimension-bar__fill--jp { background: var(--color-jp); }

.dimension-percent {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- AI 推荐 ---- */
.ai-recommend {
  background: var(--bg-card);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.ai-recommend__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-accent);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ai-recommend__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ai-recommend__item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.ai-recommend__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ai-recommend__info h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ai-recommend__info p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- 分享区 ---- */
.share-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.share-section .btn--primary {
  width: 100%;
  max-width: 320px;
}

.share-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- CTA 关注 ---- */
.cta-follow {
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.cta-follow__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-align: center;
}

.cta-follow__channels {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cta-channel {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}

.cta-channel__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-accent);
}

.cta-channel__icon svg {
  width: 20px;
  height: 20px;
}

.cta-channel__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.cta-channel__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- 重测按钮 ---- */
.restart-section {
  padding: var(--space-md) 0 var(--space-xl);
  text-align: center;
}

/* ---- 分享卡片遮罩 ---- */
.share-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: var(--space-lg);
}

.share-overlay.active {
  display: flex;
}

.share-card-wrapper {
  max-width: 340px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.share-card-wrapper canvas {
  width: 100%;
  height: auto;
  display: block;
}

.share-overlay__actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.share-overlay__hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-md);
  text-align: center;
}

/* ---- 结果页入场动画 ---- */
.result-container > * {
  opacity: 0;
  transform: translateY(20px);
  animation: resultFadeIn var(--duration-slow) var(--ease-out) forwards;
}

.result-container > *:nth-child(1) { animation-delay: 0.1s; }
.result-container > *:nth-child(2) { animation-delay: 0.2s; }
.result-container > *:nth-child(3) { animation-delay: 0.35s; }
.result-container > *:nth-child(4) { animation-delay: 0.5s; }
.result-container > *:nth-child(5) { animation-delay: 0.65s; }
.result-container > *:nth-child(6) { animation-delay: 0.8s; }
.result-container > *:nth-child(7) { animation-delay: 0.95s; }
.result-container > *:nth-child(8) { animation-delay: 1.1s; }

@keyframes resultFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
