/* =========================================================================
 * highlights.css — 首页「闺小蜜 AI 助理」板块 + 手机边框
 *
 * 手机边框沿用 findu/web 的做法：外层容器画出机身并留出四周边框，
 * 截图铺满中间的屏幕区域（圆角 + overflow 裁切），再用绝对定位的
 * 伪元素/子元素把灵动岛和高光叠在截图上面，让圆角刚好落在边框里。
 * 截图本身没有边框，所以边框厚度、圆角都按宽度比例给，缩放不会错位。
 * ========================================================================= */

/* ------------------------------ 手机边框 ------------------------------ */

.shot {
  --bezel: 10px;
  --case-radius: 46px;
  --screen-radius: 36px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: var(--bezel);
  border-radius: var(--case-radius);
  background:
    linear-gradient(
      152deg,
      #55555d 0%,
      #26262b 14%,
      #0d0d10 38%,
      #0a0a0c 62%,
      #22222a 88%,
      #4a4a52 100%
    );
  box-shadow:
    0 28px 48px -22px rgba(24, 28, 44, 0.5),
    0 10px 20px -12px rgba(24, 28, 44, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 0 2px rgba(0, 0, 0, 0.6);
}

.shot > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--screen-radius);
  background-color: #fff;
  object-fit: cover;
  object-position: top center;
}

/* 灵动岛：宽度按屏幕宽度比例，圆角胶囊 */
.shot::after {
  content: "";
  position: absolute;
  top: calc(var(--bezel) + 10px);
  left: 50%;
  width: calc((100% - 2 * var(--bezel)) * 0.3);
  aspect-ratio: 3.5 / 1;
  transform: translateX(-50%);
  border-radius: 999px;
  background-color: #050507;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

/* 侧边按键，让边框更像真机 */
.shot::before {
  content: "";
  position: absolute;
  top: 22%;
  right: -1px;
  width: 3px;
  height: 14%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #3a3a42, #17171b 40%, #34343c);
  pointer-events: none;
}

/* 首屏大图 */
.shot-hero {
  --bezel: 11px;
  --case-radius: 54px;
  --screen-radius: 44px;
  width: 300px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* 功能介绍里的一对截图 */
.shot-pair {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.shot-pair .shot {
  width: 248px;
  flex: 0 0 auto;
}

.shot-pair .shot.is-offset {
  margin-top: 48px;
}

.shot-pair.is-single .shot {
  width: 280px;
}

/* 助理板块：两列四张。上排原有示例，下排一句话记多项、一句话查趋势 */
.shot-tandem {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 210px));
  justify-content: center;
  column-gap: 16px;
  row-gap: 22px;
  align-items: start;
}

.shot-tandem .shot {
  width: 100%;
  max-width: 210px;
}

.shot-tandem .shot.is-offset {
  margin-top: 28px;
}

/* ------------------------- 闺小蜜 AI 助理板块 ------------------------- */

.assistant-section {
  position: relative;
  padding-top: 88px;
  padding-bottom: 88px;
  background:
    radial-gradient(760px 380px at 8% -6%, rgba(255, 79, 135, 0.13), transparent 68%),
    radial-gradient(680px 360px at 92% 4%, rgba(121, 168, 255, 0.16), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #fdf6f9 58%, #ffffff 100%);
  overflow: hidden;
}

.assistant-head {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.assistant-head .subtitle {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
}

.assistant-head h2 {
  margin-bottom: 16px;
}

.assistant-lead {
  color: var(--medium-text);
  font-size: 17px;
  line-height: 29px;
  margin-bottom: 0;
}

.assistant-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-column-gap: 56px;
  grid-row-gap: 48px;
  align-items: center;
  margin-top: 56px;
}

.assistant-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 16px;
  grid-row-gap: 16px;
}

.assistant-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.86);
  padding: 20px 22px;
  box-shadow: 0 16px 32px -24px rgba(39, 42, 48, 0.5);
}

.assistant-card h3 {
  font-size: 18px;
  line-height: 26px;
  margin-bottom: 8px;
}

.assistant-card p {
  color: var(--medium-text);
  font-size: 15px;
  line-height: 25px;
  margin-bottom: 0;
}

