:root {
  --pg-primary: #1faa38;
  --pg-primary-dark: #168a2c;
  --pg-accent: #e84d3d;
  --pg-gold: #f5c518;
  --pg-lime: #7cff3a;
  --pg-bg: #07140c;
  --pg-bg-2: #0d2215;
  --pg-surface: #12301c;
  --pg-text: #f4f7f2;
  --pg-muted: rgba(244, 247, 242, 0.72);
  --pg-border: rgba(244, 247, 242, 0.12);
  --pg-link: #9dff6a;
  --pg-header: rgba(7, 20, 12, 0.92);
  --pg-radius: 18px;
  --pg-max: 1120px;
  --pg-sticky-h: calc(56px + env(safe-area-inset-bottom, 0px));
}

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

html {
  background: var(--pg-bg);
  color: var(--pg-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

@media (min-width: 1024px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #0a1c11 0%, var(--pg-bg) 28%, #06110a 100%);
  padding-bottom: var(--pg-sticky-h);
}

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

a {
  color: var(--pg-link);
}

.pg-wrap {
  width: 100%;
  max-width: 2048px;
  margin: 0 auto;
  min-width: 0;
}

.pg-container {
  width: 100%;
  max-width: var(--pg-max);
  margin: 0 auto;
  padding: 0 14px;
}

@media (min-width: 768px) {
  .pg-container {
    padding: 0 20px;
  }
}

/* Buttons */
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  color: #fff;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
  .pg-btn {
    min-height: 48px;
    padding: 12px 22px;
    font-size: 16px;
  }
}

.pg-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.pg-btn--main {
  background: linear-gradient(180deg, var(--pg-lime) 0%, var(--pg-primary) 55%, var(--pg-primary-dark) 100%);
  color: #06200c;
  box-shadow: 0 8px 22px rgba(31, 170, 56, 0.35);
}

.pg-btn--ghost {
  background: transparent;
  border-color: var(--pg-lime);
  color: var(--pg-text);
}

.pg-btn--shine {
  position: relative;
  overflow: hidden;
}

.pg-btn--shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.55), transparent 60%);
  transform: skewX(-20deg);
  animation: pg-shine 3.4s infinite;
}

@keyframes pg-shine {
  0% { left: -75%; }
  40% { left: 125%; }
  100% { left: 125%; }
}

/* Header */
.pg-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 8px 0;
  background: transparent;
}

.pg-header__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 10px;
  border: 1px solid var(--pg-border);
  border-radius: 999px;
  background: var(--pg-header);
  backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
  .pg-header__bar {
    min-height: 64px;
    padding: 8px 16px;
  }
}

.pg-header__menu {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--pg-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

@media (min-width: 900px) {
  .pg-header__menu {
    display: none;
  }
}

.pg-header__logo {
  display: flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
  flex: 0 0 auto;
}

.pg-header__logo img {
  width: 110px;
  height: 42px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .pg-header__logo img {
    width: 130px;
    height: 50px;
  }
}

.pg-nav {
  display: none;
}

.pg-header.is-open .pg-nav {
  display: block;
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(100% - 4px);
  background: var(--pg-bg-2);
  border: 1px solid var(--pg-border);
  border-radius: 18px;
  padding: 18px 16px 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

@media (min-width: 900px) {
  .pg-nav,
  .pg-header.is-open .pg-nav {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
  }
}

.pg-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

@media (min-width: 900px) {
  .pg-nav ul {
    flex-direction: row;
    gap: 18px;
  }
}

.pg-nav a {
  color: var(--pg-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}

.pg-nav a:hover,
.pg-nav a[aria-current="page"] {
  color: var(--pg-lime);
}

.pg-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pg-header__actions .pg-btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
}

@media (min-width: 768px) {
  .pg-header__actions .pg-btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
  }
}

.pg-header__actions .pg-btn--ghost {
  display: none;
}

@media (min-width: 480px) {
  .pg-header__actions .pg-btn--ghost {
    display: inline-flex;
  }
}

/* Hero — CLS-safe picture block */
.pg-hero {
  padding: 8px 0 18px;
}

.pg-hero__frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--pg-border);
  background: #0a1a10;
  aspect-ratio: 800 / 1000;
}

@media (min-width: 768px) {
  .pg-hero__frame {
    aspect-ratio: 1920 / 600;
  }
}

.pg-hero__frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.pg-hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pg-hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.pg-hero__cta .pg-btn {
  flex: 1 1 160px;
  max-width: 280px;
}

/* Games */
.pg-games {
  padding: 8px 0 20px;
}

.pg-games__group + .pg-games__group {
  margin-top: 22px;
}

.pg-games__title {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--pg-gold);
}

.pg-games__title::before,
.pg-games__title::after {
  content: "";
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pg-primary), transparent);
}

.pg-games__list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  margin: 0 -14px;
  padding: 2px 14px 10px;
}

.pg-games__list::-webkit-scrollbar {
  height: 4px;
}

.pg-games__list::-webkit-scrollbar-thumb {
  background: rgba(124, 255, 58, 0.35);
  border-radius: 999px;
}

.pg-game {
  flex: 0 0 38%;
  min-width: 118px;
  max-width: 148px;
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--pg-text);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--pg-border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pg-game:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 255, 58, 0.35);
}

.pg-game__media {
  aspect-ratio: 1 / 1;
  background: #102418;
  position: relative;
  overflow: hidden;
}

.pg-game__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pg-game__meta {
  padding: 8px 8px 10px;
}

