:root {
  --bg: #0a0d11;
  --panel: #141920;
  --panel-2: #171c24;
  --panel-3: #1b2632;
  --line: #2a3340;
  --line-bright: #3d4758;
  --text: #edf2f8;
  --text-dim: #90a0b5;
  --text-faint: #657286;
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, 0.14);
  --good: #3ddc84;
  --warning: #ffd166;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.4);
  --radius: 0px;
  --font-body: "Inter", sans-serif;
  --font-display: "Oswald", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

*::before,
*::after {
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 26, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(0, 140, 255, 0.11), transparent 34%),
    linear-gradient(180deg, #0a0d11 0%, #0d1015 100%);
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.page-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-card {
  position: relative;
  max-width: 650px;
  width: 100%;
  border: 1px solid var(--line-bright);
  background:
    linear-gradient(135deg, rgba(255, 122, 26, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 38%),
    var(--panel);
  padding: 42px;
  display: grid;
  gap: 18px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.4);
}

.auth-brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

.auth-title {
  max-width: 520px;
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.98;
}

.auth-copy {
  max-width: 540px;
  margin: 0;
  color: var(--text-dim);
  line-height: 1.6;
}

.auth-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.auth-info-grid div {
  display: grid;
  gap: 5px;
}

.auth-info-grid strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.auth-info-grid span,
.auth-footnote {
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.4;
}

.steam-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #17100a;
  text-decoration: none;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.steam-button strong {
  color: #17100a;
}

.steam-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  color: #17100a;
}

.auth-footnote {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 0 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.2rem;
  line-height: 1.1;
}

.brand-sub {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar .pill {
  width: auto;
  white-space: nowrap;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--line-bright);
  background: rgba(17, 25, 34, 0.7);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tab-view[hidden] {
  display: none;
}

.tab-button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 122, 26, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.18);
}

.bank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
}

.bank-page {
  display: grid;
  gap: 18px;
}

.bank-profile-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.1), transparent 55%), var(--panel-2);
  animation: bank-profile-zoom 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bank-profile-avatar {
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  flex: 0 0 72px;
  border-radius: 50%;
}

.bank-profile-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  text-transform: uppercase;
}

