/* Shared styles for product pages */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; line-height: 1.6; color: #333; }
html, body { width: 100%; overflow-x: hidden; }
img { max-width: 100%; height: auto; }


/* Header */
.header { position: fixed; top: 0; left: 0; right: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); z-index: 1000; transition: all 0.3s ease; border-bottom: 1px solid rgba(0,0,0,0.1); box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
.header.scrolled { background: rgba(255,255,255,0.98); box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
.header-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { height: 50px; transition: transform 0.3s ease; }

/* Logo链接样式 */
.logo-link {
  text-decoration: none;
  display: inline-block;
  vertical-align: top;
  transform: translateY(4px);
  transition: opacity 0.3s ease;
}
.logo-link:hover {
  opacity: 0.8;
}

/* Top nav */
.nav-menu { display: flex; list-style: none; gap: 40px; }
.nav-item { position: relative; }
.nav-link { text-decoration: none; color: #333; font-weight: 500; font-size: 18px; padding: 10px 0; transition: all 0.3s ease; position: relative; cursor: pointer; }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; background: #2AB1F3; transition: width 0.3s ease; }
.nav-link:hover::after { width: 100%; }

/* 移动端顶部导航 */
@media (max-width: 768px) {
  .header-container {
    position: relative;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: 20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 1700; /* 提高主导航的层级，高于左侧菜单按钮 */
    overflow-y: auto;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin: 0;
  }
  
  .nav-item:last-child {
    border-bottom: none;
  }
  
  .nav-link {
    display: block;
    padding: 20px 0;
    font-size: 18px;
    border-bottom: none;
  }
  
  .nav-link::after {
    display: none;
  }
  
  /* 移动端下拉菜单 */
  .dropdown-menu {
    position: static;
    background: rgba(42,177,243,0.05);
    border: none;
    border-radius: 8px;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 10px;
    margin-bottom: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1400;
  }
  
  .nav-item.dropdown-open .dropdown-menu {
    max-height: 500px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .dropdown-item {
    padding: 15px 20px;
    font-size: 16px;
  }
  
  /* 移动端主导航汉堡按钮 */
  .mobile-nav-btn {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .mobile-nav-btn .hamburger-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
  }
  
  .mobile-nav-btn .hamburger-main span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
  }
  
  .mobile-nav-btn.active .hamburger-main span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .mobile-nav-btn.active .hamburger-main span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-nav-btn.active .hamburger-main span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* 桌面端隐藏移动端主导航按钮 */
@media (min-width: 769px) {
  .mobile-nav-btn {
    display: none;
  }
}

/* Dropdown */
.dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 200px; background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.1); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; z-index: 1001; }
.nav-item:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: block; padding: 12px 20px; color: #333; text-decoration: none; font-size: 16px; font-weight: 500; transition: all 0.3s ease; border-bottom: 1px solid rgba(0,0,0,0.05); }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: rgba(42,177,243,0.1); color: #2AB1F3; }

/* Banner */
.banner {
  margin-top: 80px;
  width: 100%;
  height: 162px;
  background-color: #E4ECF7;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden; /* 隐藏超出容器的部分 */
}
/* Fallback: 当页面仅有一张Banner图片时，确保不产生横向滚动并自适应（不影响 .banner-desktop/.banner-mobile） */
.banner > img:not(.banner-desktop):not(.banner-mobile) {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* 桌面端Banner图片 */
.banner-desktop { 
  width: 3020px; /* 保持原始宽度 */
  height: 162px; 
  object-fit: cover; /* 改为 cover 以保持图片比例 */
  display: block; 
  flex-shrink: 0; /* 防止图片被压缩 */
}

/* 移动端Banner图片 */
.banner-mobile {
  width: 100%;
  max-width: 963px;
  height: auto;
  object-fit: contain;
  display: none; /* 默认隐藏 */
  flex-shrink: 0;
}

/* 移动端显示移动版Banner，隐藏桌面版 */
@media (max-width: 768px) {
  .banner {
    height: auto; /* 让高度自适应 */
    min-height: unset; /* 移除最小高度 */
    padding: 0; /* 移除内边距 */
    background-color: transparent; /* 移除背景色 */
  }
  
  .banner-desktop {
    display: none;
  }
  
  .banner-mobile {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover; /* 改为cover填充整个容器 */
  }
}

/* 中等屏幕（平板）也使用移动端Banner */
@media (max-width: 1024px) and (min-width: 769px) {
  .banner-mobile {
    display: block;
    max-width: 100%;
    object-fit: cover;
  }
  
  .banner-desktop {
    display: none;
  }
  
  .banner {
    height: auto;
    min-height: unset;
    padding: 0;
    background-color: transparent;
  }
}

/* Product layout */
.product-section { width: 100%; background: #fff; }
.product-layout { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 20px 40px; 
  display: grid; 
  grid-template-columns: 280px 1fr; 
  gap: 40px; 
}

/* 响应式布局：小屏幕时改为单列 */
@media (max-width: 1024px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* 左侧产品导航：移动端改为抽屉式（汉堡菜单控制） */
  .product-nav {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 80px);
    background: #fff;
    z-index: 1550; /* 低于主导航的 1700 */
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    padding-top: 30px;
  }
  .product-nav.active { left: 0; }

  /* 移动端左侧菜单的触发按钮（放在 .pc-left 顶部） */
  .mobile-menu-btn {
    display: block !important;
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 20px;
    z-index: 1500; /* 低于弹层 */
    background: #2AB1F3;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(42,177,243,0.3);
    transition: all 0.3s ease, opacity 0.3s ease;
    opacity: 1;
  }
  .mobile-menu-btn:hover { background: #1e90d8; transform: translateY(-1px); }
  /* 主导航打开时淡出左侧按钮，避免遮挡 */
  .mobile-menu-btn.hidden { opacity: 0; pointer-events: none; }

  /* 弹层内关闭按钮（抽屉右上角） */
  .sidebar-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 40px;
    background: #2AB1F3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1660;
    box-shadow: 0 2px 10px rgba(42,177,243,0.3);
    transition: background 0.3s ease, transform 0.3s ease;
  }
  .sidebar-close-btn:hover { background: #1e90d8; transform: translateY(-1px); }

  /* 汉堡菜单图标（用于按钮与关闭） */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
  }
  .hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: 0.3s;
  }

  /* 遮罩层 */
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1400;
  }
  .mobile-overlay.active { display: block; }

  /* 为按钮提供定位参考 */
  .pc-left { padding-top: 20px; position: relative; }
}

