:root {
  --bg: #e9eef4;
  --panel: #ffffff;
  --ink: #0e1726;
  --muted: #64748b;
  --line: #d7dee8;
  --nav: #070b13;
  --dark: #161d2b;
  --dark-2: #20283a;
  --blue: #1685dd;
  --blue-2: #0f6fbd;
  --green: #13a889;
  --amber: #f7b531;
  --red: #e84b4f;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.nav {
  display: grid;
  grid-template-columns: 220px 1fr minmax(280px, 560px);
  gap: 22px;
  align-items: center;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 17px 0;
  color: #fff;
}

.brand {
  font-size: 22px;
  font-weight: 900;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  font-size: 15px;
  font-weight: 800;
}

.nav-links a {
  color: #dce7f7;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.search {
  position: relative;
  display: flex;
  height: 42px;
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  border-radius: 6px 0 0 6px;
  padding: 0 14px;
  outline: 0;
}

.search button,
.primary-btn,
.deal-button {
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.search button {
  border-radius: 0 6px 6px 0;
  padding: 0 18px;
}

.primary-btn,
.deal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
}

.search button:hover,
.primary-btn:hover,
.deal-button:hover {
  background: var(--blue-2);
}

.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(720px, 92vw);
  max-height: 72vh;
  overflow: auto;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  color: var(--ink);
}

.suggest-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f8fb;
}

.suggest-head span {
  display: inline-grid;
  min-width: 28px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #6f657c;
  font-weight: 900;
}

