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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: #f5f0fa;
  -webkit-font-smoothing: antialiased;
}

/* ========== 页面容器 ========== */
.page-wrapper {
  max-width: 480px;
  margin: 0 auto;
  background-color: #f5f0fa;
  min-height: 100vh;
  position: relative;
}

/* ========== 顶部导航栏 ========== */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #9556bf;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
}

.top-bar .title {
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}

.top-bar .phone-link {
  position: absolute;
  right: 13px;
  text-decoration: none;
  color: #fff;
}

.top-bar .phone-link svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.top-bar .phone-link .dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  background-color: #ef4f4f;
  border-radius: 50%;
}

/* ========== 主内容区 ========== */
.main-content {
  background-color: #f5f6fa;
  min-height: 100vh;
  padding-bottom: 90px;
}

/* ========== Banner 轮播 ========== */
.banner-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.banner-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.banner-slide {
  width: 100%;
  flex-shrink: 0;
}

.banner-slide img {
  width: 100%;
  object-cover;
  height: 188px;
  display: block;
}

.banner-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.banner-dots .dot {
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s;
  height: 3px;
  border-radius: 0;
  background-color: #9556bf;
}

.banner-dots .dot.active {
  width: 12px;
  opacity: 1;
}

.banner-dots .dot:not(.active) {
  width: 6px;
  opacity: 0.3;
}

/* ========== 导航图标区域 ========== */
.nav-section {
  background-color: #fff;
}

.nav-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: 10px 0;
  padding: 18px 0 14px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20%;
  text-decoration: none;
  margin-bottom: 14px;
  opacity: 0;
  animation: navItemIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.nav-item:nth-child(1)  { animation-delay: 0s; }
.nav-item:nth-child(2)  { animation-delay: 0.06s; }
.nav-item:nth-child(3)  { animation-delay: 0.12s; }
.nav-item:nth-child(4)  { animation-delay: 0.18s; }
.nav-item:nth-child(5)  { animation-delay: 0.24s; }
.nav-item:nth-child(6)  { animation-delay: 0.3s; }
.nav-item:nth-child(7)  { animation-delay: 0.36s; }
.nav-item:nth-child(8)  { animation-delay: 0.42s; }
.nav-item:nth-child(9)  { animation-delay: 0.48s; }
.nav-item:nth-child(10) { animation-delay: 0.54s; }

.nav-item img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  transition: filter 0.3s;
}

.nav-item img.icon-float-1  { animation: iconFloat 3s ease-in-out 0s infinite; }
.nav-item img.icon-float-2  { animation: iconFloat 3s ease-in-out 0.2s infinite; }
.nav-item img.icon-float-3  { animation: iconFloat 3s ease-in-out 0.4s infinite; }
.nav-item img.icon-float-4  { animation: iconFloat 3s ease-in-out 0.6s infinite; }
.nav-item img.icon-float-5  { animation: iconFloat 3s ease-in-out 0.8s infinite; }
.nav-item img.icon-float-6  { animation: iconFloat 3s ease-in-out 1.0s infinite; }
.nav-item img.icon-float-7  { animation: iconFloat 3s ease-in-out 1.2s infinite; }
.nav-item img.icon-float-8  { animation: iconFloat 3s ease-in-out 1.4s infinite; }
.nav-item img.icon-float-9  { animation: iconFloat 3s ease-in-out 1.6s infinite; }
.nav-item img.icon-float-10 { animation: iconFloat 3s ease-in-out 1.8s infinite; }

.nav-item span {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
  text-align: center;
  line-height: 1.2;
}

/* ========== 中国好月嫂推广图 ========== */
.promo-banner {
  margin: 10px 12px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.15);
}

.promo-banner img {
  width: 100%;
  display: block;
}

/* ========== 底部版权区 ========== */
.footer-section {
  background-color: #edf0f7;
  padding: 15px 0 20px;
  text-align: center;
}

.footer-section .powered {
  font-size: 10px;
  color: #ccc;
  margin-bottom: 6px;
}

.footer-section .icp {
  font-size: 10px;
  color: #bbb;
  text-decoration: none;
}

