/* ============================================================
   Home-страница в стиле roblox.com/home. Inter (полная кириллица).
   Палитра по эталону: топбар #181a1e (светлее контента), фон #121214,
   панели #232527, синий #00a2ff.
   Иконки интерфейса — реальный спрайт Roblox (assets/icons/*.svg,
   извлечены из images.rbxcdn.com/b7639eda12d0857e.svg 12.10.2026),
   встроены через CSS-mask → перекраиваются под тему.
   ============================================================ */

/* ---------- Inter (официальные статические woff2, локально; полная кириллица) ---------- */
@font-face { font-family: "Inter"; src: url("./fonts/Inter-Thin.woff2") format("woff2"); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./fonts/Inter-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./fonts/Inter-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

/* ---------- темы ---------- */
:root,
[data-theme="dark"] {
  --bg: #121214;
  --bg-topbar: #181a1e;
  --bg-rail: #121214;
  --bg-card: #232527;
  --bg-hover: #2e3033;
  --bg-search: #393b3d;
  --line: #2e3033;
  --text: #f7f7f7;
  --text-2: #bdbdbe;
  --muted: #9b9da2;
  --blue: #00a2ff;
  --green: #00b06f;
  --red: #e2231a;
  --shadow: 0 8px 24px rgba(0,0,0,.45);
  --lb-bg: rgba(0,0,0,.88);
  --avatar-ring: #181a1e;
}
[data-theme="light"] {
  --bg: #f8f8f9;
  --bg-topbar: #ffffff;
  --bg-rail: #f2f3f4;
  --bg-card: #ffffff;
  --bg-hover: #eaeaeb;
  --bg-search: #eaeaeb;
  --line: #e3e3e4;
  --text: #393b3d;
  --text-2: #575a5f;
  --muted: #75777a;
  --blue: #00a2ff;
  --shadow: 0 8px 24px rgba(0,0,0,.12);
  --lb-bg: rgba(24,24,26,.92);
  --avatar-ring: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  transition: background .25s ease, color .25s ease;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

/* ---------- реальные иконки Roblox (CSS-mask) ---------- */
.ic {
  display: inline-block; flex: none;
  width: 28px; height: 28px;
  background-color: currentColor;
  /* лёгкое затенение, чтобы иконки не выглядели плоским светящимся белым */
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .38));
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.ic--home        { -webkit-mask-image: url("./assets/icons/home.svg");        mask-image: url("./assets/icons/home.svg"); }
.ic--profile     { -webkit-mask-image: url("./assets/icons/profile.svg");     mask-image: url("./assets/icons/profile.svg"); }
.ic--robux       { -webkit-mask-image: url("./assets/icons/robux.svg");       mask-image: url("./assets/icons/robux.svg"); }
.ic--robloxplus  { -webkit-mask-image: url("./assets/icons/robloxplus.svg");  mask-image: url("./assets/icons/robloxplus.svg"); }
.ic--like        { -webkit-mask-image: url("./assets/icons/like.svg");        mask-image: url("./assets/icons/like.svg"); width: 12px; height: 12px; }
.ic--message     { -webkit-mask-image: url("./assets/icons/message.svg");     mask-image: url("./assets/icons/message.svg"); }
.ic--mail        { -webkit-mask-image: url("./assets/icons/mail.svg");        mask-image: url("./assets/icons/mail.svg"); }
.ic--phone       { -webkit-mask-image: url("./assets/icons/phone.svg");       mask-image: url("./assets/icons/phone.svg"); }
.ic--friends     { -webkit-mask-image: url("./assets/icons/friends.svg");     mask-image: url("./assets/icons/friends.svg"); }
.ic--avatar      { -webkit-mask-image: url("./assets/icons/avatar.svg");      mask-image: url("./assets/icons/avatar.svg"); }
.ic--inventory   { -webkit-mask-image: url("./assets/icons/inventory.svg");   mask-image: url("./assets/icons/inventory.svg"); }
.ic--trade       { -webkit-mask-image: url("./assets/icons/trade.svg");       mask-image: url("./assets/icons/trade.svg"); }
.ic--communities { -webkit-mask-image: url("./assets/icons/communities.svg"); mask-image: url("./assets/icons/communities.svg"); }
.ic--newsroom    { -webkit-mask-image: url("./assets/icons/newsroom.svg");    mask-image: url("./assets/icons/newsroom.svg"); }
.ic--store       { -webkit-mask-image: url("./assets/icons/store.svg");       mask-image: url("./assets/icons/store.svg"); }
.ic--giftcards   { -webkit-mask-image: url("./assets/icons/giftcards.svg");   mask-image: url("./assets/icons/giftcards.svg"); }
.ic--feed        { -webkit-mask-image: url("./assets/icons/feed.svg");        mask-image: url("./assets/icons/feed.svg"); }
.ic--search      { -webkit-mask-image: url("./assets/icons/search.svg");      mask-image: url("./assets/icons/search.svg"); width: 20px; height: 20px; }
.ic--menu        { -webkit-mask-image: url("./assets/icons/menu.svg");        mask-image: url("./assets/icons/menu.svg"); }
.ic--notifications { -webkit-mask-image: url("./assets/icons/notifications.svg"); mask-image: url("./assets/icons/notifications.svg"); }
.ic--settings    { -webkit-mask-image: url("./assets/icons/settings.svg");    mask-image: url("./assets/icons/settings.svg"); }
.ic--moon        { -webkit-mask-image: url("./assets/icons/moon.svg");        mask-image: url("./assets/icons/moon.svg"); }
.ic--sun         { -webkit-mask-image: url("./assets/icons/sun.svg");         mask-image: url("./assets/icons/sun.svg"); }
.ic--play        { -webkit-mask-image: url("./assets/icons/play.svg");        mask-image: url("./assets/icons/play.svg"); }
.ic--favorite    { -webkit-mask-image: url("./assets/icons/favorite.svg");    mask-image: url("./assets/icons/favorite.svg"); }
.ic--chevron-left  { -webkit-mask-image: url("./assets/icons/chevron-left.svg");  mask-image: url("./assets/icons/chevron-left.svg"); }
.ic--chevron-right { -webkit-mask-image: url("./assets/icons/chevron-right.svg"); mask-image: url("./assets/icons/chevron-right.svg"); }
.ic--verified    { -webkit-mask-image: url("./assets/icons/verified.svg");    mask-image: url("./assets/icons/verified.svg"); }
.ic--shuffle     { -webkit-mask-image: url("./assets/icons/shuffle.svg");     mask-image: url("./assets/icons/shuffle.svg"); }

/* ================= TOP BAR ================= */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 1.2rem;
  height: 52px; padding: 0 1rem;
  background: var(--bg-topbar);
  transition: background .25s ease;
}
.topbar__logo { display: flex; align-items: center; text-decoration: none; flex: none; }
.topbar__wordmark { height: 20px; width: auto; color: var(--text); }
.topbar__mark { display: none; width: 24px; height: 24px; color: var(--text); }
.topbar__burger, .topbar__searchbtn { display: none; }
.topbar__nav { display: flex; gap: 1.4rem; flex: none; }
.topbar__nav a {
  text-decoration: none; font-weight: 600; font-size: .95rem;
  color: var(--text); padding: .3rem 0; border-bottom: 2px solid transparent;
}
.topbar__nav a:hover { border-bottom-color: var(--text); }
.topbar__search {
  position: relative;
  flex: 1; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: .55rem;
  height: 36px; padding: 0 .8rem;
  background: var(--bg-search); border-radius: 8px;
  color: var(--text-2);
  transition: background .25s ease, box-shadow .2s ease;
}
.topbar__search:focus-within { background: var(--bg-hover); box-shadow: 0 0 0 2px var(--blue); }
.topbar__search .ic--search { opacity: .7; flex: none; }
.topbar__search input {
  flex: 1; border: 0; outline: none; background: none;
  color: var(--text); font: inherit; font-size: .92rem;
}
.topbar__search input::placeholder { color: var(--text-2); }
.topbar__search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---- выпадашка подсказок (по мотивам .new-dropdown-menu Roblox) ---- */
.srchdrop {
  position: absolute; top: calc(100% + 6px); left: 0;
  width: min(720px, 100%);
  max-height: min(70vh, 480px); overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
  padding: 6px 0;
  z-index: 70;
}
.srchrow {
  display: flex; align-items: center; gap: .65rem;
  height: 48px; padding: 0 .75rem;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.srchrow:hover, .srchrow.is-active { background: var(--bg-hover); }
.srchrow__thumb {
  width: 40px; height: 40px; flex: none;
  border-radius: 4px; object-fit: cover; display: block;
}
.srchrow__title {
  flex: 1; min-width: 0;
  font-size: .92rem; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.srchrow__meta {
  flex: none; margin-left: auto;
  color: var(--text-2); opacity: .7;
  font-size: .8rem; white-space: nowrap;
}
.srchdrop__empty { padding: .9rem .75rem; color: var(--text-2); font-size: .9rem; }
.topbar__right { display: flex; align-items: center; gap: .7rem; flex: none; margin-left: auto; }
.userchip { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.userchip:hover .userchip__name { text-decoration: underline; }
.userchip__name { font-weight: 500; font-size: .95rem; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #00a2ff, #8b5cf6);
  color: #fff; font-weight: 700; font-size: .95rem; flex: none;
  border: 2px solid var(--avatar-ring);
  overflow: hidden;
  transition: border-color .25s ease;
}
.avatar--sm { width: 30px; height: 30px; font-size: .85rem; }
.avatar img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%;
  display: block;
}
.iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; color: var(--text);
}
.iconbtn:hover { background: var(--bg-hover); }
.badge {
  position: absolute; top: 2px; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 9px;
  font: 700 .68rem/17px "Inter", sans-serif; font-style: normal; text-align: center;
}
.robux { display: inline-flex; align-items: center; gap: .3rem; color: var(--text); font-size: .95rem; }
.robux .ic { width: 26px; height: 26px; }
.themetog .sun { display: none; }
[data-theme="light"] .themetog .sun { display: block; }
[data-theme="light"] .themetog .moon { display: none; }

/* ================= SHELL ================= */
.shell { display: flex; align-items: flex-start; }

/* ---------- sidebar ---------- */
.rail-scrim { display: none; }
.rail {
  position: sticky; top: 52px;
  flex: none; width: 260px; height: calc(100vh - 52px);
  padding: .9rem .7rem 1rem;
  background: var(--bg-rail);
  overflow-y: auto; overflow-x: hidden;
  transition: background .25s ease;
}
.rail__user { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem .8rem; }
.rail__id { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.rail__id b { font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  align-self: flex-start;
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--text-2); font-size: .74rem; font-weight: 600;
  border-radius: 6px; padding: .1rem .45rem;
}
.rail__menu { display: flex; flex-direction: column; gap: .15rem; }
.rail__item {
  display: flex; align-items: center; gap: .75rem;
  padding: .62rem .7rem; border-radius: 8px;
  text-decoration: none; color: var(--text);
  font-size: .95rem; font-weight: 500;
}
.rail__item:hover { background: var(--bg-hover); }
.rail__item.is-active { background: var(--bg-card); }
.rail__promo {
  margin-top: 1.1rem; padding: .9rem;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text-2); font-size: .84rem;
}
.rail__promo .ic { width: 24px; height: 24px; color: var(--text); }
.rail__promo p { margin: .5rem 0 .55rem; }
.rail__promo a { color: var(--text); font-weight: 600; }

