.hv-game-inventory {
  position: fixed;
  top: var(--hv-inv-panel-top, 112px);
  left: 12px;
  bottom: var(--hv-inv-panel-bottom, 102px);
  z-index: 45;
  display: flex;
  align-items: stretch;
  pointer-events: none;
}

.hv-game-inventory[hidden] {
  display: none !important;
}

.hv-game-inventory.is-open {
  z-index: 110;
  pointer-events: auto;
}

.hv-inv-panel {
  position: relative;
  width: min(420px, calc(100vw - 24px));
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 8px 10px 6px;
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(0, 255, 255, 0.04) 0%, transparent 28%),
    linear-gradient(135deg, rgba(8, 14, 28, 0.97) 0%, rgba(4, 8, 18, 0.99) 100%);
  border: 1px solid rgba(0, 255, 255, 0.22);
  border-radius: 10px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  clip-path: none;
  transform: translateX(calc(-100% - 20px));
  transition: transform 0.22s ease;
}

.hv-game-inventory.is-open .hv-inv-panel {
  transform: translateX(0);
}

.hv-inv-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(0, 255, 255, 0.18);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  overflow: hidden;
}

.hv-inv-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: rgba(0, 255, 255, 0.75);
  border-style: solid;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.45));
}

.hv-inv-corner-tl { top: 4px; left: 4px; border-width: 2px 0 0 2px; }
.hv-inv-corner-tr { top: 4px; right: 4px; border-width: 2px 2px 0 0; }
.hv-inv-corner-bl { bottom: 4px; left: 4px; border-width: 0 0 2px 2px; }
.hv-inv-corner-br { bottom: 4px; right: 4px; border-width: 0 2px 2px 0; }

.hv-inv-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.022) 2px,
    rgba(0, 255, 255, 0.022) 4px
  );
  opacity: 0.55;
  animation: hvInvScan 6s linear infinite;
}

@keyframes hvInvScan {
  from { transform: translateY(0); }
  to { transform: translateY(8px); }
}

.hv-inv-header {
  position: relative;
  z-index: 1;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(120, 180, 255, 0.14);
}

.hv-inv-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.hv-inv-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.hv-inv-cube-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(0, 255, 255, 0.45);
  background:
    linear-gradient(135deg, transparent 42%, rgba(0, 255, 255, 0.18) 42%, rgba(0, 255, 255, 0.18) 58%, transparent 58%),
    linear-gradient(45deg, rgba(0, 255, 255, 0.08) 0%, rgba(0, 255, 255, 0.02) 100%);
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.12);
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}

.hv-inv-heading {
  min-width: 0;
}

.hv-inv-title {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #e8f8ff;
  line-height: 1.1;
}

.hv-inv-subtitle {
  margin: 2px 0 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(143, 212, 255, 0.72);
  text-transform: uppercase;
}

.hv-inv-wealth {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 1 auto;
}

.hv-inv-currency {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #e8f4ff;
  white-space: nowrap;
}

.hv-inv-currency-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hv-inv-currency-icon .hv-icon,
.hv-inv-currency-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.hv-inv-currency-coins .hv-inv-currency-icon {
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.45));
}

.hv-inv-currency-diamonds .hv-inv-currency-icon {
  color: #67e8f9;
  filter: drop-shadow(0 0 6px rgba(103, 232, 249, 0.45));
}

.hv-inv-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(120, 180, 255, 0.1);
}

.hv-inv-filters {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.hv-inv-filter-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  flex: 1 1 0;
  max-width: 50%;
}

.hv-inv-filter-tag {
  font-family: "Rajdhani", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(143, 212, 255, 0.72);
  line-height: 1;
  padding-left: 2px;
}

