:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #232838;
  --muted: #616b82;
  --line: #dde5f1;
  --accent: #ff7d21;
  --accent-strong: #ea6810;
  --accent-soft: rgba(255, 125, 33, 0.12);
  --shadow: 0 10px 30px rgba(32, 48, 88, 0.08);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --max-width: 1120px;
  --font-ui: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f6fc 100%);
  color: var(--text);
  font-family: var(--font-ui);
  overflow-x: hidden;
}

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

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

input,
button {
  font: inherit;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.category-strip__inner,
.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  flex-shrink: 0;
}

.brand__logo {
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
}

.brand__name {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-form input {
  width: min(260px, 48vw);
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}

.search-form button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff8c34 0%, var(--accent) 100%);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.category-strip {
  background: #fff;
  border-bottom: 3px solid var(--accent);
}

.category-strip__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 12px 0;
}

.category-pill,
.category-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.category-pill:not(:last-child)::after,
.category-link:not(:last-child)::after {
  content: "\2022";
  margin-left: 18px;
  color: #c3cada;
}

.page-shell {
  padding: 34px 0 48px;
}

.game-card,
.content-section,
.related-section,
.faq-section {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.game-card {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  padding: 18px;
}

.game-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #edf4fd 0%, #f7fbff 100%);
}

.game-card__media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
}

.game-card__content {
  display: flex;
  flex-direction: column;
}

.game-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.game-card__content h1,
.game-card__content p {
  margin: 0;
}

.game-card__content h1 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.05;
}

.game-description {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.game-actions {
  margin-top: 22px;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #ff8c34 0%, var(--accent) 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(255, 125, 33, 0.2);
}

.details-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.detail-item span,
.detail-item strong {
  display: block;
}

.detail-item span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-item strong {
  margin-top: 8px;
  line-height: 1.45;
}

.content-section,
.related-section,
.faq-section {
  margin-top: 22px;
  padding: 20px 18px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading p {
  margin-top: 8px;
  color: var(--muted);
}

.rich-text {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.rich-text > *:first-child {
  margin-top: 0;
}

.rich-text p,
.rich-text ul,
.rich-text ol {
  margin: 0 0 14px;
}

.rich-text h3 {
  margin: 22px 0 10px;
  color: var(--text);
  font-size: 1.08rem;
}

.rich-text ul,
.rich-text ol {
  padding-left: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  min-height: 188px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(32, 48, 88, 0.05);
}

.related-card__top {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.related-card__image {
  display: block;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 14px;
  background: #eef4fc;
}

.related-card__image img {
  height: 100%;
  object-fit: cover;
}

.related-card__content {
  min-width: 0;
}

.related-card__content h3,
.related-card__content p {
  margin: 0;
}

.related-card__content h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.related-card__description {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.related-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.related-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 125, 33, 0.28);
  border-radius: var(--radius-pill);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.related-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #ff8c34 0%, var(--accent) 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 800;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item__body {
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.site-footer__inner {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 26px;
}

.site-footer__left,
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer__links a:hover,
.site-footer__left a:hover,
.site-footer__links a:focus-visible,
.site-footer__left a:focus-visible {
  color: var(--text);
}

@media (max-width: 860px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-form {
    width: 100%;
  }

  .search-form input {
    width: 100%;
  }

  .game-card {
    grid-template-columns: 1fr;
  }

  .content-section,
  .related-section,
  .faq-section {
    padding: 18px 16px;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .header-inner,
  .category-strip__inner,
  .page-shell {
    width: min(calc(100% - 24px), var(--max-width));
  }

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

  .search-form {
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
  }

  .search-form button {
    width: 100%;
  }

  .category-strip__inner {
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .category-strip__inner::-webkit-scrollbar {
    display: none;
  }

  .category-pill,
  .category-link {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface-soft);
  }

  .category-pill:not(:last-child)::after,
  .category-link:not(:last-child)::after {
    content: none;
  }

  .game-card,
  .content-section,
  .related-section,
  .faq-section {
    padding: 18px 16px;
  }

  .game-card {
    gap: 16px;
  }

  .game-card__media {
    min-height: 280px;
    padding: 14px;
  }

  .game-card__media img {
    max-height: 280px;
  }

  .game-card__content h1 {
    font-size: 1.95rem;
  }

  .game-description,
  .section-heading p,
  .rich-text,
  .faq-item__body {
    font-size: 1rem;
    line-height: 1.65;
  }

  .play-button {
    width: 100%;
  }

  .details-panel {
    grid-template-columns: 1fr;
  }

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

  .related-card {
    min-height: 0;
    padding: 14px;
  }

  .related-card__top {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .related-card__image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .related-card__description {
    -webkit-line-clamp: 4;
  }

  .related-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .related-card__cta {
    width: auto;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