.bank-profile-steamid {
  margin-top: 5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.bank-history {
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.bank-history-empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

@keyframes bank-profile-zoom {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.bank-balances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bank-figure {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.4rem;
}

.bank-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.bank-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pill {
  border: 1px solid var(--line-bright);
  background: var(--panel-2);
  color: var(--text-dim);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill.live {
  color: var(--good);
  border-color: #24503a;
}

.pill.down {
  color: #ff5a5a;
  border-color: #5a2424;
}

.hero-grid,
.bottom-grid {
  display: grid;
  gap: 16px;
}

.hero-grid {
  grid-template-columns: 280px 1fr 320px;
  margin-bottom: 16px;
}

.bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-title {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.panel-body {
  padding: 14px;
}

.profile-card {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.08), transparent 55%), var(--panel-2);
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  background: var(--panel-2);
  object-fit: cover;
}

.profile-name {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-meta {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.stat-row:last-child {
  border-bottom: none;
}

.filter-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr auto;
  gap: 8px;
  margin-bottom: 14px;
}

input,
select,
button {
  width: 100%;
  border: 1px solid var(--line-bright);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 0;
  font-family: inherit;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.inventory-grid,
.case-grid,
.odds-grid {
  display: grid;
  gap: 12px;
}

.inventory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pill,
.case-card,
.item-card,
.mini-box,
.trade-line,
.equip-photo-card,
.odds-card {
  border-radius: 0;
}

@media (min-width: 1500px) {
  .page-shell {
    max-width: 1740px;
    padding: 16px 20px;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .hero-grid {
    grid-template-columns: 220px minmax(0, 1fr) 250px;
    gap: 12px;
    height: calc(100vh - 96px);
    margin-bottom: 0;
  }

  .panel-title {
    padding: 9px 11px;
    font-size: 0.62rem;
  }

  .panel-body {
    padding: 10px;
  }

  .profile-card {
    gap: 8px;
    margin-bottom: 8px;
  }

  .profile-avatar {
    width: 42px;
    height: 42px;
  }

  .profile-meta,
  .stat-row {
    font-size: 0.68rem;
  }

  .stat-row {
    padding: 6px 0;
  }

  .filter-row {
    gap: 6px;
    margin-bottom: 8px;
  }

  input,
  select,
  button {
    padding: 7px 8px;
    font-size: 0.78rem;
  }

  .main-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .main-panel .panel-body {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .inventory-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
    padding-right: 3px;
  }

  .item-card {
    padding: 8px;
  }

  .item-card .thumb {
    height: 58px;
    margin-bottom: 6px;
  }

  .item-card .name {
    min-height: 32px;
    font-size: 0.88rem;
    line-height: 1.15;
  }

  .item-card .meta-line {
    margin-top: 4px;
    font-size: 0.72rem;
  }

  .item-actions {
    gap: 5px;
    margin-top: 7px;
  }

  .item-actions button {
    padding: 6px 4px;
    font-size: 0.68rem;
  }

  .inventory-pagination {
    margin-top: 8px;
  }

  .stack {
    gap: 8px;
  }

  .mini-box {
    padding: 9px;
  }
}

.inventory-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.inventory-pagination button {
  width: auto;
  min-width: 86px;
}

.inventory-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#inventoryPageStatus {
  min-width: 68px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-align: center;
}

.case-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.odds-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 12px;
}

.case-opener {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  margin: 16px 0;
  gap: 16px;
}

.case-opener .main-panel {
  min-width: 0;
}

.case-opener-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.case-selection {
  min-width: 0;
}

.case-section-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.case-section-copy {
  color: var(--text-dim);
  font-size: 0.76rem;
  line-height: 1.4;
}

.case-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.case-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  text-align: left;
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.case-card:hover {
  background: #1b222c;
  transform: translateY(-1px);
}

.case-card.selected {
  border-color: var(--accent);
  background: rgba(255, 122, 26, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.2);
}

.case-card .name {
  min-height: 2.4em;
  overflow-wrap: anywhere;
  font-size: 0.84rem;
  line-height: 1.2;
  margin: 0;
}

.case-opening-stage {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 14px;
}

.selected-case-summary {
  display: flex;
  min-height: 118px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.08), rgba(17, 25, 34, 0.96));
  border-radius: 0;
}

.selected-case-image {
  display: grid;
  flex: 0 0 94px;
  width: 94px;
  height: 94px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: rgba(10, 13, 17, 0.8);
  color: var(--accent);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  border-radius: 0;
}

.selected-case-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.selected-case-details {
  min-width: 0;
}

.selected-case-name {
  overflow: hidden;
  margin-top: 7px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.selected-case-price {
  margin-top: 5px;
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.roulette-frame {
  padding: 10px;
  border: 1px solid var(--line);
  background: #111720;
}

.roulette-label {
  margin-bottom: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-reel {
  position: relative;
  height: 158px;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: #0c1015;
}

.case-reel::before,
.case-reel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14%;
  z-index: 2;
  pointer-events: none;
}

.case-reel::before {
  left: 0;
  background: linear-gradient(90deg, #0c1015, transparent);
}

.case-reel::after {
  right: 0;
  background: linear-gradient(270deg, #0c1015, transparent);
}

.case-reel-marker {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(255, 122, 26, 0.8);
}

.case-reel-marker::before,
.case-reel-marker::after {
  content: "";
  position: absolute;
  left: -5px;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}

.case-reel-marker::before {
  top: 0;
  border-top: 7px solid var(--accent);
}

.case-reel-marker::after {
  bottom: 0;
  border-bottom: 7px solid var(--accent);
}

.case-reel-track {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.case-reel-track.spinning {
  animation: case-reel-spin 5.6s cubic-bezier(0.08, 0.8, 0.16, 1) forwards;
}

.reel-item {
  flex: 0 0 160px;
  height: 126px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  overflow: hidden;
}

.reel-item img {
  display: block;
  width: 100%;
  height: 82px;
  object-fit: contain;
}

.reel-item span {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-reel-placeholder,
.case-opening-status {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.case-reel-placeholder {
  width: 100%;
  text-align: center;
}

.case-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.case-action-row button {
  width: auto;
  min-width: 164px;
  border-color: var(--accent);
  background: var(--accent);
  color: #17100a;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.case-action-row button:hover:not(:disabled) {
  background: #ff954d;
  color: #17100a;
}

.case-action-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.case-odds {
  margin-top: 16px;
}

.toast-region {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 28px));
}

.toast {
  border: 1px solid var(--line-bright);
  border-left: 3px solid var(--accent);
  background: #151b23;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  padding: 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  animation: toast-in 180ms ease-out;
}

.toast-success { border-left-color: var(--good); }
.toast-error { border-left-color: #ff5a5a; }

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 9, 0.78);
}

.modal-backdrop[hidden] {
  display: none;
}

.spin-backdrop {
  z-index: 40;
}

.spin-modal {
  width: min(1080px, calc(100vw - 32px));
  border: 1px solid var(--line-bright);
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.spin-modal .mini-title {
  margin-bottom: 12px;
  text-align: center;
}

.opened-items-strip {
  display: flex;
  gap: 8px;
  min-height: 58px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.opened-item-chip {
  display: grid;
  flex: 0 0 82px;
  justify-items: center;
  gap: 3px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-align: center;
}

.opened-item-chip img {
  width: 56px;
  height: 36px;
  object-fit: contain;
}

.opened-item-flying-image {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  object-fit: contain;
  opacity: 0.95;
  transition: left 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 420ms ease;
}

.opened-item-flying-image-active {
  opacity: 0.2;
}

.opened-item-chip span {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spin-modal .case-reel {
  height: 190px;
}

.spin-modal .reel-item {
  height: 154px;
}

.spin-modal .reel-item img {
  height: 104px;
}

.result-modal {
  width: min(380px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  border: 1px solid var(--line-bright);
  background: var(--panel);
  padding: 18px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.result-batch-item + .result-batch-item {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.case-quantity-control {
  display: grid;
  gap: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.case-quantity-control select {
  min-width: 58px;
  padding: 8px;
  border: 1px solid var(--line-bright);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

.team-choice-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.team-choice-actions button.team-choice-unavailable {
  cursor: not-allowed;
  filter: blur(2px);
  opacity: 0.35;
  pointer-events: none;
}

.sell-countdown {
  margin-top: 14px;
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

#confirmSellButton:disabled {
  cursor: not-allowed;
  border-color: #5a2424;
  color: #ff5a5a;
  opacity: 0.7;
}

#confirmSellButton,
#confirmSellButton:hover {
  border-color: #ff5a5a;
  color: #ff5a5a;
}

#dailyBtn:disabled {
  border-color: #5a2424;
  color: #ff5a5a;
  cursor: not-allowed;
  opacity: 0.7;
}

.result-item-image {
  height: 172px;
  margin: 14px 0;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.result-item-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-item-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-transform: uppercase;
}

.result-item-rarity {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.quick-sell-button {
  margin-top: 12px;
  border-color: var(--accent);
  color: var(--accent);
}

.sale-success-value {
  margin: 14px 0 4px;
  color: var(--good);
  font-family: var(--font-display);
  font-size: 2rem;
}

@keyframes case-reel-spin {
  from { transform: translateX(0); }
  to { transform: translateX(var(--reel-stop, -1860px)); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.item-card,
.case-card,
.odds-card,
.mini-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 12px;
}

.odds-card {
  min-width: 0;
}

.odds-image {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 1px solid var(--line-bright);
  background: #111720;
}

.odds-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.odds-card .name {
  min-height: 2.6em;
  margin-top: 4px;
  font-family: var(--font-display);
  line-height: 1.3;
}

.odds-card .quote-result {
  margin-top: 8px;
}

.item-card .thumb,
.case-card .thumb {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-bright);
  margin-bottom: 8px;
}

.item-card .thumb img,
.equip-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.item-card .name,
.case-card .name {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.item-card .meta,
.case-card .meta,
.quote-result,
.trade-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.item-card .meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.rarity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.stack {
  display: grid;
  gap: 12px;
}

.mini-title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-size: 0.66rem;
  margin-bottom: 8px;
}

.quote-result {
  margin: 8px 0;
}

.trade-list,
.trade-list {
  display: grid;
  gap: 10px;
}

.trade-line {
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 10px;
}

.trade-panel {
  overflow: hidden;
}

.trade-top-box {
  margin-bottom: 12px;
}

.trade-room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.trade-message-grid {
  grid-template-columns: 1.25fr 0.75fr;
}

.trade-side,
.trade-chat-box {
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 10px;
}

.trade-card-grid {
  display: grid;
  gap: 10px;
}

.trade-card {
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 10px;
}

.trade-card .thumb {
  height: 82px;
  margin-bottom: 8px;
}

.trade-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-log {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #0f1419;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.equip-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
  width: 100%;
  align-items: stretch;
}

.loadout-screen {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 24px;
}

.loadout-screen::before {
  content: "LOADOUT // EQUIPMENT";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.equip-panel {
  min-height: 260px;
  border-color: #394554;
}

.loadout-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  background: #1a222c;
  font-size: 0.78rem;
}

.loadout-side-mark {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.category-group {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.category-title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 10px 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.equip-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.equip-photo-card {
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 8px;
  min-width: 0;
  transition: border-color 160ms ease, background 160ms ease;
}

.equip-photo-card:hover {
  border-color: var(--accent);
  background: #202a35;
}

.equip-photo-card img {
  height: 90px;
}

.photo-label {
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--text);
}

.photo-rarity {
  margin-top: 4px;
  font-size: 0.68rem;
}

.photo-detail {
  margin-top: 5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.empty-group {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .case-opener {
    grid-template-columns: 1fr;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .auth-card {
    padding: 28px 22px;
  }

  .auth-info-grid {
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .inventory-grid,
  .case-grid,
  .odds-grid {
    grid-template-columns: 1fr;
  }

  .case-opener-layout {
    grid-template-columns: 1fr;
  }

  .bank-layout,
  .bank-balances,
  .bank-profile-hero {
    grid-template-columns: 1fr;
  }

  .bank-profile-hero {
    flex-direction: column;
    text-align: center;
  }

  .equip-layout {
    grid-template-columns: 1fr;
  }

  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .case-action-row {
    grid-template-columns: 1fr;
  }

  .case-action-row button {
    width: 100%;
  }

  .toast-region {
    right: 14px;
    bottom: 14px;
  }

  .page-shell {
    padding: 14px;
  }
}

.quick-sell-all-button {
  width: 100%;
  margin-top: 18px;
  border-color: var(--accent);
  background: var(--accent);
  color: #17100a;
  font-weight: 700;
}

.auth-brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.bank-profile-hero .bank-profile-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  max-width: 72px;
  max-height: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .bank-profile-hero {
    animation: none;
  }
}