/* ============================================================
   JAVAR — Дызайн-сістэма
   ============================================================ */

/* --- Tokens --- */
:root {
  --bg:          #181824;
  --surface:     #1F1F2E;
  --surface-2:   #262638;
  --border:      #2E2E44;
  --text:        #FFFFFF;
  --text-body:   #E8E8F0;
  --text-muted:  #7A7A9A;
  --text-dim:    #444466;
  --accent:      #FF2626;
  --accent-glow: rgba(255, 38, 38, 0.15);
  --green:       #4ADE80;
  --yellow:      #FACC15;

  --font-logo:   'Jaro', 'Arial Black', Impact, sans-serif;
  --font-body:   'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-head:   'Arial', 'Helvetica Neue', sans-serif;
  --font-mono:   'IBM Plex Mono', 'Cascadia Code', 'Consolas', monospace;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   18px;

  --nav-h:       68px;
  --max-w:       1180px;
  --page-px:     48px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Page transitions ───────────────────────────────────── */
body {
  opacity: 0;
  transition: opacity .15s ease;
}
body.loaded {
  opacity: 1;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; outline: none; border: none; background: none; }
img { display: block; max-width: 100%; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 999px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
* { scrollbar-width: thin; scrollbar-color: var(--border) var(--surface-2); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 var(--page-px);
  height: var(--nav-h);
  background: rgba(24, 24, 36, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.navbar__logo {
  font-family: var(--font-logo);
  font-size: 36px;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--accent);
  margin-right: 60px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: filter 0.3s ease, transform 0.3s ease;
}
.navbar__logo:hover {
  filter: drop-shadow(0 0 8px rgba(255, 38, 38, 0.6)) drop-shadow(0 0 20px rgba(255, 38, 38, 0.3));
  transform: scale(1.05);
}
.navbar__logo img {
  display: block;
  height: 28px;
  transition: filter 0.3s ease;
}
.navbar__logo:hover img {
  filter: brightness(1.2) saturate(1.3);
}

.navbar__menu {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  order: 1;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin-right: auto;
  min-width: 0;
}

.navbar__links a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.navbar__links a:hover,
.navbar__links a.active { color: var(--text); }

.navbar__submit-item {
  display: flex;
  justify-content: center;
  margin-left: 24px;
}

.navbar__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 clamp(10px, 1.2vw, 14px);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff !important;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 38, 38, 0.2), 0 8px 20px var(--accent-glow);
  transition: opacity 0.2s, transform 0.2s;
}
.navbar__submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.navbar__search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.navbar__search svg { flex-shrink: 0; }

.navbar__search input {
  flex: 1;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.navbar__search input::placeholder { color: var(--text-muted); }
.navbar__search input:focus { color: var(--text); }

.navbar__lang {
  display: flex;
  align-items: center;
  margin-left: 24px;
  order: 2;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  height: 32px;
  transition: color .2s, border-color .2s;
}
.lang-btn:hover { border-color: #4a4a6a; color: var(--text); }

/* ============================================================
   LAYOUT
   ============================================================ */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: calc(var(--max-w) + var(--page-px) * 2);
  margin-inline: auto;
}

.main {
  flex: 1;
  padding: 48px var(--page-px) 0;
  max-width: calc(var(--max-w) + var(--page-px) * 2);
  width: 100%;
}

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.section-heading--compact { margin-bottom: 16px; }

.section-heading h2 {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  text-align: center;
}

.section-heading__bar {
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  width: 100%;
  min-width: 60px;
}

/* ============================================================
   HOMEPAGE STATS
   ============================================================ */
.translation-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 37px;
}

.translation-stat {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 118px;
  padding: 24px 28px;
  min-width: 220px;
  max-width: 340px;
  flex: 1;
  background: linear-gradient(145deg, var(--surface), rgba(38, 38, 56, 0.72));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.translation-stat:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 38, 38, 0.08);
}

.translation-stat::after {
  content: '';
  position: absolute;
  inset: auto -24px -36px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--accent-glow);
  opacity: .75;
}

.translation-stat__label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
}

