/* ====== Design tokens ====== */
:root {
  --bg: #0f1923;
  --bg-elevated: #16212c;
  --bg-card: #1a2733;
  --border: #243240;
  --text: #e8eef2;
  --text-dim: #8fa3b0;
  --green: #00e676;
  --green-dark: #00b85c;
  --orange: #ff6d00;
  --red: #ff1744;
  --blue: #2196f3;
  --radius: 10px;
  --radius-sm: 6px;
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1280px;
  --navbar-height: 68px;
}

* { box-sizing: border-box; }
.is-hidden { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: 0;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0 0 .4em;
  letter-spacing: .3px;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; }
main { min-height: 60vh; }

/* ====== Badges ====== */
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.badge--discount { background: var(--green); color: #04200f; }
.badge--lg { font-size: .9rem; padding: 5px 12px; }
.badge--best-deal { background: var(--green); color: #04200f; }
.badge--coupon { background: var(--orange); color: #2b1300; }
.badge--free { background: var(--blue); color: #fff; }
.badge--official { background: #1f3b2c; color: var(--green); border: 1px solid var(--green); }
.badge--authorized { background: #1f2f3b; color: var(--blue); border: 1px solid var(--blue); }
.badge--marketplace { background: #3b2a1f; color: var(--orange); border: 1px solid var(--orange); }

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  cursor: pointer;
}
.btn--primary { background: var(--green); color: #04200f; }
.btn--primary:hover { background: var(--green-dark); }
.btn--secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--buy { background: var(--green); color: #04200f; padding: 8px 16px; }
.btn--buy:hover { background: var(--green-dark); }
.btn--coupon {
  background: var(--bg-elevated);
  color: var(--orange);
  border: 1px dashed var(--orange);
  font-weight: 700;
  padding: 8px 12px;
}
.btn--coupon .copy-label { color: var(--text-dim); font-weight: 400; margin-left: 4px; }

/* ====== Announcement banner ====== */
.announcement-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 44px 10px 16px;
  position: relative;
  font-size: .88rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.announcement-banner[hidden] { display: none; }
.announcement-banner__inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.announcement-banner__text { font-weight: 600; }
.announcement-banner__link { text-decoration: underline; font-weight: 700; white-space: nowrap; }
.announcement-banner__close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: .7;
}
.announcement-banner__close:hover { opacity: 1; }
.announcement-banner--info    { background: rgba(33,150,243,.12);  color: #7cc4f7; }
.announcement-banner--info    .announcement-banner__link { color: #7cc4f7; }
.announcement-banner--success { background: rgba(74,222,128,.12);  color: #4ade80; }
.announcement-banner--success .announcement-banner__link { color: #4ade80; }
.announcement-banner--warning { background: rgba(251,191,36,.12);  color: #fbbf24; }
.announcement-banner--warning .announcement-banner__link { color: #fbbf24; }
.announcement-banner--danger  { background: rgba(220,38,38,.14);   color: #f87171; }
.announcement-banner--danger  .announcement-banner__link { color: #f87171; }
@media (max-width: 640px) {
  .announcement-banner { font-size: .8rem; padding: 8px 36px 8px 12px; }
}

/* ====== Navbar ====== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 25, 35, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.navbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
}
.navbar__burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: 6px; }
.navbar__burger span { width: 22px; height: 2px; background: var(--text); display: block; }
.navbar__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.navbar__logo-accent { color: var(--green); }
.navbar__categories { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.navbar__link { font-size: .92rem; color: var(--text-dim); font-weight: 500; }
.navbar__link:hover { color: var(--text); }
.navbar__link--free { color: var(--blue); }
.nav-dropdown { position: relative; }
.nav-dropdown__trigger { background: none; border: none; color: var(--text-dim); font-size: .92rem; font-weight: 500; font-family: var(--font-body); padding: 4px 0; }
.nav-dropdown:hover .nav-dropdown__trigger { color: var(--text); }
.nav-dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-width: 180px;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.nav-dropdown__menu hr { border-color: var(--border); width: 100%; margin: 6px 0; }
.nav-dropdown:hover .nav-dropdown__menu { display: flex; }
.nav-dropdown__menu a { padding: 7px 10px; border-radius: 4px; font-size: .9rem; color: var(--text-dim); }
.nav-dropdown__menu a:hover { background: var(--bg-card); color: var(--text); }

/* margin-left: auto pins search+currency to the far right regardless of how many
   nav links are currently shown/hidden via the section/platform toggles — without
   it, hiding links shrinks .navbar__categories and leaves the leftover space
   stranded after the currency selector instead of collapsing the gap. */
.navbar__search { flex: 1; display: flex; position: relative; max-width: 420px; margin-left: auto; }
.navbar__search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .9rem;
}
.navbar__search input:focus { outline: none; border-color: var(--green); }
.navbar__search button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: none;
  color: var(--text-dim);
  padding: 0 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: none;
  z-index: 50;
}
.search-suggestions.is-open { display: block; }
.search-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}
.search-suggestion:hover { background: var(--bg-card); }
.search-suggestion img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }

.navbar__currency {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  flex-shrink: 0;
}

/* ====== Ad slots ====== */
.ad-slot {
  max-width: var(--max-width);
  margin: 18px auto;
  padding: 10px;
  text-align: center;
  color: var(--text-dim);
  font-size: .75rem;
}
.ad-mobile-only { display: none; }
.ad-desktop-only { display: block; }

/* ====== Hero ====== */
.hero { max-width: var(--max-width); margin: 30px auto 10px; padding: 0 20px; }
.hero__header p { color: var(--text-dim); margin-top: 0; }
.hero__carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0;
}
.hero-slide {
  scroll-snap-align: start;
  flex: 0 0 min(85%, 760px);
  height: 320px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.hero-slide__content { display: flex; flex-direction: column; gap: 10px; }
.hero-slide__content h2 { font-size: 1.8rem; margin: 0; }
.hero-slide__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero-slide__store { color: var(--text-dim); font-size: .85rem; }

/* ====== Price typography ====== */
.price-original { text-decoration: line-through; color: var(--text-dim); font-size: .9rem; }
.price-current { color: var(--green); font-weight: 700; font-size: 1.15rem; font-family: var(--font-heading); }
.price-current--lg { font-size: 2rem; }

/* ====== Free games row ====== */
.free-games-row { max-width: var(--max-width); margin: 30px auto; padding: 0 20px; }
.free-games-row__track { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 0; }
.free-game-card {
  flex: 0 0 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.free-game-card img { height: 120px; width: 100%; object-fit: cover; }
.free-game-card__body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.free-game-card__body h3 { font-size: .95rem; margin: 0; }
.free-game-card__store, .free-game-card__worth, .free-game-card__ends { font-size: .78rem; color: var(--text-dim); }
.free-game-card--grid { flex: unset; }

/* ====== Game rows / grids ====== */
.game-row, .coupons-row { max-width: var(--max-width); margin: 36px auto; padding: 0 20px; }
.game-row__header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.game-row__subtitle { color: var(--text-dim); margin: 0; font-size: .85rem; }
.game-row__view-all { color: var(--green); font-size: .85rem; font-weight: 600; }
.game-row__track { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 0; }
.game-row__empty { color: var(--text-dim); }

.game-card {
  flex: 0 0 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
}
.game-card:hover { transform: translateY(-3px); border-color: var(--green); }
.game-card__image-wrap { position: relative; overflow: hidden; height: 130px; }
.game-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.game-card:hover .game-card__image { transform: scale(1.08); }
.game-card__image--giftcard { object-fit: contain; background: var(--bg-elevated); padding: 14px; }
.game-card__image--placeholder { display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#1a2a3a,#0f4f7a); color:rgba(255,255,255,.6); font-size:2rem; font-weight:700; letter-spacing:.05em; width:100%; height:100%; }
.game-card__image-wrap .badge { position: absolute; top: 8px; right: 8px; }
.game-card__platforms { position: absolute; bottom: 8px; left: 8px; display: flex; gap: 4px; }
.platform-chip { background: rgba(0,0,0,.6); color: var(--text); font-size: .65rem; padding: 2px 6px; border-radius: 3px; }
.game-card__body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card__title { font-size: .95rem; margin: 0; line-height: 1.3; }
.game-card__rating { color: var(--orange); font-size: .8rem; }
.game-card__price-row { display: flex; align-items: baseline; gap: 8px; }
.game-card__store { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: .78rem; }
.store-logo-tiny { width: 16px; height: 16px; object-fit: contain; }
.game-card__compare { color: var(--green); font-size: .78rem; margin-top: auto; }

/* category/browse grid (wraps instead of scrolling) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.category-grid .game-card { flex: unset; }

/* ====== Coupons ====== */
.coupons-row__track { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 0; }
.coupon-card {
  flex: 0 0 280px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.coupon-card img { width: 40px; height: 40px; object-fit: contain; }
.coupon-card__desc { font-size: .85rem; margin: 0 0 8px; }

/* ====== Newsletter ====== */
.newsletter { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 40px; }
.newsletter__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.newsletter__inner p { color: var(--text-dim); margin: 4px 0 0; }
.newsletter__form { display: flex; gap: 8px; }
.newsletter__form input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  min-width: 240px;
}
.newsletter__msg { width: 100%; font-size: .85rem; color: var(--green); margin: 0; }

/* ====== Footer ====== */
.site-footer { background: var(--bg-elevated); padding-top: 40px; }
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
}
.site-footer__col { display: flex; flex-direction: column; gap: 8px; }
.site-footer__col h4 { color: var(--text-dim); font-size: .8rem; text-transform: uppercase; letter-spacing: .6px; }
.site-footer__col a { color: var(--text-dim); font-size: .88rem; }
.site-footer__col a:hover { color: var(--text); }
.site-footer__social { display: flex; gap: 12px; margin-top: 6px; }
.site-footer p { color: var(--text-dim); font-size: .85rem; }
.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  text-align: center;
}
.site-footer__bottom p { max-width: 900px; margin: 0 auto; font-size: .78rem; }

/* ====== Mobile bottom nav ====== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  z-index: 90;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-dim); font-size: .65rem; }

/* ====== Price comparison table ====== */
.price-comparison { margin-bottom: 40px; }
.historical-low { color: var(--text-dim); }
.price-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.price-table__delivery-filter { display: flex; gap: 8px; padding: 12px 16px 0; }
.delivery-filter__btn {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim);
  padding: 6px 14px; border-radius: 20px; font-size: .8rem; cursor: pointer;
}
.delivery-filter__btn:hover { color: var(--text); border-color: var(--green); }
.delivery-filter__btn.is-active { background: var(--green); color: #04200f; border-color: var(--green); font-weight: 600; }
.price-table-wrap > p { padding: 0 16px; }
.price-table { border-radius: 0; border: none; min-width: 480px; }
.price-table__header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr 1.6fr;
  padding: 10px 16px;
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-size: .75rem;
  text-transform: uppercase;
}
.price-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr 1.6fr;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  gap: 8px;
}
.price-row--best { background: #102a1c; }
.price-row__store { display: flex; align-items: center; gap: 10px; }
.store-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; background: #fff; }
.price-row__store-meta { display: flex; flex-direction: column; gap: 3px; }
.store-name { font-weight: 600; font-size: .88rem; }
.warning-icon { color: var(--orange); cursor: help; }
.price-row__price { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.price-row__action { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.price-row__edition, .price-row__platform, .price-row__region { color: var(--text-dim); font-size: .85rem; }

/* ====== Game detail ====== */
.game-detail { max-width: var(--max-width); margin: 0 auto; padding: 20px; }
.breadcrumbs { color: var(--text-dim); font-size: .8rem; margin-bottom: 14px; }
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs span { color: var(--text); }
.game-hero {
  border-radius: var(--radius);
  background-size: cover;
  background-position: center top;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  padding: 30px;
  border: 1px solid var(--border);
  margin-bottom: 30px;
}
.game-hero__content h1 { font-size: 2.4rem; margin-bottom: 8px; }
.game-hero__meta { display: flex; gap: 14px; color: var(--text-dim); font-size: .88rem; margin-bottom: 10px; }
.game-hero__scores { display: flex; gap: 8px; margin-bottom: 10px; }
.score-pill { background: var(--bg-elevated); border: 1px solid var(--border); padding: 4px 10px; border-radius: 20px; font-size: .8rem; }
.game-hero__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tag { background: var(--bg-elevated); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; font-size: .75rem; color: var(--text-dim); }
.game-hero__price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }

.game-detail__layout { display: grid; grid-template-columns: 1fr 280px; gap: 30px; align-items: start; }
.game-detail__main { min-width: 0; }
.game-detail__sidebar { min-width: 0; }
.game-detail__main section { margin-bottom: 36px; }
.game-description p { color: var(--text-dim); line-height: 1.7; white-space: pre-line; word-break: break-word; overflow-wrap: break-word; }
.screenshot-gallery__track { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.screenshot-gallery__track::-webkit-scrollbar { display: none; }
.screenshot-gallery__track img { width: 280px; height: 160px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.trailer__embed { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; }
.trailer__embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.system-requirements__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.system-requirements__grid p { color: var(--text-dim); white-space: pre-line; }
.share-row { display: flex; gap: 14px; align-items: center; color: var(--text-dim); }
.share-row a { color: var(--text); border: 1px solid var(--border); padding: 6px 12px; border-radius: var(--radius-sm); font-size: .85rem; }
.price-history__range { display: flex; gap: 8px; margin-bottom: 10px; }
.range-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); padding: 6px 12px; border-radius: var(--radius-sm); font-size: .8rem; }
.range-btn--active { color: var(--green); border-color: var(--green); }

/* ====== Comments ====== */
.comments .comment { border-top: 1px solid var(--border); padding: 14px 0; }
.comment__header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment__rating { color: var(--orange); font-size: .85rem; }
.comment__date { color: var(--text-dim); font-size: .78rem; margin-left: auto; }
.comments .comment p { color: var(--text-dim); margin: 0; }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; max-width: 520px; }
.comment-form__row { display: flex; gap: 10px; }
.comment-form input, .comment-form select, .comment-form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  flex: 1;
}

/* ====== Category / browse pages ====== */
.category-page { max-width: var(--max-width); margin: 0 auto; padding: 20px; }
.category-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-chip { background: var(--bg-card); border: 1px solid var(--border); padding: 7px 14px; border-radius: 20px; font-size: .82rem; color: var(--text-dim); }
.filter-chip:hover { color: var(--text); border-color: var(--green); }
.store-chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* ====== Gift cards ====== */
.giftcard-brand-header, .giftcard-detail-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.giftcard-brand-header img, .giftcard-detail-header img { width: 64px; height: 64px; object-fit: contain; background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 8px; }

/* ====== Static / error pages ====== */
.static-page, .error-page { max-width: 720px; margin: 60px auto; padding: 0 20px; }
.error-page { text-align: center; }
.error-page h1 { font-size: 4rem; color: var(--green); }
.static-page p, .static-page li { color: var(--text-dim); line-height: 1.7; }
.static-page h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; color: var(--text); }
.static-page ul { padding-left: 1.4rem; margin: .5rem 0 1rem; }
.static-page li { margin-bottom: .35rem; }
.static-page a { color: var(--green); }
.static-page em { color: var(--text-dim); font-size: .88rem; }

/* ====== Modal ====== */
.modal[hidden] { display: none; }
.modal__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); }
.modal__panel {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: min(90vw, 380px);
  z-index: 200;
}
.modal__panel form { display: flex; flex-direction: column; gap: 8px; }
.modal__panel label { font-size: .8rem; color: var(--text-dim); margin-top: 6px; }
.modal__panel input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
}
.form-msg { font-size: .82rem; color: var(--green); min-height: 1.2em; }

/* ====== Admin shell ====== */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar__logo { font-family: var(--font-heading); font-size: 1.3rem; padding: 0 20px 20px; display: block; }
.admin-sidebar a {
  display: block;
  padding: 10px 20px;
  color: var(--text-dim);
  font-size: .88rem;
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--text); background: var(--bg-card); border-left-color: var(--green); }
.admin-sidebar__logout { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.admin-main { flex: 1; padding: 28px 32px; max-width: 1200px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-topbar h1 { margin: 0; }

.flash { padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .88rem; }
.flash-error { background: #3b1f23; color: var(--red); border: 1px solid var(--red); }
.flash-success { background: #103b22; color: var(--green); border: 1px solid var(--green); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-card__label { color: var(--text-dim); font-size: .78rem; text-transform: uppercase; }
.stat-card__value { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; margin-top: 4px; }

.admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.admin-card h2 { font-size: 1.1rem; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { text-align: left; color: var(--text-dim); font-size: .75rem; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table img { width: 28px; height: 28px; object-fit: contain; }
.admin-actions { display: flex; gap: 8px; }
.admin-actions a, .admin-actions button { font-size: .8rem; }

.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.admin-toolbar form { display: flex; gap: 8px; }
.admin-toolbar input[type="text"], .admin-toolbar input[type="search"] {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: var(--radius-sm);
}

.admin-form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.admin-form label { font-size: .82rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 6px; }
.admin-form input, .admin-form select, .admin-form textarea {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .92rem;
}
.admin-form .checkbox-row { flex-direction: row; align-items: center; gap: 8px; }
.admin-form .form-row { display: flex; gap: 14px; }
.admin-form .form-row > * { flex: 1; }
.admin-form fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.admin-form legend { color: var(--text-dim); font-size: .8rem; padding: 0 6px; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; width: 320px; }
.login-card h1 { text-align: center; margin-bottom: 20px; }

.pill-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.pill-tab { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); color: var(--text-dim); font-size: .82rem; }
.pill-tab.active { color: var(--green); border-color: var(--green); }

/* ====== Responsive ====== */
@media (max-width: 980px) {
  .navbar__categories { display: none; }
  .navbar__burger { display: flex; }
  .game-detail__layout { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { padding-bottom: 62px; }
  .mobile-nav { display: flex; }
  .navbar__inner {
    height: auto;
    min-height: var(--navbar-height);
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    align-items: center;
  }
  .navbar__search {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
    margin: 0;
    padding-bottom: 4px;
  }
  .navbar__currency { display: none; }
  .hero-slide { flex: 0 0 92%; height: 260px; padding: 18px; }
  .game-hero__content h1 { font-size: 1.7rem; }
  .price-table__header { display: none; }
  .price-row { grid-template-columns: 1fr; gap: 10px; text-align: left; }
  .price-row__action { justify-content: flex-start; }
  .system-requirements__grid { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .newsletter__inner { flex-direction: column; align-items: stretch; }
  .newsletter__form input { min-width: 0; flex: 1; }
  .ad-desktop-only { display: none; }
  .ad-mobile-only { display: block; }
}

@media (max-width: 360px) {
  .game-card, .free-game-card { flex-basis: 160px; }
  h1 { font-size: 1.5rem; }
}

/* ====== Price Section Labels (Official vs Keyshop) ====== */
.price-section__header { display:flex; align-items:center; gap:.75rem; margin-bottom:.75rem; }
.price-section__label { font-size:.75rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:3px 10px; border-radius:4px; }
.price-section__label--official { background:rgba(74,222,128,.15); color:#4ade80; border:1px solid rgba(74,222,128,.3); }
.price-section__label--keyshop  { background:rgba(251,191,36,.12); color:#fbbf24; border:1px solid rgba(251,191,36,.3); }
.price-section__sub { font-size:.8rem; color:var(--text-dim); }

/* ====== Admin utility classes ====== */
.btn--xs { font-size:.78rem; padding:3px 10px; }
.btn--danger { background:#dc2626; color:#fff; }
.btn--danger:hover { background:#b91c1c; }
.badge--danger  { background:rgba(220,38,38,.15); color:#f87171; border:1px solid rgba(220,38,38,.3); }
.badge--success { background:rgba(74,222,128,.15); color:#4ade80; border:1px solid rgba(74,222,128,.3); }
.badge--warning { background:rgba(251,191,36,.15); color:#fbbf24; border:1px solid rgba(251,191,36,.3); }
.admin-empty { text-align:center; padding:3rem 1rem; color:var(--text-dim); }
.admin-empty h3 { color:var(--text); margin-bottom:.5rem; }
.toggle-btn { padding:3px 10px; border-radius:20px; border:1px solid var(--border); background:var(--bg); color:var(--text-dim); cursor:pointer; font-size:.78rem; font-weight:600; }
.toggle-btn--on { background:rgba(74,222,128,.15); color:#4ade80; border-color:rgba(74,222,128,.4); }
.historical-low { font-size:.88rem; color:var(--text-dim); }

/* ====== Scroll row buttons ====== */

/* CSS fallback: hide scrollbar on every browser that supports it */
.game-row__track,
.free-games-row__track,
.coupons-row__track,
.hero__carousel {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.game-row__track::-webkit-scrollbar,
.free-games-row__track::-webkit-scrollbar,
.coupons-row__track::-webkit-scrollbar,
.hero__carousel::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

/* JS injects .scroll-row (outer, position:relative) > .scroll-row__clip (overflow:hidden, exact height) */
.scroll-row { position: relative; }
.scroll-row__clip { overflow: hidden; }   /* physical clip — scrollbar can't appear outside this */

.scroll-row__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 33, 0.92);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.6);
  transition: background .15s ease, border-color .15s ease;
}
.scroll-row__btn:hover { background: var(--green); border-color: var(--green); color: #000; }
.scroll-row__btn--left  { left: 8px; }
.scroll-row__btn--right { right: 8px; }
.scroll-row__btn[hidden] { display: none; }

@media (max-width: 640px) {
  .scroll-row__btn { display: none; }
}

/* ====== Category page ====== */
.category-page { max-width: var(--max-width); margin: 0 auto; padding: 20px 20px 60px; }

/* ====== Pagination ====== */
.pager {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
}
.pager__btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1;
}
.pager__btn:hover:not(.pager__btn--disabled):not(.pager__btn--active) {
  background: var(--bg-elevated);
  border-color: var(--green);
  color: var(--green);
}
.pager__btn--active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
  font-weight: 700;
  cursor: default;
}
.pager__btn--disabled {
  opacity: .3;
  cursor: default;
}
.pager__ellipsis {
  color: var(--text-dim);
  padding: 0 4px;
  font-size: .9rem;
}
