/* PlayZone — components */

/* Buttons */
.pz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.12s, box-shadow 0.15s;
  min-height: 44px;
}

.pz-btn:active {
  transform: scale(0.97);
}

.pz-btn--primary {
  background: linear-gradient(135deg, var(--pz-purple), var(--pz-purple-light));
  color: #fff;
  box-shadow: var(--pz-glow);
}

.pz-btn--play {
  background: linear-gradient(135deg, var(--pz-purple), var(--pz-purple-light));
  color: #fff;
  padding: 14px 32px;
  font-size: 1rem;
  width: 100%;
  max-width: 320px;
}

.pz-btn--sm {
  padding: 8px 18px;
  font-size: 0.82rem;
  min-height: 36px;
}

.pz-btn--ghost {
  background: var(--pz-surface-2);
  color: var(--pz-text);
  border: 1px solid var(--pz-border);
}

.pz-btn--fav.is-active svg {
  fill: var(--pz-hot);
  stroke: var(--pz-hot);
}

/* Hero */
.pz-hero {
  position: relative;
  border-radius: var(--pz-radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.pz-hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pz-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 10, 18, 0.95) 0%, rgba(12, 10, 18, 0.15) 60%);
}

.pz-hero__content {
  position: relative;
  z-index: 1;
}

.pz-hero__title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

/* Filter pills */
.pz-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.pz-pills::-webkit-scrollbar {
  display: none;
}

.pz-pill {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid transparent;
  transition: transform 0.12s, opacity 0.15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.pz-pill:active,
.pz-pill.is-active {
  transform: scale(0.96);
}

.pz-pill--hot {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.pz-pill--new {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
}

.pz-pill--featured {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}

.pz-pill--all {
  background: rgba(147, 51, 234, 0.15);
  color: var(--pz-purple-light);
  border-color: rgba(147, 51, 234, 0.35);
}

/* Game grid */
.pz-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pz-game-grid--search,
.pz-game-grid--fav {
  grid-template-columns: repeat(3, 1fr);
}

/* Game card */
.pz-game-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pz-game-card__thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--pz-radius-sm);
  overflow: hidden;
  background: var(--pz-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pz-game-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pz-game-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.15s;
  font-size: 1.5rem;
  color: #fff;
}

.pz-game-card:active .pz-game-card__play,
.pz-game-card:hover .pz-game-card__play {
  opacity: 1;
}

.pz-game-card__title {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pz-game-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--pz-text-muted);
}

.pz-game-card__rating {
  color: #fcd34d;
  font-weight: 600;
}

/* Rank list */
.pz-rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pz-rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--pz-surface);
  border-radius: var(--pz-radius-md);
  border: 1px solid var(--pz-border);
}

.pz-rank-row__num {
  width: 28px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--pz-purple-light);
  text-align: center;
  flex-shrink: 0;
}

.pz-rank-row__num--1 { color: #fcd34d; }
.pz-rank-row__num--2 { color: #d1d5db; }
.pz-rank-row__num--3 { color: #d97706; }

.pz-rank-row__thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.pz-rank-row__info {
  flex: 1;
  min-width: 0;
}

.pz-rank-row__title {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pz-rank-row__meta {
  font-size: 0.75rem;
  color: var(--pz-text-muted);
  margin-top: 2px;
}

.pz-rank-row__meta .star {
  color: #fcd34d;
}

/* Detail page */
.pz-detail-page {
  padding-bottom: 24px;
}

.pz-detail-hero {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--pz-surface);
  overflow: hidden;
}

.pz-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pz-detail-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--pz-bg-deep) 0%, transparent 50%);
}

.pz-detail-body {
  padding: 16px 0;
}

.pz-detail-card {
  background: rgba(34, 30, 46, 0.92);
  border-radius: var(--pz-radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--pz-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.pz-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pz-detail-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.pz-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--pz-text-muted);
}

.pz-detail-rating {
  color: #fcd34d;
  font-weight: 700;
}

.pz-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 16px;
}

.pz-detail-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(147, 51, 234, 0.15);
  color: var(--pz-purple-light);
  border: 1px solid rgba(147, 51, 234, 0.25);
}

.pz-detail-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.pz-detail-section {
  margin-bottom: 20px;
}

.pz-detail-section__title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pz-detail-section__title::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--pz-purple);
}

.pz-detail-section__body {
  color: var(--pz-text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.pz-detail-section__body p {
  margin-bottom: 10px;
}

/* Overview collapse */
.pz-overview-viewport {
  position: relative;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.pz-overview-viewport.is-collapsed {
  max-height: var(--pz-overview-collapsed-h);
}

.pz-overview-viewport.is-expanded {
  max-height: none;
}

.pz-overview-viewport__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(to top, var(--pz-surface), transparent);
  pointer-events: none;
}

.pz-overview-viewport.is-expanded .pz-overview-viewport__fade {
  display: none;
}

.pz-overview-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  color: var(--pz-purple-light);
  font-weight: 700;
  font-size: 0.88rem;
}

.pz-overview-toggle__icon {
  transition: transform 0.2s;
}

.pz-overview-toggle[aria-expanded='true'] .pz-overview-toggle__icon {
  transform: rotate(180deg);
}

/* FAQ */
.pz-faq-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--pz-border);
}

.pz-faq-item:last-child {
  border-bottom: none;
}

.pz-faq-q {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--pz-text);
}

.pz-faq-a {
  font-size: 0.88rem;
  color: var(--pz-text-muted);
}

/* Related */
.pz-related {
  padding: 0 var(--pz-shell-pad) 24px;
}

.pz-related__title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.pz-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pz-related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pz-related-card img {
  aspect-ratio: 1;
  border-radius: var(--pz-radius-sm);
  object-fit: cover;
  width: 100%;
}

.pz-related-card span {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 480px) {
  .pz-game-grid {
    gap: 12px;
  }

  .pz-hero__title {
    font-size: 1.45rem;
  }
}
