/* ============================================
   Fluxibly Games - Category Page Styles
   ============================================ */

.category-hero {
  margin-top: var(--header-height);
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: #fff;
  padding: 40px 0 32px;
}

.category-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.category-hero h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-hero .cat-icon {
  font-size: 36px;
}

.category-hero p {
  font-size: 15px;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.7;
}

.category-hero .cat-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.8;
}

/* Filters */
.filters-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  position: sticky;
  top: var(--header-height);
  z-index: 100;
}

.filters-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-select {
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.filter-select:focus {
  border-color: var(--primary);
}

.tag-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* Main layout */
.category-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.category-main {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

/* Results info */
.results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.results-info strong {
  color: var(--text-primary);
}

/* Sidebar */
.sidebar .sidebar-section {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-height) + 80px);
}

.sidebar h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.sidebar-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  transition: color var(--transition);
}

.sidebar-cat-list a:last-child {
  border-bottom: none;
}

.sidebar-cat-list a:hover,
.sidebar-cat-list a.active {
  color: var(--primary);
  font-weight: 600;
}

.sidebar-cat-list a .count {
  font-size: 12px;
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-light);
}

.sidebar-top-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-top-game:last-child {
  border-bottom: none;
}

.sidebar-top-game .rank {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-light);
  width: 20px;
  text-align: center;
}

.sidebar-top-game .rank.gold { color: var(--gold); }
.sidebar-top-game .rank.silver { color: var(--silver); }
.sidebar-top-game .rank.bronze { color: var(--bronze); }

.sidebar-top-game img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.sidebar-top-game .info {
  flex: 1;
  min-width: 0;
}

.sidebar-top-game .info .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-top-game .info .rating {
  font-size: 12px;
  color: var(--warning);
}

/* Responsive */
@media (max-width: 1024px) {
  .category-main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .category-hero h1 {
    font-size: 24px;
  }

  .filters-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .tag-filters {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
}