.hv-inv-filter-shell {
  --hv-inv-filter-cut: 5px;
  position: relative;
  display: block;
  clip-path: polygon(
    0 0,
    calc(100% - var(--hv-inv-filter-cut)) 0,
    100% var(--hv-inv-filter-cut),
    100% 100%,
    var(--hv-inv-filter-cut) 100%,
    0 calc(100% - var(--hv-inv-filter-cut))
  );
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.42), rgba(255, 0, 180, 0.28));
  box-shadow:
    0 0 12px rgba(0, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}

.hv-inv-filter-shell::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-top: 2px solid rgba(0, 255, 255, 0.75);
  border-left: 2px solid rgba(0, 255, 255, 0.75);
  pointer-events: none;
  z-index: 2;
}

.hv-inv-filter-shell::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(0, 255, 255, 0.55);
  border-bottom: 2px solid rgba(0, 255, 255, 0.55);
  pointer-events: none;
  z-index: 2;
}

.hv-inv-filter-field:focus-within .hv-inv-filter-shell {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.58), rgba(255, 0, 180, 0.38));
  box-shadow:
    0 0 16px rgba(0, 255, 255, 0.28),
    0 0 8px rgba(255, 0, 180, 0.16);
}

.hv-inv-filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 28px 7px 10px;
  border: none;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(0, 255, 255, 0.05) 0%, transparent 38%),
    linear-gradient(135deg, rgba(8, 14, 28, 0.98) 0%, rgba(4, 8, 18, 0.99) 100%);
  color: #dffcff;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  cursor: pointer;
  outline: none;
  clip-path: polygon(
    0 0,
    calc(100% - var(--hv-inv-filter-cut)) 0,
    100% var(--hv-inv-filter-cut),
    100% 100%,
    var(--hv-inv-filter-cut) 100%,
    0 calc(100% - var(--hv-inv-filter-cut))
  );
  transition: color 0.15s ease, background 0.15s ease;
}

.hv-inv-filter-select:hover {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 255, 255, 0.08) 0%, transparent 38%),
    linear-gradient(135deg, rgba(12, 20, 36, 0.98) 0%, rgba(6, 10, 22, 0.99) 100%);
}

.hv-inv-filter-select:focus {
  color: #8fd4ff;
}

.hv-inv-filter-select option {
  background: #0a1018;
  color: #dffcff;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.hv-inv-filter-chevron {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 8px;
  height: 8px;
  margin-top: -1px;
  pointer-events: none;
  z-index: 3;
  transform: translateY(-50%) rotate(45deg);
  border-right: 2px solid rgba(0, 255, 255, 0.82);
  border-bottom: 2px solid rgba(0, 255, 255, 0.82);
  filter: drop-shadow(0 0 4px rgba(0, 255, 255, 0.45));
}

#hvInvType.hv-inv-filter-select {
  min-width: 0;
}

#hvInvRarity.hv-inv-filter-select {
  min-width: 0;
}

.hv-inv-grid-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 6px 2px 4px;
  -webkit-user-select: none;
  user-select: none;
}

.hv-inv-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 6px;
  height: 100%;
  -webkit-touch-callout: none;
}

.hv-inv-cell {
  --hv-inv-cut: 7px;
  --hv-inv-cut-inner: 6px;
  --hv-inv-rim: rgba(120, 180, 255, 0.55);
  --hv-inv-glow: rgba(120, 180, 255, 0.22);
  --hv-inv-fill-top: rgba(14, 18, 28, 0.96);
  --hv-inv-fill-bottom: rgba(4, 7, 14, 0.98);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  clip-path: polygon(
    0 0,
    calc(100% - var(--hv-inv-cut)) 0,
    100% var(--hv-inv-cut),
    100% 100%,
    var(--hv-inv-cut) 100%,
    0 calc(100% - var(--hv-inv-cut))
  );
  cursor: default;
  overflow: hidden;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.hv-inv-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hv-inv-rim);
  box-shadow:
    0 0 10px var(--hv-inv-glow),
    inset 0 0 14px rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 0;
}