.translation-stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.translation-stat__value {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   GAME CARD
   ============================================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.new-releases-wrap {
  position: relative;
}

.releases-carousel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.releases-carousel__track {
  display: flex;
  width: 200%;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.releases-carousel__slide {
  width: 50%;
  flex-shrink: 0;
}

.releases-carousel__slide .games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.new-releases-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s, border-color 0.2s, color 0.2s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.new-releases-wrap:hover .new-releases-arrow {
  opacity: 1;
}

.new-releases-arrow:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

.new-releases-arrow--left {
  left: -50px;
}

.new-releases-arrow--right {
  right: -50px;
}

.new-releases-arrow:disabled {
  opacity: 0 !important;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 900px) {
  .new-releases-arrow { display: none; }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, opacity 0.25s;
}
.grid--animate .game-card {
  animation: fadeSlideUp 0.4s ease both;
}
.grid--animate .game-card:nth-child(1) { animation-delay: 0s; }
.grid--animate .game-card:nth-child(2) { animation-delay: 0.06s; }
.grid--animate .game-card:nth-child(3) { animation-delay: 0.12s; }
.grid--animate .game-card:nth-child(4) { animation-delay: 0.18s; }
.grid--animate .game-card:nth-child(5) { animation-delay: 0.24s; }
.grid--animate .game-card:nth-child(6) { animation-delay: 0.3s; }
.game-card:hover {
  border-color: rgba(255, 38, 38, 0.4);
  transform: translateY(-2px);
}

.game-card__cover {
  aspect-ratio: 16/9;
  background: var(--surface-2) center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

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

.game-card__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

.game-card__ai-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #2E2E44;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  z-index: 2;
}
.game-card__ai-badge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: rgba(255, 38, 38, 0.82);
  border-radius: 50%;
}
.game-card__official-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #2E2E44;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  z-index: 2;
}
.game-card__official-badge::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: rgba(38, 200, 38, 0.82);
  border-radius: 50%;
}
.game-card__verified-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(24, 24, 36, 0.84);
  color: #4ADE80;
  border: 1px solid rgba(74, 222, 128, 0.42);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  z-index: 2;
}
.game-card__verified-badge::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.18);
  color: #4ADE80;
  font-size: 9px;
}
.game-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.badge--genre {
  background: var(--accent-glow);
  color: var(--accent);
}
.badge--manual {
  background: rgba(38, 194, 106, 0.12);
  color: #26C26A;
}
.badge--ai {
  background: rgba(122, 122, 154, 0.15);
  color: var(--text-muted);
}
.badge--verified {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: var(--green);
}

.stars {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--accent);
  line-height: 1;
}

.game-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-top: 4px;
}

.game-card__dev {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  transition: opacity 0.2s, transform 0.15s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  height: 34px;
  margin-top: 8px;
}

.btn--primary-lg {
  padding: 15px 36px;
  background: var(--accent);
  color: #fff;
  height: 49px;
  border-radius: var(--radius-md);
}

.btn--download {
  padding: 12px 0;
  background: var(--accent);
  color: #fff;
  width: 100%;
  border-radius: var(--radius-md);
  font-size: 14px;
}

.btn--outline {
  padding: 9px 18px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  gap: 6px;
}
.btn--outline::after { content: ' ▾'; font-size: 10px; }

/* ============================================================
   FEATURED / GAME OF THE DAY
   ============================================================ */
.featured {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 415px;
  margin: 0 auto;
  transition: border-color 0.2s, transform 0.2s;
}
@media (min-width: 769px) {
  .featured {
    display: grid;
    grid-template-columns: minmax(360px, 420px) 1fr;
    gap: 40px;
    max-width: none;
    padding: 20px;
  }
}
.featured:hover {
  border-color: rgba(255, 38, 38, 0.4);
  transform: translateY(-2px);
}

/* Выява: фіксаваны 16:9, абразаецца па межах блока */
.featured__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface-2) center/cover no-repeat;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
@media (min-width: 769px) {
  .featured__image {
    width: 100%;
    min-width: 360px;
    max-width: 420px;
    aspect-ratio: 16/9;
    align-self: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
}

.featured__image > .cover-img,
.game-card__cover > .cover-img,
.game-cover > .cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Калі выявы няма — паказваем плейсхолдар меншай вышыні */
.featured__image--placeholder {
  aspect-ratio: 16 / 5;
}
@media (min-width: 769px) {
  .featured__image--placeholder {
    width: 100%;
    min-width: 360px;
    max-width: 420px;
    aspect-ratio: 16/9;
    align-self: center;
    border-radius: var(--radius-lg);
  }
}

.featured__content {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  gap: 0;
  flex: 1;
  min-width: 0;
}
@media (min-width: 769px) {
  .featured__content {
    padding: 0;
  }
}

.featured__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.featured__label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.featured__title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
}
@media (min-width: 769px) {
  .featured__title {
    font-size: 28px;
    margin-bottom: 12px;
  }
}

