:root {
  --bg: #2b1f86;
  --bg-2: #241a74;
  --head: #1c1460;
  --panel: #33279a;
  --panel-2: #3c2fae;
  --line: rgba(255, 255, 255, .12);
  --white: #ffffff;
  --side: #ffffff;
  --side-text: #1b1747;
  --side-line: #ecebf5;
  --green: #22c55e;
  --green-2: #16a34a;
  --green-dark: #0f5132;
  --lime: #8bf35a;
  --yellow: #ffd21f;
  --red: #e5233c;
  --pink: #ef3f6b;
  --text: #ffffff;
  --muted: #b9b3ea;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 12px 30px rgba(8, 4, 40, .45);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  display: flex; flex-direction: column;
  font-family: var(--font); font-size: 14px; line-height: 1.45;
  color: var(--text); background: var(--bg);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; }

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

.ico {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 14px; font-style: normal; font-weight: 400; line-height: 1;
  user-select: none;
}
.ico--glyph { font-family: var(--font); font-weight: 800; font-size: 16px; }
.ico--green { filter: grayscale(1) sepia(1) hue-rotate(65deg) saturate(6) brightness(1.15); }
.ico--white { filter: grayscale(1) brightness(3); }

@media (min-width: 1100px) { .mobile-only { display: none !important; } }
@media (max-width: 1099px) { .desktop-only { display: none !important; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px; border-radius: 6px;
  font-size: 13px; font-weight: 800; text-transform: uppercase; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: scale(.97); }
.btn--yellow { background: var(--yellow); color: #1b1747; }
.btn--yellow:hover { background: #ffe066; }
.btn--dark { background: var(--panel); color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.btn--dark:hover { background: var(--panel-2); }
.btn--green { background: var(--green); color: #0b2b18; }
.btn--green:hover { background: var(--lime); }
.btn--ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--green); color: var(--green); }
.btn--lg { height: 46px; padding: 0 26px; font-size: 14px; }

.header { position: sticky; top: 0; z-index: 50; background: var(--head); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.header__inner { display: flex; align-items: center; gap: 18px; height: 60px; padding: 0 18px; }
.burger { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 6px; background: var(--panel); }
.burger .ico { font-size: 18px; }
.logo { display: flex; flex: none; align-items: center; }
.logo img { height: 40px; width: auto; }
.nav { display: flex; align-items: stretch; height: 100%; min-width: 0; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; white-space: nowrap;
  transition: color .2s;
}
.nav a:hover { color: var(--lime); }
.nav a.is-active { color: var(--green); }
.nav a.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--green); }
.nav .ico { width: 20px; height: 20px; font-size: 16px; }
.tag-new { position: absolute; top: 4px; right: 4px; padding: 1px 6px; border-radius: 3px; background: var(--green); color: #0b2b18; font-size: 9.5px; font-weight: 800; text-transform: none; line-height: 1.4; }
.header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.page { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; padding: 18px 18px 30px; width: 100%; max-width: 1600px; margin: 0 auto; }

.side { position: sticky; top: 78px; align-self: start; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 96px); }
.search { position: relative; }
.search input {
  width: 100%; height: 40px; padding: 0 12px 0 40px; border: 0; border-radius: 6px;
  background: #fff; color: var(--side-text); font-size: 14px; font-weight: 500; outline: none;
  box-shadow: 0 0 0 2px transparent; transition: box-shadow .2s;
}
.search input::placeholder { color: #8a87a8; }
.search input:focus { box-shadow: 0 0 0 2px var(--green); }
.search .ico { position: absolute; left: 12px; top: 50%; margin-top: -9px; filter: grayscale(1) brightness(.3); }
.cats { list-style: none; margin: 0; padding: 0; overflow-y: auto; border-radius: 6px; background: var(--side); scrollbar-width: thin; }
.cat {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 42px; padding: 0 12px; border-bottom: 1px solid var(--side-line);
  color: var(--side-text); font-size: 13px; font-weight: 600; text-align: left;
  transition: background .2s;
}
.cats li:last-child .cat { border-bottom: 0; }
.cat:hover { background: #f2f1fb; }
.cat__star { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%; color: var(--green); font-size: 17px; line-height: 1; }
.cat.is-active { background: #e9f9ef; font-weight: 800; }
.cat.is-active .cat__star { background: var(--green-dark); color: var(--lime); }
.cat__count { margin-left: auto; font-size: 12.5px; font-weight: 600; color: #5b5880; }

.promos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.promo { position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: transform .25s; }
.promo:hover { transform: translateY(-3px); }
.promo img { width: 100%; aspect-ratio: 600 / 260; object-fit: cover; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.toolbar__title { margin: 0; font-size: 15px; font-weight: 800; }
.provider { position: relative; }
.provider select {
  height: 36px; min-width: 210px; padding: 0 36px 0 12px; border: 0; border-radius: 6px;
  background: var(--panel); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line); appearance: none; -webkit-appearance: none; cursor: pointer; outline: none;
}
.provider select:focus { box-shadow: inset 0 0 0 1.5px var(--green); }
.provider select option { color: #1b1747; background: #fff; }
.provider::after { content: "⌄"; position: absolute; right: 12px; top: 50%; margin-top: -13px; font-size: 16px; font-weight: 800; pointer-events: none; }
.toolbar__count { margin-left: auto; font-size: 13px; color: var(--muted); }
.plus { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #0b2b18; font-size: 22px; font-weight: 800; line-height: 1; transition: background .2s, transform .2s; }
.plus:hover { background: var(--lime); transform: rotate(90deg); }

.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 18px; }
.game { min-width: 0; }
.game[hidden] { display: none; }
.game__thumb { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--panel); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.game__thumb img { width: 100%; aspect-ratio: 400 / 264; object-fit: cover; transition: transform .35s; }
.game__tags { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tag { padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 800; text-transform: uppercase; line-height: 1.5; letter-spacing: .02em; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.tag--new { background: var(--red); color: #fff; }
.tag--pop { background: var(--pink); color: #fff; }
.game__prov { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 4px; background: rgba(12, 8, 40, .82); color: #fff; font-size: 11px; font-weight: 800; }
.game__overlay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: rgba(20, 12, 70, .72); opacity: 0; transition: opacity .25s;
}
.game__play { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #0b2b18; font-size: 20px; box-shadow: 0 0 0 6px rgba(34, 197, 94, .25); }
.game__demo { font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.game__thumb:hover img, .game__thumb:focus-visible img { transform: scale(1.06); }
.game__thumb:hover .game__overlay, .game__thumb:focus-visible .game__overlay { opacity: 1; }
.game__name { display: block; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.empty { display: none; padding: 40px 10px; text-align: center; color: var(--muted); }
.empty.is-visible { display: block; }
.more { display: flex; justify-content: center; margin-top: 26px; }
.more[hidden] { display: none; }

.content {
  min-width: 0;
  margin-top: 34px; padding: 34px 36px;
  border-radius: var(--radius-lg); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15.5px; line-height: 1.75; color: #e7e4ff;
  overflow-wrap: break-word;
}
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }
.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { color: #fff; font-weight: 800; line-height: 1.3; }
.content h1 { font-size: 30px; margin: 0 0 18px; }
.content h2 { font-size: 23px; margin: 36px 0 14px; padding-left: 14px; border-left: 4px solid var(--green); }
.content h3 { font-size: 19px; margin: 28px 0 12px; color: var(--lime); }
.content h4 { font-size: 17px; margin: 22px 0 10px; }
.content h5, .content h6 { font-size: 15px; margin: 18px 0 8px; }
.content p { margin: 0 0 16px; }
.content a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.content a:hover { color: var(--yellow); }
.content strong, .content b { color: #fff; font-weight: 700; }
.content mark { padding: 0 4px; border-radius: 3px; background: var(--yellow); color: #1b1747; }
.content small { font-size: 13px; color: var(--muted); }
.content ul, .content ol { margin: 0 0 18px; padding-left: 24px; }
.content li { margin-bottom: 8px; }
.content li > ul, .content li > ol { margin: 8px 0 0; }
.content ul li::marker { color: var(--green); }
.content ol li::marker { color: var(--green); font-weight: 800; }
.content img { display: block; max-width: 100%; height: auto; margin: 24px auto; border-radius: var(--radius-lg); }
.content figure { margin: 24px 0; }
.content figure img { margin: 0 auto; }
.content figcaption { margin-top: 8px; font-size: 13px; text-align: center; color: var(--muted); }
.content table {
  width: 100%; margin: 24px 0;
  border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--panel); font-size: 14.5px; line-height: 1.5;
}
.content caption { padding: 0 0 10px; font-size: 13px; color: var(--muted); text-align: left; }
.content th { padding: 12px 14px; text-align: left; font-weight: 800; background: var(--green); color: #0b2b18; }
.content td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.content tbody tr:nth-child(even) { background: rgba(255, 255, 255, .04); }
.content tbody tr:hover { background: rgba(34, 197, 94, .1); }
.content blockquote { margin: 24px 0; padding: 16px 22px; border-left: 4px solid var(--yellow); border-radius: 0 var(--radius) var(--radius) 0; background: var(--panel); font-style: italic; }
.content blockquote p:last-child { margin-bottom: 0; }
.content hr { height: 1px; margin: 32px 0; border: 0; background: var(--line); }
.content code { padding: 2px 6px; border-radius: 4px; background: var(--panel-2); font-size: .9em; }
.content pre { margin: 24px 0; padding: 16px; overflow-x: auto; border-radius: var(--radius); background: var(--head); }
.content pre code { padding: 0; background: none; }
.content iframe, .content video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 24px 0; border: 0; border-radius: var(--radius-lg); }
.content dl { margin: 0 0 18px; }
.content dt { font-weight: 700; color: #fff; }
.content dd { margin: 0 0 10px 18px; color: var(--muted); }
.content details { margin: 0 0 8px; padding: 14px 18px; border-radius: var(--radius); background: var(--panel); }
.content summary { cursor: pointer; font-weight: 700; color: #fff; }
.content details[open] summary { margin-bottom: 10px; color: var(--lime); }

.footer { margin-top: auto; padding: 38px 18px 22px; background: var(--head); color: var(--muted); }
.footer__inner { max-width: 1600px; margin: 0 auto; }
.footer__grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr) 1.4fr; gap: 28px; }
.footer__about { margin: 14px 0; font-size: 13px; }
.footer__title { margin: 0 0 14px; font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #fff; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin-bottom: 9px; }
.footer__list a { font-size: 13.5px; transition: color .2s; }
.footer__list a:hover { color: var(--lime); }
.pay { display: flex; flex-wrap: wrap; gap: 6px; }
.pay span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 6px; background: var(--panel); font-size: 12.5px; font-weight: 700; color: #fff; }
.orgs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge-18 { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border: 2px solid var(--red); border-radius: 50%; font-size: 13px; font-weight: 800; color: #fff; }
.org { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 6px; background: var(--panel); font-size: 12.5px; font-weight: 700; color: #fff; transition: background .2s, color .2s; }
.org:hover { background: var(--panel-2); color: var(--lime); }
.footer__note { margin: 14px 0 0; font-size: 12.5px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.footer__bottom p { margin: 0; }
.footer__bottom a:hover { color: #fff; }

.drawer { position: fixed; inset: 0 auto 0 0; z-index: 70; display: flex; flex-direction: column; width: min(84vw, 310px); background: var(--head); box-shadow: var(--shadow); overflow-y: auto; transform: translateX(-100%); visibility: hidden; transition: transform .3s ease, visibility .3s; }
.drawer > * { flex-shrink: 0; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.drawer__top img { height: 36px; }
.drawer__close { display: flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 6px; background: var(--panel); font-size: 16px; }
.drawer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.drawer__nav { list-style: none; margin: 0; padding: 0 0 20px; }
.drawer__nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 800; text-transform: uppercase; transition: background .2s; }
.drawer__nav a:hover, .drawer__nav a.is-active { background: var(--panel); color: var(--lime); }
.drawer__nav .tag-new { position: static; margin-left: auto; }
.overlay { position: fixed; inset: 0; z-index: 65; background: rgba(8, 4, 30, .6); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
body.menu-open { overflow: hidden; }
body.menu-open .drawer { transform: none; visibility: visible; }
body.menu-open .overlay { opacity: 1; visibility: visible; }

.chat { position: fixed; right: 18px; bottom: 18px; z-index: 46; display: flex; align-items: center; gap: 8px; }
.chat[hidden] { display: none; }
.chat__close { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #1b1747; font-size: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.chat__bubble { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px 20px 4px 20px; background: #fff; color: #1b1747; font-size: 13px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.chat__bubble:hover { background: #f1fff6; }

.to-top {
  position: fixed; right: 18px; bottom: 72px; z-index: 45;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #0b2b18; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, visibility .3s, transform .3s, bottom .3s;
}
.to-top:hover { background: var(--lime); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
body.chat-closed .to-top { bottom: 20px; }

.error-page { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 60px 16px; text-align: center; }
.error-page__code { display: flex; align-items: center; gap: .06em; font-size: clamp(100px, 20vw, 180px); font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 8px 0 var(--head); }
.error-clover {
  position: relative; width: .7em; height: .7em;
  animation: spin 6s linear infinite;
}
.error-clover i { position: absolute; width: 50%; height: 50%; border-radius: 50% 50% 0 50%; background: var(--green); box-shadow: inset -6px -6px 0 rgba(0, 0, 0, .12); }
.error-clover i:nth-child(1) { left: 0; top: 0; }
.error-clover i:nth-child(2) { right: 0; top: 0; transform: rotate(90deg); }
.error-clover i:nth-child(3) { right: 0; bottom: 0; transform: rotate(180deg); }
.error-clover i:nth-child(4) { left: 0; bottom: 0; transform: rotate(270deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.error-page h1 { margin: 24px 0 10px; font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
.error-page p { max-width: 520px; margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.error-page__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.error-page__links a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--panel); font-size: 13px; font-weight: 700; }
.error-page__links a:hover { color: var(--lime); }

@media (max-width: 1440px) {
  .nav a { padding: 0 7px; font-size: 12px; }
  .nav .ico { display: none; }
}

@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 1099px) {
  .header__inner { gap: 10px; padding: 0 12px; height: 56px; }
  .logo img { height: 34px; }
  .page { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 12px 30px; }
  .side { position: static; max-height: none; }
  .cats { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; border-radius: 0; background: none; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cats li { flex: none; }
  .cat { min-height: 36px; padding: 0 12px 0 6px; border: 0; border-radius: 18px; background: #fff; white-space: nowrap; }
  .cat__star { width: 24px; height: 24px; font-size: 15px; }
  .cat__count { margin-left: 4px; }
  .promos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .promos::-webkit-scrollbar { display: none; }
  .promo { flex: 0 0 82%; scroll-snap-align: start; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
}

@media (max-width: 768px) {
  .content { padding: 22px 16px; font-size: 15px; line-height: 1.7; }
  .content h1 { font-size: 25px; }
  .content h2 { font-size: 20px; margin-top: 28px; }
  .content h3 { font-size: 17.5px; }
  .content h4 { font-size: 16px; }
  .content table {
    display: block; width: 100%; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    white-space: nowrap; font-size: 14px;
  }
  .content th, .content td { padding: 10px 12px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { flex-wrap: wrap; }
  .provider { flex: 1; }
  .provider select { width: 100%; min-width: 0; }
  .toolbar__count { order: 3; width: 100%; margin-left: 0; }
  .tag { font-size: 9px; padding: 1px 6px; }
  .chat__bubble span:last-child { display: none; }
  .chat__bubble { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 400px) {
  .header__actions .btn { height: 32px; padding: 0 9px; font-size: 11px; }
  .logo img { height: 28px; }
  .burger { width: 32px; height: 32px; }
  .header__inner { gap: 8px; padding: 0 10px; }
}

@media (max-width: 340px) {
  .header__actions .btn--dark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.grid { list-style: none; margin: 0; padding: 0; }
.page--single { display: block; max-width: 1100px; }
.page--single .content { margin-top: 0; }