.hv-inv-cell::after {
  content: "";
  position: absolute;
  inset: 1px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.07), transparent 56%),
    linear-gradient(180deg, var(--hv-inv-fill-top) 0%, var(--hv-inv-fill-bottom) 100%);
  clip-path: polygon(
    0 0,
    calc(100% - var(--hv-inv-cut-inner)) 0,
    100% var(--hv-inv-cut-inner),
    100% 100%,
    var(--hv-inv-cut-inner) 100%,
    0 calc(100% - var(--hv-inv-cut-inner))
  );
  pointer-events: none;
  z-index: 0;
}

.hv-inv-cell:not(.is-empty):hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 10px var(--hv-inv-glow));
}

.hv-inv-cell.is-empty {
  --hv-inv-rim: rgba(120, 180, 255, 0.16);
  --hv-inv-glow: transparent;
  --hv-inv-fill-top: rgba(0, 0, 0, 0.2);
  --hv-inv-fill-bottom: rgba(0, 0, 0, 0.28);
  opacity: 0.34;
}

.hv-inv-cell.is-empty::before {
  background: transparent;
  border: 1px dashed var(--hv-inv-rim);
  box-shadow: none;
}

.hv-inv-cell.is-empty::after {
  display: none;
}

.hv-inv-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hv-inv-frame::before,
.hv-inv-frame::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-color: var(--hv-inv-rim);
  border-style: solid;
  opacity: 0.95;
  filter: drop-shadow(0 0 5px var(--hv-inv-glow));
}

.hv-inv-frame::before {
  top: 2px;
  left: 2px;
  border-width: 2px 0 0 2px;
}

.hv-inv-frame::after {
  right: 2px;
  bottom: 2px;
  border-width: 0 2px 2px 0;
}

.hv-inv-cell.rarity-1 {
  --hv-inv-rim: rgba(180, 83, 9, 0.9);
  --hv-inv-glow: rgba(180, 83, 9, 0.38);
  --hv-inv-fill-top: rgba(28, 16, 8, 0.96);
  --hv-inv-fill-bottom: rgba(12, 7, 4, 0.98);
}

.hv-inv-cell.rarity-2 {
  --hv-inv-rim: rgba(186, 196, 208, 0.82);
  --hv-inv-glow: rgba(186, 196, 208, 0.28);
  --hv-inv-fill-top: rgba(20, 22, 28, 0.96);
  --hv-inv-fill-bottom: rgba(8, 9, 12, 0.98);
}

.hv-inv-cell.rarity-3 {
  --hv-inv-rim: rgba(234, 179, 8, 0.92);
  --hv-inv-glow: rgba(234, 179, 8, 0.42);
  --hv-inv-fill-top: rgba(28, 22, 6, 0.96);
  --hv-inv-fill-bottom: rgba(12, 9, 3, 0.98);
}

.hv-inv-cell.rarity-4 {
  --hv-inv-rim: rgba(34, 211, 238, 0.92);
  --hv-inv-glow: rgba(34, 211, 238, 0.45);
  --hv-inv-fill-top: rgba(6, 20, 28, 0.96);
  --hv-inv-fill-bottom: rgba(3, 10, 16, 0.98);
}

.hv-inv-thumb {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76%;
  height: 76%;
  min-width: 0;
  min-height: 0;
}

.hv-inv-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  user-select: none;
}

.hv-inv-fallback {
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.hv-inv-qty {
  position: absolute;
  right: 6px;
  bottom: 4px;
  z-index: 3;
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hv-inv-slot {
  position: absolute;
  left: 6px;
  top: 4px;
  z-index: 3;
  font-family: "Rajdhani", sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--hv-inv-rim);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  opacity: 0.92;
}

.hv-inv-footer {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 2px 2px;
  border-top: 1px solid rgba(120, 180, 255, 0.12);
  pointer-events: auto;
}

.hv-inv-hint {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
  text-transform: uppercase;
}

.hv-inv-hint strong {
  color: rgba(143, 212, 255, 0.85);
  font-weight: 800;
}

.hv-inv-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.hv-inv-page-btn {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 255, 255, 0.38);
  border-radius: 8px;
  background: rgba(0, 36, 52, 0.88);
  color: #dffcff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hv-inv-page-btn:hover:not(:disabled) {
  background: rgba(0, 255, 255, 0.12);
  border-color: rgba(0, 255, 255, 0.62);
}

