:root {
  --ink: #26304f;
  --muted: #6f7895;
  --line: #e8e9f3;
  --lavender: #7864dc;
  --lavender-soft: #f0edff;
  --pink: #f17eb5;
  --pink-soft: #fff0f7;
  --blue: #5b9ef0;
  --blue-soft: #edf6ff;
  --gold: #e8ad55;
  --page: #f8f9fd;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 1360px;
  background: var(--page);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.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;
}

.site-header {
  background: var(--white) url("assets/header-anime-bg.png") center 52% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.brand-bar,
.page,
.site-footer {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
}

.brand-bar {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto minmax(360px, 1fr);
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 15px;
}

.brand-name {
  color: #34406a;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
}

.brand small {
  color: #8a91aa;
  font-size: 13px;
  letter-spacing: 1px;
}

.quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.quick-nav a {
  position: relative;
  color: #4f5875;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.quick-nav a:hover,
.quick-nav a.active {
  color: var(--lavender);
}

.quick-nav a + a {
  padding-left: 28px;
  border-left: 1px solid rgba(113, 108, 157, 0.24);
}

.search {
  width: 410px;
  height: 40px;
  display: grid;
  grid-template-columns: 1fr 74px;
  overflow: hidden;
  background: rgba(250, 250, 255, 0.92);
  border: 1px solid #dedff0;
  border-radius: 12px;
  justify-self: end;
}

.search input {
  min-width: 0;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}

.search input:focus {
  box-shadow: inset 0 0 0 2px #b7acf1;
}

.search button {
  color: var(--white);
  background: var(--lavender);
  border: 0;
  cursor: pointer;
}

.search button:hover {
  background: #6651ca;
}

.page {
  padding: 12px 0 42px;
}

.breadcrumb {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8990a7;
}

.breadcrumb a:hover {
  color: var(--lavender);
}

.page-layout {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.side-panel,
.game-card,
.recommend-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(56, 64, 105, 0.05);
}

.left-sidebar,
.right-sidebar {
  display: grid;
  gap: 18px;
}

.side-title {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.side-title span,
.side-title h3 {
  margin: 0;
  color: var(--lavender);
  font-size: 19px;
  font-weight: 800;
}

.topic-list {
  padding: 10px;
}

.topic-list a {
  min-height: 50px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #59617c;
  border-radius: 9px;
}

.topic-list a + a {
  margin-top: 2px;
}

.topic-list a:hover,
.topic-list a.active {
  color: var(--lavender);
  background: var(--lavender-soft);
}

.main-column {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.game-card {
  padding: 22px;
}

.game-summary {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: 24px;
}

.game-cover {
  width: 226px;
  height: 226px;
  object-fit: cover;
  border: 1px solid #dedff0;
  border-radius: 16px;
}

.game-copy {
  min-width: 0;
}

h1 {
  margin: 0;
  color: #202944;
  font-size: 32px;
  line-height: 1.35;
}

.game-copy h1 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.intro {
  margin: 12px 0 14px;
  display: -webkit-box;
  overflow: hidden;
  color: #5e6680;
  font-size: 15px;
  line-height: 1.85;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.game-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.game-tags a,
.recommend-item small {
  color: #6855ca;
  background: var(--lavender-soft);
  border-radius: 6px;
}

.game-tags a {
  min-width: 0;
  padding: 5px 11px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-tags a:hover {
  color: #fff;
  background: var(--lavender);
}

.resource-meta {
  margin: 20px 0 0;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fbfaff;
  border: 1px solid #e1dcfb;
  border-radius: 10px;
}

.resource-meta div {
  padding: 0 16px;
}

.resource-meta div + div {
  border-left: 1px solid var(--line);
}

.resource-meta dt {
  color: #9096aa;
  font-size: 12px;
}

.resource-meta dd {
  margin: 2px 0 0;
  color: #39415c;
  font-size: 15px;
  font-weight: 700;
}

.resource-action {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
}

.download-button {
  min-height: 38px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--lavender);
  border-radius: 24px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(120, 100, 220, 0.22);
}

.download-button:hover {
  background: #6651ca;
  transform: translateY(-1px);
}

.feature-panel {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #eadff6;
  border-radius: 12px;
}

.feature-banner {
  min-height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--white);
  background: #9a86e8;
}

.feature-banner h2 {
  margin: 0;
  font-size: 18px;
}

.feature-list article {
  min-height: 68px;
  padding: 13px 18px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.feature-list article + article {
  border-top: 1px solid var(--line);
}

.feature-list strong {
  color: #323b59;
  font-size: 15px;
}

.feature-list p {
  margin: 0;
  color: #737b93;
}

.recommend-panel {
  padding: 18px;
}

.recommend-title {
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.recommend-title h2,
.recommend-title h3 {
  margin: 0;
  color: #343d5a;
  font-size: 18px;
}

.recommend-item {
  padding: 13px 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
}

.recommend-item + .recommend-item {
  border-top: 1px solid var(--line);
}

.recommend-item.compact {
  min-height: 48px;
  grid-template-columns: 1fr;
  align-items: start;
  row-gap: 0;
}

.recommend-item.compact .mini-tags {
  margin-top: 5px;
}

.recommend-item img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.recommend-item > span {
  min-width: 0;
  display: grid;
  align-content: center;
}

.recommend-item strong {
  overflow: hidden;
  color: #343d5a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-tags {
  margin-top: 5px;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.recommend-item > .mini-tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.mini-tags a {
  min-width: 0;
  padding: 2px 6px;
  color: #6855ca;
  background: var(--lavender-soft);
  border-radius: 5px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-tags a:hover {
  color: #fff;
  background: var(--lavender);
}

.recommend-item strong a:hover {
  color: var(--lavender);
}

.category-layout {
  grid-template-columns: 228px minmax(0, 1fr) 300px;
}

.category-layout .left-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
}

.page-layout:not(.category-layout) > .left-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
}

.category-card,
.game-list-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(56, 64, 105, 0.05);
}

.category-heading {
  padding: 22px 24px 18px;
  background: linear-gradient(110deg, #f4f0ff 0%, #fff5fa 100%);
}

.category-heading h1 {
  font-size: 26px;
}

.category-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.category-tags {
  padding: 16px 22px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.category-tags a {
  color: #6855ca;
  background: var(--lavender-soft);
  border-radius: 7px;
}

.category-tags a {
  padding: 6px 12px;
}

.category-tags a:hover,
.category-tags a.active {
  color: var(--white);
  background: var(--lavender);
}

.list-heading {
  min-height: 58px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.list-heading h2 {
  margin: 0;
  font-size: 19px;
}

.category-game-item {
  min-height: 150px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.category-game-item + .category-game-item {
  border-top: 1px solid var(--line);
}

.category-cover img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border: 1px solid #e2e3ee;
  border-radius: 14px;
}

.category-game-copy {
  min-width: 0;
}

.category-game-copy h3 {
  margin: 0;
  overflow: hidden;
  color: #2d3654;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-game-copy h3 a:hover {
  color: var(--lavender);
}

.category-game-copy p {
  margin: 7px 0 10px;
  display: -webkit-box;
  overflow: hidden;
  color: #737b93;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-game-copy .game-tags a {
  padding: 3px 8px;
}

.pagination {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.pagination a,
.pagination span {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  color: #737b93;
  background: #f6f6fb;
  border-radius: 7px;
}

.pagination a:hover,
.pagination .current {
  color: var(--white);
  background: var(--lavender);
}

.pagination .next {
  min-width: 68px;
}

.home-page {
  padding-top: 22px;
}

.error-page {
  width: min(1440px, calc(100% - 48px));
  min-height: 0;
  margin: 0 auto;
  padding: 22px 0 42px;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.error-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.error-body .error-page {
  flex: 1;
}

.error-card {
  width: 100%;
  align-self: stretch;
  padding: 46px 64px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 15% 18%, rgba(241, 126, 181, 0.13), transparent 25%),
    radial-gradient(circle at 85% 22%, rgba(120, 100, 220, 0.16), transparent 30%),
    var(--white);
  border: 1px solid #e5e1f6;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(56, 64, 105, 0.08);
}

.error-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--lavender);
  font-size: 86px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -5px;
}

.error-code i {
  width: 76px;
  height: 76px;
  display: block;
  background:
    radial-gradient(circle at 34% 34%, #fff 0 7%, transparent 8%),
    linear-gradient(145deg, #b6a6f2, #7864dc 58%, #5742b9);
  border: 7px solid #eeeaff;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(120, 100, 220, 0.28);
}

.error-label {
  margin: 18px 0 3px;
  color: var(--pink);
  font-weight: 700;
}

.error-card h1 {
  font-size: 28px;
}

.error-desc {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.error-actions a {
  min-width: 124px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-weight: 700;
}

.error-primary {
  color: var(--white);
  background: var(--lavender);
  box-shadow: 0 8px 18px rgba(120, 100, 220, 0.22);
}

.error-primary:hover {
  background: #6651ca;
}

.error-secondary {
  color: var(--lavender);
  background: var(--lavender-soft);
}

.error-secondary:hover {
  background: #e5dfff;
}

.error-links {
  margin-top: 30px;
  padding-top: 20px;
  display: flex;
  justify-content: center;
  gap: 22px;
  color: #7c839a;
  border-top: 1px solid var(--line);
}

.error-links a:hover {
  color: var(--lavender);
}

.site-footer {
  min-height: 110px;
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8b91a4;
  border-top: 1px solid var(--line);
}

.site-footer strong {
  color: #4a526e;
  font-size: 17px;
}

.site-footer p {
  margin: 2px 0 0;
}

.site-footer > div {
  text-align: right;
}

.site-footer nav {
  display: flex;
  gap: 24px;
}

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