.pg-game__name {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pg-game__provider {
  margin: 0;
  font-size: 0.68rem;
  color: var(--pg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 600px) {
  .pg-game {
    flex-basis: 28%;
    max-width: 160px;
  }
}

@media (min-width: 900px) {
  .pg-games__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
    scroll-snap-type: none;
    margin: 0;
    padding: 2px 0 0;
  }

  .pg-game {
    flex: unset;
    min-width: 0;
    max-width: none;
    scroll-snap-align: unset;
  }

  .pg-game__meta {
    padding: 10px 10px 12px;
  }

  .pg-game__name {
    font-size: 0.82rem;
    white-space: normal;
  }

  .pg-game__provider {
    font-size: 0.72rem;
    white-space: normal;
  }
}

/* TOC */
.pg-toc {
  margin: 8px 0 22px;
}

.pg-toc__box {
  border: 1px solid var(--pg-border);
  border-radius: var(--pg-radius);
  background: rgba(18, 48, 28, 0.55);
  overflow: hidden;
}

.pg-toc__trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  color: var(--pg-text);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
}

.pg-toc__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.pg-toc__box.is-open .pg-toc__icon {
  transform: rotate(180deg);
}

.pg-toc__panel {
  display: none;
  padding: 0 18px 18px 34px;
}

.pg-toc__box.is-open .pg-toc__panel {
  display: block;
}

.pg-toc__panel ol {
  margin: 0;
  padding-left: 1.1rem;
}

.pg-toc__panel li + li {
  margin-top: 6px;
}

.pg-toc__panel a {
  color: var(--pg-text);
  text-decoration: none;
}

.pg-toc__panel a:hover {
  color: var(--pg-lime);
}

/* Content */
.pg-content {
  color: var(--pg-text);
  padding: 4px 0 28px;
}

.pg-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
  font-weight: 800;
}

.pg-content h2 {
  margin: 1.8rem 0 0.7rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  scroll-margin-top: 90px;
}

.pg-content h3 {
  margin: 1.3rem 0 0.55rem;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
  scroll-margin-top: 90px;
}

.pg-content p {
  margin: 0.9rem 0;
}

.pg-content ul,
.pg-content ol {
  padding-left: 1.35rem;
}

.pg-content li + li {
  margin-top: 0.45rem;
}

.pg-content a {
  color: var(--pg-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.pg-content small {
  display: block;
  margin-top: 1.5rem;
  color: var(--pg-muted);
}

.pg-content form {
  margin: 1.2rem 0 1.6rem;
  padding: 18px 16px;
  border: 1px solid var(--pg-border);
  border-radius: 16px;
  background: rgba(18, 48, 28, 0.45);
}

.pg-content form label {
  font-weight: 700;
  font-size: 0.95rem;
}

.pg-content form input[type="text"],
.pg-content form input[type="email"],
.pg-content form select,
.pg-content form textarea {
  width: 100%;
  margin-top: 6px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--pg-border);
  border-radius: 12px;
  background: #07140c;
  color: var(--pg-text);
  font: inherit;
}

.pg-content form textarea {
  min-height: 140px;
  resize: vertical;
}

.pg-content form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
}

.pg-content form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pg-lime) 0%, var(--pg-primary) 55%, var(--pg-primary-dark) 100%);
  color: #06200c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pg-content form button[type="submit"]:hover {
  filter: brightness(1.08);
}

.pg-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.2rem 0;
  border-radius: 16px;
}

.pg-content table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--pg-text);
}

.pg-content th,
.pg-content td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--pg-border);
  border-left: 1px solid var(--pg-border);
  vertical-align: top;
  text-align: left;
}

.pg-content th:last-child,
.pg-content td:last-child {
  border-right: 1px solid var(--pg-border);
}

.pg-content tr:first-child th,
.pg-content tr:first-child td {
  border-top: 1px solid var(--pg-border);
}

.pg-content th {
  background: linear-gradient(180deg, #249c38, #187a2a);
  font-weight: 700;
}

.pg-content tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04);
}

.pg-content tr:first-child th:first-child,
.pg-content tr:first-child td:first-child {
  border-top-left-radius: 16px;
}

.pg-content tr:first-child th:last-child,
.pg-content tr:first-child td:last-child {
  border-top-right-radius: 16px;
}

.pg-content tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

.pg-content tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

.pg-content thead + tbody > tr:first-child td {
  border-radius: 0;
}

/* Footer */
.pg-footer {
  border-top: 1px solid var(--pg-border);
  background: #050e09;
  padding: 22px 0 18px;
}

.pg-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pg-footer__logo img {
  width: 120px;
  height: 46px;
  object-fit: contain;
}

.pg-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.pg-footer__nav a {
  color: var(--pg-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.pg-footer__nav a:hover {
  color: var(--pg-lime);
}

.pg-footer__mail {
  color: var(--pg-text);
  font-weight: 700;
  text-decoration: none;
}

.pg-footer__mail:hover {
  color: var(--pg-lime);
}

.pg-footer__bottom {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--pg-border);
  color: var(--pg-muted);
  font-size: 13px;
  text-align: center;
}

/* Sticky CTA */
.pg-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  min-height: var(--pg-sticky-h);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #1b8f32, #127028);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

.pg-sticky__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pg-sticky__copy {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

@media (min-width: 768px) {
  .pg-sticky__copy {
    font-size: 15px;
  }
}

.pg-sticky .pg-btn {
  flex: 0 0 auto;
  min-height: 40px;
  background: #07140c;
  color: #fff;
  box-shadow: none;
}

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