.hv-inv-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hv-inv-page-label {
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
  min-width: 52px;
  text-align: center;
}

.hv-inv-page-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 6px;
}

.hv-inv-page-dot {
  width: 16px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(120, 180, 255, 0.22);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, width 0.15s ease;
}

.hv-inv-page-dot.is-active {
  width: 24px;
  background: rgba(0, 255, 255, 0.72);
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.35);
}

.hv-inv-status {
  padding: 24px 16px;
  text-align: center;
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  grid-column: 1 / -1;
}

.hv-inv-tooltip {
  position: fixed;
  z-index: 200;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid rgba(120, 180, 255, 0.28);
  border-radius: 6px;
  background: rgba(6, 10, 18, 0.96);
  color: #e8f4ff;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.hv-inv-tooltip[hidden] {
  display: none !important;
}

.hv-inv-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #8fd4ff;
}

.hv-inv-tooltip-desc {
  display: block;
  color: rgba(232, 244, 255, 0.88);
  word-break: break-word;
}

.hv-inv-tooltip-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(120, 180, 255, 0.18);
}

.hv-inv-shortcut-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(232, 244, 255, 0.82);
  font-size: 11px;
  line-height: 1.2;
}

.hv-inv-shortcut-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: auto;
}

.hv-inv-shortcut-plus {
  flex: 0 0 auto;
  color: rgba(143, 212, 255, 0.75);
  font-size: 10px;
  font-weight: 600;
}

.hv-inv-shortcut-text {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 420px) {
  .hv-inv-panel {
    width: min(360px, 96vw);
    padding: 6px 8px 4px;
  }

  .hv-inv-header-main {
    flex-direction: column;
    align-items: stretch;
  }

  .hv-inv-wealth {
    justify-content: flex-start;
  }
}


.hv-inv-cell.is-new-drop {
  z-index: 4;
  filter: drop-shadow(0 0 18px rgba(255, 214, 0, 0.85)) drop-shadow(0 0 28px rgba(0, 255, 255, 0.75));
  animation: hvInvDropCellShake 1.15s ease-in-out infinite;
}

.hv-inv-cell.is-new-drop .hv-inv-thumb {
  position: relative;
  z-index: 5;
  animation: hvInvDropThumbPop 1.15s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 230, 80, 1)) drop-shadow(0 0 18px rgba(0, 255, 255, 0.9));
}

.hv-inv-cell.is-new-drop .hv-inv-qty,
.hv-inv-cell.is-new-drop .hv-inv-slot {
  z-index: 5;
}

.hv-inv-drop-ring {
  position: absolute;
  inset: -7px;
  pointer-events: none;
  z-index: 3;
  border: 3px solid rgba(255, 214, 0, 0.95);
  box-shadow:
    0 0 22px rgba(255, 214, 0, 0.9),
    0 0 36px rgba(0, 255, 255, 0.65);
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
  animation: hvInvDropRingSpin 2.4s linear infinite;
}

.hv-inv-drop-pulse {
  position: absolute;
  inset: -2px;
  pointer-events: none;
  z-index: 6;
  border: 3px solid rgba(0, 255, 255, 1);
  background: linear-gradient(
    135deg,
    rgba(0, 255, 255, 0.22) 0%,
    rgba(255, 214, 0, 0.18) 50%,
    rgba(0, 255, 255, 0.22) 100%
  );
  box-shadow:
    0 0 24px rgba(0, 255, 255, 0.95),
    0 0 40px rgba(255, 214, 0, 0.75),
    inset 0 0 16px rgba(0, 255, 255, 0.45);
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
  animation: hvInvDropPulse 0.85s ease-in-out infinite;
}

