:root {
  --bg-main: #070a10;
  --bg-glass: rgba(7, 10, 16, 0.84);
  --surface-glass: rgba(17, 23, 35, 0.6);
  --hub-bg: rgba(7, 10, 16, 0.55);
  --bg-card: #111723;
  --bg-pill: #182132;
  --bg-dropdown: #141c2b;
  --blue-primary: #0070d1;
  --blue-accent: #3b9eff;
  --blue-gradient: linear-gradient(90deg, #0066cc 0%, #0088ff 100%);
  --accent-rgb: 0, 112, 209;
  --green-bg: rgba(29, 185, 84, 0.14);
  --green-border: rgba(29, 185, 84, 0.35);
  --green-text: #4ade80;
  --orange-bg: rgba(245, 158, 11, 0.12);
  --orange-border: rgba(245, 158, 11, 0.35);
  --orange-text: #fbbf24;
  --text-main: #ffffff;
  --text-secondary: #d1d5db;
  --text-muted: #8492a6;
  --border-color: rgba(255, 255, 255, 0.09);
  --tile-focus-ring: rgba(255, 255, 255, 0.85);
  --card-shadow: none;
  --topbar-h: 64px;
  --safe-top: calc(var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --ease-decel: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-accel: cubic-bezier(0.4, 0, 0.9, 0.35);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-enter: 340ms;
  --dur-exit: 280ms;
  --nav-glass: rgba(18, 18, 24, 0.58);
  --nav-border: rgba(255, 255, 255, 0.14);
  --nav-active: rgba(255, 255, 255, 0.15);
  --nav-icon: rgba(255, 255, 255, 0.62);
  --nav-icon-active: #ffffff;
}

body.light-theme {
  --bg-main: #f3f5f9;
  --bg-glass: rgba(243, 245, 249, 0.88);
  --surface-glass: rgba(255, 255, 255, 0.72);
  --hub-bg: rgba(243, 245, 249, 0.68);
  --bg-card: #ffffff;
  --bg-pill: #eef2f7;
  --bg-dropdown: #ffffff;
  --blue-accent: #0066cc;
  --accent-rgb: 0, 102, 204;
  --green-bg: rgba(22, 163, 74, 0.10);
  --green-border: rgba(22, 163, 74, 0.30);
  --green-text: #15803d;
  --orange-bg: rgba(217, 119, 6, 0.10);
  --orange-border: rgba(217, 119, 6, 0.30);
  --orange-text: #b45309;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --tile-focus-ring: #0066cc;
  --card-shadow: none;
  --nav-glass: rgba(255, 255, 255, 0.62);
  --nav-border: rgba(15, 23, 42, 0.10);
  --nav-active: rgba(15, 23, 42, 0.08);
  --nav-icon: rgba(15, 23, 42, 0.55);
  --nav-icon-active: #0f172a;
}

body.ps3-theme {
  --bg-main: #03040a;
  --bg-glass: rgba(3, 4, 10, 0.82);
  --surface-glass: rgba(8, 6, 3, 0.72);
  --hub-bg: rgba(3, 4, 10, 0.5);
  --bg-card: #14110a;
  --bg-pill: #1e1a10;
  --bg-dropdown: #17130c;
  --blue-primary: #d4a017;
  --blue-accent: #f2c14e;
  --blue-gradient: linear-gradient(90deg, #b8860b 0%, #f5c445 100%);
  --accent-rgb: 242, 193, 78;
  --text-secondary: #e7dcc2;
  --text-muted: #a99a72;
  --border-color: rgba(242, 193, 78, 0.16);
  --tile-focus-ring: #f2c14e;
  --card-shadow: none;
  --nav-glass: rgba(10, 8, 4, 0.62);
  --nav-border: rgba(242, 193, 78, 0.22);
  --nav-active: rgba(242, 193, 78, 0.16);
  --nav-icon: rgba(255, 255, 255, 0.62);
  --nav-icon-active: #f2c14e;
}
body.ps3-theme {
  background: radial-gradient(130% 72% at 50% 0%, #241a05 0%, var(--bg-main) 62%);
}
body.ps3-theme .theme-btn { color: var(--blue-accent); }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Onest', 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html { background: var(--bg-main); overscroll-behavior-y: none; }
body {
  background: var(--bg-main);
  color: var(--text-main);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 0;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  position: relative;
  transition: background-color 0.25s ease, color 0.25s ease;
  font-variant-numeric: tabular-nums;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  background-repeat: repeat;
  background-size: 180px 180px;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><g fill='none' stroke='%23ffffff' stroke-opacity='0.055' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M30 22 L44 46 L16 46 Z'/><circle cx='120' cy='40' r='14'/><path d='M48 100 L74 126 M74 100 L48 126'/><rect x='122' y='118' width='32' height='32' rx='4'/><circle cx='92' cy='168' r='9'/><path d='M150 62 L162 84 L138 84 Z'/><path d='M18 150 L30 172 L6 172 Z'/><circle cx='150' cy='150' r='9'/></g></svg>");
  transition: opacity 0.4s ease;
}
body.light-theme .bg-layer,
body.ps3-theme .bg-layer {
  opacity: 0;
}

.ps3-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: none;
}
body.ps3-theme .ps3-bg {
  display: block;
  opacity: 0.45;
}
body.ps3-theme::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.18) 34%,
    rgba(0, 0, 0, 0) 58%,
    rgba(0, 0, 0, 0.32) 100%
  );
}