.featured__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.featured__tags .platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.featured__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 12px;
  max-width: 100%;
}
@media (min-width: 769px) {
  .featured__desc {
    font-size: 14px;
    margin-bottom: 16px;
  }
}

.featured__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}
.featured__meta-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.featured__meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.featured__meta-value {
  font-weight: 600;
  color: var(--text);
}

.featured__rating {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 28px;
}

.featured__rating .stars { font-size: 20px; letter-spacing: 3px; }

.featured__rating .score {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.featured__actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: auto; padding-top: 16px; }

/* ── Platform / genre links ──────────────────────── */
.platform-links { display:flex; flex-wrap:wrap; gap:8px; }
.platform-link {
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--text);
  background:var(--surface-2);
  font-size:13px;
  font-weight:700;
  transition:border-color .2s, color .2s, background .2s;
}
.platform-link:hover { border-color:var(--text); color:var(--text); }
.platform-link--genre { background:var(--accent-glow); border-color:transparent; color:var(--accent); }
.platform-link--genre:hover { border-color:var(--text); color:var(--text); background:var(--accent-glow); }

/* ============================================================
   ABOUT BLOCK
   ============================================================ */
.about-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}
.about-block p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ============================================================
   CATALOG FILTERS
   ============================================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

/* ============================================================
   GAME PAGE
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -38px;
  margin-bottom: 24px;
}
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb__sep { color: var(--text); font-weight: 600; }
.breadcrumb__current { color: var(--text); font-weight: 600; }

.game-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.game-title-block h1 {
  font-family: var(--font-body);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  text-align: center;
}
.game-title-block__bar {
  width: 100%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(360px, 420px) 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 52px;
}

.game-cover-col { display: flex; flex-direction: column; gap: 16px; }

.game-cover {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--surface) center/cover no-repeat;
}

.game-cover__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.download-count strong { color: #fff; font-weight: 700; }

.stat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 10px;
}

.stat-card {
  flex: 1;
  min-width: 110px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-card__value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}
.stat-card__value--green { color: var(--green); }
.stat-card__value--yellow { color: var(--yellow); }
.stat-card__sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Info table */
.info-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }

.info-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.info-cell:last-child { border-right: none; }

.info-cell--full {
  grid-column: 1 / -1;
  border-right: none;
}

.info-cell__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.info-cell__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-sm {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tag-sm--red { background: var(--accent-glow); color: var(--accent); }
.tag-sm--green { background: rgba(38,194,106,0.12); color: #26C26A; }
.tag-sm--neutral { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }


/* Stats wide */
.stat-cards-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.stat-card-wide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card-wide__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-card-wide__value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
}
.stat-card-wide__sub { font-size: 11px; color: var(--text-muted); }

/* Description */
.section-h2 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.game-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-body);
}

/* ============================================================
   SUBMISSION MODAL
   ============================================================ */
.submission-lock { overflow: hidden; }

.submission-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 8, 14, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}
.submission-modal.open { opacity: 1; visibility: visible; pointer-events: auto; }

.submission-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(92vh, 860px);
  overflow-y: auto;
  padding: 18px 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
}
.submission-modal.open .submission-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.submission-dialog h2 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
}

.submission-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.submission-close:hover { background: var(--surface-2); color: var(--text); }

.submission-form,
.submission-field,
.submission-checks {
  display: flex;
  flex-direction: column;
}
.submission-field[hidden] { display: none !important; }

.submission-unofficial-field {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .3s ease, opacity .25s;
}
.submission-unofficial-field.visible {
  max-height: 200px;
  opacity: 1;
}
.submission-form { gap: 14px; }
.submission-field { gap: 8px; }
fieldset.submission-field { border: 0; padding: 0; }
.submission-field label,
.submission-field legend {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  padding: 0;
  margin: 0;
}
.submission-field p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted);
}
.submission-field input[type="text"],
.submission-field input[type="url"],
.submission-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.submission-field input[type="text"],
.submission-field input[type="url"] {
  height: 34px;
  padding: 0 12px;
}
.submission-field textarea {
  min-height: 80px;
  padding: 8px 12px;
  resize: vertical;
}
.submission-field input:focus,
.submission-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.submission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.submission-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.submission-checks { gap: 6px; align-items: flex-start; }
fieldset.submission-field .submission-checks { margin-top: 8px; }

