/* ==========================================================================
   全局基础样式 (base.css)
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #FFDAAD;
  padding: 20px;
  min-height: 100vh;
  overflow-x: hidden;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}
h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 30px;
  font-size: 1.8rem;
}

/* 三大主面板 */
.cards-section,
.areas-section,
.results-section {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

.results-section {
  background: rgb(243, 252, 230);
}

/* 底部按钮区域布局 */
.action-buttons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 30px auto;
  flex-wrap: wrap;
}

/* 重新开始按钮 */
.reset-btn {
  display: block;
  margin: 0;
  padding: 12px 30px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.reset-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* 导出按钮样式 */
.export-btn {
  display: none;
  margin: 0;
  padding: 12px 30px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.export-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.export-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 预约按钮及悬浮框样式 */
.consult-btn-wrapper {
  position: relative;
  display: none; /* 默认隐藏，由JS控制显示 */
}

.consult-btn {
  padding: 12px 30px;
  background: #9b59b6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  white-space: nowrap;
}
.consult-btn:hover {
  background: #8e44ad;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.consult-btn-wrapper .qr-tooltip {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 66vw;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 3000;
  margin-bottom: 0;
  text-align: center;
}

.consult-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(3px);
}
.consult-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 769px) {
  .consult-btn-wrapper .qr-tooltip {
    position: absolute;
    top: auto;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.9);
    margin-bottom: 15px;
    width: clamp(180px, 16vw, 280px);
    max-height: 70vh;
  }
  .consult-btn-wrapper:hover .qr-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
  }
  .consult-btn-wrapper:hover ~ .consult-overlay {
    opacity: 0;
    visibility: hidden;
    display: none;
  }
  .consult-btn-wrapper .qr-tooltip::after {
    display: block;
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: white transparent transparent transparent;
  }
  /* 电脑端二维码图片限制大小 */
  .consult-btn-wrapper .qr-tooltip img {
    width: 80%;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
  }
}

.consult-btn-wrapper.active .qr-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.consult-btn-wrapper .qr-tooltip::after {
  display: none;
}
.consult-btn-wrapper .qr-tooltip img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.consult-btn-wrapper .qr-tooltip p {
  margin: 0;
  font-size: 16px;
  color: #333;
  font-weight: bold;
  line-height: 1.5;
}

/* 优势力颜色定义 - 基于色彩心理学匹配性格，统一白色文字 */
/* 设计原则：鲜亮背景 + 白色文字 + 半透明深色底衬确保可读性 */
/* 学习力：绿色=成长探索 → 翠绿 */
.learning-card { background: #4CAF50; }
.learning-result { background: #4CAF50; }
/* 分析力：蓝色=理性思考 → 明亮蓝 */
.analytical-card { background: #2196F3; }
.analytical-result { background: #2196F3; }
/* 创新力：紫色=想象创造 → 薰衣紫 */
.innovative-card { background: #B396FF; }
.innovative-result { background: #B396FF; }
/* 共情力：粉色=温暖关怀 → 珊瑚粉 */
.empathy-card { background: #FFB6A0; }
.empathy-result { background: #FFB6A0; }
/* 交往力：橙色=热情社交 → 阳光橙 */
.social-card { background: #FF9F46; }
.social-result { background: #FF9F46; }
/* 引领力：红色=力量领导 → 活力红 */
.leadership-card { background: #FF5757; }
.leadership-result { background: #FF5757; }
/* 行动力：金黄=果断执行 → 向日葵金 */
.action-card { background: #FFDC32; }
.action-result { background: #FFDC32; }
/* 目标力：褐色=沉稳坚持 → 太妃褐 */
.goal-card { background: #957259; }
.goal-result { background: #957259; }
/* 驱动力：金色=成就追求 → 琥珀金 */
.drive-card { background: #FFC850; }
.drive-result { background: #FFC850; }

/* 移动端拖拽提示 & 长按提示 */
.drag-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 1000;
  animation: pulse 2s infinite;
  display: none;
}
.longpress-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  font-size: 16px;
  z-index: 1002;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.longpress-hint.visible {
  opacity: 1;
}
@keyframes pulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}
