:root{
  --bg: #f6f8fa;
  --panel: #ffffff;
  --muted: #5b6b77;
  --accent: #0ea5a0;
  --accent-2: #dc2626;
  --card: #ffffff;
  --glass: rgba(2,6,23,0.03);
  --radius: 10px;
  --gap: 16px;
  --max-width: 1100px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --shadow-1: 0 6px 18px rgba(15,23,42,0.06);
  --border-subtle: rgba(15,23,42,0.06);
  --text: #0f1724;
}

/* Reset and base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font-sans);
  background: #F7F4F1;
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding:12px;
  line-height:1.35;
  font-size:15px;
}

/* Page H1 */
.page-title {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}

/* accent underline */
.page-title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 156px;
  border-radius: 6px;
  background: linear-gradient(40deg, var(--accent), rgba(14,165,160,0.12));
  transform-origin: left;
  transform: translateY(2px);
  box-shadow: 0 6px 18px rgba(14,165,160,0.06);
}

/* small subtitle / meta under title */
.page-subtitle{
  display:block;

  color:var(--muted);
  font-size:12px;
  font-weight:500;
  text-transform: uppercase;
}

.breadcrumbs{ font-size:12px; color:var(--muted); display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.breadcrumbs a{ color:var(--text); text-decoration:none; }
.breadcrumbs a:hover{text-decoration:underline}
.crumb-sep{ color:rgba(15,23,42,0.12); }



/* Topbar */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  max-width:var(--max-width);
  margin:0 auto 12px;
  background:var(--panel);
  padding:10px 12px;
  border-radius:12px;
  box-shadow: var(--shadow-1);
  border:1px solid var(--border-subtle);
}
.topbar__left, .topbar__right{display:flex; align-items:center}
.logo{
  font-weight:700;
  color:var(--accent);
  letter-spacing:0.6px;
  font-size:18px;
}

