:root {
  --bg: #0b0f18;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --border: rgba(255,255,255,.12);
  --text: #eef2ff;
  --muted: rgba(238,242,255,.65);
  --muted2: rgba(238,242,255,.5);
  --accent: #fff;
  --ok: #2ee59d;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,15,24,.9);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
}
.brand__name { font-weight: 800; }
.brand__tag { font-size: 12px; color: var(--muted2); }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav__link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  border: 1px solid transparent;
}
.nav__link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav__link--active {
  color: var(--text);
  background: rgba(255,255,255,.08);
  border-color: var(--border);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin: 24px 0 32px;
  align-items: start;
}
@media (max-width: 768px) { .hero { grid-template-columns: 1fr; } }

.hero__main h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}
.hero__desc {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}
.search-box {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.search-box input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.2);
  color: var(--text);
  outline: none;
}
.search-box input::placeholder { color: var(--muted2); }
.search-box select {
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.2);
  color: var(--text);
  outline: none;
}
.hero__aside {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor: pointer;
}
.btn:hover { background: rgba(255,255,255,.1); }
.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: transparent;
}
.btn--primary:hover { opacity: .92; }
.btn--sm { padding: 8px 14px; font-size: 13px; }

/* Results */
.results-section { margin-top: 32px; }
.results-section h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.game-card {
  display: block;
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background .15s, transform .1s, border-color .15s;
}
.game-card:hover {
  background: var(--panel2);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
}
.game-card__img {
  aspect-ratio: 460/215;
  background: rgba(0,0,0,.3);
  overflow: hidden;
}
.game-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.game-card__title { font-weight: 700; font-size: 14px; display: block; padding: 12px 14px 4px; }
.game-card__platform {
  font-size: 11px;
  color: var(--ok);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 0 14px 12px;
  display: block;
}
.game-card--store {
  display: flex;
  align-items: center;
  gap: 12px;
}
.game-card--store .logo { width: 24px; height: 24px; flex-shrink: 0; }
.chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,.2);
  color: var(--muted);
  margin-left: 6px;
}

/* Offers table */
.offers-table {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.offers-row {
  display: grid;
  grid-template-columns: 180px 1fr 100px 100px;
  gap: 16px;
  padding: 14px 18px;
  align-items: center;
  border-top: 1px solid var(--border);
}
.offers-row:first-child { border-top: none; }
.offers-row--head {
  background: rgba(0,0,0,.2);
  font-size: 12px;
  color: var(--muted2);
  font-weight: 700;
}
@media (max-width: 700px) {
  .offers-row { grid-template-columns: 1fr 1fr; }
  .offers-row--head { display: none; }
}
.offers-row .store { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.offers-row .logo { width: 20px; height: 20px; }
.price { font-weight: 700; font-size: 16px; }

/* States */
.loading, .empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 20px 0;
}
.select { display: flex; flex-direction: column; gap: 4px; }
.select span { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Footer */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer__text { font-size: 13px; color: var(--muted); margin: 0; }
.footer__text a { color: var(--muted); }
.footer__text a:hover { color: var(--ok); }
.footer__meta { margin-top: 12px; font-size: 12px; color: var(--muted2); }

/* Game page header */
.game-header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.game-header__img {
  width: 460px;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}
@media (max-width: 600px) {
  .game-header { flex-direction: column; }
  .game-header__img { width: 100%; }
}

/* Articles */
.article { margin-top: 24px; }
.article__meta { font-size: 13px; margin-bottom: 16px; }
.article__body { line-height: 1.65; }
.article__body h2 { font-size: 18px; margin: 24px 0 12px; font-weight: 700; }
.article__body p { margin: 0 0 12px; }
.article__body ul { margin: 0 0 16px; padding-left: 24px; }
.article__body a { color: var(--ok); text-decoration: underline; }
.article__body a:hover { opacity: .9; }
.article-list { list-style: none; padding: 0; margin: 16px 0 0; }
.article-list li { margin-bottom: 10px; }
.article-list a { font-weight: 600; }
.article-list a:hover { color: var(--ok); }

/* Feedback form */
.feedback-form {
  max-width: 480px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feedback-form .input { display: flex; flex-direction: column; gap: 4px; }
.feedback-form input,
.feedback-form textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.feedback-form textarea { resize: vertical; min-height: 100px; }
.feedback-form input::placeholder,
.feedback-form textarea::placeholder { color: var(--muted2); }
.feedback-status { font-size: 14px; margin-top: 4px; }
.feedback-status--ok { color: var(--ok); }
.feedback-status--err { color: #f87171; }

/* Page titles */
h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; }
main .muted { margin-bottom: 16px; display: block; }
