/* 精选页：App Store Today 风格卡片流（深色，与站点统一） */
.featured-main {
  width: 100%;
  padding: 26px 22px 0;
}

.featured-head { margin-bottom: 20px; }
.featured-head h1 {
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.8px;
}
.featured-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* 精选卡片在详情页 / 游戏页 / 排行页的投放容器 */
.front-featured-section {
  width: 100%;
}
.front-featured-section--spaced { margin-top: 26px; }
.front-featured-section--padded { padding-inline: 22px; }
/* 排行页：标题在上，卡片与标题 / 排行列表之间留出间距 */
.front-featured-section--ranking {
  margin-top: 4px;
  margin-bottom: 20px;
}
.front-featured-section .featured-card { margin-bottom: 18px; }
.front-featured-section .featured-card:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .front-featured-section--padded { padding-inline: 17px; }
}

/* ---------- 卡片 ---------- */
.featured-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto 22px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  animation: featured-rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.featured-card:nth-of-type(2) { animation-delay: 0.05s; }
.featured-card:nth-of-type(3) { animation-delay: 0.1s; }
.featured-card:nth-of-type(4) { animation-delay: 0.15s; }
.featured-card:nth-of-type(5) { animation-delay: 0.2s; }
.featured-card:nth-of-type(n + 6) { animation-delay: 0.24s; }

@keyframes featured-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) {
  .featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.46);
  }
}

.featured-media {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 13;
  background:
    radial-gradient(circle at 20% 18%, rgba(165, 231, 188, 0.22), transparent 55%),
    radial-gradient(circle at 82% 82%, rgba(87, 105, 247, 0.18), transparent 55%),
    linear-gradient(135deg, #1c2a21, #121512);
}
.featured-media > img,
.featured-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-video { background: #000; cursor: pointer; }

/* 左上角标签 */
.featured-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  max-width: calc(100% - 28px);
  padding: 5px 11px;
  border-radius: 8px;
  background: #ff4488;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.2px;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* 整卡点击层：点击图片 / 视频背景即触发查看 */
.featured-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.featured-card-link:focus-visible { outline-offset: -4px; }

/* 底部渐变遮罩 + 文案 + 关联 App */
.featured-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 76px 18px 18px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
  /* 点击穿透到整卡链接，只有 App 条内的按钮单独接收点击 */
  pointer-events: none;
}

.featured-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #fff;
}
.featured-topic {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.4px;
  color: #a5e7bc;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  overflow-wrap: anywhere;
}
.featured-copy h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.5px;
  color: #fff;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.featured-copy p {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #dfe7e1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.featured-overlay .app-strip {
  width: 100%;
  pointer-events: auto;
}

@media (max-width: 400px) {
  .featured-main { padding-inline: 17px; }
  .featured-card { margin-bottom: 18px; border-radius: 20px; }
  .featured-overlay { padding: 64px 15px 15px; gap: 12px; }
  .featured-copy { gap: 7px; }
  .featured-topic { font-size: 11px; }
  .featured-copy h2 { font-size: 20px; }
  .featured-copy p { font-size: 12px; }
  .featured-tag { top: 12px; left: 12px; font-size: 11px; }
  .featured-overlay .app-strip { gap: 8px; }
  .featured-overlay .app-strip-logo { width: 36px; height: 36px; border-radius: 10px; }
  .featured-overlay .app-strip-name { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .featured-card { animation: none; transition: none; }
}
