/* ==========================================================================
   pages.css — Page-specific styles (home / list / detail / play / static)
   ========================================================================== */

/* ==========================================================================
   Home page
   ========================================================================== */
.home-banner {
  width: 100%;
  margin-bottom: var(--gap-4);
  position: relative;
  background: linear-gradient(135deg, #2a1d6b 0%, #6e1f7d 50%, #1f3a8a 100%);
  overflow: hidden;
  padding: 22px 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.home-banner__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #ffe07a 60%, #ff9bd0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-banner__sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
  max-width: 320px;
}
.home-banner__stats {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}
.home-banner__stats strong { color: var(--c-accent); font-weight: 700; font-size: 14px; display: block; }
.home-banner__deco {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 0, 0.4), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
}

/* ==========================================================================
   List page
   ========================================================================== */
.list-toolbar {
  display: flex;
  align-items: center;
  gap: var(--gap-2);
  padding: var(--gap-3) var(--gap-4);
  background: rgba(15, 16, 35, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: var(--header-h);
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.list-toolbar__count {
  font-size: 12px;
  color: var(--c-text-3);
  flex: 1;
}
.list-toolbar__count strong { color: var(--c-accent); }
.list-toolbar__sort {
  padding: 6px 12px;
  background: var(--c-card);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.list-content {
  padding: var(--gap-4);
}

/* ==========================================================================
   Detail page
   ========================================================================== */
.detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--c-bg-2);
  margin-bottom: var(--gap-4);
}
.detail-hero__bg {
  position: absolute;
  inset: 0;
  filter: blur(24px) brightness(0.5) saturate(1.5);
  transform: scale(1.25);
  background-size: cover;
  background-position: center;
  opacity: 0.85;
}
.detail-hero::before {
  /* 顶部到底部的暗渐变,增强封面可读性 */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
  pointer-events: none;
}
.detail-hero__cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 24px 20px;
}
.detail-hero__cover img {
  max-width: 56%;
  max-height: 80%;
  border-radius: var(--radius-3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  object-fit: cover;
}
.detail-hero__play-btn {
  position: absolute;
  z-index: 3;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-2) 100%);
  color: #1a1a1a;
  font-weight: 800;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(255, 93, 143, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.15);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.detail-hero__play-btn img { width: 18px; height: 18px; }

.detail-meta {
  padding: 0 var(--gap-4);
  margin-bottom: var(--gap-4);
}
.detail-meta__title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.detail-meta__sub {
  font-size: 13px;
  color: var(--c-text-2);
  margin-bottom: 12px;
}
.detail-meta__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-2);
  font-size: 13px;
  color: var(--c-text-2);
}
.detail-meta__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--c-card);
  border-radius: var(--radius-2);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.detail-meta__chip img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.detail-meta__chip strong { color: var(--c-accent); font-weight: 700; }

.detail-section {
  padding: 0 var(--gap-4);
  margin-bottom: var(--gap-5);
}
.detail-section__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: var(--gap-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-section__title .accent-bar {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--c-accent), var(--c-accent-2));
}
.detail-desc {
  background: var(--c-card);
  padding: 14px;
  border-radius: var(--radius-3);
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.how-to-play {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-3);
}
.how-to-play__item {
  background: var(--c-card);
  padding: 12px;
  border-radius: var(--radius-2);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.how-to-play__num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  color: #1a1a1a;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.how-to-play__text { font-size: 12px; color: var(--c-text-2); line-height: 1.5; }

.tags-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 10px;
  background: rgba(124, 92, 255, 0.12);
  color: var(--c-accent-3);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
}

.comment {
  background: var(--c-card);
  padding: 12px;
  border-radius: var(--radius-3);
  margin-bottom: var(--gap-2);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.comment__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.comment__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent-4), var(--c-accent-3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.comment__name { font-size: 13px; font-weight: 600; flex: 1; }
.comment__date { font-size: 11px; color: var(--c-text-3); }
.comment__stars { color: var(--c-accent); font-size: 11px; margin-bottom: 4px; }
.comment__text { font-size: 13px; color: var(--c-text-2); line-height: 1.6; }

/* Related games */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-2);
}
@media (max-width: 360px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Play page (iframe + floating buttons)
   ========================================================================== */
.play-stage {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.play-stage__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--gap-3);
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.play-stage__title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 var(--gap-3);
}

.play-stage__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.play-fab {
  position: fixed;
  z-index: 70;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(20, 22, 50, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-3);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}
.play-fab:active { transform: scale(0.92); background: rgba(255, 206, 0, 0.25); }
.play-fab img { width: 26px; height: 26px; }
.play-fab--left {
  left: 14px;
  bottom: 22px;
}
.play-fab--right {
  right: 14px;
  bottom: 22px;
}
.play-fab__tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 16, 35, 0.95);
  color: var(--c-text);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.play-fab:active .play-fab__tip { opacity: 1; }

.play-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(180deg, #0a0c1f 0%, #1a1c40 100%);
  z-index: 5;
  transition: opacity 0.3s ease;
}
.play-loader.hide { opacity: 0; pointer-events: none; }
.play-loader__spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--c-accent);
  border-right-color: var(--c-accent-2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.play-loader__text { font-size: 13px; color: var(--c-text-2); letter-spacing: 0.04em; }
.play-loader__name {
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   Static / Legal pages (about / privacy / contact / terms)
   ========================================================================== */
.static-page {
  padding: var(--gap-4);
}
.static-page__hero {
  background: var(--c-card);
  padding: 22px 18px;
  border-radius: var(--radius-4);
  margin-bottom: var(--gap-4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(124, 92, 255, 0.18), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(255, 206, 0, 0.08), transparent 50%);
}
.static-page__hero h1 {
  font-size: 22px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff 0%, #ffe07a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.static-page__hero p { font-size: 13px; color: var(--c-text-2); margin: 0; }

.static-page__section {
  background: var(--c-card);
  padding: 16px;
  border-radius: var(--radius-3);
  margin-bottom: var(--gap-3);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.static-page__section h2 {
  font-size: 15px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.static-page__section h2 .accent-bar {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--c-accent), var(--c-accent-2));
}
.static-page__section h3 { font-size: 13px; margin: 10px 0 4px; color: var(--c-text); }
.static-page__section p {
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.7;
}
.static-page__section ul {
  padding-left: 18px;
  margin: 6px 0;
}
.static-page__section li {
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.7;
  list-style: disc;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--c-card);
  border-radius: var(--radius-3);
  margin-bottom: var(--gap-3);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.contact-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card__icon img { width: 22px; height: 22px; }
.contact-card__body { flex: 1; }
.contact-card__body strong { display: block; font-size: 14px; margin-bottom: 2px; }
.contact-card__body span { font-size: 12px; color: var(--c-text-3); }
.contact-card__cta {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 206, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card__cta img { width: 16px; height: 16px; }

.last-updated {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: var(--gap-3);
  text-align: right;
}
