/* 登味测试器 - 小红书风格全新UI */

/* ====== 全局基础 ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background: #FFF8F0;
}

/* ====== 页面切换 ====== */
.page {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.page.active {
  display: block;
  opacity: 1;
}

/* ====== 封面页 ====== */
.start-bg {
  min-height: 100vh;
  background: linear-gradient(160deg, #FFF5E6 0%, #FFE8CC 30%, #FFDDB5 60%, #FFD4A8 100%);
  position: relative;
  overflow: hidden;
}

.start-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80vw;
  height: 80vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,165,0,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.start-bg::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* 浮动表情 */
.floating-emojis {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.float-item {
  position: absolute;
  font-size: 28px;
  animation: floatRandom 6s ease-in-out infinite;
  opacity: 0.3;
  filter: blur(0.5px);
}

@keyframes floatRandom {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(5deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
  75% { transform: translateY(-20px) rotate(3deg); }
}

/* 标题徽章 */
.title-badge {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(255,255,255,0.8);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #D97706;
  letter-spacing: 2px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.5);
}

/* 主图标 */
.main-icon-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
}

.main-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 56px;
  z-index: 2;
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -55%) scale(1.05); }
}

.icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid rgba(245,158,11,0.25);
  animation: ringPulse 3s ease-in-out infinite;
}

.icon-ring-2 {
  inset: -12px;
  border-color: rgba(245,158,11,0.12);
  animation-delay: 0.5s;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

/* 主标题 */
.main-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 42px;
  font-weight: 900;
  color: #92400E;
  letter-spacing: 4px;
  line-height: 1.2;
  margin-bottom: 6px;
  text-shadow: 0 3px 6px rgba(146,64,14,0.15);
}

.start-desc {
  font-size: 15px;
  color: #B45309;
  opacity: 0.7;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* 描述卡片 */
.intro-card {
  width: 100%;
  margin-bottom: 24px;
}

.intro-card-inner {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 28px 24px;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 8px 32px rgba(180,83,9,0.08), 0 2px 8px rgba(180,83,9,0.04);
}

.intro-tag {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #FDE68A, #FCD34D);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 16px;
}

.intro-text {
  font-size: 17px;
  color: #78350F;
  line-height: 1.7;
  font-weight: 600;
  margin-bottom: 8px;
}

.intro-text .highlight {
  font-style: normal;
  color: #EA580C;
  position: relative;
}

.intro-text .highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(234,88,12,0.15);
  border-radius: 3px;
}

.intro-text-sub {
  font-size: 14px;
  color: #A16207;
  margin-bottom: 16px;
}

.intro-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.level-tag {
  padding: 4px 10px;
  background: rgba(254,243,199,0.8);
  border-radius: 8px;
  font-size: 11px;
  color: #92400E;
  font-weight: 600;
  white-space: nowrap;
}

/* 昵称输入卡片 */
.nickname-card {
  width: 100%;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 4px 16px rgba(180,83,9,0.06);
}

.nickname-label {
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 12px;
  text-align: center;
}

.nickname-input-wrapper {
  position: relative;
}

.nickname-input {
  width: 100%;
  padding: 14px 50px 14px 16px;
  border: 2px solid #FDE68A;
  border-radius: 14px;
  font-size: 17px;
  text-align: center;
  color: #78350F;
  background: rgba(255,251,235,0.6);
  outline: none;
  transition: all 0.3s ease;
  font-weight: 600;
}

.nickname-input::placeholder {
  color: #D4A06A;
  font-weight: 400;
}

.nickname-input:focus {
  border-color: #F59E0B;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.1);
  background: white;
}

.nickname-counter {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #D4A06A;
}

.nickname-hint {
  font-size: 12px;
  color: #EF4444;
  text-align: center;
  margin-top: 8px;
}

/* 开始按钮 */
.start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 280px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #F59E0B, #EA580C);
  color: white;
  font-size: 18px;
  font-weight: 800;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 24px rgba(234,88,12,0.3), 0 2px 8px rgba(234,88,12,0.2);
  position: relative;
  overflow: hidden;
}

.start-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.start-btn:hover::before {
  left: 100%;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(234,88,12,0.4), 0 4px 12px rgba(234,88,12,0.25);
}

.start-btn:active {
  transform: translateY(0);
}

.btn-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.start-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* 参与人数统计 */
.visitor-count-wrapper {
  margin-top: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.visitor-count-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 12px rgba(180,83,9,0.06);
  animation: fadeInUp 0.8s ease 0.3s both;
}

