@import url(https://fonts.bunny.net/css?family=raleway:300,400,500,600,700,800);

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #6130ae;
  --primary-light: #f4efff;
  --primary-hover: #40236b;

  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #999;
  --text-light: #bbb;

  --bg: #fff;
  --bg-page: #f8f7fb;
  --bg-sidebar: #fff;
  --bg-card: #fff;
  --bg-input: #f3f3f6;

  --border: #e2ddec;
  --border-hover: #cfc4e1;

  --r3: #22c55e;
  --r3-bg: #ecfdf5;
  --r7: #06b6d4;
  --r7-bg: #ecfeff;
  --r13: #eab308;
  --r13-bg: #fefce8;
  --r15: #f97316;
  --r15-bg: #fff7ed;
  --r18: #ef4444;
  --r18-bg: #fef2f2;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --sidebar-width: 280px;
  --layout-wide: 1280px;
  --layout-page: 1040px;
  --layout-readable: 860px;
  --layout-gutter: clamp(1rem, 2.2vw, 1.75rem);
  --layout-gap: clamp(1rem, 2vw, 1.5rem);
  --section-gap: clamp(1.75rem, 4vw, 3rem);
  --panel-padding: clamp(1rem, 1.8vw, 1.35rem);
  --card-padding: clamp(0.95rem, 1.8vw, 1.35rem);
  --card-gap: 0.9rem;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg-page);
  background-size: 5em 5em;
  background-image:
    linear-gradient(to right, rgba(97, 48, 174, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(97, 48, 174, 0.055) 1px, transparent 1px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 3px solid rgba(97, 48, 174, 0.28);
  outline-offset: 3px;
}

.ui-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
}

.btn .ui-icon,
.detail-back .ui-icon,
.detail-share-btn .ui-icon,
.detail-link-btn .ui-icon,
.page-btn .ui-icon {
  width: 1rem;
  height: 1rem;
}