/* ================= CONTENT ================= */
.content { flex: 1; min-width: 0; padding: 1.3rem 2rem 3rem; }
.page-title { font-size: 1.9rem; font-weight: 700; margin: .1rem 0 1.1rem; }

/* ---------- notice / баннер-панель ---------- */
.notice {
  display: flex; gap: 1rem;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.15rem 1.25rem; margin-bottom: 1.6rem;
  transition: background .25s ease, border-color .25s ease;
}
.notice__icon { color: var(--blue); flex: none; padding-top: .15rem; }
.notice__body { min-width: 0; }
.notice__body h2 { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 700; }
.notice__body p { margin: 0 0 .8rem; color: var(--text-2); font-size: .92rem; max-width: 70ch; }
.notice__btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.ubtn {
  display: inline-block; text-decoration: none;
  background: var(--bg-search); color: var(--text);
  font-weight: 600; font-size: .9rem;
  padding: .5rem .95rem; border-radius: 8px;
}
.ubtn:hover { background: var(--bg-hover); }
.ubtn--green { background: var(--green); color: #fff; }
.ubtn--green:hover { filter: brightness(1.1); }
.ubtn--ghost { background: none; border: 1px solid var(--line); }

/* ---- тулбар-фильтры над Recommended ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.1rem; }
.tbtn {
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text-2);
  font-size: .85rem; font-weight: 600; padding: .45rem .9rem;
  border-radius: 8px; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.tbtn:hover { background: var(--bg-hover); color: var(--text); }
.tbtn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.tbtn--action { border-style: dashed; }
/* Shuffle — только иконка (две перекрещивающиеся стрелки), слово — в title/тултипе */
.tbtn--icon { display: inline-flex; align-items: center; justify-content: center; padding: .42rem .55rem; }
.tbtn--icon .ic { width: 18px; height: 18px; filter: none; }

/* ---- переключатель языка RU/EN в топбаре ---- */
.langtog {
  display: inline-flex; align-items: center; flex: none;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden;
}
.langtog button {
  padding: .32rem .48rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  color: var(--text-2); transition: background .15s ease, color .15s ease;
}
.langtog button:hover { background: var(--bg-hover); color: var(--text); }
.langtog button.is-active { background: var(--blue); color: #fff; }

/* ---------- секции ---------- */
.sec { margin-bottom: 1.8rem; }
.sec__title { display: flex; align-items: baseline; gap: .5rem; font-size: 1.32rem; font-weight: 700; margin: 0 0 .85rem; }
.sec__arrow { color: var(--text-2); }
.sec__sub { font-size: .82rem; font-weight: 500; color: var(--muted); }

/* ---------- сетка широких карточек ----------
   Размеры/поведение по официальным CSS roblox.com (StyleGuide.css):
   .game-card-container{border-radius:8px}, .game-card-thumb{border-radius:8px},
   .game-card-name{font-size:14px;line-height:1.1em;max-height:32px;font-weight:500;margin-top:6px},
   .game-card-info{font-size:12px;line-height:18px;font-weight:500} иконка 12×12,
   зазоры в ряду: 14px по колонке, 12px по строке. */
/* Ровно 5 колонок: 20 карточек = 4 полных строки (в оригинале auto-fill давал
   5 колонок + одинокую 21-ю карточку). 5/4/2 — делятся на 20 без остатка. */
.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 14px;
}
.gcard { cursor: pointer; border-radius: 8px; }
.gcard__thumb {
  position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
  background: var(--bg-card);
  outline: 2px solid transparent; outline-offset: -2px;
  transition: outline-color .15s ease;
}
/* ховер как в оригинале: radial-gradient(transparent, black-40), opacity 0→1, .3s linear */
.gcard__thumb::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(transparent, rgba(0, 0, 0, .4));
  border-radius: 8px; opacity: 0;
  transition: opacity .3s linear;
  pointer-events: none;
}
.gcard:hover .gcard__thumb::before { opacity: 1; }
.gcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gcard--mine .gcard__thumb { outline-color: var(--blue); }   /* мои выделены синим */
.gcard--mine:hover .gcard__thumb { outline-color: var(--blue); }
.myart {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--blue); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .06em;
  padding: .18rem .45rem; border-radius: 6px;
  text-transform: uppercase;
}
.gcard__name {
  margin: 6px .1rem .1rem;
  font-size: 14px; font-weight: 500; line-height: 1.1;
  max-height: 32px;                          /* в оригинале название переносится на 2 строки */
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.gcard__meta {
  display: flex; align-items: center; gap: .35rem;
  margin: 0 .1rem; color: var(--text-2);
  font-size: 12px; line-height: 18px; font-weight: 500;
}
.rate { display: inline-flex; align-items: center; gap: .28rem; }
.rate i { display: inline-flex; align-items: center; font-style: normal; }
.rate svg { width: 12px; height: 12px; display: block; }
.ic-like { color: var(--text-2); }
.gcard--mine .ic-like { color: var(--blue); }
.ad { color: var(--muted); }

/* ---------- Continue ---------- */
.cont { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .3rem; }
.cont::-webkit-scrollbar { height: 8px; }
.cont::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.wcard { flex: none; width: 210px; cursor: pointer; }
.wcard__thumb {
  position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
  background: var(--bg-card);
  outline: 2px solid var(--blue); outline-offset: -2px;
}
.wcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.wcard:hover .wcard__thumb img { transform: scale(1.04); transition: transform .3s ease; }
.wcard__name {
  margin: .4rem .1rem .1rem; font-size: .88rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wcard__meta { margin: 0 .1rem; color: var(--text-2); font-size: .8rem; }

/* ---------- Галерея (упразднена на Home: только профиль → Creations) ---------- */
.gal { display: none; }

/* ---------- footer ---------- */
.foot { padding: 1.4rem 2rem; color: var(--muted); font-size: .8rem; text-align: center; }
.foot__brand { display: inline-flex; align-items: center; gap: .5rem; margin-left: .75rem; vertical-align: middle; }
.foot__brand a { display: inline-flex; border-radius: 5px; overflow: hidden; opacity: .9; transition: opacity .15s ease, transform .15s ease; }
.foot__brand a:hover { opacity: 1; transform: translateY(-1px); }
.foot__brand img { display: block; width: 20px; height: 20px; }
.stub { font-size: .76rem; color: var(--muted); margin: .8rem 0 0; }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: var(--lb-bg); padding: 2rem;
}
.lb.open { display: flex; }
.lb figure { margin: 0; max-width: min(1400px, 92vw); }
.lb img { max-height: 82vh; width: auto; border-radius: 10px; box-shadow: var(--shadow); margin: 0 auto; }
.lb figcaption { margin-top: .7rem; text-align: center; color: #fff; font-size: .9rem; }
.lb__x {
  position: absolute; top: 1rem; right: 1.2rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; font-size: 1.1rem;
}
.lb__x:hover { background: rgba(255,255,255,.22); }

/* ================= PROFILE (в стиле roblox.com/users/…/profile) ================= */
/* 3D-превью аватара (.pf__hero, .pf__3d) упразднено по решению владельца */

/* шапка: аватар + имя + действия */
.pf__head { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.pf__ava {
  flex: none; width: 112px; height: 112px;
  border-radius: 50%; overflow: hidden;
  border: 4px solid var(--bg-card); background: var(--bg-card);
}
.pf__ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; }
.pf__id { min-width: 0; flex: 1 1 200px; }
.pf__id h1 { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.15; }
.pf__id span { color: var(--text-2); font-size: .95rem; }
.pf__acts { display: flex; align-items: center; gap: .55rem; margin-left: auto; }

/* пилюли и короткое описание */
.pf__pills { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.05rem 0 .75rem; }
.pf__pills .pill { align-self: center; padding: .32rem .75rem; font-size: .8rem; border-radius: 999px; }
.pf__bio { margin: 0 0 1.3rem; color: var(--text-2); font-size: .93rem; max-width: 78ch; }
.pf__bio a { color: var(--blue); }

/* вкладки About / Creations */
.pf__tabs { display: flex; gap: 2.2rem; border-bottom: 1px solid var(--line); }
.pf__tab {
  padding: .72rem .15rem; margin-bottom: -1px;
  font-size: .95rem; font-weight: 600; color: var(--text-2);
  border-bottom: 3px solid transparent;
}
.pf__tab:hover { color: var(--text); }
.pf__tab.is-active { color: var(--text); border-bottom-color: var(--text); }
.pf__panel { display: none; padding-top: 1.35rem; }
.pf__panel.is-active { display: block; }

/* контент вкладки About */
.pf__sec { margin-bottom: 1.5rem; }
.pf__sec h2 { margin: 0 0 .55rem; font-size: 1.05rem; font-weight: 700; }
.pf__sec p { margin: 0 0 .55rem; color: var(--text-2); font-size: .93rem; max-width: 82ch; }
.pf__sec ul { margin: 0; padding-left: 1.2rem; color: var(--text-2); font-size: .93rem; }
.pf__sec li { margin-bottom: .4rem; max-width: 82ch; }
.pf__sec li b { color: var(--text); }
.pf__sec li::marker { color: var(--blue); }
.pf__tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.pf__tags .pill { align-self: center; padding: .3rem .7rem; font-size: .8rem; border-radius: 999px; }

/* контакты с официальными логотипами (Telegram / VK / hh.ru) */
.pf__contacts { display: flex; flex-wrap: wrap; gap: .6rem; }
.cbtn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--bg-search); color: var(--text); text-decoration: none;
  font-size: .88rem; font-weight: 600;
  padding: .45rem .95rem .45rem .5rem; border-radius: 8px;
}
.cbtn:hover { background: var(--bg-hover); }
.cbtn img { display: block; width: 26px; height: 26px; flex: none; }
.cbtn .ic { width: 26px; height: 26px; }