.visitor-count-icon {
  font-size: 16px;
  animation: fireFlicker 1.5s ease-in-out infinite;
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.visitor-count-text {
  font-size: 13px;
  font-weight: 600;
  color: #92400E;
  letter-spacing: 0.5px;
}

.visitor-count-number {
  font-weight: 900;
  color: #EA580C;
  font-size: 15px;
  font-family: 'Noto Serif SC', serif;
}

.start-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 12px;
  color: #B45309;
  opacity: 0.5;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F59E0B;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* ====== 答题页 ====== */
.quiz-bg {
  min-height: 100vh;
  background: linear-gradient(180deg, #FFFBEB 0%, #FFF7ED 100%);
}

.quiz-header {
  padding-top: 12px;
}

.quiz-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-label {
  font-size: 15px;
  font-weight: 800;
  color: #92400E;
}

.progress-pct {
  font-size: 14px;
  font-weight: 700;
  color: #D97706;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #FDE68A;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FBBF24, #F59E0B, #EA580C);
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  border-radius: 4px;
}

.question-card {
  background: white;
  border-radius: 20px;
  padding: 24px 20px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid rgba(253,230,138,0.5);
}

.question-emoji {
  font-size: 42px;
  text-align: center;
  margin-bottom: 12px;
}

.question-title {
  font-size: 18px;
  font-weight: 700;
  color: #1F2937;
  text-align: center;
  line-height: 1.7;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* 选项按钮 */
.option-btn {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: white;
  border: 2px solid rgba(253,230,138,0.6);
  border-radius: 16px;
  font-size: 15px;
  color: #44403C;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

.option-btn:hover {
  border-color: #FBBF24;
  background: #FFFBEB;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(251,191,36,0.15);
}

.option-btn.selected {
  border-color: #F59E0B;
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(245,158,11,0.2);
}

.option-btn .option-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: white;
  font-weight: 800;
  font-size: 13px;
  margin-right: 14px;
  flex-shrink: 0;
}

.option-btn .option-text {
  font-weight: 500;
  font-size: 15px;
}

/* 选项动画 */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.option-animate {
  animation: slideInUp 0.35s ease forwards;
  opacity: 0;
}
.option-animate:nth-child(1) { animation-delay: 0.04s; }
.option-animate:nth-child(2) { animation-delay: 0.1s; }
.option-animate:nth-child(3) { animation-delay: 0.16s; }
.option-animate:nth-child(4) { animation-delay: 0.22s; }

/* 题目切换 */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
.question-animate {
  animation: fadeInRight 0.35s ease forwards;
}

/* ====== 结果页 ====== */
.result-bg {
  min-height: 100vh;
  height: 100vh;
  background: linear-gradient(160deg, #FEF3C7 0%, #FFEDD5 40%, #FED7AA 100%);
  position: relative;
  overflow-y: auto;
}

.result-card {
  width: 100%;
  background: white;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(180,83,9,0.12), 0 4px 16px rgba(0,0,0,0.04);
  opacity: 0;
}

.result-card.result-animate {
  animation: cardReveal 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-top-bar {
  height: 4px;
  background: linear-gradient(90deg, #FBBF24, #F59E0B, #EA580C, #DC2626);
}

/* 主文案大标题区 */
.result-hero {
  padding: 16px 20px 4px;
  text-align: center;
}

.result-big-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 24px;
  font-weight: 900;
  color: #92400E;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.result-player-name {
  font-size: 17px;
  font-weight: 900;
  color: #EA580C;
  line-height: 1.4;
  letter-spacing: 1px;
}

.result-player-highlight {
  font-size: 24px;
  font-weight: 900;
  color: #DC2626;
  position: relative;
  display: inline-block;
  padding: 0 2px;
}

.result-player-highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(251, 191, 36, 0.35);
  border-radius: 4px;
  z-index: -1;
}

.result-core {
  padding: 8px 20px 16px;
  text-align: center;
}

.result-main-icon {
  font-size: 64px;
  margin-bottom: 8px;
  line-height: 1;
  background: none !important;
  -webkit-background-clip: unset;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.result-main-icon.bounce {
  animation: iconBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s both;
}

@keyframes iconBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* 等级名称 - 核心突出区域 */
.result-level-badge {
  display: inline-block;
  margin: 6px 0 10px;
  padding: 8px 28px;
  border-radius: 50px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.result-level-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 32px;
  font-weight: 900;
  color: white;
  letter-spacing: 4px;
  display: block;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* 等级徽章呼吸光晕 */
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
  50% { box-shadow: 0 4px 28px rgba(0,0,0,0.18), 0 0 40px rgba(245,158,11,0.15); }
}

.result-level-badge {
  animation: badgeGlow 3s ease-in-out infinite;
}

/* 登味浓度百分比 */
.result-score-pct {
  font-size: 15px;
  font-weight: 700;
  color: #B45309;
  margin-top: 4px;
  letter-spacing: 1px;
}

/* 描述文案（紧接等级徽章下方） */
.result-desc-inline {
  font-size: 15px;
  color: #78350F;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  margin: 8px 0 0;
  padding: 0 8px;
  letter-spacing: 0.5px;
}

/* ID登味含量（单行融合布局） */
.result-deng-meter-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(254, 243, 199, 0.45);
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.deng-meter-label-inline {
  font-size: 14px;
  font-weight: 800;
  color: #92400E;
  white-space: nowrap;
  flex-shrink: 0;
}

.deng-meter-bar-track-inline {
  flex: 1;
  height: 12px;
  background: #FEF3C7;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(251, 191, 36, 0.25);
  min-width: 60px;
}

.deng-meter-bar-fill-inline {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #34D399, #A3E635, #FBBF24, #F59E0B, #EA580C, #DC2626);
  background-size: 200% 100%;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.deng-meter-bar-fill-inline::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 16px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35));
  border-radius: 6px;
}

.deng-meter-value-inline {
  font-size: 20px;
  font-weight: 900;
  color: #92400E;
  font-family: 'Noto Serif SC', serif;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 40px;
  text-align: right;
}

/* 操作按钮 */
.result-actions {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action-share-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #F59E0B, #EA580C);
  color: white;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(234,88,12,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}

.action-share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(234,88,12,0.35);
}

.action-retry-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: #B45309;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid #FDE68A;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-retry-btn:hover {
  background: #FFFBEB;
  border-color: #FBBF24;
}

/* ====== 分享弹窗 ====== */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.share-modal-overlay.hidden {
  display: none;
}

.share-modal-overlay.show {
  display: flex;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.share-modal-card {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 360px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0,0,0,0.2);
  animation: cardSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  -webkit-overflow-scrolling: touch;
}

@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 分享预览卡片 */
.share-preview {
  padding: 16px 16px 0;
}

.share-preview-inner {
  background: white;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  border: 1px solid rgba(229,231,235,0.8);
}

.share-preview-header {
  margin-bottom: 12px;
}

.share-preview-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #92400E;
}

.share-preview-icon {
  font-size: 48px;
  margin-bottom: 8px;
  line-height: 1;
  background: none !important;
}

.share-preview-name {
  font-size: 14px;
  font-weight: 700;
  color: #78350F;
  margin-bottom: 4px;
}

.share-preview-level {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 900;
  color: #92400E;
  margin-bottom: 6px;
}

.share-preview-score {
  font-size: 13px;
  color: #B45309;
  margin-bottom: 12px;
  font-weight: 600;
}

.share-preview-footer {
  padding-top: 12px;
  border-top: 1px dashed rgba(180,83,9,0.2);
  font-size: 12px;
  color: #D97706;
  font-weight: 600;
}

/* 分享操作区 */
.share-actions-area {
  padding: 16px;
}

.share-actions-title {
  font-size: 14px;
  font-weight: 700;
  color: #44403C;
  text-align: center;
  margin-bottom: 16px;
}

.share-platform-list {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.share-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.share-platform-btn:hover {
  transform: translateY(-3px);
}

.platform-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.share-platform-btn span {
  font-size: 11px;
  color: #78716C;
  font-weight: 600;
}

.share-copy-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #FDE68A, #FCD34D);
  color: #92400E;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 8px;
}

.share-copy-btn:hover {
  background: linear-gradient(135deg, #FCD34D, #FBBF24);
  transform: translateY(-1px);
}

.copy-feedback {
  font-size: 13px;
  color: #059669;
  text-align: center;
  font-weight: 700;
  padding: 4px 0;
}

.share-close-btn {
  width: 100%;
  padding: 12px;
  background: none;
  border: none;
  color: #A8A29E;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.share-close-btn:hover {
  color: #78716C;
}

/* ====== 结果页二维码引导区域 ====== */
.result-qr-section {
  margin: 0 16px 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border-radius: 14px;
  text-align: center;
  border: 1px dashed rgba(245, 158, 11, 0.35);
}

.result-qr-header {
  font-size: 15px;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.result-qr-box {
  width: 100px;
  height: 100px;
  margin: 0 auto 10px;
  background: white;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.result-qr-box img,
.result-qr-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.result-qr-hint {
  font-size: 13px;
  color: #B45309;
  font-weight: 600;
  line-height: 1.6;
  opacity: 0.85;
}

/* ====== 分享二维码区域 ====== */
.share-qr-section {
  margin: 0 16px;
  padding: 16px;
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border-radius: 16px;
  text-align: center;
  border: 1px dashed rgba(245, 158, 11, 0.3);
}

.share-qr-title {
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 12px;
}

.share-qr-box {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  background: white;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-qr-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.share-qr-hint {
  font-size: 12px;
  color: #B45309;
  font-weight: 600;
  line-height: 1.6;
}

.share-qr-hint .highlight {
  color: #EA580C;
  font-weight: 800;
}

/* ====== 粒子效果 ====== */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

@keyframes confettiFall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

/* ====== 滚动条 ====== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #FBBF24; border-radius: 2px; }

/* ====== 触摸态优化 ====== */
@media (hover: none) and (pointer: coarse) {
  .option-btn:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(253,230,138,0.6);
    background: white;
  }
  .option-btn:active {
    border-color: #FBBF24;
    background: #FFFBEB;
    transform: scale(0.98);
  }
  .start-btn:hover {
    transform: none;
  }
  .start-btn:active {
    transform: scale(0.97);
  }
  .action-share-btn:hover {
    transform: none;
  }
  .action-share-btn:active {
    transform: scale(0.97);
  }
}

/* ====== 响应式 ====== */
/* 超小屏 (≤360px, 如SE等) */
@media (max-width: 360px) {
  .main-title { font-size: 36px; letter-spacing: 3px; }
  .start-desc { font-size: 14px; }
  .main-icon-wrapper { width: 80px; height: 80px; }
  .main-icon { font-size: 46px; }
  .nickname-card { padding: 16px; }
  .nickname-label { font-size: 12px; }
  .nickname-input { padding: 12px 44px 12px 14px; font-size: 16px; }
  .start-btn { padding: 14px 28px; font-size: 17px; max-width: 260px; }
  .question-card { padding: 20px 16px 16px; margin-bottom: 16px; }
  .question-emoji { font-size: 36px; margin-bottom: 10px; }
  .question-title { font-size: 16px; }
  .option-btn { padding: 14px 16px; font-size: 14px; border-radius: 14px; }
  .option-btn .option-label { width: 24px; height: 24px; font-size: 12px; margin-right: 12px; }
  .option-btn .option-text { font-size: 14px; }
  .options-list { gap: 10px; }
  .result-big-title { font-size: 20px; letter-spacing: 2px; }
  .result-player-name { font-size: 15px; }
  .result-player-highlight { font-size: 20px; }
  .result-main-icon { font-size: 52px; }
  .result-level-text { font-size: 26px; letter-spacing: 3px; }
  .result-level-badge { padding: 6px 22px; }
  .result-score-pct { font-size: 13px; }
  .result-desc-card { margin: 0 12px 6px; padding: 10px; }
  .result-desc-text { font-size: 13px; }
  .result-desc-inline { font-size: 13px; margin: 6px 0 0; }
  .result-qr-section { margin: 0 12px 8px; padding: 12px; }
  .result-qr-header { font-size: 13px; margin-bottom: 8px; }
  .result-qr-box { width: 88px; height: 88px; padding: 5px; }
  .result-qr-hint { font-size: 12px; }
  .deng-meter-label { font-size: 12px; margin-bottom: 8px; }
  .deng-meter-bar-track { height: 14px; }
  .deng-meter-value { font-size: 22px; }
  .deng-meter-label-inline { font-size: 12px; }
  .deng-meter-bar-track-inline { height: 10px; }
  .deng-meter-value-inline { font-size: 16px; }
  .result-deng-meter-inline { gap: 8px; padding: 8px 10px; margin-top: 12px; }
  .result-actions { padding: 0 12px 12px; }
  .visitor-count-inner { padding: 6px 16px; }
  .visitor-count-text { font-size: 12px; }
  .visitor-count-number { font-size: 13px; }
  .share-platform-list { gap: 12px; }
  .platform-icon { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; }
  .share-preview-level { font-size: 18px; }
}

/* 小屏 (361-414px) */
@media (min-width: 361px) and (max-width: 414px) {
  .main-title { font-size: 40px; }
  .option-btn { font-size: 15px; padding: 15px 17px; }
  .option-btn .option-text { font-size: 15px; }
  .question-title { font-size: 17px; }
  .question-card { padding: 22px 18px 18px; }
  .result-big-title { font-size: 22px; }
  .result-player-highlight { font-size: 22px; }
  .result-level-text { font-size: 30px; }
  .result-level-badge { padding: 7px 26px; }
  .result-main-icon { font-size: 58px; }
  .result-desc-inline { font-size: 14px; }
  .result-qr-box { width: 96px; height: 96px; }
}

/* 安全区域适配 (刘海屏等) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .start-bg, .quiz-bg, .result-bg {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ====== 输入框抖动 ====== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}