/* CSProfile homepage — category-page matched design */
:root {
  --page: #07101f;
  --panel: #0b1423;
  --panel-2: #101b2d;
  --text: #f4f6fa;
  --muted: #929baa;
  --muted-2: #697383;
  --line: rgba(138,160,193,.16);
  --line-strong: rgba(166,188,222,.27);
  --accent: #f59e0b;
  --positive: #2bea78;
  --content: 1450px;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  background: var(--page);
}

body {
  margin: 0;
}

.csprofile-clean-home-page {
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 47% 7%, rgba(245,158,11,.035), transparent 30%),
    var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.csprofile-clean-home-page a {
  color: inherit;
  text-decoration: none;
}

.csprofile-clean-home-page button,
.csprofile-clean-home-page input {
  font: inherit;
}

.home-shell {
  width: min(calc(100% - 64px), var(--content));
  margin: 0 auto;
  padding: 28px 0 62px;
}

.crumbs {
  display: flex;
  align-items: center;
  min-height: 18px;
  margin: 0 0 26px 2px;
  color: #7f8999;
  font-size: 13px;
}

.crumbs strong {
  color: #d9dee7;
  font-weight: 600;
}

.home-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin: 0 2px 21px;
}

.home-heading h1 {
  margin: 0;
  font-size: clamp(48px, 3.8vw, 64px);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 780;
}

.home-heading p {
  margin: 14px 0 0;
  color: #a4adba;
  font-size: 16px;
  line-height: 1.5;
}

.home-database-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  color: #8e9aaa;
  font-size: 12px;
  white-space: nowrap;
}

.home-database-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 12px rgba(43,234,120,.5);
}

.home-search {
  position: relative;
  z-index: 50;
  margin-bottom: 14px;
}

.home-search-box {
  height: 54px;
  display: grid;
  grid-template-columns: 21px minmax(0,1fr) auto;
  align-items: center;
  overflow: hidden;
  color: #eef1f6;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.018));
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.home-search-box:hover {
  border-color: var(--line-strong);
  background: rgba(255,255,255,.035);
}

.home-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,.14);
}

.home-search-box svg {
  width: 18px;
  height: 18px;
  margin-left: 17px;
  fill: none;
  stroke: #9ca8b9;
  stroke-width: 1.8;
}

.home-search-box input {
  width: 100%;
  height: 100%;
  padding: 0 17px;
  color: #fff;
  background: transparent;
  border: 0;
  outline: 0;
}

.home-search-box input::placeholder {
  color: #7f8b9c;
}

.home-search-box kbd {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-right: 12px;
  color: #7f8b9d;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  font-family: inherit;
}

.home-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 5000;
  max-height: 410px;
  overflow-y: auto;
  padding: 7px;
  background: #0b1423;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  box-shadow: 0 22px 60px rgba(0,0,0,.55);
}

.home-search-result {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 7px 10px;
  border-radius: 8px;
}

.home-search-result:hover,
.home-search-result.is-active {
  background: rgba(255,255,255,.045);
}

.home-search-result img {
  width: 58px;
  height: 48px;
  object-fit: contain;
}

.home-search-result strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-search-result small {
  display: block;
  margin-top: 3px;
  color: #7e8796;
  font-size: 10px;
}

.home-search-result em {
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.home-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 30px;
}

.home-category-links a,
.home-popular-searches button,
.home-popular-searches a {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: #cbd3df;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 650;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.home-category-links a:hover,
.home-popular-searches button:hover,
.home-popular-searches a:hover {
  color: #fff;
  background: rgba(245,158,11,.07);
  border-color: rgba(245,158,11,.45);
}

.home-content-section {
  margin-top: 28px;
}

.home-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 0 2px 13px;
}

.home-section-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.025em;
}

.home-section-heading p {
  margin: 5px 0 0;
  color: #7f8a9b;
  font-size: 12px;
}

.home-section-heading > a {
  padding-bottom: 2px;
  color: #aeb7c5;
  font-size: 11px;
}

.home-section-heading > a:hover {
  color: var(--accent);
}

.home-popular-searches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 13px;
}

.home-popular-searches button,
.home-popular-searches a {
  width: 100%;
}

.grid.home-item-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 14px;
}

/* These are intentionally the same rules as the category-page item cards. */
.home-item-grid .item-card {
  --rarity: #697386;
  position: relative;
  min-width: 0;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 14px 15px;
  background:
    radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--rarity) 15%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(16,27,45,.98), rgba(8,16,29,.995));
  border: 1px solid color-mix(in srgb, var(--rarity) 27%, var(--line));
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.home-item-grid .item-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rarity) 5%, transparent), transparent 46%);
}

.home-item-grid .item-card:hover {
  z-index: 2;
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--rarity) 62%, rgba(255,255,255,.15));
  box-shadow:
    0 18px 42px rgba(0,0,0,.48),
    0 0 25px color-mix(in srgb, var(--rarity) 13%, transparent);
}

.home-item-grid .item-card:hover::after {
  opacity: .68;
}

.card-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 27px;
}

.rarity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  color: #fff;
  background: color-mix(in srgb, var(--rarity) 35%, #10151e);
  border: 1px solid color-mix(in srgb, var(--rarity) 34%, transparent);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650;
  box-shadow: 0 0 14px color-mix(in srgb, var(--rarity) 18%, transparent);
}

.item-card:hover .imgbox img {
  transform: scale(1.08) translateY(-4px);
  filter: drop-shadow(0 18px 22px rgba(0,0,0,.5));
}

