:root {
  --bg: #10131a;
  --panel: #181d27;
  --panel-strong: #202737;
  --line: #323b4f;
  --text: #f4f7fb;
  --muted: #9da9bb;
  --accent: #41c7b9;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  --tr-bg: rgba(0, 189, 164, 0.2);
  --tr-line: #19d7c4;
  --kz-bg: rgba(255, 178, 36, 0.22);
  --kz-line: #ffbf3f;
  --us-bg: rgba(70, 120, 255, 0.24);
  --us-line: #7fa2ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(65, 199, 185, 0.2), transparent 28rem),
    linear-gradient(135deg, #10131a 0%, #151923 48%, #0f1514 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

input,
select,
button {
  font: inherit;
}

.app {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 29, 39, 0.94);
  box-shadow: var(--shadow);
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 210px;
  padding: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.shop-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0 18px;
  color: #061210;
  background: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.secondary-link {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.secondary-link:hover {
  color: #061210;
  background: var(--accent);
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(3, 140px) minmax(220px, 1fr) 210px 150px 180px;
  gap: 16px;
  margin-top: 18px;
  padding: 22px;
}

.ps-toolbar {
  grid-template-columns: 160px 170px;
}

.updates-toolbar {
  grid-template-columns: 240px 240px;
}

.checkbox-label {
  min-height: 70px;
  align-content: center;
  grid-template-columns: 22px 1fr;
  gap: 10px;
}

.checkbox-label input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}

.checkbox-label span {
  color: var(--text);
  font-size: 14px;
}

.refresh-control {
  display: grid;
  gap: 8px;
  align-content: center;
}

.refresh-button {
  min-height: 46px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 0 14px;
  color: #061210;
  background: var(--accent);
  cursor: pointer;
  font-weight: 900;
}

.refresh-button:hover {
  filter: brightness(1.08);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.refresh-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

label {
  display: grid;
  gap: 8px;
}

label span,
.catalog-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--text);
  background: #111722;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(65, 199, 185, 0.14);
}

.catalog-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
  padding: 18px 22px;
}

.catalog-summary div {
  display: grid;
  gap: 6px;
}

.catalog-summary strong {
  font-size: 24px;
}

.catalog-sections {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.family-section {
  overflow: hidden;
}

.family-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(32, 39, 55, 0.72);
}

.family-section header span {
  color: var(--muted);
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.ps-table {
  min-width: 720px;
}

.ps-table th,
.ps-table td {
  padding-top: 8px;
  padding-bottom: 8px;
  font-weight: 800;
}

.ps-table td:first-child,
.ps-table td:nth-child(2) {
  font-size: 16px;
}

.ps-table .price-card {
  min-height: 68px;
}

.col-tr {
  background: var(--tr-bg);
}

.col-kz {
  background: var(--kz-bg);
}

.col-us {
  background: var(--us-bg);
}

th:nth-child(1),
td:nth-child(1) {
  width: 290px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 280px;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5) {
  width: 180px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
th:nth-child(3),
th:nth-child(4),
th:nth-child(5) {
  text-align: center;
  white-space: nowrap;
}

.offer-select {
  min-width: 240px;
}

.market-cell {
  width: 172px;
  min-width: 172px;
}

th.market-tr {
  color: #021310;
  background: var(--tr-line);
}

th.market-kz {
  color: #171004;
  background: var(--kz-line);
}

th.market-us {
  color: #050b1f;
  background: var(--us-line);
}

.price-card {
  display: grid;
  gap: 4px;
  width: 148px;
  min-height: 94px;
  align-content: center;
  justify-items: center;
  margin: 0 auto;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0 0 10px;
  overflow: hidden;
}

.price-card-label {
  display: block;
  width: 100%;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.price-card strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1.1;
}

.price-card-original {
  color: rgba(244, 247, 251, 0.58);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: line-through;
}

.price-card-discount {
  border-radius: 4px;
  padding: 2px 6px;
  color: #111218;
  background: #6cdb00;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1.1;
}

.price-card-currency {
  color: rgba(244, 247, 251, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.price-card-currency-original {
  margin-left: 4px;
  color: rgba(244, 247, 251, 0.52);
  text-decoration: line-through;
}

.price-card-tr {
  border-color: var(--tr-line);
  background: rgba(0, 102, 91, 0.38);
}

.price-card-tr .price-card-label {
  color: #021310;
  background: var(--tr-line);
}

.price-card-kz {
  border-color: var(--kz-line);
  background: rgba(126, 78, 0, 0.36);
}

.price-card-kz .price-card-label {
  color: #171004;
  background: var(--kz-line);
}

.price-card-us {
  border-color: var(--us-line);
  background: rgba(36, 64, 154, 0.42);
}

.price-card-us .price-card-label {
  color: #050b1f;
  background: var(--us-line);
}

.price-card-missing {
  opacity: 0.62;
  filter: grayscale(0.35);
}

.price-card-missing strong {
  font-size: 17px;
}

a {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.updates-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.update-card {
  display: grid;
  grid-template-columns: 190px 1fr 112px;
  overflow: hidden;
}

.update-date {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(32, 39, 55, 0.72);
}

.update-date strong {
  font-size: 20px;
  line-height: 1.15;
}

.update-date span {
  color: var(--muted);
  font-weight: 800;
}

.update-body {
  padding: 20px;
}

.update-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.update-kicker span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.update-body h2 {
  margin-bottom: 8px;
}

.update-body p {
  max-width: 860px;
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 104px);
  gap: 10px;
  margin: 14px 0;
}

.countdown div {
  display: grid;
  gap: 3px;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 8px;
  background: rgba(17, 23, 34, 0.8);
}

.countdown strong {
  font-size: 30px;
  line-height: 1;
}

.countdown span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.update-body a {
  color: var(--accent);
}

.game-mark {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  background: rgba(17, 23, 34, 0.62);
}

.game-mark span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 1000;
}

.update-overwatch .game-mark {
  color: #f99e1a;
}

.update-hearthstone .game-mark {
  color: #49a7ff;
}

.update-diablo .game-mark {
  color: #ff5d5d;
}

.update-overwatch {
  border-left: 5px solid #f99e1a;
}

.update-hearthstone {
  border-left: 5px solid #49a7ff;
}

.update-diablo {
  border-left: 5px solid #d04444;
}

@media (max-width: 700px) {
  .intro {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-link {
    width: 100%;
  }

  .toolbar,
  .catalog-summary,
  .update-card {
    grid-template-columns: 1fr;
  }

  .update-date {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .game-mark {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px;
  }

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

  .table-wrap {
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .app {
    width: min(100% - 20px, 1280px);
    padding: 10px 0;
  }

  .intro,
  .toolbar,
  .catalog-summary {
    padding: 16px;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }
}