.suggest-item {
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.suggest-item:hover {
  background: #f2f6fb;
}

.suggest-item img {
  width: 142px;
  height: 54px;
  object-fit: cover;
  background: #d7dee8;
}

.suggest-item strong,
.suggest-item span {
  display: block;
}

.suggest-item strong {
  color: #0875c9;
}

.suggest-item span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.suggest-more {
  width: calc(100% - 32px);
  margin: 12px 16px 14px;
  border: 0;
  border-radius: 6px;
  padding: 12px;
  background: #d8d3dd;
  color: #231f2d;
  cursor: pointer;
  font-weight: 900;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 22px auto 48px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 0;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid #1b2435;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(10, 15, 25, 0.98), rgba(28, 36, 52, 0.95));
  box-shadow: var(--shadow);
  color: #fff;
}

.hero-copy {
  padding: 34px 34px 30px;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 10px 0 14px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
}

.hero-copy p {
  max-width: 780px;
  margin: 0;
  color: #c9d7e8;
  line-height: 1.8;
}

.hero-search {
  display: flex;
  max-width: 740px;
  height: 46px;
  margin-top: 24px;
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  border-radius: 6px 0 0 6px;
  padding: 0 15px;
  outline: 0;
}

.hero-search button {
  border: 0;
  border-radius: 0 6px 6px 0;
  padding: 0 22px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-metrics span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #d8e5f5;
  font-size: 13px;
}

.hero-metrics b {
  margin-right: 6px;
  color: #fff;
  font-size: 18px;
}

.hero-media {
  position: relative;
  min-height: 310px;
  background: #0b1220;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}

.hero-media span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(4, 9, 18, 0.72);
  color: #fff;
  font-weight: 900;
}

.store-strip {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  overflow: hidden;
  border-radius: 8px;
  background: var(--dark);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.store-strip a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  padding: 9px 8px;
  border-right: 1px solid #101828;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  transition: background 0.16s ease, transform 0.16s ease;
}

.store-strip a:hover {
  background: #263148;
  transform: translateY(-1px);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 88px;
  min-height: 34px;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-logo img {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
}

.brand-logo span {
  line-height: 1.05;
}

.brand-g2a { color: #f26a21; font-size: 20px; }
.brand-gamivo { color: #ff6b00; font-size: 18px; font-style: italic; }
.brand-gameseal { color: #1f2937; font-size: 16px; }
.brand-k4g { color: #e21f32; font-size: 19px; }
.brand-instantgaming { color: #ff6b00; font-size: 14px; line-height: 1.05; }
.brand-gameboost { color: #287ee6; font-size: 16px; }
.brand-wyrel { color: #ff7a1a; font-size: 18px; }
.brand-eneba { color: #23b36b; font-size: 18px; }
.brand-kinguin { color: #1f2937; font-size: 18px; }
.brand-steam { color: #1b2838; font-size: 18px; }

.store-strip .brand-logo {
  justify-content: center;
  color: #fff;
  min-width: 0;
}

.store-strip .brand-logo img {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.95);
}

.store-strip .brand-g2a { color: #ff7a1a; }
.store-strip .brand-gamivo { color: #ff7a1a; }
.store-strip .brand-gameseal { color: #fff; }
.store-strip .brand-k4g { color: #ff4054; }
.store-strip .brand-instantgaming { color: #ff7a1a; }
.store-strip .brand-gameboost { color: #5aa9ff; }
.store-strip .brand-wyrel { color: #ff8c2f; }
.store-strip .brand-eneba { color: #32d583; }
.store-strip .brand-kinguin { color: #f7c948; }
.store-strip .brand-steam { color: #d9e8ff; }

.eyebrow {
  margin: 0;
  color: #8fc8ff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.market-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 18px;
  margin-top: 0;
}

.news-panel,
.top-panel,
.panel,
.article-card,
.game-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.news-panel,
.top-panel {
  overflow: hidden;
  background: #151b29;
  color: #fff;
}

.top-panel {
  max-height: none;
}

.news-panel h2,
.top-panel h2 {
  margin: 0;
  padding: 15px 18px;
  text-align: center;
  background: #0f1420;
  font-size: 22px;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.news-item {
  position: relative;
  display: grid;
  grid-template-columns: 156px 1fr;
  min-height: 96px;
  border-top: 2px solid #0f1420;
  border-right: 2px solid #0f1420;
  background: #20283a;
  transition: background 0.16s ease;
}

.news-item:hover,
.rank-row:hover {
  background: #283249;
}

.news-item img,
.rank-row img,
.game-card img,
.detail-card > img,
.search-result img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-item h3 {
  display: -webkit-box;
  min-height: 38px;
  margin: 11px 12px 7px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.28;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-item p {
  margin: 0 12px;
  color: #90b9ff;
  font-size: 13px;
  font-weight: 800;
}

.news-item span {
  position: absolute;
  right: 0;
  bottom: 0;
  min-width: 54px;
  padding: 5px 10px;
  background: #1887df;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 104px minmax(0, 1fr) 84px;
  align-items: center;
  min-height: 70px;
  border-top: 2px solid #0f1420;
  background: #20283a;
  transition: background 0.16s ease;
}

.rank-row b {
  text-align: center;
  color: #d9e8ff;
}

.rank-row span {
  display: -webkit-box;
  padding: 0 8px;
  overflow: hidden;
  font-weight: 900;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-row strong {
  align-self: stretch;
  display: grid;
  place-items: center;
  background: var(--blue);
  font-size: 14px;
  text-align: center;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.trust-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.trust-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.trust-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 30px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.game-card img {
  height: 136px;
  background: #cbd5e1;
}

.ad-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.ad-band a {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  border-radius: 8px;
  background: #111827;
  box-shadow: var(--shadow);
}

.ad-band img {
  width: 100%;
  height: 100%;
  min-height: 92px;
  object-fit: cover;
  display: block;
}

.ad-band span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  max-width: calc(100% - 24px);
  color: #fff;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.game-card div {
  padding: 14px;
}

.game-card h3 {
  display: -webkit-box;
  min-height: 40px;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.game-card p {
  display: -webkit-box;
  min-height: 40px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  padding: 4px 7px;
  border-radius: 4px;
  color: #075848;
  background: #dff8f0;
  font-size: 12px;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}

.detail-card {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  overflow: hidden;
}

.detail-card > img {
  min-height: 220px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111827;
}

.detail-card > div {
  padding: 24px;
}

.detail-card h1 {
  margin: 6px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.detail-card p,
.panel p,
.article-card p {
  color: var(--muted);
  line-height: 1.7;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.price-box {
  padding: 14px;
  border-radius: 8px;
  background: #e6f2ff;
}

.price-box.keyshop {
  background: #e5f8f3;
}

.price-box span,
.price-box small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.price-box strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 30px;
}

.tabs {
  display: flex;
  gap: 26px;
  margin: 18px 0 12px;
  border-bottom: 1px solid #c6d0dc;
}

.tabs button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 12px 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 900;
}

.tabs button.active {
  color: var(--blue);
  border-color: var(--blue);
}

.offer-list {
  display: grid;
  gap: 0;
}

.offer-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}

.offer-block + .offer-block {
  margin-top: 8px;
}

.offer-row {
  display: grid;
  grid-template-columns: 220px 115px 130px 128px 120px 90px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}

.offer-store {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.offer-store .brand-logo {
  min-width: 0;
  width: 100%;
}

.offer-store .brand-logo img {
  width: 38px;
  height: 38px;
  padding: 2px;
  border: 1px solid #e5ebf3;
}

.offer-store .brand-logo span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-store strong {
  display: block;
}

.store-rating,
.offer-region span,
.offer-edition span,
.offer-price span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.store-rating {
  margin-top: 0;
  padding-left: 2px;
}

.offer-region,
.offer-edition {
  font-size: 13px;
}

.coupon {
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px dashed #aeb8c6;
  border-radius: 6px;
  color: var(--ink);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}

.coupon.has-code {
  color: #101828;
  border-color: #8de3ca;
  background: #dff8f0;
}

.offer-price strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
}

.offer-row .deal-button {
  min-height: 42px;
}

.similar-row {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #f5f7fb;
  color: #70687f;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  padding: 0 18px 0 70px;
}

.similar-row:hover {
  background: #edf2f8;
  color: var(--blue);
}

.tab-panel {
  margin-top: 0;
}

.coupon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.coupon-grid div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.coupon-grid span {
  color: var(--muted);
  font-weight: 900;
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.panel,
.article-card {
  padding: 22px;
}

.panel h1,
.panel h2,
.article-card h2 {
  margin-top: 0;
}

.notice {
  margin-top: 16px;
  border-left: 4px solid var(--amber);
}

.info-list {
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  font-weight: 800;
}

.gallery-panel {
  overflow: hidden;
}

.shot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.shot-grid a,
.shot-grid img {
  display: block;
}

.shot-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #cbd5e1;
}

.store-board,
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.store-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.store-card > .brand-logo {
  min-width: 0;
  justify-content: center;
}

.store-card > .brand-logo span {
  display: none;
}

.store-card > .brand-logo img {
  width: 42px;
  height: 42px;
}

.store-card h3 {
  margin: 0 0 5px;
}

.store-card p {
  margin: 0;
  color: var(--muted);
}

.store-card > span {
  color: var(--blue);
  font-weight: 900;
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.search-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.search-main,
.search-news {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-main {
  padding: 18px;
}

.search-main h1,
.search-main p,
.search-news h2,
.search-news p {
  margin-top: 0;
}

.search-news {
  padding: 22px;
}

.search-result {
  display: grid;
  grid-template-columns: 160px 1fr 72px;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-result img {
  height: 74px;
  border-radius: 6px;
  background: #cbd5e1;
}

.search-result h3,
.search-result p {
  margin: 0;
}

.search-result p {
  color: var(--muted);
  margin-top: 5px;
}

.search-result > span {
  color: var(--blue);
  font-weight: 900;
}

.empty {
  margin-top: 16px;
  padding: 36px;
  border: 1px dashed #aeb8c6;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.footer {
  color: #dbe7f7;
  background: #0d1422;
  border-top: 1px solid #1f2937;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.footer h3 {
  margin: 0 0 8px;
  color: #fff;
}

.footer p {
  margin: 0;
  color: #9fb0c8;
  line-height: 1.6;
}

.footer a {
  color: #9fd3ff;
}

@media (max-width: 1100px) {
  .nav,
  .home-hero,
  .market-grid,
  .search-page,
  .detail-layout,
  .detail-card {
    grid-template-columns: 1fr;
  }

  .store-strip {
    grid-template-columns: repeat(5, 1fr);
  }

  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .offer-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .game-grid,
  .ad-band,
  .trust-grid,
  .store-board,
  .article-grid,
  .news-grid,
  .footer-grid,
  .price-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 12px;
  }

  .news-item {
    grid-template-columns: 120px 1fr;
  }

  .store-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-result {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 36px 90px 1fr;
  }

  .rank-row strong {
    grid-column: 1 / -1;
    min-height: 36px;
  }
}