/* Search */
.search{display:flex; gap:6px; align-items:center}
.search input{
  background:transparent;
  border:1px solid rgba(15,23,42,0.06);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
  min-width:180px;
  outline:none;
}
.search input::placeholder{color:rgba(15,23,42,0.45)}
.search button{
  background:var(--glass);
  color:var(--muted);
  border:1px solid rgba(15,23,42,0.04);
  padding:8px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

/* Layout */
.main-layout{
  display:flex;
  gap:var(--gap);
  max-width:var(--max-width);
  margin:0 auto;
  align-items:flex-start;
}

/* Sidebar */
.sidebar{
  width:180px;
  min-width:160px;
  background:var(--panel);
  border-radius:12px;
  padding:12px;
  border:1px solid var(--border-subtle);
  height:calc(100vh - 270px);

  box-shadow: 0 4px 14px rgba(15,23,42,0.04);
  position: sticky;
  position: -webkit-sticky;
  position: sticky;
  top: 12px; /* важный офсет */
  align-self:flex-start; /* на случай флекс-контейнера */
}

.menu{display:flex; flex-direction:column; gap:8px}
.menu__item{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:#15313a;
  padding:2px;
  border-radius:8px;
  transition:background .12s, transform .08s;
}
.menu__item .material-symbols-rounded{
  font-size:20px;
  color:var(--accent);
}
.menu__item:hover{background:rgba(14,165,160,0.04); transform:translateX(4px)}

/* Cards Pro */
.cards-pro{
  margin-top:14px;
  background: linear-gradient(180deg, rgba(14,165,160,0.06), rgba(14,165,160,0.02));
  border-radius:10px;
  padding:12px;
  border:1px solid rgba(14,165,160,0.08);
}
.cards-pro__title{font-weight:600; color:var(--accent); margin-bottom:6px}
.cards-pro__desc{color:var(--muted); font-size:13px; margin-bottom:10px}

/* Buttons */
.btn{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  background:transparent;
  color:var(--accent);
  border:1px solid rgba(15,23,42,0.06);
  text-decoration:none;
  cursor:pointer;
  font-weight:600;
  font-size:14px;
}
.btn--green{background:var(--accent); color:#ffffff; border:0}

/* Content */
.content{
  flex:1;
  min-height:400px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* Banner */
.banner{
  border-radius:12px;
  overflow:hidden;
  background:linear-gradient(90deg,var(--accent-2),#ef746e);
  color:#fff;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:90px;
  box-shadow: 0 6px 18px rgba(220,38,38,0.06);
}
.banner__inner{font-weight:600; letter-spacing:0.6px}


/* Center area */
.center{

  display:flex;
  flex-direction:column;
  gap:16px;
}

/* Accounts mock */
.accounts{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.account{
  background: linear-gradient(180deg,#ffffff,#fcfdff);
  padding:12px 14px;
  border-radius:10px;
  min-width:120px;
  text-align:center;
  font-weight:600;
  color:var(--text);
  border:1px solid rgba(15,23,42,0.04);
  box-shadow: 0 4px 12px rgba(15,23,42,0.03);
}
.currency{display:block; font-weight:400; color:var(--muted); font-size:13px; margin-top:6px}

/* Open account */
.open-account{display:flex; gap:12px}
.open-account .btn{background:transparent; color:var(--accent-2); border:1px solid rgba(220,38,38,0.08); padding:8px 14px; border-radius:10px}

/* Footer */
.site-footer{
  max-width:var(--max-width);
  margin:12px auto 30px;
  padding:12px;
  color:var(--muted);
  text-align:center;
  font-size:13px;
  background:#EDEAE7;
  border-radius:10px;
}

/* Utility */
.hidden-mobile{display:inline-block}
.kv-center{display:flex; align-items:center; gap:10px}

/* Банан мобильный: плавающая панель внизу экрана */
/* Банан мобильный: плавающая панель внизу экрана (скрыта по умолчанию) */
.banana{
  display:none;
  position:fixed;
  left:12px;
  right:12px;
  bottom:12px;
  height:56px;
  background:var(--panel);
  border-radius:999px;
  box-shadow:0 10px 30px rgba(2,6,23,0.08);
  gap:6px;
  align-items:center;
  padding:6px;
  z-index:80;
  border:1px solid var(--border-subtle);
}

/* Элементы внутри банана */
.banana__item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:var(--text);
  padding:6px 10px;
  border-radius:12px;
  min-width:56px;
  font-size:12px;
}
.banana__item .material-symbols-rounded{font-size:20px; color:var(--accent);}

.banana__more{
  margin-left:auto;
  margin-right:6px;
  background:var(--accent);
  color:#fff;
  border:0;
  height:44px;
  width:44px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 18px rgba(14,165,160,0.12);
  cursor:pointer;
}

/* overlay меню (мобильное) */
.banana-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(2,6,23,0.45);
  z-index:2147483645;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  align-items:flex-end;
  justify-content:center;
}

/* видимая модификация */
.banana-overlay.is-open{ display:flex; }

/* лист с меню */
.banana-overlay__sheet{
  width:100%;
  max-width:720px;
  background:var(--panel);
  border-top-left-radius:16px;
  border-top-right-radius:16px;
  padding:12px 12px 28px;
  box-shadow:0 -12px 30px rgba(15,23,42,0.12);
  transform: translateY(20px);
  animation: sheetIn .22s ease-out both;
}

/* анимация появления */
@keyframes sheetIn{
  from{ transform: translateY(18px); opacity:0; }
  to{ transform: translateY(0); opacity:1; }
}

/* close button */
.banana-overlay__close{
  background:transparent;
  border:0;
  color:var(--text);
  font-size:20px;
  float:right;
  cursor:pointer;
  padding:6px;
}

/* nav внутри оверлея */
.banana-overlay__nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:6px;
  padding-bottom:6px;
  max-height:60vh;
  overflow:auto;
}
.banana-overlay__nav .menu__item{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px;
  border-radius:10px;
  text-decoration:none;
  color:var(--text);
  background:transparent;
  border:1px solid rgba(15,23,42,0.03);
}
.banana-overlay__nav .menu__item .material-symbols-rounded{
  font-size:20px;
  color:var(--accent);
}

/* Сетка карточек */
.games-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
  margin-top:6px;
}

.games-grid > #allEntries {
  display: contents;
}

/* Карточка */
.game-card{
  position:relative;
  display:flex;
  flex-direction:row;
  gap:12px;
  align-items:flex-start;
  padding:12px;
  background:var(--panel);
  border-radius:12px;
  border:1px solid var(--border-subtle);
  box-shadow: 0 6px 18px rgba(15,23,42,0.03);
  min-height:120px;
  overflow:hidden;
  height:160px;
}

.game-card__desc img,
.game-card__desc picture,
.game-card__desc svg {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  visibility: hidden !important;
}

/* Превью слева */
.game-card__thumb{
  flex:0 0 80px;
  width:80px;
  height:100px;
  border-radius:8px;
  overflow:hidden;
  display:block;
  background:linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.02));
  text-decoration:none;
}
.game-card__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Текстовая часть */
.game-card__body{
  flex:1 1 auto;
  min-width:0;
}
.game-card__title{
  margin:0 0 6px 0;
  font-size:15px;
  line-height:1.2;
  font-weight:700;
}
.game-card__title a{ color:var(--text); text-decoration:none; }
.game-card__title a:hover{ text-decoration:underline; }