.card-copy {
  position: relative;
  z-index: 2;
}

.weapon {
  color: #d4dae3;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.skin-name {
  margin-top: 2px;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.35;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-name,
.wear-name {
  overflow: hidden;
  color: #798697;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-name {
  margin-top: 5px;
}

.wear-name {
  margin-top: 8px;
}

.card-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 7px;
}

.price {
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-card-placeholder {
  min-height: 300px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 50% 25%, rgba(99,122,156,.08), transparent 48%),
    linear-gradient(180deg, rgba(16,27,45,.98), rgba(8,16,29,.995));
  border: 1px solid var(--line);
  border-radius: 13px;
}

.home-card-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 24%, rgba(255,255,255,.035) 45%, transparent 66%);
  animation: homeCardLoading 1.6s linear infinite;
}

@keyframes homeCardLoading {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.home-empty {
  grid-column: 1 / -1;
  padding: 54px 20px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 13px;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  margin-top: 30px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(16,27,45,.92), rgba(8,16,29,.98));
  border: 1px solid var(--line);
  border-radius: 13px;
}

.home-stats > div {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 23px;
  border-right: 1px solid var(--line);
}

.home-stats > div:last-child {
  border-right: 0;
}

.home-stats strong {
  color: #fff;
  font-size: 24px;
  letter-spacing: -.035em;
}

.home-stats span {
  margin-top: 4px;
  color: #8190a4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

@media (max-width: 1320px) {
  .grid.home-item-grid {
    grid-template-columns: repeat(5, minmax(0,1fr));
  }

  .home-item-grid > :nth-child(6) {
    display: none;
  }
}

@media (max-width: 1120px) {
  .grid.home-item-grid {
    grid-template-columns: repeat(4, minmax(0,1fr));
  }

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

  .home-item-grid > :nth-child(5) {
    display: none;
  }
}

@media (max-width: 860px) {
  .home-shell {
    width: min(calc(100% - 36px), var(--content));
  }

  .home-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

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

  .home-item-grid > :nth-child(4) {
    display: none;
  }

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

  .home-stats > div:nth-child(2) {
    border-right: 0;
  }

  .home-stats > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 650px) {
  .home-shell {
    width: min(calc(100% - 24px), var(--content));
    padding-top: 22px;
  }

  .crumbs {
    margin-bottom: 22px;
  }

  .home-heading h1 {
    font-size: 40px;
  }

  .home-heading p {
    font-size: 14px;
  }

  .home-category-links a {
    flex: 1 1 calc(33.333% - 9px);
  }

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

  .home-item-grid > :nth-child(3),
  .home-item-grid > :nth-child(4),
  .home-item-grid > :nth-child(5),
  .home-item-grid > :nth-child(6) {
    display: flex;
  }

  .home-item-grid .item-card,
  .home-card-placeholder {
    min-height: 315px;
    padding: 12px;
  }

  .imgbox {
    height: 125px;
  }
}

@media (max-width: 430px) {
  .home-category-links a {
    flex-basis: calc(50% - 9px);
  }

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

  .grid.home-item-grid {
    grid-template-columns: 1fr;
  }

  .home-item-grid .item-card,
  .home-card-placeholder {
    min-height: 360px;
  }

  .imgbox {
    height: 165px;
  }

  .home-stats {
    grid-template-columns: 1fr;
  }

  .home-stats > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .home-stats > div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}


/* v5 — homepage curation */
.home-search {
  margin-bottom: 30px;
}


/* v7 — polished horizontal shelves */
.home-carousel-shell {
  position: relative;
}

.home-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px 2px 18px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.home-carousel::-webkit-scrollbar {
  display: none;
}

.home-carousel.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.home-carousel .item-card,
.home-carousel .home-card-placeholder {
  flex: 0 0 calc((100% - 70px) / 6);
  min-width: 210px;
  scroll-snap-align: start;
}

.home-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 12;
  width: 42px;
  height: 68px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(7,16,31,.92);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .18s ease, border-color .18s ease, background .18s ease;
}

.home-carousel-shell:hover .home-carousel-arrow:not(:disabled),
.home-carousel-arrow:focus-visible {
  opacity: 1;
}

.home-carousel-arrow:hover {
  background: #111d30;
  border-color: rgba(245,158,11,.55);
}

.home-carousel-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.home-carousel-arrow-left {
  left: -18px;
}

.home-carousel-arrow-right {
  right: -18px;
}

@media (max-width: 1320px) {
  .home-carousel .item-card,
  .home-carousel .home-card-placeholder {
    flex-basis: calc((100% - 56px) / 5);
  }
}

@media (max-width: 1120px) {
  .home-carousel .item-card,
  .home-carousel .home-card-placeholder {
    flex-basis: calc((100% - 42px) / 4);
  }
}

@media (max-width: 860px) {
  .home-carousel .item-card,
  .home-carousel .home-card-placeholder {
    flex-basis: calc((100% - 28px) / 3);
  }

  .home-carousel-arrow {
    display: none;
  }
}

@media (max-width: 650px) {
  .home-carousel {
    gap: 10px;
    padding-bottom: 12px;
  }

  .home-carousel .item-card,
  .home-carousel .home-card-placeholder {
    flex-basis: calc((100% - 10px) / 2);
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .home-carousel .item-card,
  .home-carousel .home-card-placeholder {
    flex-basis: 82%;
  }
}
