html,
body {
  margin: 0;
  padding: 0;
  min-width: 500px;
  min-height: 100%;
  background: var(--surface-body);
  color: var(--text-secondary);
  font: 14px/1.4 var(--font-main), sans-serif;
}

.hidden {
  display: none;
}

.tooltip {
  display: none;
  position: absolute;
  z-index: 3;
  color: var(--soft-white);
  background: var(--gray-900);
  border: 1px solid var(--border-brand-emphasis);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}

.tooltip::after {
  content: "";
  position: absolute;
  border: 7px solid transparent;
}

.inventory-wrapper {
  padding: 12px 8px 24px;
}

.inventory--items_count {
  text-align: right;
  font-size: 12px;
  font-weight: 400;
  padding: 8px 16px 12px;
  color: var(--text-muted);
}

.inventory-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.skin {
  border: 1px solid var(--border-white-soft);
  padding: 12px;
  border-radius: 8px;
  flex: 1 1 220px;
  max-width: 240px;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at top, rgba(var(--brand-rgb), 0.08), var(--black) 70%);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.skin:hover {
  border-color: var(--border-brand-active);
  box-shadow: 0 0 0 1px var(--border-brand-soft);
}

.skin__pic img {
  max-width: 200px;
  max-height: 150px;
  margin: 0 auto 10px;
  display: block;
}

.skin__name {
  color: var(--soft-white);
}

.skin__price {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  color: var(--brand-old);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(var(--black-rgb), 0.9);
  pointer-events: none;
}

.skin--muted {
  filter: grayscale(100%);
  color: var(--text-muted) !important;
}

.skin--muted .skin__name {
  color: var(--text-muted);
}

.skin__stickers {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skin__sticker img {
  width: 48px;
  min-height: 28px;
  display: block;
}

.skin__tag {
  color: var(--brand);
  display: inline-block;
  border: 1px solid var(--border-brand-emphasis);
  border-radius: 4px;
  padding: 3px 6px;
  background: rgba(var(--black-rgb), 0.55);
  position: absolute;
  top: 140px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.item-modal--wrapper {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.item-modal--wrapper.hidden {
  display: none;
}

.item-modal--background {
  position: fixed;
  inset: 0;
  background: rgba(var(--black-rgb), 0.82);
}

.item-modal {
  position: relative;
  z-index: 1;
  width: min(666px, calc(100vw - 24px));
  min-height: 350px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border-brand-emphasis);
  border-radius: 12px;
  background-color: var(--black);
  background-image: radial-gradient(circle at top, rgba(var(--brand-rgb), 0.12), transparent 72%);
  box-shadow: 0 18px 48px rgba(var(--black-rgb), 0.45);
  overflow: visible;
}

.item-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  font: 400 28px/32px var(--font-main), sans-serif;
  cursor: pointer;
  transition: color 0.15s ease;
}

.item-modal__close:hover {
  color: var(--brand);
}

.item-modal__content {
  overflow: visible;
  position: relative;
  text-align: center;
}

.item-modal__pic {
  position: relative;
  min-height: 280px;
  overflow: visible;
}

.item-modal__pic img {
  display: block;
  width: 100%;
  height: auto;
}

.item-modal__meta {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.item-modal__price {
  color: var(--brand-old);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(var(--black-rgb), 0.9);
}

.item-modal__name {
  margin-top: 16px;
  font-weight: 700;
  font-size: 20px;
  color: var(--soft-white);
}

.item-modal__tag {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border-brand-emphasis);
  border-radius: 6px;
  background: rgba(var(--black-rgb), 0.55);
  color: var(--brand);
  font-size: 16px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-modal__stickers {
  position: absolute;
  top: 40px;
  right: 10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

.item-modal__stickers img {
  width: 88px;
  min-height: 56px;
  display: block;
}

.item-modal__sticker {
  position: relative;
  overflow: visible;
}

.item-modal__sticker-name {
  display: none;
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  z-index: 10;
  transform: translateY(-50%);
  padding: 5px 10px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--black);
  color: var(--soft-white);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(var(--black-rgb), 0.45);
}

.item-modal__sticker-name::before,
.item-modal__sticker-name::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
}

.item-modal__sticker-name::before {
  margin-left: 1px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 16px solid var(--brand);
}

.item-modal__sticker-name::after {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 14px solid var(--black);
}

.item-modal__sticker:hover .item-modal__sticker-name {
  display: block;
}

.item-modal__float {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 10px;
  background: linear-gradient(
    to right,
    #4b69ff 0 7%,
    #4caf50 7% 15%,
    #f4d03f 15% 38%,
    #ff8c00 38% 45%,
    #e74c3c 45% 100%
  );
}

.item-modal__float-marker {
  position: absolute;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
  pointer-events: none;
}

.item-modal__float-value {
  position: relative;
  padding: 5px 10px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--black);
  color: var(--soft-white);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(var(--black-rgb), 0.45);
}

.item-modal__float-value::before,
.item-modal__float-value::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  transform: translateX(-50%);
}

.item-modal__float-value::before {
  margin-top: 1px;
  border-top: 16px solid var(--brand);
}

.item-modal__float-value::after {
  margin-top: 0;
  border-top: 14px solid var(--black);
}

.item-modal__seed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--border-white-soft);
  border-radius: 4px;
  background: rgba(var(--black-rgb), 0.75);
  color: var(--soft-white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.item-modal__seed::before {
  content: "seed";
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
