/* =========================================================
   酷玩街机秀官网 · 首页 index.html
   ========================================================= */

/* ---------------- Banner swiper ---------------- */
/* 宣传图为整幅成图（1918×889），容器按同比例自适应，完整展示不裁切 */
.advertise { position: relative; width: 100%; padding: var(--gutter) var(--gutter) 0; }
.advertise-swiper {
  position: relative;
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  aspect-ratio: 1918 / 889;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #101a3a;
}
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.banner-slide.is-active { opacity: 1; pointer-events: auto; transform: scale(1); }
.banner-slide > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.banner-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s;
}
.banner-arrow:hover { background: rgba(0, 0, 0, 0.45); }
.banner-arrow--prev { left: 8px; }
.banner-arrow--next { right: 8px; }

.banner-dots {
  position: absolute;
  z-index: 5;
  left: 18px;
  bottom: 12px;
  display: flex;
  gap: 6px;
}
.banner-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}
.banner-dots button.is-active { width: 20px; background: #fff; }

@media (min-width: 768px) {
  .advertise-swiper { border-radius: var(--radius-xl); }
  .banner-arrow { width: 40px; height: 40px; }
  .banner-dots { left: 36px; bottom: 18px; }
}

/* ---------------- Product block / hero card ---------------- */
.product-block { width: 100%; }
.hero-card {
  position: relative;
  margin: 0 auto;
  padding: 20px 16px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #ffffff) padding-box, linear-gradient(160deg, #f2f2f2, #ffffff) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card-media { position: relative; height: 150px; }
.hero-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.hero-card-video {
  position: absolute;
  right: 8px;
  bottom: -18px;
  width: 96px;
  height: 150px;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}
.hero-card-video img { width: 100%; height: 100%; object-fit: cover; }
.live-pill {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(3, 12, 28, 0.66);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  backdrop-filter: blur(6px);
}
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d67; box-shadow: 0 0 8px #ff4d67; }

.hero-card-content { position: relative; z-index: 2; margin-top: 34px; }
.hero-card-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.hero-card-subtitle { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--primary-2); }
.hero-card-description { margin-top: 10px; font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.hero-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-card-actions .btn { flex: 1 1 auto; min-width: 130px; }

/* 玩法演示：手机边框 + 视频，与标题同排 */
.hero-card-head { display: flex; align-items: center; gap: 16px; }
.hero-card-heading { flex: 1; min-width: 0; }
/* 容器 = 边框图尺寸，圆角与图外轮廓一致，裁掉超出边框的部分 */
.hero-showcase-device {
  flex: 0 0 auto;
  position: relative;
  width: 123px;
  height: 234px;
  overflow: hidden;
  border-radius: 15% / 7.5%;
  filter: drop-shadow(0 16px 26px rgba(15, 23, 42, 0.16));
}
/* 视频在下层：内缩到屏幕镂空区（含 0.2% 压边避免缝隙），圆角圆心与镂空角圆心重合 */
.hero-showcase-video {
  position: absolute;
  top: 2.3%;
  left: 5.4%;
  width: 89.2%;
  height: 95.4%;
  overflow: hidden;
  border-radius: 13.3% / 6.2%;
  object-fit: cover;
  background: #000;
}
/* 边框图在上层做遮罩 */
.hero-showcase-frame { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-showcase-video { display: none; }
}

.stats-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-inline: auto;
  padding: 18px 12px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}
.stats-item { flex: 1 1 calc(50% - 6px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.stats-value { font-size: 20px; font-weight: 700; color: var(--primary-2); white-space: nowrap; }
.stats-label { margin-top: 2px; font-size: 12px; color: var(--ink-3); }

@media (min-width: 768px) {
  .hero-card { padding: 28px; border-radius: var(--radius-xl); }
  .hero-card-media { height: 260px; }
  .hero-card-video { width: 150px; height: 260px; right: 20px; bottom: -30px; border-radius: 40px; }
  .hero-card-content { margin-top: 26px; max-width: 66%; }
  .hero-card-title { font-size: 34px; }
  .hero-card-subtitle { font-size: 18px; }
  .hero-card-description { font-size: 15px; }
  .hero-card-actions .btn { flex: 0 0 auto; min-width: 160px; }

  .hero-card-head { gap: 34px; }
  .hero-showcase-device { width: 183px; height: 355px; }

  .stats-section { padding: 26px 24px; border-radius: 0 0 var(--radius-xl) var(--radius-xl); gap: 20px; }
  .stats-item { flex: 1; }
  .stats-value { font-size: 30px; }
  .stats-label { font-size: 14px; }
}

@media (min-width: 1200px) {
  .hero-card { padding: 40px; }
  .hero-card-media { height: 340px; }
  .hero-card-video { width: 200px; height: 340px; bottom: -40px; }
  .hero-card-title { font-size: 44px; }
  .hero-card-description { font-size: 16px; max-width: 560px; }

  .hero-showcase-device { width: 215px; height: 420px; }

  .stats-section { flex-wrap: nowrap; height: 150px; padding: 0 24px; gap: 0; }
  .stats-value { font-size: 44px; }
}

/* ---------------- Features ---------------- */
.other-block { width: 100%; padding-bottom: 30px; }
.features-section { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }
.features-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 10px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.features-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.item-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--primary-softer);
  color: var(--primary-2);
  font-size: 20px;
  font-weight: 700;
}
.item-label { margin: 12px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.features-item p { font-size: 12px; color: var(--ink-3); line-height: 1.7; }

@media (min-width: 768px) {
  .features-section { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .features-item { padding: 26px 20px; border-radius: var(--radius-lg); }
  .item-icon { width: 52px; height: 52px; font-size: 24px; }
  .item-label { font-size: 15px; }
  .features-item p { font-size: 13px; }
}

@media (min-width: 1200px) {
  .features-section { gap: 30px; padding: 0; }
  .features-item { padding: 34px 26px; border-radius: var(--radius-xl); }
  .item-label { font-size: 17px; }
}

/* ---------------- Game wall ---------------- */
.game-block {
  position: relative;
  width: 100%;
  padding-bottom: 30px;
  background: linear-gradient(180deg, #ffffff, #f1f4ff);
  overflow: hidden;
}
.gamewall { position: relative; width: 100%; min-height: 420px; overflow: hidden; }
.gamewall-overflow {
  display: flex;
  justify-content: center;
  gap: 8px;
  height: 420px;
  width: 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}
/* 注意：使用 margin 而非 gap，保证位移 -50% 时能无缝衔接 */
.gamewallcol { flex: 0 0 auto; align-self: flex-start; width: 88px; display: flex; flex-direction: column; }
.gamewallcol[data-dir="down"] { animation: wallDown 22s linear infinite; }
.gamewallcol[data-dir="up"] { animation: wallUp 22s linear infinite; }
/* 卡片高度按产品图 420×620 的比例换算，完整展示机台边框、不裁切 */
.gamewallcol article {
  position: relative;
  flex: 0 0 auto;
  height: 130px; /* 88 × 620 / 420 */
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #101a3a;
}
.gamewallcol img { width: 100%; height: 100%; object-fit: cover; }
.gamewallcol article::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(4, 10, 26, 0.92)); }
.gamewallcol span, .gamewallcol small { position: absolute; z-index: 2; left: 8px; color: #fff; }
.gamewallcol span { bottom: 22px; font-size: 11px; font-weight: 700; }
.gamewallcol small { bottom: 6px; font-size: 9px; color: rgba(255, 255, 255, 0.62); }
@keyframes wallDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes wallUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }

@media (min-width: 768px) {
  .gamewall { min-height: 560px; }
  .gamewall-overflow { height: 560px; gap: 12px; }
  .gamewallcol { width: 150px; }
  .gamewallcol article { height: 221px; margin-bottom: 12px; border-radius: var(--radius-lg); } /* 150 × 620 / 420 */
  .gamewallcol span { bottom: 30px; font-size: 15px; }
  .gamewallcol small { bottom: 10px; font-size: 11px; }
}

@media (min-width: 1200px) {
  .gamewall { min-height: 640px; }
  .gamewall-overflow { height: 640px; gap: 16px; }
  .gamewallcol { width: 190px; }
  .gamewallcol article { height: 280px; margin-bottom: 16px; } /* 190 × 620 / 420 */
  .gamewallcol span { bottom: 34px; font-size: 17px; }
}

/* ---------------- Guide block（首页布局） ---------------- */
.guide-block { width: 100%; padding-bottom: 30px; overflow: hidden; }
.top-guide-section, .guide-list {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.top-guide-section { display: flex; flex-direction: column; gap: 12px; }
.large-card { border-radius: var(--radius-lg); }
.large-card .guide-img { width: 100%; height: 160px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.top-guide-item { border-radius: var(--radius-lg); display: flex; align-items: stretch; }
.top-guide-item .guide-img { width: 100px; height: 100px; }
.top-guide-item .guide-content { flex: 1; padding: 10px 12px; }
.top-guide-item .guide-title { -webkit-line-clamp: 2; font-size: 13px; }
.top-guide-item .guide-description { -webkit-line-clamp: 2; margin-top: 5px; }
.top-guide-item .guide-footer { margin-top: 6px; }

.guide-list { display: grid; gap: 10px; margin-top: 12px; }
.guide-column { display: grid; gap: 10px; }
.guide-item { border-radius: var(--radius-md); display: flex; align-items: stretch; }
.guide-item .guide-img { width: 92px; height: 88px; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.guide-item .guide-content { flex: 1; padding: 10px 12px; }
.guide-item .guide-title { font-size: 13px; -webkit-line-clamp: 2; }
.guide-item .guide-description { display: none; }

.btn-more {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  margin: 20px auto 0;
  padding: 0 32px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn-more:hover { background: var(--primary-softer); color: var(--ink); }

@media (min-width: 768px) {
  .large-card .guide-img { height: 260px; }
  .top-guide-item .guide-img { width: 150px; height: 130px; }
  .top-guide-item .guide-title { font-size: 15px; }
  .guide-item .guide-img { width: 120px; height: 110px; }
  .guide-item .guide-title { font-size: 14px; }
  .guide-item .guide-description { display: -webkit-box; -webkit-line-clamp: 2; }
  .btn-more { height: 52px; font-size: 16px; }
}

@media (min-width: 1200px) {
  .top-guide-section { flex-direction: row; align-items: stretch; gap: 20px; }
  .large-card { width: 40%; flex-direction: column; }
  .large-card .guide-img { flex: 1; height: auto; min-height: 300px; border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
  .large-card .guide-content { flex: none; padding: 24px; }
  .large-card .guide-title { font-size: 20px; -webkit-line-clamp: 3; }
  .small-cards-container { flex: 1; display: grid; gap: 20px; align-content: stretch; }
  .top-guide-item { height: calc(50% - 10px); }
  .top-guide-item .guide-img { width: 200px; }
  .guide-list { grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
  .guide-item .guide-img { width: 160px; height: 130px; }
}

/* ---------------- FAQ ---------------- */
.question-block { width: 100%; padding-bottom: 40px; }
.question-section { display: grid; gap: 20px; max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }
.question-section-item {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.question-section-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.section-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.title-icon { width: 24px; height: 24px; border-radius: 7px; object-fit: contain; }
.section-item-question { padding: 8px 18px 12px; }
.question-item { border-bottom: 1px solid var(--line); cursor: pointer; }
.question-item:last-child { border-bottom: 0; }
.question-item > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 10px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.question-content { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.q-mark { margin-right: 6px; color: var(--primary-2); font-style: normal; font-weight: 700; }
.toggle-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-softer);
  color: var(--primary-2);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}
.question-item > div { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.question-item > div > p { overflow: hidden; min-height: 0; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.85; }
.question-item.is-open > div { grid-template-rows: 1fr; }
.question-item.is-open > div > p { padding: 0 30px 12px 0; }

.help-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: var(--content);
  margin: 24px var(--gutter) 0;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.help-text { font-size: 14px; color: var(--ink-2); }
.contact-btn {
  width: 100%;
  padding: 10px 24px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary-softer);
  color: var(--ink-2);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.contact-btn:hover { box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3); transform: translateY(-3px); }

@media (min-width: 768px) {
  .question-section { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .question-section-item { border-radius: var(--radius-xl); }
  .section-item-title { padding: 18px 22px; font-size: 18px; }
  .title-icon { width: 30px; height: 30px; }
  .section-item-question { padding: 10px 22px 16px; }
  .question-content { font-size: 15px; }
  .help-footer { flex-direction: row; justify-content: center; gap: 24px; text-align: left; padding: 24px 30px; margin-inline: var(--gutter); }
  .contact-btn { width: auto; }
}