/* ========== 底部三导航栏 ========== */
.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 9999;
}

.tab-bar-inner {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(122, 22, 189, 0.08);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 72px;
  padding-bottom: 10px;
  position: relative;
  gap: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -2px 20px rgba(122, 22, 189, 0.12), 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tab-bar-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 22, 189, 0.3), transparent);
}

/* Tab 按钮 */
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex: 1 1 0;
  height: 100%;
  padding: 0;
  position: relative;
  transition: transform 0.2s;
  transform: scale(1);
}

.tab-btn:active {
  transform: scale(0.92);
}

.tab-btn .tab-dot {
  position: absolute;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #7A16BD;
  animation: tabBounce 0.4s ease;
}

.tab-btn .tab-icon {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(1.15) translateY(-2px);
  filter: drop-shadow(0 2px 4px rgba(122, 22, 189, 0.3));
}

.tab-btn .tab-icon svg {
  width: 24px;
  height: 24px;
}

.tab-btn .tab-label {
  font-size: 10px;
  color: #7A16BD;
  font-weight: 700;
  transition: color 0.2s;
}

/* 中间电话按钮 */
.tab-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 80px;
  flex-shrink: 0;
}

.tab-center-inner {
  position: relative;
}

.tab-center .phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7A16BD 0%, #9B59B6 100%);
  box-shadow: 0 4px 15px rgba(122, 22, 189, 0.4);
  animation: centerPulse 2.5s ease-in-out infinite;
  position: relative;
  z-index: 2;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  transform: translateY(-10px);
}

.tab-center .phone-btn:active {
  transform: translateY(-10px) scale(0.9);
}

.tab-center .phone-btn svg {
  width: 24px;
  height: 24px;
}

.tab-center .phone-label {
  font-size: 9px;
  color: #7A16BD;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 2px;
}

/* 涟漪效果 */
.ripple-ring {
  position: absolute;
  top: -10px;
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(122, 22, 189, 0.3);
  animation: ripple 2s ease-out infinite;
  pointer-events: none;
}

.ripple-ring:nth-child(3) {
  border-color: rgba(122, 22, 189, 0.2);
  animation-delay: 0.7s;
}

/* 客服按钮 */
.service-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C39BD3 0%, #D7BDE2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.15);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateY(-10px);
  position: relative;
}

.service-btn-icon svg {
  width: 24px;
  height: 24px;
}

.service-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  background-color: #FF4757;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

/* ========== 右侧客服悬浮按钮 ========== */
.float-service {
  position: fixed;
  right: 10px;
  bottom: 18%;
  z-index: 40;
  cursor: pointer;
}

.float-service-inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9B59B6, #7B1FA2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(155, 89, 182, 0.4);
  position: relative;
  z-index: 2;
}

.float-service-inner svg {
  width: 22px;
  height: 22px;
}

.float-service .pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(155, 89, 182, 0.4);
  animation: floatPulse 2s ease-out infinite;
  pointer-events: none;
}

.float-service .pulse-ring:nth-child(2) {
  border-color: rgba(155, 89, 182, 0.2);
  animation-delay: 0.6s;
}

/* ========== 动画关键帧 ========== */

