/**
 * 情感咨询问答式营销落地页样式
 * 紫色渐变主题，一比一还原设计
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.emotion-container {
  width: 100%;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

/* ==================== 进度条 ==================== */
.progress-header {
  position: relative;
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 14px 20px 6px;
  width: 90%;
  max-width: none;
  margin: 0 auto;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(124, 58, 237, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0;
  transition: width 0.25s ease;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 3px;
  width: 20%;
  transition: width 0.25s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
  flex-wrap: nowrap;
  font-size: 14px;
}

.progress-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.progress-desc {
  font-size: 14px;
  color: #666;
}

/* ==================== 主体内容 ==================== */
.emotion-main {
  position: relative;
  flex: unset;
  padding: 0 0 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 0;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.question-panel {
  display: none;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.question-panel.active {
  display: block;
  margin-top: 0px;
  opacity: 1;
  transform: none;
}

/* ==================== 问题头部 ==================== */
.question-header {
  display: none;
}

.main-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sub-title {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 5px;
}

.sub-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* ==================== 问题框 ==================== */
.question-box {
  background: white;
  border-radius: 0 0 20px 20px;
  padding: 30px 25px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

.question-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.4;
}

/* ==================== 答案列表 ==================== */
.answers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.answer-btn {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.answer-btn:hover {
  background: #f3e8ff;
  border-color: #a855f7;
  color: #7c3aed;
  transform: translateY(-2px);
}

.answer-btn.selected {
  background: #7c3aed;
  border-color: #7c3aed;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.answer-btn:active {
  transform: scale(0.97);
}

/* ==================== 性别选择 ==================== */
.gender-select {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 25px;
}

.gender-btn {
  /* 继承 answer-btn 样式 */
  width: 100%;
  height: auto;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: #f8f9fa;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  transition: all 0.15s ease;
  display: block;
  text-align: center;
}

.gender-btn:hover {
  background: #f3e8ff;
  border-color: #a855f7;
  color: #7c3aed;
  transform: translateY(-2px);
}

.gender-btn.selected {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.gender-btn:active {
  transform: scale(0.97);
}

.gender-text {
  font-size: 24px;
  font-weight: 700;
}

.male {
  color: #3b82f6;
}

.female {
  color: #ec4899;
}

.gender-btn.selected.male,
.gender-btn.selected.female {
  color: white;
}

/* ==================== 提交区域 ==================== */
.submit-area {
  text-align: center;
  margin-top: 20px;
}

.submit-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.tick-icon {
  font-size: 18px;
}

/* ==================== 信息填写 ==================== */
.info-container {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  margin: 10px;
  margin-top: 50px;
}

.info-container {}

.countdown-banner {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 25px;
  font-size: 14px;
  font-weight: 600;
}

.countdown-icon {
  margin-right: 8px;
}

.info-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin-bottom: 25px;
}

.info-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

.form-group input,
.form-group select {
  padding: 14px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #7c3aed;
  background: #f8f5ff;
}

.form-group textarea {
  padding: 14px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 15px;
  resize: vertical;
  min-height: 80px;
  transition: all 0.3s;
  line-height: 1.4;
}

.form-group textarea:focus {
  outline: none;
  border-color: #7c3aed;
  background: #f8f5ff;
}

.info-submit {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  position: sticky;
  bottom: 20px;
  z-index: 5;
}

.info-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

.service-guarantee {
  margin-top: 30px;
  text-align: center;
}

.service-guarantee h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.guarantee-list {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 15px;
}

.guarantee-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #666;
}

.guarantee-item .icon {
  font-size: 24px;
}

/* ==================== 底部提示 ==================== */
.bottom-hint {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: floatHint 3s ease-in-out infinite;
}

@keyframes floatHint {
  0%, 100% { 
    opacity: 0.7; 
    transform: translateX(-50%) translateY(0px);
  }
  50% { 
    opacity: 1; 
    transform: translateX(-50%) translateY(-3px);
  }
}

.bottom-tips {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  .emotion-main {
    padding: 0 0 15px;
  }
  
  .question-box {
    padding: 25px 20px;
  }
  
  .main-title {
    font-size: 24px;
  }
  
  .question-title {
    font-size: 16px;
  }
  
  .answer-btn {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .gender-btn {
    width: 100%;
    height: 60px;
  }
  
  .gender-text {
    font-size: 20px;
  }
  
  .info-container {
    padding: 25px 20px;
  }
  
  /* 移动端验证码样式已统一到 .sms-verify 选择器 */
}

/* 隐藏下一题按钮，自动跳转 */
.next-btn {
  display: none;
}

/* 下一题按钮：默认隐藏，显示后与 .nav-btn 外观一致 */
.next-btn {
  display: none; /* 通过 JS 设为 block */
  flex: 1;
  padding: 14px;
  border: 2px solid #7c3aed;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.next-btn:hover {
  background: #6b21a8;
  border-color: #6b21a8;
  transform: translateY(-2px);
}

.next-btn:active {
  transform: scale(0.97);
}

/* 顶部文案 */
.top-banner {
  position: relative;
  padding: 18px 16px 4px;
  color: white;
  text-align: left;
}

.taglines p {
  line-height: 1.3;
}

.taglines .line1 {
  font-size: 18px;
  font-weight: 600;
}

.taglines .line2 {
  font-size: 14px;
  opacity: 0.9;
}

.taglines .line3 {
  font-size: 13px;
  opacity: 0.8;
}

.record-btn {
  position: absolute;
  top: 0;
  right: 20px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 25px;
  padding: 6px 18px;
  font-size: 12px;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.record-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ==================== 全局提示样式 ==================== */
.global-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  z-index: 20000;
  opacity: 0;
  transition: opacity 0.3s ease;
  max-width: 80%;
  text-align: center;
  pointer-events: none;
}

.global-toast.show {
  opacity: 1;
}

.global-toast.success {
  background: rgba(16, 185, 129, 0.9);
}

.global-toast.error {
  background: rgba(239, 68, 68, 0.9);
}

.global-toast.warning {
  background: rgba(245, 158, 11, 0.9);
}

/* 导航按钮 */
.nav-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.nav-btn {
  flex: 1;
  padding: 14px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  border-color: #7c3aed;
  background: #f3e8ff;
  color: #7c3aed;
}

.nav-btn:active {
  transform: scale(0.97);
}

/* 性别选中不同颜色 */
.gender-btn.selected.male {
  background: #3b82f6;
  border-color: #3b82f6;
}

.gender-btn.selected.female {
  background: #ec4899;
  border-color: #ec4899;
}

/* =========== 支付弹窗 =========== */
.payment-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.payment-modal.show { 
  opacity: 1; 
}

.payment-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.payment-content {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 24px;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.payment-modal.show .payment-content { 
  transform: translateY(0); 
}

.payment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.payment-header h3 { 
  margin: 0; 
  font-size: 20px; 
  font-weight: 700; 
  color: #333;
}

.close-btn {
  background: #f8f9fa;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover { 
  background: #f3f4f6; 
  color: #333; 
}

/* ==================== 服务信息样式 ==================== */
.service-info {
  background: linear-gradient(135deg, #fef7ff, #f3e8ff);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid rgba(124, 58, 237, 0.1);
}

.service-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.service-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.service-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.service-title {
  flex: 1;
}

.service-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.service-title p {
  font-size: 13px;
  color: #666;
  margin: 0;
}

.service-benefits h4 {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.benefit-number {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.benefit-text {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.price-info {
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: 12px;
  border: 2px solid rgba(124, 58, 237, 0.1);
}

.original-price { 
  font-size: 14px; 
  color: #999; 
  text-decoration: line-through; 
  margin-bottom: 5px; 
}

.current-price { 
  font-size: 16px; 
  color: #333; 
}

.price-num { 
  font-size: 32px; 
  font-weight: 800; 
  color: #7c3aed; 
}

/* ==================== 支付方式样式 ==================== */
.payment-methods {
  margin-bottom: 20px;
}

.payment-methods h4 { 
  font-size: 16px; 
  margin-bottom: 15px; 
  color: #333;
  font-weight: 600;
}

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

.method-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  font-size: 15px;
}

.method-btn::after {
  content: '✓';
  position: absolute;
  right: 18px;
  color: #7c3aed;
  font-weight: 700;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.method-btn:hover::after { 
  opacity: .6; 
}

.method-btn:hover {
  border-color: #7c3aed;
  background: #faf5ff;
}

.method-btn.active {
  border-color: #7c3aed;
  background: #faf5ff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}

.method-btn.active::after { 
  opacity: 1; 
}

.method-btn img { 
  width: 30px; 
  height: 30px; 
  flex-shrink: 0; 
  position: relative; 
  z-index: 1; 
}

.method-btn span { 
  font-size: 15px; 
  font-weight: 500; 
  position: relative; 
  z-index: 1; 
  color: #333;
}

/* ==================== 短信验证样式 ==================== */
.sms-verify {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.sms-verify h4 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.verify-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.4;
}

.sms-verify .verify-row-container {
  display: grid;
  grid-template-columns: 140px 110px;
  gap: 10px;
  margin-bottom: 10px;
}

.sms-verify .verify-input,
.sms-verify .verify-btn {
  height: 40px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  font-size: 16px;
  transition: all 0.3s ease;
}

.sms-verify .verify-input {
  padding: 0 12px;
  background: white;
}

.sms-verify .verify-input:focus,
.sms-verify .verify-input:active {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.sms-verify .verify-btn,
.sms-verify .verify-btn:focus,
.sms-verify .verify-btn:active {
  background: #7c3aed !important;
  color: white !important;
  border-color: #7c3aed !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  outline: none !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

.sms-verify .verify-btn:hover:not(:disabled),
.sms-verify .verify-btn:focus:not(:disabled) {
  background: #6b21a8 !important;
  border-color: #6b21a8 !important;
}

.sms-verify .verify-btn:disabled,
.sms-verify .verify-btn:disabled:hover {
  background: #d1d5db !important;
  color: #9ca3af !important;
  border-color: #d1d5db !important;
  cursor: not-allowed !important;
}

.phone-display {
  font-size: 13px;
  color: #666;
  margin: 0;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

/* ==================== 确认支付按钮 ==================== */
.confirm-payment-btn { 
  background: linear-gradient(135deg, #7c3aed, #a855f7); 
  color: #fff; 
  border: none; 
  border-radius: 50px; 
  font-weight: 600; 
  transition: all .3s; 
  width: 100%;
  padding: 16px;
  font-size: 17px;
  cursor: pointer;
  margin: -10px 0 10px;
}

.confirm-payment-btn:hover:not(:disabled) { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(124,58,237,.35); 
}

.confirm-payment-btn:disabled { 
  background: #e4e4e7!important; 
  color: #999!important; 
  box-shadow: none; 
  cursor: not-allowed; 
  transform: none;
}

.method-btn.active, .confirm-payment-btn { 
  box-shadow:0 4px 16px rgba(124,58,237,.2); 
}

/* ==================== 移动端优化 ==================== */
@media (max-width: 768px) {
  .payment-content { 
    padding: 15px; 
    max-height: 95vh;
  }
  
  .service-header {
    gap: 12px;
  }
  
  .service-avatar {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .service-title h3 {
    font-size: 16px;
  }
  
  .benefit-item {
    gap: 10px;
  }
  
  .benefit-number {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  
  .benefit-text {
    font-size: 13px;
  }
  
  .method-btn {
    padding: 12px 15px;
  }
  
  .method-btn img {
    width: 26px;
    height: 26px;
  }
  
  .method-btn span {
    font-size: 14px;
  }
  
  .sms-verify .verify-row-container {
        grid-template-columns: 180px 90px;
    gap: 8px;
  }
  
  .sms-verify .verify-btn {
    font-size: 12px !important;
  }
}

/* ==================== 响应式优化 ==================== */
@media (max-width: 480px) {
  .emotion-main {
    width: 95%;
  }
  
  .progress-header {
    width: 95%;
    padding: 12px 16px 5px;
  }
  
  .question-box {
    padding: 25px 20px;
  }
  
  .global-toast {
    max-width: 90%;
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* ==================== 性能优化 ==================== */
.answer-btn,
.method-btn,
.verify-btn,
.confirm-payment-btn {
  will-change: transform;
}

.question-panel {
  will-change: opacity, transform;
}

/* ==================== 无障碍访问优化 ==================== */
.answer-btn:focus,
.method-btn:focus,
.verify-btn:focus,
.confirm-payment-btn:focus {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

/* ==================== 隐藏工具类 ==================== */
.hidden { 
  display: none !important; 
}

/* ==================== 响应式优化 ==================== */
@media (orientation:landscape) and (max-height:450px){
  .emotion-main{margin-top:0;}
  .question-panel{max-height:calc(100vh - 120px);overflow:auto;}
}

#infoForm.question-panel.active{margin-top:0;} 