.game-card__desc{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.3;
  max-height:3.9em; /* ~3 lines */
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Метаданные и кнопка скачивания — фиксированы снизу карточки */
.game-card__meta{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  text-decoration:none;
}

/* убрать подчёркивание только у ссылки с количеством комментариев внутри мета-блока */
.game-card__meta .meta-item--rating a,
.game-card__meta .meta-item--rating a:link,
.game-card__meta .meta-item--rating a:visited {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* сохранить видимую фокусную рамку для доступности */
.game-card__meta .meta-item--rating a:focus {
  outline: 2px solid rgba(14,165,160,0.18);
  outline-offset: 2px;
  border-radius: 6px;
}

/* при ховере можно немного менять цвет и курсор */
.game-card__meta .meta-item--rating a:hover {
  color: var(--text);
  cursor: pointer;
}


/* Левая группа мета */
.game-card__left{ display:flex; gap:8px; align-items:center; }
.meta-item{
  display:inline-flex;
  gap:4px;
  align-items:center;
  font-size:13px;
  color:var(--muted);
  background:transparent;
  text-decoration:none;
  border-radius:8px;
}
.meta-item .material-symbols-rounded{ font-size:18px; color:var(--accent); }

/* Кнопка скачать */
.btn--download{
  display:inline-flex;
  gap:4px;
  align-items:center;
  padding:4px 6px;
  background:var(--accent);
  color:#fff;
  border-radius:10px;
  text-decoration:none;
  font-weight:400;
  font-size:12px;
  box-shadow: 0 6px 18px rgba(14,165,160,0.08);
}
.btn--download .material-symbols-rounded{ font-size:18px; color:inherit; }

/* Комментарии (если включите позже) */
.game-card__comments{ display:none; }


/* Логотип (контейнер) */
.site-logo{
  display:inline-block;
  text-decoration:none;
  line-height:0;
  vertical-align:middle;
}

/* Само изображение логотипа */
.site-logo img{
  display:block;
  width:100%;
  height:auto;
  max-width:180px;       /* десктопный размер */
  max-height:34px;
  object-fit:contain;
  filter: none;
  margin-right:30px;
}


/* Баннер во всю ширину с закруглёнными углами */
.site-banner{
  display:block;
  width:100%;
  max-width:100%;
  line-height:0;
  text-decoration:none;
  -webkit-tap-highlight-color: transparent;
}

/* Картинка адаптивная, заполняет контейнер по ширине, аккуратно обрезается при необходимости */
.site-banner img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  object-fit:cover;
  border-radius:12px;
  box-shadow: 0 6px 20px rgba(2,6,23,0.06);
}



/* Page article */
.game-article{ max-width:1100px; margin:0 auto; padding:18px; background:transparent; }

/* Hero */
.game-hero{ display:flex; gap:18px; align-items:flex-start; margin-bottom:2px; }
.game-hero__left{ flex:0 0 220px; display:flex; flex-direction:column; gap:4px; }
.game-hero__thumb{ display:block; border-radius:12px; overflow:hidden; box-shadow:0 8px 28px rgba(2,6,23,0.08); }
.game-hero__img{ width:220px; object-fit:cover; display:block; }
.game-hero__thumb-row{ display:flex; gap:4px; margin-top:6px; }
.game-ss{ width:68px; height:90px; object-fit:cover; border-radius:8px; border:1px solid rgba(0,0,0,0.06); }

/* Right column */
.game-hero__right{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:12px; }
.game-title{ margin:10px 0px 0px 0px; font-size:26px; font-weight:800; letter-spacing:-0.01em; text-transform:uppercase; }
.game-subtitle{ margin:0; color:var(--muted); font-size:14px; line-height:1.4; max-height:6.2em; overflow:hidden; }

/* Meta */
.game-meta{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:auto; }
.meta-left{ display:flex; flex-direction:column; gap:8px; }
.meta-row{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.meta-row--small{ font-size:13px; color:var(--muted); }
.meta-item2{ display:inline-flex; gap:8px; align-items:center; color:var(--muted); background:transparent; padding:6px 8px; border-radius:8px; }


/* Buttons and social */
.meta-right{ display:flex; gap:12px; align-items:center; }
.btn--download2, .btn--primary{ display:inline-flex; gap:8px; align-items:center; justify-content:center; padding:10px 14px; border-radius:999px; text-decoration:none; font-weight:700; }
.btn--primary{ background:var(--accent); color:#fff; box-shadow:0 10px 30px rgba(14,165,160,0.08); }

/* Content layout */
.game-content{ display:grid; grid-template-columns: 1fr 320px; gap:18px; margin-top:18px; }
.game-section{ background:var(--panel); padding:24px; border-radius:12px; border:1px solid var(--border-subtle); }
.game-related{ background:var(--panel); padding:14px; border-radius:12px; border:1px solid var(--border-subtle); }
.section-title{ margin:0 0 12px 0; font-size:16px; font-weight:700; }

/* Comments */
.game-comments{ margin-top:20px; background:transparent; }
.comments-wrapper{ background:var(--panel); padding:14px; border-radius:12px; border:1px solid var(--border-subtle); }
.comments-list{ margin-bottom:12px; }



/* визуал для миниатюр и плавной замены */
.game-hero__thumb-row{ display:flex; gap:8px; margin-top:8px; }
.ss-thumb{ display:inline-block; border-radius:8px; overflow:hidden; border:2px solid transparent; cursor:pointer; text-decoration:none; }
.ss-thumb img.game-ss{ display:block; width:68px; height:90px; object-fit:cover; transition:transform .18s ease; }
.ss-thumb:hover img.game-ss{ transform:scale(1.03); }
.ss-thumb.is-active{ border-color:var(--accent, #0ea5a4); box-shadow:0 6px 18px rgba(14,165,160,0.08); }

/* анимация для главного изображения */
#game-main-img{ transition:opacity .18s ease, transform .22s ease; display:block; width:220px; height:300px; object-fit:cover; border-radius:12px; }
#game-main-img.fade-out{ opacity:0; transform:scale(.995); }


/* Блок контейнера */
.supported-models{ margin:18px 0; font-family:Inter,system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }

/* Скрытый заголовок для скринридеров, видимый только при необходимости */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

/* Сетка моделей: 4 колонки на десктопе, 2 на мобильных */
.models-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:8px 12px;
  align-items:start;
}

/* Элемент модели */
.model-item{
  display:block;
  font-size:12px;               /* небольшой шрифт */
  line-height:1.2;
  color: #0f172a;               /* тёмный, но не чёрный */
  text-decoration:none;
}

/* Ховер/фокус: аккуратное выделение */
.model-item:hover,
.model-item:focus{
  transform:translateY(-1px);
  outline:none;
  color:#022; 
}







/* Responsive: 2 колонки и 1 колонка */
@media (max-width:1100px){
  .games-grid{ grid-template-columns: repeat(2, 1fr); }
  .game-content{ grid-template-columns: 1fr; }
  .game-hero{ flex-direction:column; }
  .game-hero__left{ flex-direction:row; gap:8px; }
  .game-hero__img{ width:160px; height:220px; }
}





/* Responsive */
@media (max-width:900px){
  body{padding:10px}
  .main-layout{flex-direction:column; gap:12px}
  .sidebar{width:100%; height:auto; order:2; max-height:none}
  .content{order:1}
  .topbar{padding:10px}
  .search input{min-width:80px}
  .logo{font-size:16px}
  .account{min-width:100px; padding:10px}
  .banner{min-height:70px; padding:14px}
  .banana{display:flex}
  .sidebar{display:none}
  .page-title{ font-size:22px; }
  /* Если вы хотите, чтобы меню всё ещё было доступно — добавьте переключатель по .banana__more */
}

@media (max-width:700px){
  .games-grid{ grid-template-columns: 1fr; }
  .game-card{ flex-direction:row; min-height:120px; }
  .game-hero__thumb-row > .ss-thumb:nth-child(3) { display: none !important; }
  .models-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap:8px; }
  .model-item{ font-size:13px; padding:10px; }
}

/* Small screens: compact menu with icons left of labels */
@media (max-width:600px){
  .menu__item span:last-child{display:inline-block}
  .menu__item{padding:8px}
  .search input{display:none}
  .topbar{padding:8px}
  .logo{font-size:15px}
  .game-hero__img{ width:110px; height:190px; }
  .game-ss{ width:54px; height:72px; }
  .game-title{ font-size:20px; }
}

/* На очень маленьких экранах — уменьшаем отступы */
@media (max-width:420px){
  .banana{ left:8px; right:8px; bottom:8px; height:52px; padding:4px; }
  .banana__item{ min-width:48px; padding:4px 8px; font-size:11px; }
  .banana__more{ height:40px; width:40px; }
  .page-title{ font-size:18px; }
  .page-title::after{ width:44px; height:5px; }
  .models-grid{ grid-template-columns: 1fr; }
  .model-item{ white-space:normal; }
}
