/* ============================================================
   氪金兽首页复刻 · 首页模块
   ============================================================ */

/* ---------- 轮播 ---------- */
.banner {
  position: relative;
  margin-bottom: var(--page-gap);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #e9edf7;
  touch-action: pan-y;
}

.banner__viewport {
  overflow: hidden;
}

.banner__track {
  display: flex;
  will-change: transform;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}

.banner__track.is-dragging {
  transition: none;
}

.banner__slide {
  flex: 0 0 100%;
  width: 100%;
  /* 原站按 app 宽度换算：appWidth / 375 * 72 */
  height: calc(min(100vw, 450px) / 375 * 72);
}

.banner__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.banner__dots {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}

.banner__dot {
  width: 10px;
  height: 4px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .45);
  transition: width .25s, background-color .25s;
  pointer-events: auto;
}

.banner__dot.is-active {
  width: 16px;
  background: #fff;
}

/* ---------- 五大入口 ---------- */
.quick {
  margin-bottom: var(--page-gap);
  padding-top: 12px;
  border-radius: var(--radius-lg);
  background: #fff;
}

.quick ul {
  display: flex;
  flex-wrap: wrap;
}

.quick li {
  display: flex;
  justify-content: center;
  width: 20%;
  margin-bottom: 10px;
}

.quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.quick__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #ffce6a, #ff9b1f);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 9px rgba(31, 45, 96, .1);
  transition: transform .2s ease;
}