/* ================= Адаптив ================= */
@media (max-width: 1100px) {
  .topbar__nav { display: none; }
  .rail { width: 74px; }
  .rail__id, .rail__promo, .rail__item span { display: none; }
  .rail__item { justify-content: center; padding: .7rem; }
  .rail__user { justify-content: center; }
  .content { padding: 1.1rem 1.2rem 3rem; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pf__ava { width: 92px; height: 92px; }
  .pf__id h1 { font-size: 1.45rem; }
  .pf__acts { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  /* ---- топбар в две строки, как на roblox.com в вертикальном виде
         (замер с Clipboard_10-12-2026_07.png: строка 1 — 44px, строка 2 — 30px,
          всего 74px; бургер + знак Roblox слева, справа аватар/поиск/Robux/луна/шестерня) ---- */
  .topbar {
    flex-wrap: wrap; height: auto; padding: 0 .3rem;
    column-gap: .25rem; row-gap: 0;
  }
  .topbar__burger { display: inline-flex; }
  .topbar__logo { height: 44px; }
  .topbar__mark { display: block; }
  .topbar__wordmark { display: none; }
  .topbar__search { display: none; }
  .topbar__searchbtn { display: inline-flex; }
  /* мобильный поиск: по иконке поле раскрывается под топбаром на всю ширину */
  body.search-open .topbar__search {
    display: flex;
    position: fixed; top: 74px; left: 0; right: 0; z-index: 65;
    width: auto; max-width: none; margin: 0;
    height: 48px; padding: 0 .8rem;
    background: var(--bg-topbar);
    border-radius: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  }
  body.search-open .srchdrop { left: 0; right: 0; width: auto; }
  .topbar__right { height: 44px; gap: .25rem; }
  .userchip__name { display: none; }
  .topbar__bell { display: none; }
  .topbar__nav {
    order: 9; flex: 1 0 100%; height: 30px; padding: 0 .35rem;
    display: flex; justify-content: space-around; align-items: center;
  }
  .topbar__nav a { font-size: .92rem; padding: 0; border-bottom: 0; text-align: center; }

  /* ---- рельс: в вертикальном виде бокового меню НЕТ (как на roblox.com) —
          меню вызывает иконка-бургер: рельс выезжает слева как drawer ---- */
  .rail {
    position: fixed; top: 74px; left: 0; z-index: 60;
    width: min(78vw, 300px); height: calc(100vh - 74px);
    padding: .9rem .7rem 1rem;
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
    visibility: hidden;
  }
  body.nav-open .rail { transform: none; visibility: visible; }
  /* в drawer-меню — полные подписи, не иконки (правила ≤1100 их прячут) */
  .rail__id { display: flex; }
  .rail__item span { display: inline; }
  .rail__item { justify-content: flex-start; padding: .62rem .7rem; }
  .rail__user { justify-content: flex-start; }
  .rail .ic { width: 20px; height: 20px; }
  .rail-scrim {
    display: block; position: fixed; top: 74px; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, .55); z-index: 55; opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
  }
  body.nav-open .rail-scrim { opacity: 1; visibility: visible; }

  /* ---- контент: без левого поля (бокового меню нет), 16px по краям, 2 колонки ---- */
  .content { padding: .9rem 16px 2.5rem; }
  .page-title { font-size: 1.4rem; margin: 0 0 .8rem; }
  .sec__title { font-size: 1.15rem; margin-bottom: .7rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }

  /* профиль: компактная шапка */
  .pf__ava { width: 76px; height: 76px; border-width: 3px; }
  .pf__id h1 { font-size: 1.25rem; }
  .pf__acts { gap: .4rem; }
  .pf__acts .ubtn { padding: .45rem .7rem; font-size: .82rem; }
  .pf__tabs { gap: 1.5rem; }
  .cbtn { font-size: .82rem; padding: .4rem .75rem .4rem .45rem; }
  .cbtn img, .cbtn .ic { width: 22px; height: 22px; }
}

/* =========================================================
   Страница игры (game.html) — концепт в стиле roblox.com/games:
   крошки, шапка с иконкой, галерея слева + инфо-панель справа,
   вкладки About/Store/Servers, сетки превью и иконок.
   ========================================================= */
.gp__crumb {
  display: flex; align-items: center; gap: .4rem;
  font-size: .85rem; color: var(--muted); margin-bottom: 1rem;
}
.gp__crumb a { color: var(--text-2); text-decoration: none; }
.gp__crumb a:hover { color: var(--text); text-decoration: underline; }
.gp__crumb b { color: var(--text); font-weight: 600; }

.gp__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.gp__icon {
  flex: none; width: 92px; height: 92px; border-radius: 8px; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line);
}
.gp__icon img { width: 100%; height: 100%; object-fit: cover; }
.gp__title h1 { margin: 0 0 .2rem; font-size: 1.6rem; font-weight: 700; }
.gp__creator { display: flex; align-items: center; gap: .35rem; font-size: .9rem; color: var(--text-2); }
.gp__creator a { color: var(--text); text-decoration: none; }
.gp__creator a:hover { text-decoration: underline; }
.gp__creator .ic--verified { width: 18px; height: 18px; color: var(--blue); }

