:root {
  color-scheme: dark;
  --bg: #101114;
  --bg-soft: #15181d;
  --surface: #1b1f26;
  --surface-strong: #252a33;
  --text: #f7f3ea;
  --muted: #b9c0c9;
  --line: #343b46;
  --coral: #ff6b57;
  --gold: #f6c453;
  --teal: #31d0a7;
  --violet: #8f7cff;
  --shadow: rgba(0, 0, 0, 0.34);
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, #101114 0%, #151216 48%, #11181b 100%);
  background-size:
    72px 72px,
    72px 72px,
    auto;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 17, 20, 0.9);
  backdrop-filter: blur(16px);
}

.nav-bar {
  display: flex;
  width: min(100% - 2rem, 1180px);
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  object-fit: cover;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  min-height: 40px;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.catalog-section {
  width: min(100% - 2rem, 1180px);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 2rem 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

.section-label,
.game-badge {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section-label {
  margin: 0 0 0.75rem;
}

.section-heading h1,
.game-placeholder h1 {
  margin: 0;
  font-size: 2.75rem;
  line-height: 1.08;
}

.section-heading p:not(.section-label),
.game-content p,
.game-placeholder p,
.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.section-heading p:not(.section-label) {
  margin: 1rem 0 0;
  font-size: 1.02rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.game-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 42, 51, 0.96), rgba(27, 31, 38, 0.94));
  box-shadow: 0 22px 60px var(--shadow);
}

.game-cover-wrap,
.placeholder-icon {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: var(--surface-strong);
  overflow: hidden;
}

.game-cover-wrap {
  width: 100%;
  aspect-ratio: 1;
}

.game-cover,
.placeholder-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.game-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(49, 208, 167, 0.42);
  border-radius: 8px;
  background: rgba(49, 208, 167, 0.08);
}

.game-content h2 {
  margin: 0.9rem 0 0.65rem;
  font-size: 1.36rem;
  line-height: 1.16;
}

.game-content p {
  margin: 0 0 1.35rem;
}

.enter-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: auto;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(246, 196, 83, 0.52);
  border-radius: 8px;
  color: #17120f;
  background: linear-gradient(135deg, var(--gold), var(--coral));
  box-shadow: 0 12px 28px rgba(255, 107, 87, 0.22);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    box-shadow 160ms ease;
}

.enter-button:hover,
.enter-button:focus-visible {
  filter: brightness(1.04);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(255, 107, 87, 0.3);
}

.enter-button:disabled {
  border-color: rgba(185, 192, 201, 0.24);
  color: rgba(247, 243, 234, 0.58);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: not-allowed;
}

.enter-button:disabled:hover {
  filter: none;
  transform: none;
  box-shadow: none;
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 9, 11, 0.76);
  backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
  display: none;
}

.game-modal {
  position: relative;
  width: min(100%, 460px);
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 42, 51, 0.98), rgba(18, 21, 26, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.game-modal h2 {
  margin: 1rem 2.5rem 0.75rem 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.game-modal p {
  margin: 0 0 1.35rem;
  color: var(--muted);
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.modal-confirm {
  width: 100%;
}

.placeholder-main {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: center;
  padding: 4rem 1rem;
}

.game-placeholder {
  width: min(100%, 560px);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 31, 38, 0.94);
  box-shadow: 0 22px 60px var(--shadow);
  text-align: center;
}

.placeholder-icon {
  width: 132px;
  height: 132px;
  margin: 0 auto 1.25rem;
}

.game-placeholder .game-badge {
  justify-content: center;
}

.game-placeholder h1 {
  margin-top: 1rem;
}

.game-placeholder p {
  margin: 0.85rem 0 1.35rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0e1013;
}

.footer-inner {
  display: flex;
  width: min(100% - 2rem, 1180px);
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.footer-inner strong {
  display: block;
  margin-bottom: 0.35rem;
}

.footer-inner p {
  margin: 0;
}

.footer-records {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

@media (max-width: 720px) {
  .nav-bar {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 0;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-links a {
    text-align: center;
  }

  .catalog-section {
    min-height: auto;
    padding: 3rem 0;
  }

  .section-heading h1,
  .game-placeholder h1 {
    font-size: 2.2rem;
  }

  .footer-inner {
    display: grid;
  }

  .footer-records {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .brand span {
    white-space: normal;
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

  .game-card,
  .game-placeholder {
    padding: 0.9rem;
  }

  .enter-button {
    width: 100%;
  }
}
