:root {
  --bg: #0c0e12;
  --surface: #151820;
  --surface-2: #1b1f29;
  --surface-3: #222735;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f6fb;
  --muted: #9aa3b5;
  --accent: #ff7a18;
  --accent-2: #ff9a4d;
  --success: #b4e414;
  --danger: #ff6b6b;
  --radius: 18px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(255, 122, 24, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 30% at 100% 0%, rgba(80, 120, 255, 0.06), transparent 45%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

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

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.back,
.brand-inline,
.steam-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.back:hover,
.steam-link:hover {
  color: var(--text);
}

.back svg,
.steam-link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.brand-inline .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px rgba(255, 122, 24, 0.55);
}

.hero {
  margin-bottom: 14px;
  animation: rise 0.45s ease both;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero p {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.search-panel {
  margin-bottom: 14px;
  animation: rise 0.45s ease 0.05s both;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: start;
}

.search-wrap {
  position: relative;
  min-width: 0;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  min-height: 56px;
}

.search-field:focus-within {
  border-color: rgba(255, 122, 24, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.12);
}

.search-field svg {
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  flex-shrink: 0;
}

.search-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.search-field input::placeholder {
  color: #667086;
}

.search-pulse {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 122, 24, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.currency {
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  min-width: 92px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  height: 42px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    opacity 0.2s ease,
    border-color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  height: 56px;
  padding: 0 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff922e, var(--accent));
  color: #1a0d00;
  box-shadow: 0 12px 28px rgba(255, 122, 24, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffa24a, #ff861f);
}

.btn-soft {
  background: #f3f5f8;
  color: #11151d;
}

.btn-soft:hover:not(:disabled) {
  background: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
}

.suggestions {
  display: none;
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #10131a;
  box-shadow: var(--shadow);
}

.suggestions.open {
  display: block;
}

.suggestion {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.suggestion + .suggestion {
  border-top: 1px solid var(--border);
}

.suggestion:hover,
.suggestion[aria-selected="true"] {
  background: rgba(255, 122, 24, 0.08);
}

.suggestion img {
  width: 56px;
  height: 26px;
  object-fit: cover;
  border-radius: 5px;
  background: #222;
}

.suggestion strong {
  display: block;
  font-size: 0.92rem;
}

.suggestion span {
  color: var(--muted);
  font-size: 0.75rem;
}

.status {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
}

.status.visible {
  display: flex;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.error {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
  color: #ffb4b4;
}

.error.visible {
  display: block;
}

.results[hidden],
.info-card[hidden],
.steam-info-card[hidden],
.price-tag[hidden],
.steam-price-wrap[hidden],
.check[hidden] {
  display: none !important;
}

.results {
  animation: rise 0.4s ease both;
}

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.results-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  letter-spacing: -0.03em;
}

.kit-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 0.9fr;
  gap: 12px;
  margin-bottom: 12px;
  align-items: start;
}

.cover-panel {
  margin-bottom: 12px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  height: fit-content;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.chips {
  display: flex;
  gap: 6px;
}

.chip {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
}

.chip.accent {
  color: #ffd2ad;
  border-color: rgba(255, 122, 24, 0.35);
  background: rgba(255, 122, 24, 0.1);
}

.chip.featured {
  color: #ffb4b4;
  border-color: rgba(255, 80, 80, 0.35);
  background: rgba(255, 80, 80, 0.12);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.checker {
  background:
    linear-gradient(45deg, #2a2f3a 25%, transparent 25%),
    linear-gradient(-45deg, #2a2f3a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2f3a 75%),
    linear-gradient(-45deg, transparent 75%, #2a2f3a 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-color: #1a1e27;
}

.stage {
  border-radius: 12px;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: hidden;
}

.stage-logo {
  min-height: 0;
  padding: 16px 14px;
}

.stage img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
  display: block;
}

.info-card {
  border-radius: 12px;
  overflow: hidden;
  background: #0f131b;
  border: 1px solid var(--border);
}

.info-header {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #000;
}

.info-body {
  padding: 10px 12px 12px;
}

.info-body p {
  margin: 0 0 10px;
  color: #c8d0e0;
  font-size: 0.8rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.info-meta {
  margin: 0;
  display: grid;
  gap: 6px;
}

.info-meta div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px;
  font-size: 0.72rem;
}

.info-meta dt {
  margin: 0;
  color: var(--muted);
}

.info-meta dd {
  margin: 0;
  color: #d7deec;
}

/* Exact Steam store game info block */
.steam-info-card {
  --steam-bg: #1b2838;
  --steam-text: #c6d4df;
  --steam-muted: #8f98a0;
  --steam-link: #67c1f5;
  border-radius: 2px;
  overflow: hidden;
  background: var(--steam-bg);
  font-family: "Motiva Sans", Arial, Helvetica, sans-serif;
  color: var(--steam-text);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
}

.steam-info-header {
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  display: block;
  background: #000;
}

.steam-info-body {
  padding: 12px 14px 14px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 100%),
    var(--steam-bg);
}

.steam-info-desc {
  margin: 0 0 12px;
  color: #c6d4df;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 300;
}

.steam-info-rows {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.steam-info-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  line-height: 1.35;
}

.steam-info-row .label {
  color: var(--steam-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.02em;
  padding-top: 2px;
}

.steam-info-row .value {
  color: #acb2b8;
}

.steam-info-row .value.linkish,
.steam-info-row a {
  color: var(--steam-link);
  text-decoration: none;
}

.steam-info-row a:hover {
  color: #fff;
}

.steam-review {
  font-weight: 400;
}

.steam-review.positive {
  color: #66c0f4;
}

.steam-review.mixed {
  color: #b9a404;
}

.steam-review.negative {
  color: #c35c2c;
}

.steam-review-count {
  color: #acb2b8;
}

.steam-tags-wrap {
  margin-top: 2px;
}

.steam-tags-label {
  color: var(--steam-muted);
  font-size: 11px;
  margin-bottom: 6px;
}

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

.steam-tag {
  appearance: none;
  border: 0;
  background: rgba(103, 193, 245, 0.2);
  color: #67c1f5;
  font-family: inherit;
  font-size: 11px;
  line-height: 19px;
  padding: 0 7px;
  border-radius: 2px;
  cursor: default;
}

.steam-tag.plus {
  width: 19px;
  padding: 0;
  text-align: center;
  font-weight: 700;
}

.price-tag {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 8px;
  align-items: stretch;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #10141c;
  border: 1px solid var(--border);
}

.price-tag-logo {
  display: grid;
  place-items: center;
  padding: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 122, 24, 0.18), transparent 50%),
    #0c1017;
}

.price-tag-logo img {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.price-tag-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px;
  background: linear-gradient(160deg, #171b25, #10141c);
}

.price-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.price-tag-copy strong {
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  color: var(--success);
}

.price-was {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.85rem;
}

/* Exact Steam purchase / Add to Cart bar */
.steam-price-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 56px;
  padding: 4px 0;
}

.steam-buy {
  display: inline-flex;
  align-items: stretch;
  border-radius: 2px;
  overflow: hidden;
  font-family: "Motiva Sans", Arial, Helvetica, sans-serif;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  line-height: 1;
}

.steam-buy-price {
  display: flex;
  align-items: center;
  background: #000;
  color: #fff;
  font-size: 13px;
  padding: 0 12px;
  white-space: nowrap;
  min-height: 32px;
}

.steam-buy-btn {
  appearance: none;
  border: 1px solid #172407;
  margin: 0;
  min-height: 32px;
  padding: 0 14px;
  color: #d2e885;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: default;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
  background: linear-gradient(to bottom, #799905 5%, #536904 95%);
  background-image: linear-gradient(to bottom, #a4d007 5%, #536904 95%);
}

.steam-buy-btn:hover {
  background: linear-gradient(to bottom, #b6d911 5%, #80a006 95%);
  color: #fff;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.trailers-panel,
.art-panel {
  margin-bottom: 12px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #0f131b;
  border: 1px solid var(--border);
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.seg-btn.active {
  background: #f4f6fb;
  color: #11151d;
}

.cover-stage {
  border-radius: 12px;
  background: #0f131b;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 14px;
}

.cover-stage img {
  width: min(100%, 200px);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: block;
}

.trailer-list {
  display: grid;
  gap: 10px;
}

.trailer-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #0f131b;
  border: 1px solid var(--border);
}

.trailer-row img,
.trailer-row video {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.trailer-meta strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.trailer-meta .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.asset-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #0f131b;
  cursor: pointer;
  padding: 0;
  color: inherit;
  text-align: left;
  width: 100%;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.asset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 24, 0.35);
}

.asset-card .thumb {
  aspect-ratio: 16 / 10;
  background: #090b10;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.asset-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-card .thumb.contain img {
  object-fit: contain;
  padding: 10px;
}

.asset-card .meta {
  padding: 9px 10px 11px;
}

.asset-card .meta strong {
  display: block;
  font-size: 0.78rem;
}

.asset-card .meta span {
  color: var(--muted);
  font-size: 0.7rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal.open {
  display: flex;
}

.modal-panel {
  width: min(960px, 100%);
  max-height: min(90vh, 900px);
  background: #141820;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

.modal-body {
  padding: 16px;
  overflow: auto;
  display: grid;
  place-items: center;
  background: #0d1016;
}

.modal-body img,
.modal-body video {
  max-width: 100%;
  max-height: calc(90vh - 120px);
  border-radius: 10px;
}

.empty-note {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .kit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .search-row,
  .trailer-row {
    grid-template-columns: 1fr;
  }

  .currency,
  .btn-primary {
    width: 100%;
  }

  .page {
    width: min(100% - 24px, 1180px);
  }
}