@keyframes hvInvDropRingSpin {
  from { transform: rotate(0deg) scale(1); opacity: 0.95; }
  50% { transform: rotate(180deg) scale(1.06); opacity: 1; }
  to { transform: rotate(360deg) scale(1); opacity: 0.95; }
}

@keyframes hvInvDropPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow:
      0 0 24px rgba(0, 255, 255, 0.95),
      0 0 40px rgba(255, 214, 0, 0.75),
      inset 0 0 16px rgba(0, 255, 255, 0.45);
  }
  50% {
    transform: scale(1.1);
    opacity: 0.88;
    box-shadow:
      0 0 34px rgba(0, 255, 255, 1),
      0 0 52px rgba(255, 214, 0, 0.95),
      inset 0 0 22px rgba(255, 214, 0, 0.55);
  }
}

@keyframes hvInvDropCellShake {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-2px); }
  75% { transform: translateY(2px); }
}

@keyframes hvInvDropThumbPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.hv-chest-preview {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  pointer-events: none;
}

.hv-chest-preview[hidden] {
  display: none !important;
}

.hv-chest-preview:not([hidden]) {
  pointer-events: auto;
}

.hv-chest-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(3px);
}

.hv-chest-preview-panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(0, 255, 255, 0.05) 0%, transparent 30%),
    linear-gradient(135deg, rgba(8, 14, 28, 0.98) 0%, rgba(4, 8, 18, 0.99) 100%);
  border: 1px solid rgba(0, 255, 255, 0.28);
  border-radius: 10px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: hvChestPreviewIn 0.2s ease;
}

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

.hv-chest-preview-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(120, 180, 255, 0.14);
}

.hv-chest-preview-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hv-chest-preview-title {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8fd4ff;
}

.hv-chest-preview-subtitle {
  margin: 2px 0 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  color: rgba(232, 244, 255, 0.72);
  word-break: break-word;
}

.hv-chest-preview-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(120, 180, 255, 0.28);
  border-radius: 6px;
  background: rgba(8, 14, 24, 0.8);
  color: #cfe9ff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.hv-chest-preview-close:hover {
  border-color: rgba(0, 255, 255, 0.45);
  color: #fff;
}

.hv-chest-preview-desc {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(232, 244, 255, 0.82);
}

.hv-chest-preview-desc[hidden] {
  display: none !important;
}

.hv-chest-preview-grid-wrap {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 10px;
  overflow: auto;
  padding-right: 2px;
}

.hv-chest-preview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  min-height: 120px;
}

.hv-chest-preview-grid .hv-inv-cell {
  aspect-ratio: 1;
  min-height: 0;
}

.hv-chest-preview-grid .hv-inv-status {
  grid-column: 1 / -1;
}

.hv-chest-preview-hint {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  color: rgba(143, 212, 255, 0.72);
  text-align: center;
}

.hv-chest-preview-tooltip {
  position: fixed;
  z-index: 200;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid rgba(120, 180, 255, 0.28);
  border-radius: 6px;
  background: rgba(6, 10, 18, 0.96);
  color: #e8f4ff;
  font-family: "Rajdhani", sans-serif;
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.hv-chest-preview-tooltip[hidden] {
  display: none !important;
}

.hv-chest-preview-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #8fd4ff;
}

.hv-chest-preview-tooltip-meta {
  display: block;
  color: rgba(232, 244, 255, 0.9);
}

.hv-chest-preview-tooltip-meta + .hv-chest-preview-tooltip-meta {
  margin-top: 3px;
}

.hv-chest-preview-tooltip-desc {
  display: block;
  margin-top: 4px;
  color: rgba(232, 244, 255, 0.78);
  word-break: break-word;
}

@media (max-width: 520px) {
  .hv-chest-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