#tab-home, #tab-fav, #tab-cart, #tab-profile {
  position: relative;
  z-index: 2;
}

@keyframes tabFadeSlideUp {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.tab-animate-in {
  animation: tabFadeSlideUp 300ms var(--ease-decel) forwards;
}

@keyframes cardIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

#dynamicBlocksContainer > * {
  animation: cardIn 380ms var(--ease-decel) backwards;
}
#dynamicBlocksContainer > *:nth-child(1) { animation-delay: 0ms; }
#dynamicBlocksContainer > *:nth-child(2) { animation-delay: 50ms; }
#dynamicBlocksContainer > *:nth-child(3) { animation-delay: 100ms; }
#dynamicBlocksContainer > *:nth-child(4) { animation-delay: 150ms; }
#dynamicBlocksContainer > *:nth-child(5) { animation-delay: 200ms; }
#dynamicBlocksContainer > *:nth-child(6) { animation-delay: 250ms; }
#dynamicBlocksContainer > *:nth-child(n+7) { animation-delay: 300ms; }

.genres-grid > *, .collection-grid > *, .games-list > *, .search-results-grid > *, .editions-grid > * {
  animation: cardIn 340ms var(--ease-decel) backwards;
}

.collection-card, .game-row, .profile-item, .pay-method-btn, .cart-card-item, .back-btn, .hub-close {
  transition: transform 0.16s ease;
}
.collection-card:active, .game-row:active, .profile-item:active, .pay-method-btn:active, .hub-card:active, .edition-card:active, .topup-full:active, .cart-card-item:active, .back-btn:active, .theme-btn:active, .region-btn:active, .hub-close:active, .fav-btn:active {
  transform: scale(0.97);
}
.nav-tab:active { transform: scale(0.9); }
.primary-btn:active { transform: scale(0.98); }

.nav-badge.pop { animation: badgePop 360ms var(--ease-decel); }
@keyframes badgePop {
  0% { transform: scale(0.55); }
  55% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #dynamicBlocksContainer > *, .genres-grid > *, .collection-grid > *, .games-list > *, .search-results-grid > *, .editions-grid > * { animation: none !important; }
  .nav-badge.pop { animation: none !important; }
}

.icon-svg { width: 18px; height: 18px; flex-shrink: 0; }