.submission-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  cursor: pointer;
}
.submission-pill input { position: absolute; opacity: 0; pointer-events: none; }
.submission-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.submission-pill span::before {
  content: '';
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border: 1.5px solid var(--text-muted);
  border-radius: 50%;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.submission-pill input[type="checkbox"] + span::before { border-radius: 3px; }
.submission-pill input:checked + span {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}
.submission-pill input:checked + span::before {
  border-color: var(--accent);
  background: radial-gradient(circle at center, var(--accent) 0 42%, transparent 48%);
}
.submission-pill input[type="checkbox"]:checked + span::before {
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.submission-error {
  display: block;
  border-radius: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 38, 38, 0.35);
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 11px;
  border-width: 0;
  transition: opacity 0.2s, max-height 0.2s, padding 0.2s, border-width 0.2s;
}
.submission-error.visible {
  opacity: 1;
  max-height: 80px;
  padding: 9px 11px;
  border-width: 1px;
}

.submission-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  max-width: 360px;
  padding: 14px 18px;
  border: 1px solid var(--green);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--green);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.25s, transform 0.25s;
}
.submission-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.submission-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}
.submission-submit {
  min-width: 120px;
  height: 38px;
  padding: 0 22px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  transition: opacity 0.15s;
}
.submission-submit:hover { opacity: 0.9; }
.submission-submit:disabled { opacity: 0.65; cursor: wait; }

@media (max-width: 680px) {
  .submission-grid { grid-template-columns: 1fr; }
  .submission-dialog { padding: 18px; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-page {
  max-width: 1120px;
  margin: 0 auto;
}

.faq-hero {
  margin-bottom: 28px;
}

.faq-hero .section-heading {
  margin-bottom: 12px;
}

.faq-hero h1 {
  font-family: var(--font-head);
  font-size: 40px;
  line-height: 1.15;
  color: var(--text);
  text-align: center;
}

.faq-hero p {
  margin-inline: auto;
  font-size: 16px;
  text-align: center;
  line-height: 1.7;
  color: var(--text-muted);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: linear-gradient(180deg, var(--surface), rgba(31,31,46,.72));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s, background .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
}

.faq-item.open {
  border-color: rgba(255, 51, 85, .42);
}

.faq-item:hover {
  border-color: rgba(255, 51, 85, .32);
}

.faq-question {
  font-family: var(--font-head);
  font-size: clamp(19px, 2.4vw, 22px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.18;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  cursor: pointer;
  transition: outline-color 0.15s, outline-offset 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.faq-question:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.faq-question__index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .8px;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(255, 51, 85, .24);
  border-radius: 999px;
  padding: 6px 9px;
}

.faq-question__icon {
  position: relative;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
}

.faq-question__icon::before,
.faq-question__icon::after {
  content: '';
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 2px;
  background: var(--text-muted);
  transform: translateY(-50%);
  border-radius: 2px;
}

.faq-question__icon::after {
  transform: translateY(-50%) rotate(90deg);
  transition: transform .2s, opacity .2s;
}

.faq-item.open .faq-question__icon::after {
  transform: translateY(-50%) rotate(0deg);
  opacity: 0;
}

.faq-answer {
  position: relative;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
  margin: 0 24px 0 70px;
  border-left: 3px solid var(--accent);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--text-body);
}
.faq-answer > div {
  overflow: hidden;
  padding: 0 0 0 18px;
  opacity: 0;
  transition: padding .3s ease, opacity .3s ease;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
}
.faq-item.open .faq-answer > div {
  padding: 16px 0 24px 18px;
  border-top: 1px solid var(--border);
  opacity: 1;
}

@media (max-width: 640px) {
  .faq-page {
    max-width: none;
  }

  .faq-hero h1 {
    font-size: 28px;
    text-align: center;
  }

  .section-heading {
    width: fit-content;
  }

  .faq-question {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
  }

  .faq-question__index {
    display: none;
  }

  .faq-answer {
    margin: 0 18px 20px;
    padding-left: 14px;
  }
}

/* ============================================================
   CONTACTS
   ============================================================ */
.contacts-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}
.contacts-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px var(--page-px);
  border-top: 0.8px solid var(--border);
  margin-top: 37px;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__brand { display: flex; flex-direction: column; gap: 4px; }
.footer__logo {
  font-family: var(--font-logo);
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--accent);
  line-height: 1;
}
.footer__copy { font-size: 12px; color: var(--text-muted); }