/* 桌面端隐藏移动端左侧菜单按钮 */
@media (min-width: 1025px) {
  .mobile-menu-btn { display: none; }
}

.product-nav { background: rgba(255,255,255,0.92); border-radius: 0; box-shadow: 0 0 28px rgba(42,177,243,0.08); position: sticky; top: 120px; padding-top: 30px; }
.product-nav-list { list-style: none; }
.product-nav-list li { margin: 4px 0; }
.product-nav-list a { display: block; padding: 14px 30px; color: #333; text-decoration: none; border-radius: 0; font-size: 18px; line-height: 1.4; transition: color .2s ease, background-color .2s ease; position: relative; }
.product-nav-list a:hover { color: #2AB1F3; background: rgba(42,177,243,0.08); }
.product-nav-list a.active { color: #2AB1F3; background: rgba(42,177,243,0.12); font-weight: 600; padding-left: 30px; }
.product-nav-list a.active::before { content: ''; position: absolute; left: 0; top: 0; width: 5px; height: 100%; background: #2AB1F3; }

.product-content { min-height: 560px; display: block; }

/* Right content grid */
.product-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
  overflow-x: hidden; /* 防止内容撑出导致右侧出现横向滚动条 */
}

@media (min-width: 1025px) {
  .product-content-grid {
    grid-template-columns: minmax(400px, 1fr) 260px;
  }
}
.pc-left { 
  padding-top: 50px; 
  min-width: 0; 
  overflow-wrap: break-word; 
}

@media (min-width: 769px) {
  .pc-left {
    min-width: 400px;
  }
}

.pc-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.pc-title h2 { font-size: 28px; line-height: 1.2; color: #2AB1F3; font-weight: 800; letter-spacing: 0.5px; }
.pc-badge { background: #FF8A00; color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; position: relative; top: -6px; }

.pc-tags { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 14px; }
.pc-tag { padding: 6px 12px; border: 1px solid rgba(42,177,243,0.6); color: #2AB1F3; border-radius: 9999px; font-size: 14px; background: rgba(42,177,243,0.06); }

.pc-desc { color: #333; font-size: 16px; line-height: 1.9; margin-bottom: 16px; margin-top: 30px; }
.pc-desc strong { font-weight: 700; }

.pc-highlights h3 { font-size: 20px; margin: 32px 0 12px; color: #222; }
.pc-highlights ul { padding-left: 20px; color: #333; }
.pc-highlights li { margin: 6px 0; font-size: 16px; }

.pc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; padding-top: 50px; }
.pc-actions { width: 100%; display: flex; justify-content: center; padding-top: 13px; }
.cta-btn { display: inline-flex; align-items: center; justify-content: center; background: #2AB1F3; color: #fff; padding: 10px 24px; border-radius: 999px; text-decoration: none; font-weight: 600; box-shadow: 0 6px 16px rgba(42,177,243,0.35); transition: transform .2s ease, filter .2s ease; width: 230px; height: 60px; }
.cta-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* CTA Button Dropdown */
.cta-dropdown { position: relative; display: inline-block; }
.cta-dropdown-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 200px; background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.1); opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(-10px); transition: all 0.3s ease; z-index: 1001; margin-top: 8px; }
.cta-dropdown:hover .cta-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.cta-dropdown-item { display: block; padding: 12px 20px; color: #333; text-decoration: none; font-size: 16px; font-weight: 500; transition: all 0.3s ease; border-bottom: 1px solid rgba(0,0,0,0.05); text-align: center; }
.cta-dropdown-item:last-child { border-bottom: none; }
.cta-dropdown-item:hover { background: rgba(42,177,243,0.1); color: #2AB1F3; }

/* 添加小箭头指示器 */
.cta-dropdown-menu::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid rgba(255,255,255,0.98); }
.cta-dropdown-menu::after { content: ''; position: absolute; top: -7px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid rgba(0,0,0,0.1); }

.pc-media { width: 100%; overflow: hidden; display: flex; justify-content: center; padding-top: 28px; }
.pc-media-img { width: 90%; display: block; object-fit: contain; margin: 0 auto; }

/* Footer */
.footer-section { width: 100%; background-color: #0084C4; padding: 60px 0; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; padding: 0 20px; }
.footer-left { flex: 1; color: #fff; }
.footer-logo { width: 237px; height: 56px; margin-bottom: 30px; object-fit: contain; }
.contact-info { margin-bottom: 30px; }
.contact-info p { margin: 8px 0; font-size: 16px; line-height: 1.6; color: #fff; }
.copyright { margin-top: 20px; }
.copyright p { margin: 5px 0; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.8); }
.footer-right { flex: 0 0 auto; margin-left: 40px; margin-top: 50px; }
.footer-qrcode { 
  width: 100%; 
  max-width: 388px; 
  height: auto; 
  object-fit: contain; 
}
/* Wider dropdown for desktop pages */
.dropdown-menu { min-width: 220px; width: max-content; }
.dropdown-item { white-space: nowrap; }
/* ========== Demo: 健康问答/报告解读 页面专用样式（从 demo-health-qa.html 内联样式迁移） ========== */

/* 页面整体背景：原尺寸、居中、不拉伸 */
.demo-page {
  margin-top: 80px; /* 顶部固定头部占位 */
  min-height: calc(100vh - 80px);
  background-image: url('../images/testbg.jpg');
  background-repeat: no-repeat;
  background-position: center top;  /* 居中 */
  background-size: auto;            /* 保持原始大小 */
  background-color: #111;           /* 背景填充色，防止空白 */
  background-width: 2246px;
}

/* 内容容器（与产品页一致的宽度与左右留白） */
.demo-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* 上下分栏：上=文案， 下=图片占位符 */
.demo-hero {
  padding-top: 36px;
  color: #E6F6FF;
}
.demo-hero h1 {
  font-size: 30px;
  line-height: 1.25;
  color: #2AB1F3;
  margin-bottom: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.demo-hero .badge {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #FF8A00;
  border-radius: 999px;
  position: relative;
  top: -12px;
}
.demo-hero p {
  color: rgba(255,255,255,0.92);
  font-size: 18px;
  line-height: 1.6;
  margin: 8px 0;
}

.demo-content {
  margin-top: 28px;
}

/* 微信PC假界面背景图及其容器 */
.wx-mock {
  position: relative;
  width: 920px; /* 2760/3=920px (将3x图缩小为1x大小) */
  height: 801px; /* 2403/3=801px */
  margin: 0 auto;
  background-image: url('../images/product/chatwxbg@3x.png');
  background-size: contain; /* 确保背景图适应容器大小 */
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);

  /* 标题定位与宽度（可通过 CSS 变量微调） */
  --title-center-x: 535px; /* 标题区域中心的 X 坐标（基于 .wx-mock 左上角） */
  --title-width: 360px;    /* 标题区域可视宽度（文本居中，超出省略） */
}

/* 公共叠加层样式 */
.ov {
  position: absolute;
}

/* 左侧头像定位（叠加在背景上的固定头像） */
.ov-avatar-left {
  left: 18px; /* 根据背景图位置调整 */
  top: 22px;
}
.ov-avatar-left img {
  width: 51.6px; /* 155/3=51.6px */
  height: 51.6px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 右侧头像定位（叠加在背景上的固定头像） */
.ov-avatar-right {
  right: 771px;
  top: 94px;
}
.ov-avatar-right img {
  width: 54px; /* 147/3=49px */
  height: 54px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 顶部标题定位（叠加文字） */
/* 固定宽度 + 居中对齐，避免不同文案长度造成视觉偏移 */
.ov-title {
  top: 24px;
  left: calc(var(--title-center-x) - var(--title-width) / 2);
  width: var(--title-width);
  transform: none;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none; /* 标题不拦截鼠标事件，避免误点 */
}

/* 左侧列表项标题定位（叠加文字） */
.ov-listitem {
  left: 160px;
  top: 102px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* 小字副标题定位（显示在“健康报告解读与问答”下方） */
.ov-listitem-subtext {
  left: 160px;
  top: 124px;
  font-size: 12px;
  color: #999;
  font-weight: 400;
  white-space: nowrap;
}

/* 聊天气泡容器（滚动区） */
.chat-container {
  position: absolute;
  top: 76px;
  left: 364px;
  width: 550px;
  height: 496px;
  padding: 14px;
  overflow-y: auto;
}

/* 聊天消息行（改为 Flex 以支持头像 + 气泡） */
.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  max-width: 85%;
}
.chat-msg .avatar {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  flex: 0 0 38px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.msg-left .avatar { margin-right: 2px; }
.msg-right .avatar { margin-left: 2px; }

/* 时间戳 */
.msg-time {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin: 15px 0;
}

/* 左侧消息（医生发送） */
.msg-left {
  justify-content: flex-start;
  flex-wrap: nowrap; /* 保持头像与气泡同一行 */
}
.msg-left .bubble {
  background-color: #fff;
  border-radius: 8px;
  padding: 12px 15px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: relative;
  display: inline-block;
  font-size: 16px;
  color: #333;
  line-height: 1.5;
}
.msg-left .bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 10px;
  border-top: 8px solid transparent;
  border-right: 10px solid #fff;
  border-bottom: 8px solid transparent;
}

/* 右侧消息（患者发送） */
.msg-right {
  margin-left: auto;            /* 整行靠右 */
  justify-content: flex-end;    /* 气泡在左，头像在右 */
}
.msg-right .bubble {
  background-color: #95EC69;
  border-radius: 8px;
  padding: 12px 15px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: relative;
  display: inline-block;
  font-size: 16px;
  color: #333;
  line-height: 1.5;
}
.msg-right .bubble::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 10px;
  border-top: 8px solid transparent;
  border-left: 10px solid #95EC69;
  border-bottom: 8px solid transparent;
}

/* 聊天输入框区域（两行：上=工具条，下=输入+发送） */
.chat-input-area {
  position: absolute;
  bottom: 22px;
  left: 370px;
  width: 540px;
  height: 193px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

/* 表情和附件按钮 */
.chat-toolbar {
  display: flex;
  gap: 8px;
  margin: 0 0 8px 0;
}
.chat-toolbar-btn {
  width: 30px;
  height: 30px;
  margin-right: 8px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-toolbar-btn:hover { opacity: 1; }

/* 文本输入与发送按钮一行 */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 聊天输入框 */
.chat-textbox {
  flex: 1;
  height: 120px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 10px;
  background-color: #fff;
  font-size: 16px;
  resize: none;
}

/* 发送按钮 */
.chat-send-btn {
  width: 100px;
  height: 120px;
  margin-left: 10px;
  background-color: #07C160;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.chat-send-btn:hover { background-color: #06AD56; }

/* 底部图片占位符（可替换为真实图片） */
.image-placeholder {
  width: 100%;
  height: 520px;
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: 12px;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  backdrop-filter: blur(1px);
}

/* 适配小屏 */
@media (max-width: 768px) {
  .demo-hero h1 { font-size: 24px; }
  .image-placeholder { height: 360px; }
  .wx-mock {
    width: 100%;
    max-width: 920px;
    height: 0;
    padding-bottom: 87%; /* 保持宽高比 */
  }
  
  /* Footer 响应式 */
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-right {
    margin-left: 0;
    margin-top: 30px;
  }
  
  .footer-qrcode {
    max-width: 300px;
  }
}
/* ========== End of Demo 页面样式 ========== */
/* --- Chat markdown & thinking state styles (Dify streaming) --- */
.bubble.thinking { color: #888; font-style: italic; }

/* Markdown basics inside AI bubble */
.msg-left .bubble ul,
.msg-left .bubble ol { padding-left: 5px; margin: 8px 12px 8px 12px; }
.msg-left .bubble li { margin: 4px 0; }

.msg-left .bubble table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.msg-left .bubble table th,
.msg-left .bubble table td { border: 1px solid #e5e7eb; padding: 6px 8px; text-align: left; }

.msg-left .bubble blockquote {
  margin: 8px 0;
  padding-left: 10px;
  border-left: 3px solid #e5e7eb;
  color: #555;
}

/* Inline and block code styles */
.msg-left .bubble code {
  background: rgba(0,0,0,0.06);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 90%;
}
.msg-left .bubble pre {
  background: #0f172a; /* slate-900 like */
  color: #e2e8f0;      /* slate-200 */
  padding: 12px 14px;
  border-radius: 8px;
  overflow: auto;
  line-height: 1.6;
  font-size: 13px;
  margin: 10px 0;
}
.msg-left .bubble pre code {
  background: transparent;
  padding: 0;
}
/* Markdown 段落间距（AI 气泡） */
.msg-left .bubble p { margin: 8px 0; }
/* 建议问题按钮（开场白与医生回复下方展示） */
.suggested-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column; /* 每行一个问题（纵向排布） */
  align-items: flex-start; /* 子项不拉伸，按内容宽度 */
  gap: 8px;
}

/* 使建议问题作为新的一行出现在气泡下方，并与头像错开对齐 */
.msg-left .suggested-list {
  flex-basis: 100%;       /* 强制占据一整行，换到气泡下面 */
  margin-left: 48px;      /* 38px 头像 + 10px 间距，与气泡左边对齐 */
}
.suggested-btn {
  border: 1px solid #d0e7f7;
  background: #f3fbff;
  color: #0b7bb9;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
  display: inline-flex;  /* 独占一行但不拉满整宽 */
  align-items: center;
  text-align: left;      /* 文案靠左对齐 */
}
.suggested-btn:hover {
  background: #e8f6ff;
  border-color: #b8def3;
}

/* ===== 全局“猜你想问”条（固定在聊天容器底部） ===== */
.suggested-global {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-top: 10px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}

.suggested-global .label {
  color: #666;
  font-size: 12px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.suggested-inline-list {
  display: flex;
  flex-wrap: nowrap; /* 一行展示 */
  gap: 8px;
  align-items: center;
  overflow-x: auto;       /* 仅在内容超出时可横向滚动（通过拖动） */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch; /* 移动端顺滑滚动 */
  cursor: grab;           /* 鼠标手势提示可拖动 */
  -ms-overflow-style: none;  /* IE/Edge 隐藏滚动条 */
  scrollbar-width: none;     /* Firefox 隐藏滚动条 */
}

.suggested-chip {
  border: 1px solid #d0e7f7;
  background: #f3fbff;
  color: #0b7bb9;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
  flex: 0 0 auto;           /* 芯片不被压缩，保证横向排列 */
  user-select: none;        /* 避免拖动时选中文本 */
}

.suggested-chip:hover {
  background: #e8f6ff;
  border-color: #b8def3;
}

/* 拖动时的样式与滚动条定制 */
.suggested-inline-list.dragging {
  cursor: grabbing;
  user-select: none;
}
.suggested-inline-list::-webkit-scrollbar {
  display: none; /* WebKit 隐藏滚动条（同时保留滚动能力） */
}

/* 新消息上屏：从下到上小幅上升 + 透明度渐显 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.anim-in {
  animation: fadeInUp 220ms ease-out both;
}
/* 固定在“工具栏”上方的一行建议条（单行展示“试着问问：1. 2. 3.”） */
.suggested-fixed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 38px;
  height: 44px;
}

.suggested-fixed .label {
  color: #666;
  font-size: 12px;
  white-space: nowrap;
  flex: 0 0 auto;
}
/* 吐字进行中禁用交互的轻提示与忙碌态样式（不禁用 pointer-events，保留点击以触发提示） */
.toast-tip {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 2000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  display: none;
}

/* 吐字进行中时的视觉弱化（不屏蔽点击，点击由 JS 拦截弹提示） */
.chat-input-area.streaming .suggested-chip,
.chat-input-area.streaming .chat-send-btn,
.chat-send-btn.busy {
  opacity: 0.6;
  cursor: not-allowed;
}
/* Markdown &lt;hr&gt; style inside chat bubbles (rendered by marked) */
.msg-left .bubble hr,
.msg-right .bubble hr {
  border: none;                  /* reset UA default */
  border-top: 1px solid #e5e7eb; /* subtle divider */
  margin: 12px 0;                /* vertical spacing around the rule */
  height: 0;                     /* keep to border line only */
}

/* Alternative styles (switch if needed)
.msg-left .bubble hr,
.msg-right .bubble hr {
  border: none;
  border-top: 1px dashed #d1d5db; 
  margin: 10px 0;
}

.msg-left .bubble hr,
.msg-right .bubble hr {
  border: none;
  height: 1px;
  margin: 12px 0;
  background: linear-gradient(to right, transparent, #d1d5db, transparent);
}
*/
/* Ensure left product menu is collapsed by default on mobile (override order/cascade) */
@media (max-width: 1024px) {
  .product-nav {
    position: fixed !important;
    top: 80px;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 80px);
    background: #fff;
    z-index: 1550;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    padding-top: 30px;
  }
  .product-nav.active { left: 0; }
}
/* Close icon (X) for the drawer's top-right button, consistent with product-dental-staff */
@media (max-width: 1024px) {
  .sidebar-close-btn .hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: 0.3s;
  }
  .sidebar-close-btn .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .sidebar-close-btn .hamburger span:nth-child(2) {
    opacity: 0;
  }
  .sidebar-close-btn .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}
/* Enable click-to-open for CTA dropdown on product-emotion page (and others reusing the pattern) */
.cta-dropdown.open .cta-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ========== 视频演示模块样式 ========== */
.pc-video-demo {
  margin-top: 32px;
}

.pc-video-demo h3 {
  font-size: 20px;
  margin: 0 0 16px 0;
  color: #222;
}

/* 视频卡片样式 */
.video-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: #fff;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.video-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(42,177,243,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.video-card:hover .play-btn {
  background: rgba(42,177,243,1);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-title {
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  background: #fff;
}

/* 视频弹窗样式 */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
}

.video-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.video-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.video-modal-close:hover {
  background: rgba(0,0,0,0.8);
  transform: scale(1.1);
}

.video-modal-player {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 宽高比 */
  background: #000;
}

.video-modal-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .video-card {
    max-width: 100%;
  }
  
  .video-thumb {
    height: 180px;
  }
  
  .play-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .video-title {
    padding: 12px;
    font-size: 14px;
  }
  
  .video-modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .video-modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}