/**
 * u2.css
 * Unisound U2 模型详情页专用样式
 *
 * 由 maas.unisound.com/models/u2 的 Tailwind 工具类改写为语义化 class，
 * 尺寸、颜色、圆角、阴影等取值均与原站保持一致。
 *
 * 结构：本页仅保留 U2 独有的展现形式，其余通用模块
 * （.md-wrap / .md-intro / .md-bench / .md-start / .md-head 等）
 * 统一使用 model-common.css，本文件需在其之后加载。
 *   .u2-core        核心能力（图文交替，U2 独有）
 *   .u2-cases       实战案例（视频卡片，U2 独有）
 */

/* ========== 3. 核心能力 ========== */
.u2-core {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.u2-core__list {
  display: flex;
  flex-direction: column;
}

.u2-core__row {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* 奇偶行渐变方向相反 */
.u2-core__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, #f8f8f8, #b5ddff);
}

.u2-core__row--reverse .u2-core__bg {
  background: linear-gradient(to right, #b5ddff, #f8f8f8);
}

.u2-core__inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 40px;
  padding: 29px 46px;
}

.u2-core__text {
  display: flex;
  width: 100%;
  max-width: 454px;
  flex-direction: column;
  gap: 27px;
}

/* 反向行文字靠右对齐到栅格末端 */
.u2-core__row--reverse .u2-core__text {
  justify-self: end;
}

.u2-core__heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.u2-core__title {
  font-size: 24px;
  font-weight: 600;
  line-height: normal;
  color: #000;
  margin: 0;
}

.u2-core__subtitle {
  font-size: 16px;
  line-height: normal;
  color: #000;
  margin: 0;
}

.u2-core__points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.u2-core__point {
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.u2-core__point img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.u2-core__point span {
  font-size: 14px;
  line-height: normal;
  color: #666;
}

.u2-core__media {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.u2-core__row--reverse .u2-core__media {
  justify-content: flex-start;
}

.u2-core__figure {
  position: relative;
  width: 100%;
  max-width: 594px;
  aspect-ratio: 594 / 238;
  overflow: hidden;
  border-radius: 14px;
}

.u2-core__figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== 4. 实战案例 ========== */
.u2-cases {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.u2-cases__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.u2-case {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #E8ECF4;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 43, 0.03);
  transition: box-shadow 0.2s;
}

.u2-case:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 43, 0.06);
}

.u2-case__media {
  position: relative;
  display: flex;
  aspect-ratio: 16 / 9;
  width: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(to bottom right, #E8F2FC, #F6FAFD, #EEF2FF);
}

.u2-case__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 视频：铺满媒体区，叠在封面之上；未播放时隐藏，播放时淡入 */
.u2-case__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
/* 播放中（含放大后回到小窗继续播）：显示视频、放开原生控件、隐去封面与自定义播放键 */
.u2-case.is-playing .u2-case__video {
  opacity: 1;
  pointer-events: auto;
}
.u2-case.is-playing .u2-case__poster,
.u2-case.is-playing .u2-case__overlay,
.u2-case.is-playing .u2-case__play {
  opacity: 0;
  pointer-events: none;
}
.u2-case__poster,
.u2-case__overlay {
  transition: opacity .25s ease;
}
.u2-case__play {
  transition: background-color .15s, opacity .2s ease;
}

/* 缓冲中：保留封面并显示转圈，避免慢网络下"点了没反应" */
.u2-case.is-loading .u2-case__poster {
  opacity: 1;
}
.u2-case.is-loading .u2-case__video {
  opacity: 0;
}
.u2-case.is-loading .u2-case__media::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid rgba(255, 255, 255, .55);
  border-top-color: #fff;
  border-radius: 50%;
  animation: u2-case-spin .8s linear infinite;
  z-index: 12;
  pointer-events: none;
}
@keyframes u2-case-spin {
  to { transform: rotate(360deg); }
}

/* 全屏播放时视频完整显示，不裁切 */
.u2-case__video:fullscreen,
.u2-case__video:-webkit-full-screen {
  object-fit: contain;
  background: #000;
}

/* 封面上的暗角，与原站一致 */
.u2-case__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(15, 23, 43, 0.06) 100%);
}

.u2-case__play {
  position: relative;
  z-index: 10;
  display: flex;
  width: 48px;
  height: 48px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 28px rgba(15, 23, 43, 0.12);
  backdrop-filter: blur(4px);
  transition: background-color 0.15s;
}

.u2-case__play:hover {
  background: #fff;
}