.footer__nav {
  display: flex;
  gap: 28px;
  list-style: none;
}
.footer__nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--text); }

.footer__legal {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer__legal a {
  font-size: 11px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer__legal a:hover { color: var(--text-muted); }

/* ============================================================
   SECTION GAP
   ============================================================ */
.section { margin-bottom: 37px; }
.section:last-child { margin-bottom: 0; }

/* ============================================================
   UTILITIES
   ============================================================ */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-52 { margin-top: 52px; }

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

/* ── Navbar toggle (hamburger) ─────────────────────────── */
.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: none;
  border: none;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  transition: color 0.2s;
}
.navbar__toggle:hover { color: var(--text); }
.navbar__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.navbar.open .navbar__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar.open .navbar__toggle span:nth-child(2) { opacity: 0; }
.navbar.open .navbar__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Search autocomplete dropdown ─────────────── */
.navbar__menu { position: relative; }

/* ── Search expand animation ─────── */
.navbar__search-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 10;
  margin-left: 20px;
  transition: margin-left .4s cubic-bezier(.4,0,.2,1);
}

.navbar__search {
  position: relative;
  display: flex;
  align-items: center;
  width: 200px;
  height: 40px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: width .4s cubic-bezier(.4,0,.2,1),
              background .3s ease,
              border-color .3s ease;
}

.navbar__search-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: color .2s;
}
.navbar__search-icon:hover { color: var(--text); }

.navbar__search-icon svg { pointer-events: none; }

.navbar__search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  opacity: 1;
  padding: 0 8px;
  transition: opacity .3s ease;
  outline: none;
}

.navbar__search-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: transparent; /* the visible × is drawn by the two bars below, not this glyph */
  border: none;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0;
  line-height: 1;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.navbar__search-close:hover { opacity: .85; transform: translateY(-50%) scale(1.1); }
.navbar__search-close::before,
.navbar__search-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
.navbar__search-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.navbar__search-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ── Active state ─────── */
.navbar.search-active .navbar__search-wrap {
  margin-left: calc(20px - 220px);
}
.navbar.search-active .navbar__search {
  width: 420px;
  padding-right: 4px;
}
.navbar.search-active .navbar__search-close {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}
/* Submit button: stays in place, fades out as search field covers it */
.navbar__submit-item {
  transition: opacity .4s cubic-bezier(.4,0,.2,1);
}
.navbar.search-active .navbar__submit-item {
  opacity: 0;
  pointer-events: none;
}

/* ── Mobile toggle button ─────── */
.navbar__search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: 16px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .2s, background .2s;
}
.navbar__search-toggle:hover { color: var(--text); background: var(--surface-2); }
.navbar__search-toggle svg { width: 18px; height: 18px; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  max-height: 420px;
  display: flex;
  flex-direction: column;
  z-index: 600;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.search-dropdown__scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.search-dropdown.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.search-dropdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}
.search-dropdown__item:hover,
.search-dropdown__item.active {
  background: var(--accent-glow);
}

.search-dropdown__cover {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--surface-2) center/cover no-repeat;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.search-dropdown__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.search-dropdown__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: .3;
}

.search-dropdown__info { flex: 1; min-width: 0; }