.assistant-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background-color: rgba(255, 79, 135, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.assistant-note {
  color: var(--medium-text);
  font-size: 13px;
  line-height: 21px;
  text-align: center;
  margin: 40px auto 0;
  max-width: 780px;
}

/* 对话示例 */
.assistant-demo {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: #fff;
  padding: 18px 20px 20px;
  box-shadow: 0 20px 40px -30px rgba(39, 42, 48, 0.55);
}

.assistant-demo-title {
  color: var(--medium-text);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.chat-line {
  display: flex;
  margin-bottom: 10px;
}

.chat-line:last-child {
  margin-bottom: 0;
}

.chat-line.is-me {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 82%;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 22px;
  color: var(--black-text);
  background-color: var(--background);
}

.chat-line.is-me .chat-bubble {
  background-color: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-line.is-bot .chat-bubble {
  border-bottom-left-radius: 4px;
}

.chat-bubble strong {
  font-weight: 600;
}

.chat-bubble .chat-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 18px;
  color: var(--medium-text);
}

.chat-line.is-me .chat-bubble .chat-meta {
  color: rgba(255, 255, 255, 0.82);
}

/* 带列表与图表的回复气泡：内容比纯文字宽一些 */
.chat-bubble-chart {
  max-width: 100%;
  width: 100%;
  padding: 12px 14px 14px;
}

.chat-lead {
  display: block;
  margin-bottom: 12px;
}

.chat-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fff;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.chat-block:last-of-type {
  margin-bottom: 12px;
}

.chat-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--medium-text);
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.chat-block-count {
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 999px;
  background-color: rgba(255, 79, 135, 0.1);
  color: var(--primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(222, 227, 234, 0.9);
  font-size: 13px;
  line-height: 20px;
}

.chat-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.chat-row-date {
  color: var(--black-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.chat-row-tag {
  flex: 0 0 auto;
  padding: 0 8px;
  border-radius: 999px;
  background-color: var(--background);
  color: var(--medium-text);
  font-size: 12px;
  line-height: 20px;
}

.chat-chart {
  display: block;
  width: 100%;
  height: 92px;
  overflow: visible;
}

.chat-grid {
  stroke: rgba(222, 227, 234, 0.85);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.chat-line-path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chat-area {
  stroke: none;
}

.chat-dot {
  fill: #fff;
  stroke: var(--primary);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.chat-chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 6px;
  color: var(--medium-text);
  font-size: 11px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

.chat-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(222, 227, 234, 0.7);
  color: var(--medium-text);
  font-size: 11px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

.chat-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chat-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.chat-legend-dot.is-low {
  background-color: rgba(255, 79, 135, 0.32);
}

.chat-legend-dot.is-high {
  background-color: var(--primary);
}

/* --------------------------- 响应式 --------------------------- */

@media screen and (max-width: 1024px) {
  .shot-hero {
    --bezel: 9px;
    --case-radius: 44px;
    --screen-radius: 36px;
    width: 250px;
  }

  .shot-pair .shot {
    width: 200px;
  }

  .shot-pair.is-single .shot {
    width: 230px;
  }

  .shot-tandem {
    grid-template-columns: repeat(2, minmax(0, 180px));
  }

  .shot-tandem .shot {
    width: 100%;
    max-width: 180px;
  }

  .assistant-grid {
    grid-template-columns: 1fr;
    grid-column-gap: 0;
    grid-row-gap: 40px;
  }

  .assistant-cards {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (max-width: 767px) {
  .assistant-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .assistant-lead {
    font-size: 15px;
    line-height: 26px;
  }

  .shot-hero {
    width: 220px;
  }

  .shot-pair .shot {
    width: 44vw;
    max-width: 200px;
  }

  .shot-pair.is-single .shot {
    width: 56vw;
    max-width: 240px;
  }

  .shot-tandem {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    column-gap: 12px;
  }

  .shot-tandem .shot {
    width: 100%;
    max-width: none;
  }

  .assistant-cards {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 479px) {
  .shot {
    --bezel: 6px;
    --case-radius: 28px;
    --screen-radius: 22px;
  }

  .shot::after {
    top: calc(var(--bezel) + 5px);
  }

  .shot-hero {
    --bezel: 7px;
    --case-radius: 32px;
    --screen-radius: 25px;
    width: 200px;
  }

  .shot-pair .shot {
    width: 42vw;
  }

  .shot-tandem {
    column-gap: 10px;
    row-gap: 14px;
  }

  .shot-tandem .shot.is-offset {
    margin-top: 16px;
  }

  .shot-pair.is-single .shot {
    width: 60vw;
  }

  .assistant-card {
    padding: 16px 18px;
  }

  .chat-bubble {
    font-size: 13px;
    line-height: 21px;
  }

  .chat-bubble-chart {
    padding: 10px 12px 12px;
  }

  .chat-chart {
    height: 74px;
  }

  .chat-list li {
    font-size: 12px;
    line-height: 18px;
  }

  .chat-chart-axis {
    font-size: 10px;
  }
}