.byn-sign {
  display: inline-block;
  width: 0.66em;
  height: 0.82em;
  vertical-align: -0.08em;
  margin-left: 0.12em;
  fill: currentColor;
}
.ps5-square-tile .byn-sign,
.collection-card .byn-sign,
.game-row .byn-sign {
  width: 0.56em;
  height: 0.72em;
  vertical-align: -0.06em;
  margin-left: 0.09em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  padding: calc(12px + var(--safe-top)) 16px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-box {
  flex: 1;
  height: 40px;
  background: rgba(17, 23, 35, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
body.light-theme .search-box { background: rgba(255, 255, 255, 0.85); }
.search-icon { color: var(--text-muted); width: 17px; height: 17px; }
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 14.5px;
  font-weight: 500;
  width: 100%;
  user-select: text;
}
.search-box input::placeholder { color: var(--text-muted); font-weight: 400; }

.theme-btn, .region-btn {
  height: 40px;
  background: rgba(17, 23, 35, 0.75);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
body.light-theme .theme-btn, body.light-theme .region-btn { background: rgba(255, 255, 255, 0.85); }
.theme-btn { width: 40px; }
.region-btn { padding: 0 12px; gap: 6px; }
.theme-btn:active, .region-btn:active { transform: scale(0.94); }

.flag-mini { width: 22px; height: 16px; border-radius: 4px; object-fit: cover; display: block; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.chevron-icon { width: 14px; height: 14px; color: var(--text-muted); }

.user-profile { display: flex; align-items: center; gap: 8px; margin-right: 12px; flex-shrink: 0; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-color); background: var(--bg-card); }
.user-name { font-size: 14px; font-weight: 600; color: var(--text-main); max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.light-theme .user-avatar { border-color: var(--border-color); background: #ffffff; }
body.light-theme .user-name { color: var(--text-main); }

.back-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.back-btn:active { transform: scale(0.95); }

.region-dropdown { position: fixed; top: calc(var(--topbar-h, 64px) + 6px); right: 16px; background: var(--bg-dropdown); border: 1px solid var(--border-color); border-radius: 16px; padding: 6px; z-index: 170; display: none; box-shadow: 0 12px 32px rgba(0,0,0,0.45); min-width: 170px; }
.region-dropdown.open { display: block; animation: tabFadeSlideUp 160ms ease forwards; }
.region-option { padding: 10px 12px; border-radius: 10px; display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--text-main); cursor: pointer; }
.region-option.active { background: rgba(var(--accent-rgb), 0.18); color: var(--blue-accent); }
.region-all-link { border-top: 1px solid var(--border-color); margin-top: 4px; font-size: 13px; color: var(--text-muted); justify-content: center; }

.hub-screen { position: fixed; inset: 0; background: var(--hub-bg); z-index: 200; padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom)); display: none; overflow-y: auto; }
.hub-screen.active { display: block; animation: tabFadeSlideUp 300ms var(--ease-decel) forwards; }
body.hub-open .topbar,
body.hub-open #tab-home,
body.hub-open #tab-fav,
body.hub-open #tab-cart,
body.hub-open #tab-profile,
body.hub-open .bottom-nav,
body.hub-open .sticky-action-bar,
body.hub-open .detail-view,
body.hub-open .collection-view,
body.hub-open .legal-view {
  visibility: hidden;
}
.hub-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.hub-brand { font-weight: 900; font-size: 19px; letter-spacing: -0.03em; }
.hub-close { background: var(--surface-glass); border: 1px solid var(--border-color); color: var(--text-main); padding: 8px 14px; border-radius: 18px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.hub-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 300px; margin: 0 auto; }
.hub-card { background: var(--surface-glass); border: 1.5px solid var(--border-color); border-radius: 18px; padding: 14px; cursor: pointer; transition: transform 0.15s ease; aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.hub-card:active { transform: scale(0.97); }
.hub-card.selected { border-color: var(--blue-accent); background: rgba(var(--accent-rgb), 0.12); }
.hub-flag-img { width: 44px; height: 32px; border-radius: 6px; object-fit: cover; display: block; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.hub-card h3 { font-size: 17px; font-weight: 700; margin: 0; }
.hub-card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.35; margin: 0; }

.hub-extra { margin-top: 22px; }
.hub-extra-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: inherit;
  margin: 0 2px 14px;
}
.hub-extra-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 16px;
  margin-bottom: 10px;
  background: var(--surface-glass);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  color: inherit;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.hub-extra-btn:active { transform: scale(0.985); }
.hub-extra-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* HERO-БАННЕР: крупные плитки с инфо внутри (по референсу) */
.hero-peek-section {
  margin: 4px 0 22px;
  position: relative;
}

.hero-peek-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 11% 12px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.hero-peek-track::-webkit-scrollbar {
  display: none;
}
.hero-peek-track.no-snap {
  scroll-snap-type: none;
}

.hero-peek-card {
  flex: 0 0 78vw;
  max-width: 348px;
  aspect-ratio: 1 / 1.1;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  cursor: pointer;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 18px 20px;
  color: #ffffff;
  transform: scale(0.95);
  opacity: 0.72;
  contain: paint;
  transition: transform 0.26s ease, opacity 0.26s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero-peek-card.active {
  transform: scale(1);
  opacity: 1;
}

.hero-peek-card:active {
  transform: scale(0.985);
}

.hero-peek-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.hero-peek-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 9, 15, 0) 28%,
    rgba(6, 9, 15, 0.5) 60%,
    rgba(6, 9, 15, 0.92) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-peek-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  pointer-events: none;
}

.hero-peek-badge {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-peek-title {
  font-size: 27px;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-peek-sub {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  line-height: 1.3;
}

.hero-peek-dots {
  display: none;
}

.section { padding: 0 16px; margin-bottom: 26px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.section-header-link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.section-header-link:active { opacity: 0.7; }
.section-title-arrow {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.78em;
  font-weight: 700;
  opacity: 0.55;
  transform: translateY(-1px);
}

.powered-by {
  padding: 18px 0 10px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.powered-by-link {
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.powered-by-link:active { opacity: 0.7; }

#tab-fav, #tab-cart {
  flex-direction: column;
  min-height: 100vh;
}
#tab-fav .powered-by, #tab-cart .powered-by {
  margin-top: auto;
}
.section-link { color: var(--blue-accent); font-size: 14px; font-weight: 600; cursor: pointer; }
.page-heading { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }

.period-tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg-card); border-radius: 12px; padding: 3px; margin-bottom: 14px; border: 1px solid var(--border-color); }
.period-tab { text-align: center; padding: 9px 0; font-size: 13.5px; font-weight: 600; color: var(--text-muted); border-radius: 9px; cursor: pointer; transition: 0.18s ease; }
.period-tab:active { transform: scale(0.96); }
.period-tab.active { background: var(--blue-gradient); color: #fff; box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3); }

.period-tabs.slider { position: relative; }
.period-tabs.slider .period-tabs-ind { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 9px; background: var(--blue-gradient); box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3); transform: translateX(calc(var(--pi, 0) * 100%)); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); will-change: transform; }
.period-tabs.slider .period-tab { position: relative; z-index: 1; background: none; box-shadow: none; transition: color 0.22s ease, transform 0.18s ease; }
.period-tabs.slider .period-tab.active { background: none; box-shadow: none; color: #fff; }

.h-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 3px 2px 10px; cursor: grab; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll.dragging { scroll-behavior: auto; cursor: grabbing; }

.ps5-square-tile {
  min-width: 172px;
  max-width: 172px;
  height: 172px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  color: #ffffff;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ps5-square-tile:hover, .ps5-square-tile:active {
  transform: scale(0.97);
  border-color: var(--tile-focus-ring);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.ps5-square-tile img.tile-bg-img,
.ps5-square-tile video.tile-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.ps5-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 9, 15, 0.12) 0%,
    rgba(6, 9, 15, 0.22) 38%,
    rgba(6, 9, 15, 0.86) 74%,
    rgba(6, 9, 15, 0.97) 100%
  );
  z-index: 1;
  pointer-events: none;
}
.ps5-tile-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; pointer-events: none; }
.ps5-tile-bottom { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.psplus-square-tile { justify-content: flex-end; }
.ps5-tags-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ps5-plat-tag {
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ps5-edition-tag {
  background: rgba(10, 14, 22, 0.62);
  color: #f1f5f9;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 112px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps5-release-tag {
  background: rgba(var(--accent-rgb), 0.22);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.ps5-video-pill { background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 9.5px; font-weight: 700; padding: 3px 6px; border-radius: 5px; }
.ps5-tile-title {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 6px rgba(0,0,0,0.65);
}
.ps5-tile-price-row { display: flex; align-items: baseline; gap: 4px; margin-top: 1px; min-width: 0; white-space: nowrap; }
.ps5-disc-chip { background: #ffffff; color: #090d16; font-size: 9px; font-weight: 900; padding: 1px 3px; border-radius: 3px; letter-spacing: -0.02em; line-height: 1.25; flex-shrink: 0; }
.ps5-tile-price { font-size: 13.5px; font-weight: 900; color: #ffffff; letter-spacing: -0.01em; line-height: 1.1; white-space: nowrap; }
.ps5-tile-old-price { font-size: 10.5px; font-weight: 600; color: rgba(255, 255, 255, 0.58); text-decoration: line-through; white-space: nowrap; flex-shrink: 0; }
.ps5-tile-price-row .byn-sign { width: 0.52em; height: 0.68em; margin-left: 0.07em; vertical-align: -0.05em; }

.psplus-square-tile .ps5-plus-mark {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 66px;
  font-weight: 900;
  z-index: 1;
  opacity: 0.9;
  pointer-events: none;
  text-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.psplus-tier-pill {
  background: rgba(0, 0, 0, 0.72);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.45);
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.psplus-sub-perk { font-size: 11px; color: rgba(255, 255, 255, 0.78); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.plus-rows { display: flex; flex-direction: column; gap: 10px; }
.plus-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-glass); border: 1px solid var(--border-color); cursor: pointer; transition: transform 0.16s ease, border-color 0.16s ease; }
.plus-row:active { transform: scale(0.98); }
.plus-row-mark { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.plus-row-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plus-row-plus { font-size: 22px; font-weight: 900; }
.plus-row-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.plus-row-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plus-row-price { font-size: 16px; font-weight: 800; white-space: nowrap; }

.topup-square-center {
  position: relative;
  z-index: 2;
  margin: auto 0;
  align-self: center;
  background: rgba(255, 255, 255, 0.96);
  color: #991b1b;
  font-weight: 900;
  font-size: 20px;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  letter-spacing: -0.02em;
}
.topup-art { background: linear-gradient(155deg, #630d0d 0%, #1a0303 100%); }
.topup-art.ua { background: linear-gradient(155deg, #102e4a 0%, #071320 100%); }
.topup-art.in { background: linear-gradient(155deg, #1d3b23 0%, #09140b 100%); }
.topup-art.pl { background: linear-gradient(155deg, #521627 0%, #18050b 100%); }

.topup-full { position: relative; width: 100%; min-height: 136px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: var(--card-shadow); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.16s ease; }
.topup-full:active { transform: scale(0.985); }
.topup-full-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.topup-full-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.42) 100%); }
.topup-full-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 20px 16px; text-align: center; color: #fff; }
.topup-full-plus { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.16); font-size: 26px; font-weight: 700; line-height: 1; }
.topup-full-title { font-size: 20px; font-weight: 900; letter-spacing: -0.01em; }
.topup-full-sub { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.82); }

.unavailable { position: relative; }
.unavailable::before { content: ''; position: absolute; inset: 0; background: rgba(8, 10, 16, 0.62); z-index: 15; border-radius: inherit; pointer-events: none; }
.unavailable::after { content: 'Недоступно'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 16; background: rgba(0, 0, 0, 0.82); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; padding: 5px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.region-option.unavailable::after { left: auto; right: 12px; transform: translateY(-50%); }

.topup-config { padding-top: 20px; }
.topup-amount-block { text-align: center; margin-bottom: 4px; }
.topup-amount-label { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.topup-amount-big { font-size: 34px; font-weight: 900; letter-spacing: -0.03em; }
.topup-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; margin: 20px 0 8px; background: rgba(255, 255, 255, 0.16); outline: none; cursor: pointer; }
body.light-theme .topup-slider { background: rgba(15, 23, 42, 0.15); }
.topup-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--blue-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); cursor: pointer; }
.topup-slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--blue-accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); cursor: pointer; }
.topup-ticks { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); font-weight: 600; padding: 0 2px; margin-bottom: 18px; }
.topup-breakdown { margin-bottom: 14px; }
.topup-breakdown-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.topup-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topup-chip { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 800; }
.topup-overpay { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }
.topup-pay-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.topup-pay-label { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.topup-pay-value { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.topup-how { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 0 16px; margin-bottom: 4px; }
.topup-how summary { list-style: none; cursor: pointer; padding: 14px 0; font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.topup-how summary::-webkit-details-marker { display: none; }
.topup-how summary::after { content: '+'; font-size: 20px; color: var(--text-muted); font-weight: 400; }
.topup-how[open] summary::after { content: '−'; }
.topup-how ul { list-style: none; margin: 0 0 14px; padding: 0; }
.topup-how li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.topup-how li::before { content: '✓'; position: absolute; left: 0; color: #22c55e; font-weight: 700; }

.search-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search-results-grid .ps5-square-tile { min-width: 100%; max-width: 100%; height: auto; aspect-ratio: 1 / 1; }

@keyframes slideInFromRight {
  0% { transform: translate3d(100vw, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes slideOutToRight {
  0% { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0.7; transform: translate3d(100vw, 0, 0); }
}

.detail-view, .collection-view { display: none; position: fixed; top: var(--topbar-h); left: 0; right: 0; width: 100vw; height: calc(100vh - var(--topbar-h)); max-width: 100vw; max-height: calc(100vh - var(--topbar-h)); padding-top: 12px; padding-bottom: calc(110px + var(--safe-bottom)); will-change: transform, opacity; background: var(--bg-main); z-index: 150; overflow-y: auto; overscroll-behavior: contain; }
.detail-view.active, .collection-view.active { display: block; animation: slideInFromRight var(--dur-enter) var(--ease-decel) forwards; }
.collection-view { padding-bottom: calc(80px + var(--safe-bottom)); }
body.ps3-theme .detail-view,
body.ps3-theme .collection-view,
body.ps3-theme .legal-view { background: transparent; }
.detail-view.closing, .collection-view.closing { display: block; pointer-events: none; animation: slideOutToRight var(--dur-exit) var(--ease-accel) forwards; }

.sticky-action-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; width: 100%; max-width: 100%; padding: 12px 16px calc(12px + var(--safe-bottom)); background: var(--bg-glass); border-top: 1px solid var(--border-color); z-index: 200; }
.sticky-action-bar .primary-btn { width: 100%; background: var(--blue-gradient); border: none; color: #fff; font-size: 16px; font-weight: 700; padding: 16px; border-radius: 12px; cursor: pointer; box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.25); }
.sticky-action-bar .primary-btn:active { transform: scale(0.98); }

body.detail-open { overflow: hidden; width: 100vw; }

/* Десктоп: все оверлеи держим в той же 480px колонке, что и витрина */
@media (min-width: 768px) {
  .detail-view, .collection-view {
    top: var(--topbar-h);
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 480px;
    max-width: 480px;
    height: calc(100vh - var(--topbar-h));
    max-height: calc(100vh - var(--topbar-h));
    border-radius: 0;
    padding-bottom: calc(110px + var(--safe-bottom));
  }
  .sticky-action-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 480px;
    max-width: 480px;
  }
  .legal-view,
  .hub-screen {
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 480px;
    max-width: 480px;
  }
  body.detail-open { width: 480px; }
}

.collection-header { padding: 8px 16px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.collection-title-wrap { display: flex; align-items: center; gap: 10px; }
.collection-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.collection-grid { padding: 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.collection-card { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--bg-card); border: 1.5px solid rgba(255, 255, 255, 0.12); color: #ffffff; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.16s ease, border-color 0.16s ease; }
.collection-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.collection-card-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(6, 9, 15, 0.12) 0%, rgba(6, 9, 15, 0.22) 38%, rgba(6, 9, 15, 0.86) 74%, rgba(6, 9, 15, 0.97) 100%); }
.collection-card-top { position: relative; z-index: 2; display: flex; justify-content: flex-end; pointer-events: none; }
.collection-card-bottom { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.collection-price-row { display: flex; align-items: baseline; gap: 4px; min-width: 0; white-space: nowrap; }
.collection-price { font-size: 14.5px; font-weight: 900; color: #ffffff; letter-spacing: -0.01em; white-space: nowrap; }
.collection-old-price { font-size: 10.5px; font-weight: 600; color: rgba(255, 255, 255, 0.58); text-decoration: line-through; white-space: nowrap; flex-shrink: 0; }
.collection-disc { font-size: 9.5px; font-weight: 800; padding: 1px 4px; border-radius: 4px; background: rgba(29, 185, 84, 0.2); color: #4ade80; flex-shrink: 0; line-height: 1.25; }
.collection-disc.hot { background: rgba(234, 88, 12, 0.22); color: #fb923c; }
.collection-price-row .byn-sign { width: 0.52em; height: 0.68em; margin-left: 0.07em; vertical-align: -0.05em; }
.collection-name { font-size: 13.5px; font-weight: 800; color: #ffffff; line-height: 1.18; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65); }

.games-list { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.game-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-color); box-shadow: var(--card-shadow); cursor: pointer; transition: transform 0.16s ease; }
.game-row:active { transform: scale(0.98); }
.game-row-art { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 10px; overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-color); }
.game-row-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-row-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.game-row-title { font-size: 14px; font-weight: 700; color: var(--text-main); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-row-meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-row-price-col { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.game-row-price { font-size: 15px; font-weight: 800; color: var(--text-main); white-space: nowrap; }
.game-row-old { font-size: 11px; color: var(--text-muted); text-decoration: line-through; }
.game-row-disc { font-size: 10.5px; font-weight: 800; padding: 1px 5px; border-radius: 6px; background: rgba(29, 185, 84, 0.2); color: #4ade80; }

@keyframes shimmerPulse {
  0% { opacity: 0.45; }
  50% { opacity: 0.85; }
  100% { opacity: 0.45; }
}
.skeleton-card { display: flex; flex-direction: column; gap: 8px; animation: shimmerPulse 1.1s infinite ease-in-out; }
.skeleton-box { width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; background: #1c2436; }
body.light-theme .skeleton-box, body.light-theme .skeleton-line { background: #dce3ee; }
.skeleton-line { height: 12px; border-radius: 6px; background: #1c2436; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w85 { width: 85%; }
.skeleton-line.w40 { width: 40%; }

.detail-hero { width: calc(100% - 32px); margin: 0 16px; aspect-ratio: 1 / 1; height: auto; position: relative; overflow: hidden;   background: #0d121c; border-radius: 20px; border: 1px solid var(--border-color); }
.detail-hero video, .detail-hero img.hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-btn { position: absolute; bottom: 16px; right: 16px; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--border-color); color: var(--text-main); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 30; pointer-events: auto; transition: transform 0.15s ease, color 0.2s ease; }
.fav-btn:active { transform: scale(0.9); }
.fav-btn.liked { color: var(--blue-accent); }
.sound-btn { position: absolute; bottom: 16px; left: 16px; height: 38px; padding: 0 12px; border-radius: 10px; background: rgba(15,20,30,0.85); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; cursor: pointer; z-index: 5; }
.detail-body { padding: 18px 16px; }
.detail-title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.detail-name { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.type-pill { background: rgba(var(--accent-rgb), 0.16); color: var(--blue-accent); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; }
.discount-badge { background: #ea580c; color: #fff; font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 6px; }
.detail-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.detail-price { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.detail-old-price { font-size: 17px; font-weight: 600; color: var(--text-muted); text-decoration: line-through; }
.old-price { font-size: 12.5px; font-weight: 600; color: var(--text-muted); text-decoration: line-through; }
.info-row-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 18px; }
.editions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 20px; }
.edition-card { background: var(--surface-glass); border: 2px solid var(--border-color); border-radius: 14px; padding: 12px; cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.edition-card:active { transform: scale(0.97); }
.edition-card.active { border-color: #ffffff; background: var(--surface-glass); }
.edition-info-card { margin-top: 12px; }
.edition-info-card .bullet-list { margin: 10px 0 0; }
body.light-theme .edition-card.active { border-color: #0088ff; background: rgba(0,136,255,0.10); }
body.ps3-theme .edition-card.active { border-color: var(--blue-accent); background: rgba(var(--accent-rgb), 0.12); }
.edition-name { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.edition-price { font-size: 16px; font-weight: 800; }
.bullet-list { list-style: none; margin-bottom: 20px; }
.bullet-list li { position: relative; padding-left: 16px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.bullet-list li::before { content: "•"; color: var(--blue-accent); font-weight: 900; position: absolute; left: 0; }
.desc-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px; margin-top: 10px; }
.desc-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.desc-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; white-space: pre-line; }
.detail-section-title { font-size: 16px; font-weight: 700; margin: 4px 0 8px; }
.dlc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.dlc-card { display: flex; gap: 12px; padding: 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; }
.dlc-cover { width: 64px; height: 64px; border-radius: 10px; background-size: cover; background-position: center; flex-shrink: 0; }
.dlc-info { min-width: 0; flex: 1; }
.dlc-name { font-size: 14px; font-weight: 700; }
.dlc-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }
.dlc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.dlc-price { font-size: 15px; font-weight: 800; }
.dlc-add { border: 1px solid var(--border-color); background: var(--surface-glass); color: var(--text-main); border-radius: 9px; padding: 7px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.dlc-add.in-cart { color: var(--text-muted); }
.specs-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 14px 16px; margin-top: 16px; }
.spec-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.spec-line:last-child { border-bottom: none; }
.spec-label { color: var(--text-muted); }
.spec-val { font-weight: 600; }

.sticky-action-bar .primary-btn {
  width: 100%;
  background: var(--blue-gradient);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.25);
}
.sticky-action-bar .primary-btn:active {
  transform: scale(0.98);
}
.primary-btn { width: 100%; background: var(--blue-gradient); border: none; color: #fff; font-size: 15.5px; font-weight: 700; padding: 15px; border-radius: 14px; cursor: pointer; box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.25); transition: transform 0.15s ease; }
.primary-btn:active { transform: scale(0.98); }
.ghost-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; min-height: 44px; background: var(--surface-glass); border: 1px solid var(--border-color); border-radius: 12px; color: var(--text-main); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform 0.15s ease; }
.ghost-btn:active { transform: scale(0.97); }

.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - var(--topbar-h) - 190px); text-align: center; }
.cart-empty-text { color: var(--text-muted); margin-bottom: 20px; }
.cart-empty-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.cart-empty-btn { width: 230px; max-width: 100%; }

.fav-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - var(--topbar-h) - 260px); text-align: center; }
.fav-empty-text { color: var(--text-muted); margin-bottom: 16px; }
.fav-empty-btn { width: 210px; max-width: 100%; }
.primary-btn.in-cart { background: var(--bg-card); border: 1.5px solid var(--blue-accent); color: var(--text-main); box-shadow: none; }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.toast-banner { position: fixed; top: calc(12px + var(--safe-top)); left: 16px; right: 16px; max-width: 448px; margin: 0 auto; background: #143523; border: 1px solid #24b47e; color: #fff; padding: 13px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; display: none; justify-content: space-between; align-items: center; z-index: 300; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.toast-banner.info { background: #132238; border-color: #3b9eff; }
.toast-banner.show { display: flex; animation: tabFadeSlideUp 180ms ease forwards; }
.toast-close { cursor: pointer; opacity: 0.75; padding-left: 10px; }

.fav-notify-box { background: var(--surface-glass); border: 1.5px solid var(--border-color); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; cursor: pointer; transition: all 0.2s ease; }
.fav-notify-box.active { border-color: var(--blue-accent); background: var(--surface-glass); }
.fav-notify-text { font-size: 13.5px; font-weight: 500; color: var(--text-muted); line-height: 1.4; }
.fav-notify-box.active .fav-notify-text { color: var(--text-main); }
.fav-notify-check { width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid var(--border-color); background: var(--bg-pill); color: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fav-notify-check svg { width: 17px; height: 17px; }
.fav-notify-box.active .fav-notify-check { background: var(--blue-gradient); border-color: transparent; color: #ffffff; }

.cart-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.cart-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.cart-total-byn { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.cart-subhead { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.cart-subhead span:last-child { color: var(--blue-accent); }
.cart-card-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 12px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cart-item-left { display: flex; align-items: center; gap: 12px; }
.cart-thumb { width: 54px; height: 54px; border-radius: 10px; background-size: cover; background-position: center; flex-shrink: 0; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-box { display: flex; align-items: center; background: var(--bg-pill); border: 1px solid var(--border-color); border-radius: 10px; padding: 2px; }
.qty-btn { width: 30px; height: 30px; border: none; background: transparent; color: var(--text-main); font-size: 17px; font-weight: 600; cursor: pointer; }
.qty-val { min-width: 24px; text-align: center; font-weight: 700; font-size: 14px; }
.trash-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-pill); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.smart-notice { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green-text); padding: 12px 14px; border-radius: 12px; font-size: 13px; font-weight: 500; line-height: 1.4; margin: 10px 0 20px; }
.smart-warning { background: var(--orange-bg); border: 1px solid var(--orange-border); color: var(--orange-text); padding: 12px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.4; margin: 10px 0 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.empty-cards-placeholder { border: 1.5px dashed var(--border-color); border-radius: 14px; padding: 16px; text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 8px; }
.pay-method-btn { background: var(--bg-card); border: 1.5px solid var(--border-color); border-radius: 12px; padding: 12px 6px; color: var(--text-main); font-size: 13.5px; font-weight: 600; text-align: center; cursor: pointer; }
.pay-method-btn.active { background: var(--blue-gradient); color: #fff; border-color: transparent; }
.terms-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-muted); margin: 16px 0; cursor: pointer; }
.terms-row input { width: 18px; height: 18px; accent-color: #0088ff; }
.terms-row a { color: var(--blue-accent); text-decoration: none; font-weight: 500; }
.cart-legal-note { font-size: 12.5px; color: var(--text-muted); margin: -6px 0 14px; }
.cart-legal-note a { color: var(--blue-accent); text-decoration: none; font-weight: 500; }

.legal-view { display: none; position: fixed; top: var(--topbar-h); left: 0; right: 0; width: 100vw; height: calc(100vh - var(--topbar-h)); max-width: 100vw; padding: 12px 16px calc(110px + var(--safe-bottom)); background: var(--bg-main); z-index: 160; overflow-y: auto; overscroll-behavior: contain; }
.legal-view.active { display: block; animation: slideInFromRight var(--dur-enter) var(--ease-decel) forwards; }
.legal-topbar { margin-bottom: 10px; }
.legal-close { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.legal-wrap { max-width: 720px; }
.legal-doc-title { font-size: 20px; font-weight: 800; margin: 6px 0 14px; }
.legal-subtitle { font-size: 16px; font-weight: 800; margin: 20px 0 8px; }
.legal-doc-body { font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.legal-requisites { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.legal-req-title { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.legal-req-line { font-size: 13.5px; color: var(--text-secondary); margin-top: 2px; }
.legal-version { font-size: 12px; color: var(--text-muted); margin-top: 18px; text-align: center; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto; padding: 0 16px calc(10px + var(--safe-bottom)); display: flex; justify-content: center; z-index: 60; pointer-events: none; }
.nav-pill { position: relative; display: flex; width: 100%; max-width: 420px; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: var(--nav-glass); border: 1px solid var(--nav-border); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); pointer-events: auto; touch-action: none; transition: transform 0.18s var(--ease-decel), box-shadow 0.18s ease; }
.nav-pill.swiping { transition: none; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.nav-indicator { position: absolute; top: 6px; left: 0; width: var(--nav-w, 60px); height: 50px; border-radius: 999px; background: var(--nav-active); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px rgba(0, 0, 0, 0.18); z-index: 0; pointer-events: none; transform: translateX(var(--nav-x, 0px)) scale(1); transition: transform 0.24s var(--ease-decel); }
.nav-pill.nav-sliding .nav-indicator { transition: none; }
.nav-pill.nav-hold .nav-indicator { transform: translateX(var(--nav-x, 0px)) scale(1.16); }
.nav-tab { flex: 1 1 0; min-width: 0; height: 50px; display: flex; align-items: center; justify-content: center; color: var(--nav-icon); cursor: pointer; position: relative; z-index: 1; -webkit-tap-highlight-color: transparent; }
.nav-bubble { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; background: transparent; transition: transform 0.15s var(--ease-standard), color 0.2s ease; }
.nav-tab.active { color: var(--nav-icon-active); }
.nav-tab:active .nav-bubble { transform: scale(0.92); }
.nav-icon { width: 22px; height: 22px; stroke-width: 2; }
.nav-avatar-bubble { background: transparent; overflow: visible; }
.nav-avatar { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.nav-avatar-initials { width: 28px; height: 28px; border-radius: 50%; font-size: 12px; font-weight: 800; color: var(--nav-icon-active); display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.10); }
.nav-badge { position: absolute; top: 0; right: 0; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: none; align-items: center; justify-content: center; padding: 0 4px; }
.nav-badge.show { display: flex; }

#tab-home { padding-bottom: calc(80px + var(--safe-bottom)); }
body.profile-open .topbar { display: none; }
body.profile-open #tab-profile { padding-top: calc(16px + var(--safe-top)) !important; }
body.profile-open .legal-view { top: 0; height: 100vh; }

.orders-modal { position: fixed; inset: 0; z-index: 180; display: none; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.orders-modal.active { display: flex; }
.orders-sheet { width: 100%; max-width: 480px; max-height: 84vh; display: flex; flex-direction: column; background: var(--bg-main); border-radius: 24px 24px 0 0; border: 1px solid var(--border-color); border-bottom: 0; padding: 16px 16px calc(18px + var(--safe-bottom)); box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.45); animation: ordersSheetIn 260ms var(--ease-decel); }
.orders-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.orders-sheet-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.orders-close { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-glass); border: 1px solid var(--border-color); color: var(--text-main); font-size: 16px; cursor: pointer; }
.orders-modal-list { overflow-y: auto; padding-bottom: 4px; }
body.orders-open { overflow: hidden; }
@keyframes ordersSheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 768px) {
  .orders-modal { align-items: center; }
  .orders-sheet { border-radius: 24px; border-bottom: 1px solid var(--border-color); max-height: 82vh; }
}

.profile-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface-glass); border: 1px solid var(--border-color); border-radius: 14px; margin-bottom: 10px; }
.profile-avatar-wrap { position: relative; width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: var(--blue-gradient); display: flex; align-items: center; justify-content: center; }
.profile-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-initials { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #ffffff; }
.profile-head-info { min-width: 0; }
.profile-head-name { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-head-username { font-size: 14px; color: var(--text-muted); margin-top: 2px; }

.profile-currency { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-glass); border: 1px solid var(--border-color); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; min-height: 52px; }
.profile-currency-label { font-size: 15px; font-weight: 600; }
.currency-switch { display: inline-flex; background: var(--bg-pill); border-radius: 10px; padding: 3px; gap: 2px; }
.currency-btn { border: 0; background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: background 0.18s, color 0.18s; }
.currency-btn.active { background: var(--blue-gradient); color: #ffffff; }
.cart-total-usd { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.profile-item { background: var(--surface-glass); border: 1px solid var(--border-color); border-radius: 14px; padding: 0 16px; min-height: 52px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.profile-item-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile-arrow { color: var(--text-muted); font-size: 18px; }
.profile-item-legal span { font-size: 14.5px; }

.profile-socials-title { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 12px 2px 10px; }
.profile-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.profile-social { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; background: var(--surface-glass); border: 1px solid var(--border-color); border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.profile-social svg { width: 20px; height: 20px; flex-shrink: 0; }
.profile-social-wide { grid-column: 1 / -1; }

#purchaseHistoryList { margin: 2px 0 12px; }
.ph-loading, .ph-empty { font-size: 13.5px; color: var(--text-muted); padding: 16px 4px; text-align: center; }
.ph-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.ph-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ph-order { font-size: 15px; font-weight: 800; }
.ph-status { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--bg-pill); color: var(--text-secondary); white-space: nowrap; }
.ph-status.ok { background: var(--green-bg); color: var(--green-text); }
.ph-status.pending { background: var(--orange-bg); color: var(--orange-text); }
.ph-status.fail { background: rgba(239, 68, 68, 0.14); color: #f87171; }
.ph-date { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.ph-cards { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.ph-line { font-size: 13px; color: var(--text-secondary); }
.ph-target { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.ph-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-color); }
.ph-pay { font-size: 12.5px; color: var(--text-muted); }
.ph-total { font-size: 15px; font-weight: 800; }

.search-clear-btn { display: none; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(255,255,255,0.14); color: var(--text-main); font-size: 11px; font-weight: 700; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0; line-height: 1; }
body.light-theme .search-clear-btn { background: rgba(15,23,42,0.10); }
.search-clear-btn.show { display: inline-flex; }

.genres-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.genre-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  color: #ffffff;
  background: var(--bg-card);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--card-shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.genre-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.genre-img-light { display: none; }
body.light-theme .genre-tile.has-light .genre-img-dark { display: none; }
body.light-theme .genre-tile.has-light .genre-img-light { display: block; }
.genre-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(6, 9, 15, 0.04) 38%, rgba(6, 9, 15, 0.82) 100%);
  pointer-events: none;
}
.genre-tile:hover, .genre-tile:active {
  transform: scale(0.97);
  border-color: var(--tile-focus-ring);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.genre-tile-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.genre-tile-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
body.light-theme .genre-tile { border-color: rgba(15, 23, 42, 0.10); }

.collection-empty {
  margin: 12px 16px;
  padding: 42px 18px;
  text-align: center;
  border: 1.5px dashed var(--border-color);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 600;
}