.u2-case__play svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
  fill: #0F172B;
  color: #0F172B;
}

.u2-case__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
}

.u2-case__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #0F172B;
  margin: 0;
}

.u2-case__desc {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  color: #808080;
  margin: 0;
}

/* ========== 5. 立即开始 ========== */

/* ========== 6. 底部 CTA ========== */
.u2-cta {
  position: relative;
  z-index: 10;
  padding: 0 24px;
  margin-bottom: 96px;
}

.u2-cta__inner {
  position: relative;
  margin: 0 auto;
  max-width: 1344px;
  height: 340px;
  overflow: hidden;
  border-radius: 32px;
  text-align: center;
}

.u2-cta__bg {
  position: absolute;
  inset: 0;
  background: #f1f5f9;
}

.u2-cta__img {
  position: absolute;
  top: 0;
  height: 340px;
  mix-blend-mode: darken;
}

.u2-cta__img--left {
  left: 0;
  width: 572px;
}

.u2-cta__img--right {
  right: 0;
  width: 642px;
}

.u2-cta__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
  transform-origin: right;
  transition: transform 0.7s ease-out;
}

.u2-cta__inner:hover .u2-cta__img img {
  transform: scale(1.1);
}

/* 三团光晕 */
.u2-cta__glow-wrap {
  position: absolute;
  inset: 0;
  overflow: clip;
  pointer-events: none;
}

.u2-cta__glow {
  position: absolute;
  border-radius: 9999px;
}

.u2-cta__glow--1 {
  background: rgba(43, 127, 255, 0.15);
  filter: blur(120px);
  width: 840px;
  height: 624px;
  left: -168px;
  top: -62px;
  mix-blend-mode: color-burn;
}

.u2-cta__glow--2 {
  background: rgba(97, 95, 255, 0.15);
  filter: blur(140px);
  width: 1007px;
  height: 728px;
  right: 0;
  top: 62px;
}

.u2-cta__glow--3 {
  background: rgba(0, 211, 243, 0.3);
  filter: blur(100px);
  width: 672px;
  height: 416px;
  left: 336px;
  top: 208px;
  mix-blend-mode: color-burn;
}

.u2-cta__content {
  position: absolute;
  left: 4.84%;
  right: 4.84%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.u2-cta__title {
  width: 100%;
  text-align: center;
  font-size: 36px;
  font-weight: 600;
  line-height: 42px;
  letter-spacing: -0.3172px;
  color: #0F172B;
  margin: 0;
}

.u2-cta__btn {
  position: relative;
  width: 172px;
  height: 48px;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  border-radius: 28px;
  background: #0f172b;
  font-family: 'PingFang SC', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.1504px;
  color: #fff;
  white-space: nowrap;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.u2-cta__btn:hover {
  background: #1a2540;
  box-shadow: 0 8px 32px rgba(15, 23, 43, 0.25);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .u2-bench__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .u2-core__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  /* 单列时图片统一排在文字之后 */
  .u2-core__row--reverse .u2-core__media {
    order: 2;
  }

  .u2-core__row--reverse .u2-core__text {
    order: 1;
    justify-self: start;
  }

  .u2-core__media {
    justify-content: flex-start;
  }

  .u2-start__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .u2-wrap__inner {
    gap: 56px;
    padding: 32px 16px;
  }

  .u2-intro__title,
  .u2-head__title {
    font-size: 24px;
  }

  .u2-intro__desc,
  .u2-head__desc {
    font-size: 15px;
  }

  .u2-bench__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .u2-bench__card {
    border-radius: 14px;
    padding: 12px 12px 8px;
  }

  .u2-bench__bars {
    margin-top: 8px;
    gap: 4px;
  }

  .u2-bench__bar-fill {
    max-width: 22px;
  }

  .u2-bench__bar-value {
    font-size: 10px;
  }

  .u2-bench__bar-icon {
    width: 16px;
    height: 16px;
  }

  .u2-bench__bar-name {
    font-size: 8px;
  }

  .u2-bench__bar-meta {
    margin-top: 8px;
  }

  .u2-core__inner {
    padding: 32px 24px;
    gap: 24px;
  }

  .u2-cases__grid,
  .u2-start__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .u2-cta {
    padding: 0 16px;
    margin-bottom: 56px;
  }

  .u2-cta__inner {
    height: 280px;
    border-radius: 24px;
  }

  .u2-cta__title {
    font-size: 24px;
    line-height: 32px;
  }
}
