/* Front Page (simple) */
/* Uses design tokens from tokens.css */

.gpcc-container {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gap);
  padding-right: var(--gap);
}

/* Hero */
.gpcc-home {
  margin-top: var(--gap-xl);
  margin-bottom: var(--gap-xl);
  text-align: center;
}

.gpcc-home__title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: var(--leading-tight);
  font-weight: var(--font-bold);
  margin: 0 0 var(--gap-sm) 0;
  color: var(--text);
}

.gpcc-home__tagline {
  margin: 0 0 var(--gap) 0;
  color: var(--text-muted);
  font-size: var(--text-lg);
}

.gpcc-home__search {
  display: flex;
  gap: var(--gap-sm);
  justify-content: center;
  max-width: 640px;
  margin: var(--gap) auto var(--gap-lg);
}

.gpcc-home__search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.gpcc-home__search input[type="search"]::placeholder { color: var(--text-soft); }

.gpcc-home__btn {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-weight: var(--font-semibold);
}

.gpcc-home__counters {
  display: flex;
  gap: var(--gap);
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gpcc-home__num { display: block; font-size: var(--text-3xl); font-weight: var(--font-bold); }
.gpcc-home__label { display: block; color: var(--text-muted); font-size: var(--text-sm); }

@media (max-width: 640px) {
  .gpcc-home__search { flex-direction: column; }
}

/* Sections */
.gpcc-section__title {
  margin: 0 0 var(--gap) 0;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--text);
}

.gpcc-home-section {
  margin-top: var(--gap-xl);
  margin-bottom: var(--gap-xl);
}

/* Generic grid for cards */
.gpcc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
}

/* 5-column grid for Top Downloads, Latest Games, Latest Apps */
.gpcc-grid-5col {
  display: grid;
  gap: var(--gap);
}

/* Desktop: 5 items per row (2 rows = 10 items) */
@media (min-width: 1024px) {
  .gpcc-grid-5col {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Tablet: 3 items per row */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .gpcc-grid-5col {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: 2 items per row */
@media (max-width: 639.98px) {
  .gpcc-grid-5col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Term list (browse by genre) */
.gpcc-term-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--gap-sm);
  list-style: none;
  margin: 0 0 var(--gap-lg) 0;
  padding: 0;
}

.gpcc-term-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
}

.gpcc-term-link:hover { background: var(--surface-3); }

.gpcc-term-count {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Blog list */
.gpcc-blog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.gpcc-blog__item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--gap); }
.gpcc-blog__thumb { display: block; margin: -var(--gap) -var(--gap) var(--gap) -var(--gap); }
.gpcc-blog__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.gpcc-blog__title { margin: 0 0 6px 0; font-size: var(--text-lg); }
.gpcc-blog__date { color: var(--text-soft); font-size: var(--text-sm); }
.gpcc-blog__excerpt { margin-top: 8px; color: var(--text-muted); }

/* Muted text */
.gpcc-muted { color: var(--text-soft); }

/* Newsletter */
.gpcc-newsletter { margin: var(--gap-xl) auto; max-width: 720px; }
.gpcc-newsletter { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--gap-lg); text-align: center; }
.gpcc-newsletter__text { color: var(--text-muted); margin: 0 0 var(--gap) 0; }
.gpcc-newsletter__form { display: flex; gap: var(--gap-sm); justify-content: center; max-width: 560px; margin: 0 auto var(--gap) auto; }
.gpcc-newsletter__form input[type="email"] { flex: 1; min-width: 0; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-1); color: var(--text); }
.gpcc-newsletter__btn { padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid transparent; background: var(--primary); color: #fff; font-weight: var(--font-semibold); }
.gpcc-newsletter__policy { color: var(--text-soft); font-size: var(--text-sm); margin: 0; }

.gpcc-note { margin: 0 auto var(--gap) auto; max-width: 560px; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-1); }
.gpcc-note--ok { border-color: rgba(16,185,129,0.6); background: rgba(16,185,129,0.12); color: #D1FAE5; }
.gpcc-note--err { border-color: rgba(239,68,68,0.6); background: rgba(239,68,68,0.12); color: #FECACA; }

@media (max-width: 640px) {
  .gpcc-newsletter__form { flex-direction: column; }
}

/* Latest Blog - Horizontal Scroll */
.gpcc-blog-horizontal {
  margin-top: var(--gap-xl);
  margin-bottom: var(--gap-xl);
}

.gpcc-blog-scroll {
  position: relative;
  overflow: hidden;
}

.gpcc-blog-scroll__track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding-bottom: var(--gap-sm);
}

.gpcc-blog-scroll__track::-webkit-scrollbar {
  height: 8px;
}

.gpcc-blog-scroll__track::-webkit-scrollbar-track {
  background: transparent;
}

.gpcc-blog-scroll__track::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.gpcc-blog-scroll__track::-webkit-scrollbar-thumb:hover {
  background: var(--text-soft);
}

.gpcc-blog-card {
  flex: 0 0 auto;
  width: 280px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gpcc-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gpcc-blog-card__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-1);
}

.gpcc-blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.gpcc-blog-card:hover .gpcc-blog-card__thumb img {
  transform: scale(1.05);
}

.gpcc-blog-card__body {
  padding: var(--gap-sm);
}

.gpcc-blog-card__title {
  margin: 0 0 var(--gap-xs) 0;
  font-size: var(--text-sm);
  line-height: 1.4;
  font-weight: var(--font-semibold);
}

.gpcc-blog-card__title a {
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gpcc-blog-card__title a:hover {
  color: var(--primary);
  text-decoration: none;
}

.gpcc-blog-card__date {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-soft);
}

/* Desktop: Show 5 cards at once */
@media (min-width: 1280px) {
  .gpcc-blog-card {
    width: calc((100% - (var(--gap) * 4)) / 5);
  }
}

/* Tablet: Show 3 cards */
@media (min-width: 768px) and (max-width: 1279.98px) {
  .gpcc-blog-card {
    width: calc((100% - (var(--gap) * 2)) / 3);
  }
}

/* Mobile: Show 1.5 cards (hint to scroll) */
@media (max-width: 767.98px) {
  .gpcc-blog-card {
    width: calc(70% - var(--gap));
  }
}

/* Social links (newsletter) */
.gpcc-social { display: flex; flex-wrap: wrap; gap: var(--gap); justify-content: center; margin: var(--gap) 0; }
.gpcc-social__link { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-1); color: var(--text); text-decoration: none; }
.gpcc-social__link:hover { background: var(--surface-3); }
.gpcc-social__icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-full); color: #fff; font-weight: var(--font-bold); font-size: 14px; }
.gpcc-social__icon--facebook { background: #1877F2; }
.gpcc-social__icon--x { background: #000; }
.gpcc-social__icon--youtube { background: #FF0000; font-size: 12px; }
.gpcc-social__icon--threads { background: #000; }