/* Tailwind覆盖和自定义样式 */

/* 基础变量 */
:root {
  --primary: #FF6B35;
  --primary-hover: #E55A2B;
  --light-bg: #FFF5F0;
  --text-dark: #2D2D2D;
  --text-secondary: #666666;
  --card-shadow: 0 4px 20px rgba(255, 107, 53, 0.1);
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* 首屏地平线动画 */
@keyframes cityPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

.skyline-bg {
  animation: cityPulse 4s ease-in-out infinite;
}

/* 渐入动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  opacity: 0;
}

.animate-fade-in.visible {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* 卡片悬浮效果 */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.2);
}

/* 按钮样式 */
.btn-primary {
  background: var(--primary);
  color: white;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: scale(1.02);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* 标签滚动 */
.tag-scroll::-webkit-scrollbar {
  display: none;
}
.tag-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 视频卡片 */
.video-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}
.video-card video {
  width: 100%;
  height: auto;
  display: block;
}
.video-card .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 107, 53, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.video-card .play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--primary);
}

/* 证书网格 */
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 768px) {
  .certificate-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 流程图箭头 */
.arrow-right::after {
  content: '→';
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 20px;
}

/* 底部悬浮栏 */
.floating-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 999;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.floating-bar.hidden {
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

/* 返回顶部 */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-overlay img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

/* 收益数字动画 */
.revenue-number {
  background: linear-gradient(135deg, var(--primary) 0%, #FF8F5C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 标签徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--light-bg);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
}

/* 对比表格 */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}
.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.compare-table th {
  background: var(--light-bg);
  font-weight: 600;
  color: var(--primary);
}
.compare-table td:first-child {
  color: var(--text-secondary);
}

/* 品类卡片 */
.category-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.2);
}
.category-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 微信扫码提示 */
.wechat-scan {
  position: relative;
}
.wechat-scan::after {
  content: '微信扫码';
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-secondary);
}

/* 数据卡片 */
.data-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  border-left: 4px solid var(--primary);
}
.data-card .number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.data-card .unit {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 人群卡片 */
.persona-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}
.persona-card .avatar {
  width: 56px;
  height: 56px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* 政策条 */
.policy-item {
  background: white;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  box-shadow: var(--card-shadow);
}
.policy-item .icon-box {
  width: 40px;
  height: 40px;
  background: var(--light-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 流程节点 */
.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.flow-node .node-icon {
  width: 64px;
  height: 64px;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.flow-arrow {
  color: var(--primary);
  font-size: 24px;
  margin: 0 8px;
}

/* 收益示例 */
.income-example {
  background: linear-gradient(135deg, var(--light-bg) 0%, #fff 100%);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 107, 53, 0.2);
}
.income-example .formula {
  font-family: monospace;
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 12px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.income-example .result {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
}
.income-example .amount {
  text-align: center;
}
.income-example .amount .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}
.income-example .amount .label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 投入说明 */
.invest-box {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--card-shadow);
}
.invest-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.invest-item:last-child {
  border-bottom: none;
}
.invest-item .label {
  color: var(--text-secondary);
  font-size: 14px;
}
.invest-item .value {
  color: var(--text-dark);
  font-weight: 500;
}

/* 服务热线 */
.hotline {
  background: linear-gradient(135deg, var(--primary) 0%, #FF8F5C 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hotline:hover {
  transform: scale(1.02);
}

/* AI咨询按钮 */
.ai-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}
.ai-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* 品牌标签行 */
.brand-tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.brand-tags::-webkit-scrollbar {
  display: none;
}
.brand-tag {
  flex-shrink: 0;
  padding: 6px 12px;
  background: var(--light-bg);
  color: var(--primary);
  border-radius: 20px;
  font-size: 11px;
  white-space: nowrap;
}

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--light-bg);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 移动端优化 */
@media (max-width: 768px) {
  .data-card .number {
    font-size: 24px;
  }
  .income-example .amount .value {
    font-size: 22px;
  }
  .flow-arrow {
    display: none;
  }
  .flow-container {
    flex-direction: column;
    gap: 16px;
  }
  .flow-container .arrow-vertical {
    display: block;
    text-align: center;
    color: var(--primary);
    font-size: 20px;
  }
}

/* 触摸反馈 */
@media (hover: none) {
  .btn-primary:active,
  .btn-outline:active {
    transform: scale(0.98);
  }
}


/* ===== 收益逻辑流程图 ===== */
.pfc {
  margin-bottom: 0;
}
.pfc-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 8px;
  scrollbar-width: none;
}
.pfc-row::-webkit-scrollbar {
  display: none;
}
.pfc-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--light-bg);
  border: 2px solid #ffe0cc;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-dark);
  text-align: center;
  flex-shrink: 0;
  gap: 6px;
}
.pfc-node.pfc-hl {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.pfc-node-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.pfc-node .pfc-node-icon {
  color: var(--primary);
}
.pfc-node.pfc-hl .pfc-node-icon {
  color: white;
}
.pfc-arrow {
  color: var(--primary);
  font-size: 20px;
  font-weight: bold;
  flex-shrink: 0;
  line-height: 1;
}
.pfc-loop {
  position: relative;
  margin: 8px 30px 0;
}
.pfc-loop-svg {
  display: block;
  width: 100%;
  height: 40px;
}
.pfc-loop-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--text-secondary);
  background: white;
  padding: 2px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
@media (min-width: 768px) {
  .pfc-row {
    gap: 10px;
  }
  .pfc-node {
    padding: 12px 16px;
    font-size: 14px;
  }
  .pfc-arrow {
    font-size: 24px;
  }
  .pfc-loop {
    margin: 10px 50px 0;
  }
}


/* 长按保存图片支持 */
img[style*="-webkit-touch-callout"],
img.saveable {
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
}
/* 确保二维码区域可长按 */
section img[src*="wechat-qr"],
section img[src*="daren-code"] {
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
}