/* 入场弹入动画 */
@keyframes navItemIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.6);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 图标持续浮动呼吸 */
@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* 按压弹跳 */
@keyframes iconBounce {
  0% { transform: scale(0.85); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Tab 弹跳 */
@keyframes tabBounce {
  0% { transform: scale(1); }
  30% { transform: scale(0.85); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* 中间按钮呼吸脉冲 */
@keyframes centerPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(122, 22, 189, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(122, 22, 189, 0.7); }
}

/* 涟漪扩散 */
@keyframes ripple {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* 右侧悬浮按钮脉冲 */
@keyframes floatPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* 提示气泡入场 */
@keyframes tooltipIn {
  0% { opacity: 0; transform: translateY(-50%) translateX(8px); }
  100% { opacity: 1; transform: translateY(-50%) translateX(0); }
}


/* ========== 文章内容样式 ========== */
#article {
  background-color: #fff;
  margin: 12px;
  border-radius: 16px;
  padding: 20px 16px;
  box-shadow: 0 2px 12px rgba(122, 22, 189, 0.08);
}

/* 文章头部 */
.article-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0e6f5;
}

.article-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #2d1f3d;
  line-height: 1.4;
  margin-bottom: 10px;
}

.article-meta {
  font-size: 12px;
  color: #999;
}

/* 文章正文 */
.article-body {
  font-size: 15px;
  color: #4a4a4a;
  line-height: 1.8;
  letter-spacing: 0.3px;
}

/* 标题样式 */
.article-body h1 {
  font-size: 20px;
  font-weight: 700;
  color: #2d1f3d;
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 4px solid #9556bf;
  line-height: 1.4;
}

.article-body h2 {
  font-size: 17px;
  font-weight: 600;
  color: #3d2d4d;
  margin: 20px 0 10px;
  padding-left: 10px;
  border-left: 3px solid #b794d4;
  line-height: 1.5;
}

.article-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: #4a3d5a;
  margin: 16px 0 8px;
  line-height: 1.5;
}

.article-body h4,
.article-body h5,
.article-body h6 {
  font-size: 14px;
  font-weight: 600;
  color: #5a4d6a;
  margin: 14px 0 6px;
}

/* 段落 */
.article-body p {
  margin: 12px 0;
  text-align: justify;
}

/* 链接 */
.article-body a {
  color: #9556bf;
  text-decoration: none;
  border-bottom: 1px dashed #c9a8e0;
  transition: all 0.2s;
}

.article-body a:hover {
  color: #7a3aa0;
  border-bottom-color: #9556bf;
}

/* 加粗 */
.article-body strong {
  color: #2d1f3d;
  font-weight: 600;
}

/* 斜体 */
.article-body em {
  color: #5a4d6a;
  font-style: italic;
}

/* 行内代码 */
.article-body code {
  background-color: #f8f4fa;
  color: #9556bf;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: "SF Mono", Monaco, Consolas, monospace;
}

/* 无序列表 */
.article-body ul {
  margin: 12px 0;
  padding-left: 0;
  list-style: none;
}

.article-body ul li {
  position: relative;
  padding-left: 20px;
  margin: 8px 0;
  line-height: 1.7;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #9556bf, #b794d4);
  border-radius: 50%;
}

/* 有序列表 */
.article-body ol {
  margin: 12px 0;
  padding-left: 0;
  list-style: none;
  counter-reset: article-ol;
}

.article-body ol li {
  position: relative;
  padding-left: 28px;
  margin: 10px 0;
  line-height: 1.7;
  counter-increment: article-ol;
}

.article-body ol li::before {
  content: counter(article-ol);
  position: absolute;
  left: 4px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #9556bf, #b794d4);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 引用块 */
.article-body blockquote {
  margin: 16px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #faf8fc, #f5f0fa);
  border-left: 4px solid #9556bf;
  border-radius: 0 8px 8px 0;
  color: #5a4d6a;
  font-size: 14px;
}

.article-body blockquote p {
  margin: 0;
}

/* 表格 */
.article-body table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 14px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(122, 22, 189, 0.1);
}

.article-body table thead {
  background: linear-gradient(135deg, #9556bf, #b794d4);
}

.article-body table th {
  color: #fff;
  font-weight: 600;
  padding: 12px 10px;
  text-align: left;
}

.article-body table td {
  padding: 10px;
  border-bottom: 1px solid #f0e6f5;
  color: #4a4a4a;
}

.article-body table tbody tr:last-child td {
  border-bottom: none;
}

.article-body table tbody tr:nth-child(even) {
  background-color: #faf8fc;
}

/* 水平线 */
.article-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e0d0e8, transparent);
  margin: 20px 0;
}

/* 图片 */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-body figure {
  margin: 16px 0;
  text-align: center;
}

.article-body figure figcaption {
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

/* 代码块 */
.article-body pre {
  background-color: #2d2d2d;
  color: #f8f8f2;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.5;
}

.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* 删除线 */
.article-body del {
  color: #999;
  text-decoration: line-through;
}