.site-header {
  position: relative;
  background: var(--primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1rem 0;
  box-shadow: 0 8px 24px rgba(41, 24, 70, 0.08);
}

.header-inner {
  max-width: var(--layout-wide);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-top {
  display: contents;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.logo-text span {
  font-weight: 400;
  opacity: 0.8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 420px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
  order: 2;
}

.site-logo {
  order: 1;
}

.header-lang-toggle {
  flex-shrink: 0;
  order: 3;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn[aria-current="page"] {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  box-shadow: 0 6px 18px rgba(30, 18, 49, 0.12);
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--section-gap) var(--layout-gutter);
  width: 100%;
}

.hero-content {
  max-width: var(--layout-readable);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-title-accent {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  row-gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 112px;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat-num-updated {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.hero-stat-wide {
  flex-basis: 100%;
  width: 100%;
  margin-top: 0.15rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.hero-stat-wide .hero-stat-label {
  margin-top: 0.45rem;
}

.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.hero-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.hero-btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.hero-btn.secondary {
  background: var(--bg);
  color: var(--primary);
  border-color: var(--border);
}

.hero-btn.secondary:hover {
  border-color: var(--primary);
}

.hero-ratings {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero-ratings img {
  width: 56px;
  height: auto;
  border-radius: 4px;
  opacity: 0.85;
  transition: all 0.2s;
}

.hero-ratings a:hover img {
  opacity: 1;
  transform: scale(1.08);
}

.app-layout {
  max-width: var(--layout-wide);
  margin: 0 auto;
  padding: var(--layout-gutter);
  display: flex;
  gap: var(--layout-gap);
  align-items: flex-start;
  width: 100%;
  flex: 1;
}

.app-layout.detail-active {
  align-items: center;
}

.hero-logo {
  width: 260px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  margin-bottom: -1rem;
  display: block;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--layout-gutter);
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  max-height: calc(100vh - (var(--layout-gutter) * 2));
  overflow-y: auto;
}

.search-section {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: var(--card-gap);
  padding: var(--panel-padding);
}

.search-row {
  display: flex;
  gap: 0.6rem;
}

.search-bar {
  position: relative;
  flex: 1;
}

.search-bar.publisher-bar {
  flex: 0 0 220px;
}

.search-bar svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem 0.65rem 2.4rem;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}

.search-bar input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(97, 48, 174, 0.12);
}

.search-stats {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.search-stats strong {
  color: var(--text-secondary);
  font-weight: 700;
}

.active-filter-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 44px;
  padding-top: 0.45rem;
}

.active-filter-summary:empty {
  display: none;
}

.active-filter-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.active-filter-chips {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.active-filter-chips span {
  background: var(--primary-light);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.25rem 0.5rem;
}

.active-filter-clear,
.empty-clear-btn {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  min-height: 44px;
  padding: 0 0.25rem;
}

.active-filter-clear:hover,
.empty-clear-btn:hover {
  text-decoration: underline;
}

.filter-panel {
  background: var(--bg-sidebar);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.filter-panel-header {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--primary);
  background: var(--bg-sidebar);
  border: 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  text-align: left;
}

.filter-panel.collapsed .filter-panel-header {
  border-bottom: 0;
}

.filter-panel-header .toggle-icon {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.filter-panel.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.filter-panel.collapsed .filter-panel-body {
  display: none;
}

.filter-panel-body {
  padding: 0.6rem 1rem;
  max-height: 260px;
  overflow-y: auto;
}

:is(#filter-year, #filter-platform) .filter-panel-body {
  max-height: 126px;
}

.filter-panel-body::-webkit-scrollbar {
  width: 4px;
}

.filter-panel-body::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 4px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.3rem 0;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.filter-checkbox:hover {
  color: var(--text);
}

.filter-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.filter-checkbox .count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 600;
}

.filter-clear-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
  color: var(--primary);
  cursor: pointer;
  transition: background 0.15s;
}

.filter-clear-btn:hover {
  background: var(--primary-light);
}

.filter-clear-btn.hidden {
  display: none;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.game-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius);
  padding: var(--card-padding);
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.game-card:hover {
  border-color: var(--border-hover);
  border-left-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.game-card:focus-visible {
  border-color: var(--primary);
  border-left-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(97, 48, 174, 0.16), var(--shadow-hover);
  outline: none;
}

.game-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

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

.game-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.game-title mark {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 2px;
  padding: 0 2px;
}

.game-publisher {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.game-publisher mark {
  background: var(--primary-light);
  color: var(--primary-hover);
  border-radius: 2px;
  padding: 0 2px;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.game-meta-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.game-meta-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0;
}

.game-meta-value {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.descriptor-preview {
  display: flex;
  flex: 1 1 220px;
  min-width: 180px;
}

.game-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  letter-spacing: 0;
  color: #fff;
}

.rating-badge[data-rating="7"] {
  background: var(--r3);
}

.rating-badge[data-rating="4"] {
  background: var(--r7);
}

.rating-badge[data-rating="5"] {
  background: var(--r13);
  color: #1a1a1a;
}

.rating-badge[data-rating="28"] {
  background: var(--r15);
}

.rating-badge[data-rating="6"] {
  background: var(--r18);
}

.rating-badge[data-rating="35"] {
  background: #111827;
}

.view-detail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  padding: 0.25rem 0;
  transition: color 0.15s;
  white-space: nowrap;
}

.view-detail:hover {
  color: var(--primary);
}

.detail-page {
  display: none;
}

.detail-page.active {
  display: block;
}

.list-view.hidden {
  display: none;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  transition: none;
}

.detail-back:hover {
  opacity: 0.7;
}

.detail-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
}

.detail-publisher {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.3rem;
}

.detail-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 800px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.85rem 1.5rem;
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.detail-label {
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0;
  padding-top: 0.15rem;
}

.detail-value {
  color: var(--text);
  line-height: 1.5;
}

.detail-value a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.detail-value a:hover {
  text-decoration: underline;
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.detail-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.detail-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.detail-share-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.detail-link-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.detail-link-btn img {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.detail-share-btn.copied {
  border-color: var(--r3);
  color: var(--r3);
}

.detail-steam-match {
  margin-top: 1rem;
}

.steam-match-panel {
  align-items: center;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  display: flex;
  gap: 0.85rem;
  justify-content: space-between;
  padding: 0.85rem;
  width: 100%;
}

.steam-match-panel-muted {
  justify-content: flex-start;
}

.steam-match-panel .loading-spinner {
  flex: 0 0 auto;
  height: 1.1rem;
  width: 1.1rem;
}

.steam-match-title {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.steam-match-status {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 0.2rem;
}

.steam-match-name {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 0.2rem;
}

.steam-match-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.steam-match-options {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  min-width: 0;
}

.steam-match-options .detail-link-btn {
  background: var(--bg);
  max-width: 100%;
}

.steam-match-appid {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.detail-sidebar {
  background: var(--bg-sidebar);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-sidebar-section {
  padding: 1rem;
}

.detail-sidebar-section+.detail-sidebar-section {
  border-top: 1px solid var(--border);
}

.detail-sidebar-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 0.6rem;
}

.rating-icon-link {
  display: inline-block;
  transition: transform 0.15s;
}

.rating-icon-link:hover {
  transform: scale(1.06);
}

.rating-icon-link img {
  width: 72px;
  height: auto;
  border-radius: 4px;
}

.descriptor-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.descriptor-icon {
  display: inline-block;
  position: relative;
}

.descriptor-icon img {
  width: 52px;
  height: auto;
  border-radius: 4px;
}

.descriptor-icon .tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 0.6rem;
  background: var(--text);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}

.descriptor-icon:hover .tooltip {
  opacity: 1;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-page);
}

.detail-no-descriptors {
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
}

.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.pagination-status {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pagination-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.page-jump-input {
  width: 3.15rem;
  height: 44px;
  padding: 0 0.35rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.page-jump-input:focus {
  border-color: var(--primary);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--text-light);
  font-weight: 600;
  padding: 0 0.2rem;
}

.empty-state {
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.6rem;
  color: var(--primary);
  opacity: 0.45;
}

.empty-state-svg {
  width: 2.4rem;
  height: 2.4rem;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.empty-state-desc {
  font-size: 0.8rem;
}

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.loading-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 0.6rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.page-container {
  max-width: var(--layout-page);
  margin: 0 auto;
  padding: var(--layout-gutter);
  flex: 1;
  width: 100%;
}

.ratings-page {
  max-width: var(--layout-page);
  padding-bottom: 3rem;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.section-title {
  font-size: 1.2rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: var(--layout-gap);
  font-weight: 400;
}

.ratings-page #ratings-list {
  display: grid;
  gap: var(--card-gap);
}

.rating-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: var(--card-padding);
  margin-bottom: 0;
  box-shadow: var(--shadow);
}

.rating-guide-card {
  display: grid;
  gap: 1rem;
}

.rating-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rating-card-header img {
  width: 52px;
  height: auto;
  border-radius: 4px;
}

.rating-card-title {
  font-size: 1rem;
  font-weight: 700;
}

.rating-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.rating-summary {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
  max-width: 76ch;
}

.rating-guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.rating-guide-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  background: var(--bg);
}

.rating-guide-item dt {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.rating-guide-item dd {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0;
}

.rating-watch-row {
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 0;
}

.rating-watch-row > span {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rating-watch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.rating-watch-tags span {
  background: var(--primary-light);
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.35rem 0.55rem;
}

.rating-official {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.rating-official summary {
  align-items: center;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 44px;
}

.rating-official[open] summary {
  margin-bottom: 0.5rem;
}

.rating-source {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.rating-source span {
  font-weight: 800;
  text-transform: uppercase;
}

.rating-source a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.rating-source a:hover {
  text-decoration: underline;
}

.rating-content {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.65;
  white-space: pre-line;
}

.descriptors-section {
  margin-top: var(--section-gap);
}

.descriptor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--card-gap);
}

.descriptor-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: var(--card-padding);
  box-shadow: var(--shadow);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.descriptor-guide-card {
  display: grid;
  grid-template-columns: 38px 1fr;
}

.descriptor-card img {
  width: 38px;
  height: auto;
  border-radius: 4px;
  flex-shrink: 0;
}

.descriptor-card-text {
  flex: 1;
  min-width: 0;
}

.descriptor-name {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.descriptor-alt {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.descriptor-summary {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0.4rem 0 0.6rem;
}

.descriptor-review-line {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.74rem;
  gap: 0.3rem 0.4rem;
  line-height: 1.35;
  margin-top: 0.35rem;
}

.descriptor-review-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.descriptor-review-items {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.descriptor-review-items span {
  background: var(--primary-light);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
}

.descriptor-review-items .descriptor-review-more {
  background: transparent;
  color: var(--text-muted);
  padding: 0;
}

.descriptor-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rating-card,
.descriptor-card,
.game-card {
  padding: var(--card-padding);
}

.steam-checker-page {
  max-width: var(--layout-wide);
  padding-bottom: 3rem;
}

.steam-checker-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--layout-gap);
  margin-bottom: var(--card-gap);
}

.steam-checker-shell {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: var(--panel-padding);
  box-shadow: var(--shadow);
}

.steam-checker-form {
  margin-bottom: 0.85rem;
}

.steam-checker-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}

.steam-checker-input-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.steam-checker-input-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: all 0.2s var(--ease);
}

.steam-checker-input-row input::placeholder {
  color: var(--text-light);
}

.steam-checker-input-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(97, 48, 174, 0.12);
}

.steam-checker-submit {
  min-height: 44px;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.steam-checker-submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.steam-checker-status {
  min-height: 1.1rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.steam-checker-layout {
  display: flex;
  gap: var(--layout-gap);
  align-items: flex-start;
}

.steam-checker-main {
  flex: 1;
  min-width: 0;
}

.steam-checker-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--layout-gutter);
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.steam-rating-img {
  width: 60px;
  height: auto;
  border-radius: 5px;
  box-shadow: var(--shadow);
}

.steam-rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
}

.steam-result-card {
  margin-bottom: 1rem;
}

.steam-result-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.steam-result-title-block {
  min-width: 0;
}

.steam-result-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.steam-result-store-btn {
  white-space: nowrap;
}

.steam-result-description-shell {
  margin-top: 0.9rem;
}

.steam-description {
  color: var(--text-secondary);
  display: grid;
  font-size: 0.95rem;
  gap: 1rem;
  line-height: 1.65;
  max-width: 72ch;
  overflow-wrap: anywhere;
}

.steam-description p {
  margin: 0;
}

.steam-description-intro {
  display: grid;
  gap: 0.55rem;
}

.steam-description-section {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.5rem;
  padding-top: 0.75rem;
}

.steam-description h3 {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.steam-description-list {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steam-description-list li {
  padding-left: 0.95rem;
  position: relative;
}

.steam-description-list li::before {
  background: var(--primary);
  border-radius: 50%;
  content: "";
  height: 0.32rem;
  left: 0.1rem;
  opacity: 0.72;
  position: absolute;
  top: 0.72em;
  width: 0.32rem;
}

.steam-checker-meta {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.steam-checker-meta-row {
  margin-bottom: 0.5rem;
}

.steam-review-summary-card {
  display: grid;
  gap: 0.75rem;
}

.steam-review-score {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.steam-review-rate {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: -0.35rem;
}

.steam-review-metrics {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.steam-review-metrics div:first-child {
  grid-column: 1 / -1;
}

.steam-review-metrics dt {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.1rem;
  text-transform: uppercase;
}

.steam-review-metrics dd {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  margin: 0;
}

.steam-checker-support-link {
  color: var(--primary);
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.steam-actions {
  margin-top: 1rem;
}

.rating-card-kicker {
  margin-bottom: 0.5rem;
}

.steam-rating-badge-muted {
  background: var(--bg-page);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.fallback-page {
  display: grid;
  max-width: var(--layout-readable);
  min-height: calc(100vh - 220px);
  place-items: center;
}

.fallback-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.35rem, 4vw, 2.5rem);
  text-align: center;
  width: 100%;
}

.fallback-icon {
  align-items: center;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--primary);
  display: inline-flex;
  height: 3.25rem;
  justify-content: center;
  margin-bottom: 0rem;
  width: 3.25rem;
}

.fallback-icon .ui-icon {
  height: 1.55rem;
  width: 1.55rem;
}

.fallback-kicker {
  color: var(--primary);
  font-size: 8rem;
  font-weight: 800;
  letter-spacing: 10;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.fallback-card .page-subtitle {
  margin-left: auto;
  margin-right: auto;
  max-width: 52ch;
}

.fallback-help {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0.75rem auto 0;
  max-width: 62ch;
}

.fallback-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.4rem;
}

.fallback-actions .hero-btn,
.fallback-actions .detail-link-btn {
  min-height: 44px;
}

.site-footer {
  background: #f1f1f1;
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  justify-content: center;
  line-height: 1.5;
  padding: 0 var(--layout-gutter);
}

.footer-copyright {
  align-items: center;
  display: inline-flex;
  gap: 0.2rem;
  white-space: nowrap;
}

.footer-copyright .ui-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.footer-separator {
  color: var(--text-light);
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--primary);
}

.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 50;
  box-shadow: var(--shadow);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
    align-items: stretch;
  }
  
  .app-layout.detail-active {
    flex-direction: column;
    align-items: stretch;
  }
  
  .app-layout.detail-active .sidebar {
    order: 6;
  }

  .main-content {
    display: contents;
  }
  
  .search-section { order: 1; margin-bottom: 0.5rem; }
  .sidebar { order: 2; margin-bottom: 0.5rem; }
  #list-view { order: 4; }
  #detail-page { order: 5; }

  .sidebar {
    width: 100%;
    position: static;
    flex-direction: column;
    max-height: none;
    gap: 0.6rem;
  }

  .sidebar .filter-panel,
  .sidebar .detail-sidebar {
    width: 100%;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 2rem;
  }

  .steam-checker-hero {
    flex-direction: column;
  }

  .steam-checker-layout {
    flex-direction: column;
  }

  .steam-checker-sidebar {
    width: 100%;
    position: static;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 14px;
  }

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 0 1rem;
  }

  .header-top {
    position: static;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    padding-right: 4.75rem;
    min-width: 0;
    width: auto;
    order: 1;
  }

  .header-actions {
    flex: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    order: 2;
    width: auto;
  }

  .header-actions .btn,
  .header-lang-toggle {
    font-size: 0.72rem;
    padding: 0.42rem 0.68rem;
  }

  .header-actions .btn {
    width: 100%;
    white-space: normal;
  }

  .header-lang-toggle {
    background: #fff;
    border-color: #fff;
    color: var(--primary);
    margin-left: 0;
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 2;
  }

  .steam-result-header {
    flex-direction: column;
  }

  .steam-result-header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .steam-result-store-btn {
    width: 100%;
  }

  .page-jump {
    margin-top: 0.15rem;
  }

  .page-jump-input {
    width: 3.2rem;
    height: 44px;
    font-size: 0.7rem;
  }

  .pagination-center {
    width: 100%;
    order: 2;
  }

  .search-row {
    flex-direction: column;
  }

  .search-bar.publisher-bar {
    flex: 1;
  }

  .game-card-top {
    flex-direction: column;
  }

  .game-card-right {
    align-items: flex-start;
    width: 100%;
  }

  .descriptor-preview {
    flex-basis: 100%;
    min-width: 0;
  }

  .game-card-meta {
    gap: 0.65rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-card {
    padding: 1.25rem;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-title {
    font-size: 1.65rem;
  }

  .detail-description {
    font-size: 0.95rem;
  }

  .rating-guide-list,
  .descriptor-grid {
    grid-template-columns: 1fr;
  }

  .rating-watch-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-logo {
    width: 180px;
    margin-bottom: -1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .steam-checker-shell {
    padding: 1rem;
    border-radius: var(--radius);
  }

  .steam-checker-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .steam-checker-submit {
    width: 100%;
  }
}

.fade-in {
  animation: fadeIn 0.25s var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