.quick__icon--safe {
  background: linear-gradient(145deg, #ff9db2, #ff4d6d);
}

.quick__icon--estimate {
  background: linear-gradient(145deg, #7fd2ff, #2f8bff);
}

.quick__icon--recycle {
  background: linear-gradient(145deg, #8ee08a, #21b356);
}

.quick__icon--transfer {
  background: linear-gradient(145deg, #ffc36b, #ff8a00);
}

.quick__icon svg {
  width: 22px;
  height: 22px;
}

.quick a:active .quick__icon {
  transform: scale(.94);
}

.quick h3 {
  width: 68px;
  margin-top: 4px;
  padding: 0 2px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 游戏宫格 ---------- */
.games {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: var(--page-gap);
  padding-top: 12px;
  border-radius: var(--radius-lg);
  background: #fff;
}

.games__item {
  display: flex;
  justify-content: center;
  width: 20%;
  margin-bottom: 12px;
}

.games__item:nth-child(n + 6) {
  margin-bottom: 10px;
}

.games__item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.games__item img {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #f3f5f9;
}

.games__item h3 {
  width: 68px;
  margin-top: 4px;
  padding: 0 2px;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 氪金严选 ---------- */
.strict {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: var(--page-gap);
  padding: 0 12px;
  /* 与原站严选图 1780×305 保持同一比例 */
  aspect-ratio: 1780 / 305;
  border: 1px solid #e3e8ff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(100deg, #f2f5ff 0%, #fbfcff 42%, #fff 100%);
  box-shadow: var(--shadow-card);
}

.strict__badge {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(150deg, #8796ff, #4a5cff);
  color: #fff;
  box-shadow: 0 6px 14px rgba(84, 104, 255, .32);
}

.strict__badge::before {
  content: "";
  position: absolute;
  inset: -6px -8px;
  border: 1px solid rgba(84, 104, 255, .18);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.strict__badge svg {
  width: 26px;
  height: 26px;
}

.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a9b7ff;
}

.spark--1 {
  top: 4px;
  right: 2px;
}

.spark--2 {
  bottom: 4px;
  left: 1px;
  width: 3px;
  height: 3px;
}

.strict__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.strict__text strong {
  color: #1f2430;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 1.5px;
}

.strict__text span {
  overflow: hidden;
  color: #8a90a0;
  font-size: 11px;
  letter-spacing: .3px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.strict__btn {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
  height: 30px;
  padding: 0 11px 0 13px;
  border-radius: 15px;
  background: linear-gradient(90deg, #8796ff, #5468ff 60%);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 5px 12px rgba(84, 104, 255, .3);
}

.strict__btn svg {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

/* ---------- 转移 / 估值 ---------- */
.duo {
  display: flex;
  gap: var(--page-gap);
  margin-bottom: var(--page-gap);
}

.duo__card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  height: 110px;
  padding: 8px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.duo__head {
  display: flex;
  align-items: center;
  min-height: 20px;
}

.duo__head strong {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 14px;
  margin-left: 6px;
  padding: 0 3px;
  border: 1px solid var(--kr-blue-500);
  border-radius: 3px;
  color: var(--kr-blue-500);
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
}

.tag--soft {
  height: 14px;
  margin-left: 4px;
  padding: 0 4px;
  border: 0;
  background: var(--kr-blue-100);
  color: var(--kr-blue-500);
  font-size: 10px;
}

.duo__desc {
  margin-top: 2px;
  color: var(--color-text-weak);
  font-size: 12px;
  line-height: 18px;
}

/* 左卡：OPPO 转移条 */
.transfer {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  margin-top: auto;
  padding: 3px;
  border: 1px solid #a9b8ff;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #c9d4ff, #eef2ff 60%);
}

.transfer__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #fff;
  color: var(--kr-blue-500);
  box-shadow: 0 2px 6px rgba(84, 104, 255, .18);
}

.transfer__icon svg {
  width: 18px;
  height: 18px;
}

.transfer__brand {
  display: block;
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 6px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .35));
  color: #2b3350;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右卡：估值 */
.duo__pad {
  width: 116px;
  height: 28px;
  margin: 8px auto 0;
  color: #7d8bff;
}

.duo__count {
  margin-top: 2px;
  color: var(--color-text);
  font-size: 9px;
  line-height: 14px;
  text-align: center;
}

.duo__count b {
  color: var(--color-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}

.duo__btn {
  position: absolute;
  right: 14px;
  bottom: 8px;
  left: 14px;
  display: grid;
  place-items: center;
  height: 16px;
  border-radius: var(--radius-sm);
  background: var(--kr-blue-500);
  color: #fff;
  font-size: 8px;
  font-weight: 500;
}

/* ---------- 找回包赔 / 保障 ---------- */
.assure {
  display: flex;
  margin-bottom: var(--page-gap);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.assure__left {
  flex: 1;
  min-width: 0;
  padding: 4px 12px 12px;
}

.assure__head {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 26px;
}

.assure__head strong {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.assure__desc {
  margin-top: 2px;
  color: var(--color-text-weak);
  font-size: 12px;
  line-height: 18px;
}

.assure__media {
  position: relative;
  display: grid;
  place-items: center;
  height: 74px;
  margin-top: 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    radial-gradient(85% 110% at 8% 0%, rgba(126, 143, 255, .95), transparent 62%),
    radial-gradient(80% 110% at 96% 8%, rgba(255, 138, 176, .8), transparent 60%),
    radial-gradient(90% 120% at 50% 110%, rgba(84, 104, 255, .9), transparent 65%),
    linear-gradient(140deg, #4b5bd6, #6b49cf 55%, #a2439a);
}

/* 网格纹理 */
.assure__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(transparent, #000);
  mask-image: linear-gradient(transparent, #000);
}

.assure__media-title {
  position: absolute;
  bottom: 6px;
  left: 8px;
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  letter-spacing: 2px;
}

.play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  backdrop-filter: blur(2px);
}

.play svg {
  width: 13px;
  height: 13px;
  margin-left: 1px;
}

.assure__right {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--color-line);
}

.assure__row {
  position: relative;
  flex: 1;
  padding: 12px;
}

.assure__row + .assure__row {
  border-top: 1px solid var(--color-line);
}

.assure__row .chev {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  color: var(--color-text-weak);
}

.assure__row p {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  color: var(--color-text-weak);
  font-size: 12px;
  line-height: 18px;
}

.assure__deco {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 40px;
  height: 40px;
  color: #f0f3fa;
}

/* ---------- 通用面板（资讯 / 商品） ---------- */
.panel {
  margin-bottom: var(--page-gap);
  padding: 12px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel__head h2 {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 500;
}

.more {
  display: flex;
  align-items: center;
  color: var(--color-text-sub);
  font-size: 12px;
}

.more svg {
  width: 11px;
  height: 11px;
  margin-bottom: 1px;
}

/* 资讯条目 */
.news__item {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
}

.news__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.news__item img {
  flex: 0 0 auto;
  width: 102px;
  height: 64px;
  margin-right: 12px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #eef1f7;
}

.news__body {
  position: relative;
  flex: 1;
  min-width: 0;
}

.news__body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.news__body time {
  position: absolute;
  bottom: 0;
  left: 0;
  color: var(--color-text-weak);
  font-size: 12px;
}

/* 商品条目 */
.goods__item {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
}

.goods__item:last-of-type {
  border-bottom: 0;
}

.goods__link {
  display: flex;
}

.goods__img {
  flex: 0 0 auto;
  width: 102px;
  height: 53px;
  margin-right: 12px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #eef1f7;
}

.goods__info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.goods__title {
  margin-top: 4px;
  overflow: hidden;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.goods__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.goods__area {
  display: flex;
  min-width: 0;
  color: var(--color-text-sub);
  font-size: 12px;
  line-height: 18px;
}

.goods__area span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.goods__area span + span {
  margin-left: 6px;
  color: var(--color-text-weak);
}

.goods__price {
  flex: 0 0 auto;
  color: var(--color-price);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.2px;
}

.goods__price small {
  margin-right: 1px;
  font-size: 11px;
  font-weight: 500;
}

/* ---------- 页脚 ---------- */
.footer {
  padding: 20px 0 12px;
  text-align: center;
}

.footer__slogan {
  color: #d9dbe0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 5px;
  text-indent: 5px;
}

.footer__copy {
  margin-top: 6px;
  color: #c9ccd4;
  font-size: 10px;
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .banner__track {
    transition: none;
  }
}

/* ---------- 小屏适配 ---------- */
@media (max-width: 360px) {
  .strict {
    gap: 7px;
    padding: 0 9px;
  }

  .strict__badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .strict__badge svg {
    width: 22px;
    height: 22px;
  }

  .strict__text strong {
    font-size: 15px;
    letter-spacing: .8px;
  }

  .strict__text span {
    font-size: 9px;
  }

  .strict__btn {
    height: 26px;
    padding: 0 8px 0 10px;
    font-size: 11px;
  }

  .duo__head strong {
    font-size: 15px;
  }

  .tag {
    margin-left: 4px;
    padding: 0 2px;
    font-size: 7px;
  }

  .tag--soft {
    padding: 0 3px;
    font-size: 9px;
  }

  .transfer__brand {
    font-size: 11px;
  }
}

.hot-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.hot-card {
  display: block;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31, 45, 96, .04);
}

.hot-card__game {
  color: #8a90a0;
  font-size: 11px;
}

.hot-card__title {
  margin-top: 4px;
  color: #1f2430;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-card__price {
  margin-top: 8px;
  color: #ff5a3c;
  font-size: 16px;
  font-weight: 700;
}

.hot-empty {
  grid-column: 1 / -1;
  padding: 22px 0;
  color: #a6acbb;
  font-size: 12px;
  text-align: center;
}

.hot-card__img {
  width: 100%;
  height: 96px;
  margin-bottom: 8px;
  border-radius: 8px;
  object-fit: cover;
}
