@font-face {
  font-family: "StratumNo2";
  src: url("../assets/fonts/stratumno2_light.otf") format("opentype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "StratumNo2";
  src: url("../assets/fonts/stratumno2_regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "StratumNo2";
  src: url("../assets/fonts/stratumno2_bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --header-height: 68px;
  --toolbar-height: 57px;
  --page-gutter: clamp(42px, 5.55vw, 112px);
  --text-main: #f1f0ea;
  --text-muted: rgba(238, 237, 229, 0.68);
  --text-faint: rgba(238, 237, 229, 0.45);
  --blue: #73b7d6;
  --blue-fill: rgba(67, 135, 164, 0.55);
  --panel: rgba(24, 24, 22, 0.92);
  --font-condensed: "StratumNo2", "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", sans-serif;
  --font-ui: var(--font-condensed);
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  display: none;
}

html {
  min-width: 980px;
  min-height: 100%;
  background: #292824;
}

body {
  min-width: 980px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text-main);
  background: #292722;
  font-family: var(--font-condensed);
  font-size: 14px;
  font-stretch: condensed;
  font-weight: 400;
  isolation: isolate;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body::before {
  inset: -22px;
  opacity: 0.58;
  background: url("../assets/mirage-background.png") center / cover no-repeat;
  filter: blur(12px) saturate(0.72) contrast(0.9);
  transform: scale(1.04);
}

body::after {
  z-index: -1;
  opacity: 1;
  background: linear-gradient(rgba(21, 20, 18, 0.56), rgba(34, 32, 28, 0.67));
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible {
  outline: 1px solid rgba(177, 224, 243, 0.9);
  outline-offset: 2px;
}

img {
  user-select: none;
  -webkit-user-drag: none;
}

::selection {
  color: #fff;
  background: rgba(71, 141, 170, 0.72);
}

.app-shell {
  min-height: 100vh;
}

.game-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(90deg, rgba(21, 22, 22, 0.82), rgba(45, 45, 42, 0.76) 48%, rgba(21, 22, 21, 0.84));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
}

.game-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(157, 194, 204, 0.2), transparent);
}

.game-nav {
  display: flex;
  height: 100%;
  align-items: stretch;
  justify-content: center;
}

.player-status-root {
  position: absolute;
  top: 0;
  right: 4px;
  display: flex;
  height: 100%;
  align-items: center;
  gap: 18px;
  z-index: 3;
}


.player-account-group {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  margin-left: 2px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.player-account {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.player-stars {
  display: flex;
  min-width: 54px;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #55c978;
}

.player-stars img {
  width: 14px;
  height: 14px;
  filter: brightness(0) saturate(100%) invert(68%) sepia(54%) saturate(643%) hue-rotate(87deg) brightness(94%);
}

.player-stars strong {
  max-width: 86px;
  overflow: hidden;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-balance,
.player-level {
  display: grid;
  align-content: center;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.player-balance span {
  color: rgba(241, 240, 232, 0.43);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.player-balance strong {
  max-width: 180px;
  overflow: hidden;
  color: #dce9ce;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-status-root.is-level-up .player-stars {
  animation: player-credit-pulse 960ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.player-status-root.is-level-up .player-xp-track i {
  animation: player-xp-flash 960ms ease-out both;
}

@keyframes player-credit-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  30% { transform: scale(1.22); filter: brightness(1.75); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes player-xp-flash {
  0%, 100% { box-shadow: 0 0 4px rgba(117, 180, 74, 0.28); }
  35% { box-shadow: 0 0 14px rgba(135, 215, 76, 0.82); }
}

.player-currency {
  min-width: 34px;
  height: 25px;
  padding: 2px 7px 0;
  cursor: pointer;
  border: 1px solid rgba(177, 215, 226, 0.24);
  background: rgba(20, 24, 23, 0.52);
  color: rgba(214, 232, 237, 0.76);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.player-currency:hover {
  border-color: rgba(177, 224, 243, 0.48);
  color: #e5f3f6;
  background: rgba(65, 100, 107, 0.34);
}

.player-level {
  min-width: 82px;
  padding: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.player-level strong {
  color: rgba(244, 243, 236, 0.86);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.player-xp-track {
  width: 82px;
  height: 3px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.15);
}

.player-xp-track i {
  display: block;
  height: 100%;
  background: #75b44a;
  box-shadow: 0 0 4px rgba(117, 180, 74, 0.28);
}

.nav-tab {
  position: relative;
  min-width: 124px;
  padding: 4px 17px 0;
  cursor: pointer;
  background: transparent;
  color: rgba(247, 246, 239, 0.78);
  font-family: var(--font-condensed);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.055em;
  line-height: var(--header-height);
}

.nav-tab:not(.is-selected):hover {
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.035);
}

.nav-tab.is-selected {
  color: #a9d8ed;
  background: linear-gradient(90deg, transparent, rgba(64, 137, 168, 0.3) 28%, rgba(64, 137, 168, 0.3) 72%, transparent);
  text-shadow: 0 0 12px rgba(86, 160, 190, 0.2);
}

.nav-tab.is-selected::after {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 3px;
  content: "";
  background: #69aeca;
  box-shadow: 0 -4px 18px rgba(73, 150, 183, 0.23);
}

.nav-tab.is-disabled,
.nav-tab.is-locked {
  position: relative;
}

.nav-tab.is-disabled {
  color: rgba(247, 246, 239, 0.29);
  background: rgba(0, 0, 0, 0.08);
  cursor: not-allowed;
}

.nav-tab.is-locked {
  color: rgba(247, 246, 239, 0.42);
}

.nav-tab.is-disabled::before,
.nav-tab.is-locked::before {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  left: 50%;
  display: none;
  padding: 7px 10px 5px;
  transform: translateX(-50%);
  background: rgba(25, 26, 24, 0.98);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  color: rgba(245, 243, 236, 0.78);
  content: attr(data-disabled-copy);
  font-size: 9px;
  letter-spacing: 0.09em;
  line-height: 12px;
  white-space: nowrap;
}

.nav-tab.is-disabled:hover::before,
.nav-tab.is-disabled:focus-visible::before,
.nav-tab.is-locked:hover::before,
.nav-tab.is-locked:focus-visible::before {
  display: block;
}

.noscript-message {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 100;
  padding: 14px 18px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(20, 20, 18, 0.95);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 190px;
  padding: 10px 14px;
  border-left: 3px solid #76b4cf;
  background: rgba(18, 18, 17, 0.94);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  letter-spacing: 0.055em;
  animation: toast-in 140ms ease-out both;
}

@keyframes toast-in {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1180px) {
  .nav-tab { min-width: 94px; padding-inline: 8px; }
  .player-status-root { right: 10px; gap: 10px; }
  .player-stars { display: none; }
}

@media (max-width: 1600px) {
  .game-nav { justify-content: flex-start; padding-left: 18px; }
  .nav-tab { min-width: 100px; padding-inline: 10px; font-size: 16px; }
  .player-status-root { gap: 8px; }
}

/* 2026-08-25 navigation, rank and CS2-style view polish */
.view-enter {
  animation: cs2-view-enter 170ms cubic-bezier(0.18, 0.72, 0.26, 1) both;
}

@keyframes cs2-view-enter {
  from { opacity: 0; transform: translate3d(12px, 0, 0); filter: brightness(0.82); }
  to { opacity: 1; transform: translate3d(0, 0, 0); filter: brightness(1); }
}

.supply-ready-indicator {
  position: absolute;
  z-index: 4;
  top: 11px;
  right: 13px;
  width: 15px;
  height: 15px;
  line-height: 0;
  pointer-events: none;
}

.supply-ready-indicator img {
  width: 15px;
  height: 15px;
  filter: brightness(0) saturate(100%) invert(80%) sepia(65%) saturate(1074%) hue-rotate(348deg) brightness(104%) contrast(96%);
  filter: brightness(0) saturate(100%) invert(83%) sepia(61%) saturate(1360%) hue-rotate(345deg) brightness(101%) contrast(92%) drop-shadow(0 0 5px rgba(242, 198, 65, 0.35));
}

.player-balance { display: block; }
.player-rank {
  min-width: 112px;
  grid-template-columns: 51px auto;
  grid-template-rows: auto 3px;
  align-items: center;
  column-gap: 6px;
  text-align: left;
}
.player-rank-icon {
  width: 51px;
  height: 22px;
  grid-row: 1 / span 2;
  object-fit: contain;
}
.player-rank strong {
  max-width: 78px;
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-rank .player-xp-track {
  width: 100%;
  margin-top: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .view-enter { animation: none; }
}

/* 202608250012 layout and scrolling repair */
html { scroll-behavior: smooth; }
body { scroll-behavior: smooth; }
.player-status-root {
  right: 12px;
  gap: 13px;
  max-width: calc(100vw - 24px);
}
.player-account-group {
  gap: 6px;
  height: 42px;
  margin-left: 1px;
  padding-left: 12px;
  padding-right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}
.player-account {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 0;
}
.inventory-content,
.market-shell,
.trade-shell,
.profile-shell,
.cases-screen,
.trade-up-grid,
.notification-body {
  scroll-behavior: smooth;
}

/* Reuse the case-opening loading wheel for server-backed actions. */
.ui-action-spinner.case-opening-spinner {
  width: 17px;
  height: 17px;
  display: inline-block;
  box-sizing: border-box;
  border-width: 3px;
  flex: 0 0 17px;
}

button.is-action-loading {
  min-width: var(--ui-busy-width, 0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

/* 202608260025 transient UI must stay above every modal. */
.toast-root { z-index: 20000; }