.gp__cols {
  display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(240px, 1fr);
  gap: 1.4rem; align-items: start; margin-bottom: 1.4rem;
}

/* --- галерея --- */
.gp__media { position: relative; }
.gp__stage {
  position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
  background: var(--bg-card); cursor: pointer;
  outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .15s ease;
}
.gp__stage:hover { outline-color: var(--blue); }
.gp__stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp__playbadge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(transparent, rgba(0, 0, 0, .45));
  opacity: 0; transition: opacity .3s linear; pointer-events: none;
}
.gp__stage:hover .gp__playbadge { opacity: 1; }
.gp__playbadge .ic { width: 58px; height: 58px; color: #fff; }

.gp__nav {
  position: absolute; top: calc((100% - 58px) / 2 - 18px); z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s ease;
}
.gp__nav .ic { width: 22px; height: 22px; }
.gp__media:hover .gp__nav, .gp__nav:focus-visible { opacity: 1; }
.gp__nav--prev { left: 10px; }
.gp__nav--next { right: 10px; }

.gp__thumbs {
  display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px;
}
.gp__thumbs::-webkit-scrollbar { height: 6px; }
.gp__thumbs::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.gp__thumb {
  flex: none; width: 96px; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden;
  cursor: pointer; padding: 0; border: 2px solid transparent; background: var(--bg-card);
}
.gp__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp__thumb.is-active { border-color: var(--blue); }

.gp__dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.gp__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--line); border: 0; padding: 0; cursor: pointer;
}
.gp__dot.is-active { background: var(--blue); }