.search-dropdown__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown__genres {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.search-dropdown__year {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 1px;
}

.search-dropdown__all {
  display: block;
  padding: 12px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  border-top: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.search-dropdown__all:hover {
  background: var(--accent-glow);
}

@media (max-width: 820px) {
  :root {
    --page-px: 24px;
  }

  .navbar__menu {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    background: rgba(24, 24, 36, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  }

  .navbar__toggle { display: flex; }

  .navbar.open .navbar__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .navbar__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0;
    width: 100%;
  }

  .navbar__links li { text-align: center; }

  .navbar__links a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
  }
  .navbar__links li:last-child a { border-bottom: none; }

  .navbar__submit-item {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    margin-left: 0;
  }

  .navbar__submit {
    text-align: center;
  }

  .navbar__toggle { order: 4; margin-left: 0; }

  /* Mobile: a plain magnifying-glass button sits next to the language button. Tapping it pops the search field open. */
  .navbar__search-toggle {
    display: flex !important;
    order: 2;
    margin-left: auto;
    margin-right: 4px;
  }

  .navbar__lang { margin-left: 0; margin-right: 10px; order: 3; }
  .lang-btn { height: 40px; }

  /* The wrap itself carries no visual weight in the layout on mobile — it's an
     absolutely-positioned anchor for the popup panel that appears under the toggle. */
  .navbar__search-wrap {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: var(--page-px);
    right: var(--page-px);
    margin: 0;
    flex: none;
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px) scale(.96);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity .3s cubic-bezier(.4,0,.2,1),
                transform .3s cubic-bezier(.4,0,.2,1),
                visibility .3s;
  }

  .navbar.search-active .navbar__search-wrap {
    margin: 0;
    top: calc(100% + 10px);
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .navbar__search,
  .navbar.search-active .navbar__search {
    width: 100%;
    height: 48px;
    padding: 0 8px 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .5);
    transition: none; /* the popup's appearance is animated on the wrap only — no width/size morphing here */
  }

  .navbar__search-icon { display: flex; }

  .navbar__search input {
    font-size: 14px;
    padding: 0 8px;
    opacity: 1;
  }

  .navbar__search-close,
  .navbar.search-active .navbar__search-close {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    margin-left: 4px;
  }

  /* Games grid: 2 columns */
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .releases-carousel__slide .games-grid { grid-template-columns: repeat(2, 1fr); }

  /* Featured body tighter padding on mobile */
  .featured-skeleton__body { padding: 24px 28px; }

  /* Game page: stack layout */
  .game-layout { grid-template-columns: 1fr; }
  .game-cover-col { order: -1; }

  /* Info table: single column */
  .info-row { grid-template-columns: 1fr; }
  .info-cell { border-right: none; }
  .info-cell:first-child { border-bottom: 1px solid var(--border); }

  /* Stat cards wide */
  .stat-cards-wide { grid-template-columns: 1fr; }

  /* Catalog filters */
  .catalog-search { min-width: 0; flex: 1 1 100%; max-width: none; }
  .filter-sep { display: none; }
  .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .catalog-search { min-width: 0; }
  .dropdown__trigger {
    width: 100%;
    justify-content: space-between;
    font-size: 12px;
    padding: 0 12px;
    height: 36px;
  }
  .dropdown.open .dropdown__menu {
    width: max-content !important;
    min-width: 100% !important;
    max-width: calc(100vw - 24px) !important;
    max-height: 55vh !important;
    overflow-x: auto !important;
    z-index: 300 !important;
  }
}

@media (max-width: 580px) {
  :root {
    --page-px: 14px;
    --nav-h: 56px;
  }

  .navbar__logo { margin-right: auto; }
  .navbar__logo img { height: 22px !important; }

  /* Grid: 1 column */
  .games-grid { grid-template-columns: 1fr; }
  .releases-carousel__slide .games-grid { grid-template-columns: 1fr; }

  /* Breadcrumb: reset negative margin on mobile */
  .breadcrumb { margin-top: 0; }

  /* Font sizes */
  .section-heading h2 { font-size: 28px; }
  .featured__title { font-size: 24px; }
  .game-title-block h1 { font-size: 28px; }
  .translation-stat__value { font-size: 26px; }
  .section-h2 { font-size: 20px; }
  .stat-card__value { font-size: 22px; }

  /* Spacing */
  .main { padding-top: 28px; }
  .featured__content { padding: 20px; }
  .about-block { padding: 24px; }
  .about-block p { font-size: 14px; }
  .footer { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .footer__brand { align-items: center; }
  .footer__nav { justify-content: center; }

  /* Homepage stat cards */
  .translation-stat { min-width: 0; max-width: none; padding: 18px 20px; min-height: 100px; }

  /* Game page stat cards */
  .stat-card { min-width: calc(50% - 8px); padding: 12px 14px; }

  /* Translation cards */
  .translation-card__head { flex-direction: column; align-items: flex-start; padding: 14px 16px; }
  .translation-card__right { align-items: flex-start; }
  .translation-card__body { padding: 14px 16px; }
  .translation-card__info-row { gap: 16px; }

  /* Contact form */
  .contacts-content > div { padding: 40px 20px !important; }

  /* Submission dialog */
  .submission-dialog { padding: 14px; }

  /* Featured skeleton */
  .featured-skeleton { min-height: auto; }
}

@media (max-width: 420px) {
  .translation-stats { gap: 6px; }
  .translation-stat { padding: 12px 10px; min-height: 72px; }
  .translation-stat__value { font-size: 20px; }
  .translation-stat__label { font-size: 11px; gap: 6px; }
  .translation-stat__icon { width: 20px; height: 20px; font-size: 10px; }
  .stat-card { min-width: 100%; }
}

