/* .GAMES-main 宽度与边距见 game.css（与首页 main.max-w-7xl 一致） */

/* 与 .GAMES-main / .GAME-main 同宽，首页相似游戏区与列表、单页对齐 */
.GAMES-tiles-wrap {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1020px) {
  .GAMES-tiles-wrap { padding-left: 0; padding-right: 0; }
}

.GAMES-article.GAME-article { padding: 16px 32px 36px; }
@media (max-width: 640px) {
  .GAMES-article.GAME-article { padding: 12px 16px 28px; }
}

.GAMES-hero { margin-bottom: 4px; }

.GAMES-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  text-align: left;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
@media (min-width: 640px) {
  .GAMES-heading { font-size: 1.75rem; margin-bottom: 10px; }
}

.GAMES-lead {
  margin: 0 0 10px;
  max-width: 680px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
@media (min-width: 640px) {
  .GAMES-lead { font-size: 1rem; line-height: 1.6; }
}

.GAMES-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}
.GAMES-jump-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-secondary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 100px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.GAMES-jump-link:hover {
  color: var(--brand-yellow);
  border-color: rgba(59, 211, 128, 0.45);
  background: rgba(59, 211, 128, 0.08);
}

.GAMES-surprise-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 100px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.GAMES-surprise-btn:hover {
  color: #1a1a1a;
  background: #fbbf24;
  border-color: #d97706;
}
.GAMES-surprise-btn .surprise-me-icon {
  width: 16px;
  height: 16px;
}
.GAMES-surprise-label { white-space: nowrap; }
[data-theme="light"] .GAMES-surprise-btn {
  color: #b45309;
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(217, 119, 6, 0.38);
}
[data-theme="light"] .GAMES-surprise-btn:hover {
  color: #1a1a1a;
  background: #fbbf24;
  border-color: #d97706;
}
@media (max-width: 480px) {
  .GAMES-surprise-label { display: none; }
  .GAMES-surprise-btn { padding: 5px 10px; }
}

.GAMES-collection { margin-top: 0; }

.GAMES-collection-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.GAMES-gg-banner {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 28px 0 8px;
}

.GAMES-seo.GAME-section { margin-top: 36px; }
.GAMES-seo.GAME-section:first-of-type { margin-top: 32px; }

.GAMES-subgroup {
  margin-top: 16px;
  scroll-margin-top: 72px;
}
.GAMES-subgroup:first-of-type { margin-top: 6px; }

.GAMES-subgroup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 10px;
}

.GAMES-subheading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  flex: 0 0 auto;
}
@media (min-width: 640px) {
  .GAMES-subheading { font-size: 1.125rem; }
}

.GAMES-subgroup-intro {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
  flex: 1 1 220px;
}

.GAMES-collection .GAMES-grid {
  gap: 16px 14px;
}
@media (min-width: 1024px) {
  .GAMES-collection .GAMES-grid { gap: 18px 16px; }
}

.GAMES-cta {
  margin-top: 36px;
  padding-top: 8px;
  border-top: 1px solid var(--card-border);
}
.GAMES-cta p {
  margin: 16px 0 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.GAMES-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 auto 32px;
  max-width: 640px;
  text-align: center;
  padding: 18px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.GAMES-intro p { margin: 0 0 10px; }
.GAMES-intro p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .GAMES-intro { padding: 14px 18px; margin-bottom: 28px; font-size: 0.9375rem; }
}

/* 首页 /word-games/ 列表 / 游戏单页「相似游戏」统一：桌面一行 5 个 */
.GAMES-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 18px;
  width: 100%;
  max-width: 100%;
  justify-items: stretch;
  box-sizing: border-box;
}
@media (max-width: 1024px) {
  .GAMES-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 14px; }
}
@media (max-width: 768px) {
  .GAMES-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
}
@media (max-width: 520px) {
  .GAMES-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
}

.GAMES-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  width: 100%;
  max-width: none;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.GAMES-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.GAMES-card-inner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
  background: var(--card-bg);
}

.GAMES-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.GAMES-card:hover .GAMES-card-img {
  transform: scale(1.06);
}

.GAMES-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.82) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.GAMES-card:hover .GAMES-card-overlay {
  opacity: 1;
}

.GAMES-card-name {
  display: block;
  width: 100%;
  padding: 12px 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.3;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.GAMES-card:hover .GAMES-card-name {
  color: var(--brand-yellow);
}

.GAMES-card-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(59, 211, 128, .12);
  border: 1px solid rgba(59, 211, 128, 0.4);
  border-radius: 100px;
  backdrop-filter: blur(8px);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.GAMES-card-play-text:empty::before {
  content: 'Play';
}
.GAMES-card:hover .GAMES-card-play {
  background: var(--brand-yellow);
  color: var(--surface-contrast);
  border-color: #0d2818;
}

.GAMES-card-play-arrow { display: inline-flex; align-items: center; justify-content: center; }

.GAMES-empty { text-align: center; color: var(--text-secondary); font-size: 16px; margin: 0; }

@media (max-width: 520px) {
  .GAMES-card-name { padding: 10px 8px 12px; font-size: 13px; }
}

/* ══════════════════════════════════════════════════════════════════
   Games Carousel - 游戏轮播
══════════════════════════════════════════════════════════════════ */
.GAMES-carousel-wrap { position: relative; margin: 0 auto; max-width: 100%; }

.GAMES-carousel-viewport { position: relative; overflow: hidden; width: 100%; }
.GAMES-carousel-track { display: flex; transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94); will-change: transform; }
.GAMES-carousel-page { flex: 0 0 100%; width: 100%; }

.GAMES-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 80px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.GAMES-carousel-btn:hover:not(:disabled) {
  color: var(--brand-green);
}
.GAMES-carousel-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.92);
}
.GAMES-carousel-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}
.GAMES-carousel-btn svg { width: 32px; height: 32px; }
.GAMES-carousel-prev { left: -56px; }
.GAMES-carousel-next { right: -56px; }

@media (max-width: 1200px) {
  .GAMES-carousel-prev { left: -48px; }
  .GAMES-carousel-next { right: -48px; }
}
@media (max-width: 1024px) {
  .GAMES-carousel-prev { left: -40px; }
  .GAMES-carousel-next { right: -40px; }
  .GAMES-carousel-btn { width: 44px; height: 72px; }
  .GAMES-carousel-btn svg { width: 28px; height: 28px; }
}
@media (max-width: 768px) {
  .GAMES-carousel-prev { left: -32px; }
  .GAMES-carousel-next { right: -32px; }
  .GAMES-carousel-btn { width: 40px; height: 64px; }
  .GAMES-carousel-btn svg { width: 24px; height: 24px; }
}
@media (max-width: 480px) {
  .GAMES-carousel-prev { left: 0; }
  .GAMES-carousel-next { right: 0; }
  .GAMES-carousel-btn { width: 36px; height: 56px; }
  .GAMES-carousel-btn svg { width: 22px; height: 22px; }
}

.GAMES-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  min-height: 12px;
}
.GAMES-carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: var(--text-secondary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.3;
  -webkit-tap-highlight-color: transparent;
}
.GAMES-carousel-dot:hover { opacity: 0.6; }
.GAMES-carousel-dot.active {
  width: 28px;
  border-radius: 5px;
  background: var(--brand-green);
  opacity: 1;
}
@media (max-width: 480px) {
  .GAMES-carousel-dots { gap: 8px; margin-top: 20px; }
  .GAMES-carousel-dot { width: 8px; height: 8px; }
  .GAMES-carousel-dot.active { width: 22px; }
}