/* --- инфо-панель --- */
.gp__side {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem;
}
.gp__rating { margin-bottom: .9rem; }
.gp__ratingbar {
  display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-hover);
}
.gp__ratingbar span { background: var(--green); }
.gp__ratingbar i { flex: 1; background: #e14d4d; }
.gp__rating b { display: block; margin-top: .35rem; font-size: .85rem; color: var(--text-2); }

.gp__play {
  width: 100%; justify-content: center; font-size: 1rem; padding: .65rem; margin-bottom: .5rem;
}
.gp__play .ic { width: 20px; height: 20px; }
.gp__fav { width: 100%; justify-content: center; margin-bottom: 1rem; }
.gp__fav .ic { width: 18px; height: 18px; }
.gp__fav.is-on { color: #f5c518; }

.gp__stats { margin: 0; display: grid; gap: .45rem; }
.gp__stats > div { display: flex; justify-content: space-between; gap: .6rem; font-size: .88rem; }
.gp__stats dt { color: var(--muted); }
.gp__stats dd { margin: 0; color: var(--text); font-weight: 600; }

/* --- вкладки --- */
.gp__tabs {
  display: flex; gap: 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem;
}
.gp__tab {
  background: none; border: 0; cursor: pointer; font: inherit;
  padding: .55rem 0; color: var(--text-2); font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.gp__tab:hover { color: var(--text); }
.gp__tab.is-active { color: var(--text); border-bottom-color: var(--text); }
.gp__panel { display: none; }
.gp__panel.is-active { display: block; }

.gp__desc { margin-bottom: 1.6rem; }
.gp__desc h2 { font-size: 1.2rem; margin: 0 0 .6rem; }
.gp__desc p { margin: 0 0 .7rem; color: var(--text-2); line-height: 1.55; max-width: 80ch; white-space: pre-line; }
.gp__credits {
  margin-top: .9rem; padding: .8rem 1rem; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--text-2); font-size: .9rem; line-height: 1.5; max-width: 80ch;
}

/* --- квадратная сетка иконок 512 --- */
.sqgrid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px;
}
.sqcard { cursor: pointer; border-radius: 8px; }
.sqcard__thumb {
  position: relative; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden;
  background: var(--bg-card);
  outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .15s ease;
}
.sqcard__thumb::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(transparent, rgba(0, 0, 0, .4));
  border-radius: 8px; opacity: 0; transition: opacity .3s linear; pointer-events: none;
}
.sqcard:hover .sqcard__thumb::before { opacity: 1; }
.sqcard:hover .sqcard__thumb { outline-color: var(--blue); }
.sqcard__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* --- «ещё мои игры»: карточки как в Recommended на roblox --- */
.gp__more .sqcard__name {
  margin: 6px .1rem .1rem; font-size: 14px; font-weight: 500; line-height: 1.1;
  max-height: 32px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.gp__more .sqcard__meta {
  display: flex; align-items: center; gap: .35rem; margin: 0 .1rem;
  color: var(--text-2); font-size: 12px; line-height: 18px; font-weight: 500;
}

@media (max-width: 1100px) {
  .gp__cols { grid-template-columns: 1fr; }
  .gp__side { order: -1; }
  .sqgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .gp__head { gap: .7rem; }
  .gp__icon { width: 68px; height: 68px; }
  .gp__title h1 { font-size: 1.2rem; }
  .gp__nav { opacity: 1; }
  .sqgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .gp__tabs { gap: 1.2rem; }
}
