:root{
  --bg:#06060c;--bg2:#0c0c18;--surface:#111124;--surface2:#181834;
  --border:#222244;--text:#e0e0f2;--muted:#6a6a90;--accent:#FFA600;--accent-rgb: 255, 166, 0;--accent-dark: #cc8400;--accent-darker: #b37400;
  --c-milspec:#4b69ff;--c-restricted:#8847ff;--c-classified:#d32ce6;
  --c-covert:#eb4b4b;--c-gold:#e4ae39;--c-case:#9b59b6;
  --item-w:152px;--item-h:186px;--item-gap:4px;--item-step:156px;
}

*{margin:0;padding:0;box-sizing:border-box}

body{
  font-family:'Exo 2',sans-serif;
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  overflow-x:hidden;
}

h1,h2,h3,h4{font-family:'Jost',sans-serif;font-weight:700}

::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:var(--bg2)}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:var(--muted)}

html.reduced-borders,html.reduced-borders *{border-width:0!important;outline:none!important}
html.reduced-borders .content-item{border-bottom-style:solid!important;border-bottom-width:1px!important}
html.reduced-borders .roulette-item .item-bg{border-bottom-style:solid!important;border-bottom-width:3px!important}
html.reduced-borders .create-trade-item.selected{box-shadow:inset 0 0 0 2px var(--accent)!important}
html.reduced-borders .inspect-card{border-style:solid!important;border-width:1px!important}
html.reduced-borders .mouse{border-style:solid!important;border-width:2px!important}
html.reduced-borders .spinner{border-style:solid!important;border-width:3px!important}
html.reduced-borders .content-item .cname{border-top-style:solid!important;border-top-width:1px!important}
body::before{
  content:'';
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%,rgba(var(--accent-rgb),.04),transparent),
    radial-gradient(ellipse 40% 40% at 15% 95%,rgba(75,105,255,.025),transparent),
    radial-gradient(ellipse 35% 35% at 85% 85%,rgba(211,44,230,.015),transparent);
}

#loader{
  position:fixed;
  inset:0;
  z-index:9999;
  background:var(--bg);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:20px;
  transition:opacity .5s;
  overflow:hidden;
}
#loader.hidden{opacity:0;pointer-events:none}
.loader-icon{
  width:min(120px,30vw);
  height:min(120px,30vw);
  object-fit:contain;
  opacity:1;
  animation:loaderPulse 1.5s ease-in-out infinite;
  filter:drop-shadow(0 0 24px rgba(var(--accent-rgb),.35));
  will-change:transform,opacity;
  pointer-events:none;
  user-select:none;
  backface-visibility:hidden;
  transform:translateZ(0);
}
#loader.finishing .loader-icon{
  animation:loaderExit 1.6s forwards;
  filter:none;
}
@keyframes loaderPulse{
  0%,100%{opacity:1}
  50%{opacity:.38}
}
@keyframes loaderExit{
  0%{
    transform:scale(1) translateZ(0);
    opacity:1;
    animation-timing-function:cubic-bezier(.33,1,.68,1);
  }
  22%{
    transform:scale(.9) translateZ(0);
    opacity:1;
    animation-timing-function:linear;
  }
  38%{
    transform:scale(.9) translateZ(0);
    opacity:1;
    animation-timing-function:cubic-bezier(.25,.8,.25,1);
  }
  100%{
    transform:scale(45) translateZ(0);
    opacity:0;
  }
}
.spinner{
  width:44px;
  height:44px;
  border:3px solid var(--border);
  border-top-color:var(--accent);
  border-radius:50%;
  animation:spin .7s linear infinite;
}

.beta-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 8px;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));
  color:#0a0a12;
  font-family:'Rajdhani',sans-serif;
  font-size:.65rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.5px;
  border-radius:6px;
  margin-left:4px;
  line-height:1;
}

#loading-overlay{
  position:fixed;
  inset:0;
  z-index:9990;
  background:rgba(3,3,8,.85);
  backdrop-filter:blur(6px);
  display:none;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:opacity .3s ease;
}
#loading-overlay.active{
  display:flex;
  opacity:1;
}
.loading-box{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  padding:32px 40px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
  min-width:220px;
}
.loading-box .spinner{
  width:36px;
  height:36px;
  border-width:2px;
}
.loading-text{
  font-family:'Jost',sans-serif;
  font-size:1rem;
  font-weight:700;
  color:var(--text);
  text-align:center;
}
.loading-cancel{
  padding:8px 20px;
  background:var(--surface2);
  border:1px solid var(--border);
  border-radius:8px;
  color:var(--muted);
  font-family:inherit;
  font-size:.85rem;
  font-weight:600;
  cursor:pointer;
  transition:all .2s;
}
.loading-cancel:hover{
  border-color:#eb4b4b;
  color:#eb4b4b;
  background:rgba(235,75,75,.08);
}

.page-container{
  transition:opacity .42s cubic-bezier(.4,0,.2,1), transform .42s cubic-bezier(.4,0,.2,1);
  transform:translateY(0);
}
.page-hidden{
  opacity:0;
  pointer-events:none;
  transform:translateY(12px);
}

header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(6,6,12,.92);
  backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border);
  padding:10px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  box-shadow:0 1px 0 rgba(255,255,255,.02) inset,0 4px 20px rgba(0,0,0,.3);
}
.logo{
  display:flex;
  align-items:center;
  gap:8px;
  filter:drop-shadow(0 0 20px rgba(var(--accent-rgb),.3));
  cursor:pointer;
  transition:transform .2s ease, filter .2s ease;
}
.logo:hover{transform:translateY(-1px)}

.header-right{
  display:flex;
  align-items:center;
  gap:10px;
}

#lang-select{
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  padding:7px 10px;
  border-radius:8px;
  font-family:inherit;
  font-size:.82rem;
  cursor:pointer;
  outline:none;
  height:38px;
}

.profile-dropdown{
  position:relative;
}
.profile-btn{
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px 14px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:10px;
  color:var(--text);
  font-family:inherit;
  font-size:.85rem;
  font-weight:600;
  cursor:pointer;
  transition:all .25s;
  height:38px;
}
.profile-btn:hover{
  border-color:var(--accent);
  box-shadow:0 0 12px rgba(var(--accent-rgb),.1);
}
.profile-avatar{
  width:22px;
  height:22px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));
  display:flex;
  align-items:center;
  justify-content:center;
  color:#0a0a12;
  font-size:.7rem;
  flex-shrink:0;
}
.profile-avatar .steam-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  display:block;
}
.profile-avatar:has(.steam-avatar-img),
.profile-menu-avatar:has(.steam-avatar-img){
  background:transparent;
}
.profile-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  width:220px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  padding:8px;
  box-shadow:0 16px 48px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.03) inset;
  opacity:0;
  transform:translateY(-8px) scale(.96);
  pointer-events:none;
  transition:all .25s cubic-bezier(.25,.8,.25,1);
  z-index:120;
}
.profile-dropdown.open .profile-menu{
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}
.profile-menu-header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 10px 14px;
}
.profile-menu-avatar{
  width:36px;
  height:36px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));
  display:flex;
  align-items:center;
  justify-content:center;
  color:#0a0a12;
  font-size:.9rem;
  overflow:hidden;
  flex-shrink:0;
}
.profile-menu-avatar .steam-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  display:block;
}
.profile-menu-info{flex:1}
.profile-menu-name{font-family:'Jost',sans-serif;font-weight:700;font-size:.95rem}
.profile-menu-status{font-size:.72rem;color:var(--muted)}
.profile-menu-divider{height:1px;background:var(--border);margin:0 4px 6px}
.profile-menu-item + .profile-menu-divider{margin-top:4px}
.profile-menu-item{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:9px 12px;
  border-radius:10px;
  border:none;
  background:transparent;
  color:var(--text);
  font-family:inherit;
  font-size:.85rem;
  font-weight:600;
  cursor:pointer;
  transition:all .2s;
  text-align:left;
}
.profile-menu-item:hover{
  background:var(--surface2);
}
a.profile-menu-item.profile-link{text-decoration:none;}
.profile-menu-item i{width:18px;text-align:center}
.menu-badge{
  margin-left:auto;
  background:var(--accent);
  color:#0a0a12;
  font-size:.65rem;
  font-weight:800;
  padding:2px 8px;
  border-radius:10px;
}

#settings-panel{
  max-width:680px;
  margin:40px auto;
  padding:0 20px;
  position:relative;
  z-index:1;
  min-height:70vh;
}
.settings-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  padding:28px;
}
.settings-card h2{
  font-size:1.5rem;
  margin-bottom:24px;
}
.settings-section{margin-bottom:24px}
.settings-section h3{
  font-size:1rem;
  margin-bottom:14px;
  color:var(--accent);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:1px;
  font-size:.82rem;
}
.settings-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  background:var(--bg2);
  border:1px solid var(--border);
  border-radius:10px;
}
.settings-row + .settings-row{margin-top:10px}
.settings-row span{font-size:.9rem}
@keyframes attentionHighlight{
  0%{box-shadow:0 0 0 5px rgba(var(--accent-rgb),.55)}
  100%{box-shadow:0 0 0 0 rgba(var(--accent-rgb),0)}
}
.attention-highlight{animation:attentionHighlight .8s ease-out}
.settings-select{
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  padding:7px 12px;
  border-radius:8px;
  font-family:inherit;
  font-size:.85rem;
  cursor:pointer;
  outline:none;
}
.settings-slider{
  -webkit-appearance:none;
  appearance:none;
  width:140px;
  height:5px;
  background:var(--border);
  border-radius:3px;
  outline:none;
}
.settings-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:16px;
  height:16px;
  border-radius:50%;
  background:var(--accent);
  cursor:pointer;
  box-shadow:0 0 8px rgba(var(--accent-rgb),.3);
}
.settings-toggle{
  width:44px;
  height:24px;
  border-radius:12px;
  background:var(--border);
  border:none;
  cursor:pointer;
  position:relative;
  transition:background .25s;
  padding:0;
}
.settings-toggle[data-active="true"]{background:var(--accent)}
.toggle-knob{
  position:absolute;
  top:2px;
  left:2px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:var(--text);
  transition:transform .25s;
  box-shadow:0 2px 4px rgba(0,0,0,.3);
}
.settings-toggle[data-active="true"] .toggle-knob{transform:translateX(20px)}
.settings-danger h3{color:#eb4b4b}
.settings-delete-btn{
  padding:9px 18px;border-radius:8px;border:1px solid rgba(235,75,75,.4);
  background:rgba(235,75,75,.1);color:#eb4b4b;font-family:inherit;
  font-size:.85rem;font-weight:700;cursor:pointer;transition:all .2s;
  display:inline-flex;align-items:center;gap:6px;
}
.settings-delete-btn:hover{background:rgba(235,75,75,.18);border-color:rgba(235,75,75,.6)}
.volume-value{font-family:'Rajdhani',sans-serif;font-weight:700;font-size:.9rem;color:var(--accent);min-width:32px;text-align:right}
.settings-reset-btn{
  padding:9px 18px;border-radius:8px;border:1px solid var(--border);
  background:var(--surface);color:var(--muted);font-family:inherit;
  font-size:.85rem;font-weight:700;cursor:pointer;transition:all .2s;
  display:inline-flex;align-items:center;gap:6px;
}
.settings-reset-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--surface2)}
.trade-link-clear-btn{
  padding:9px 14px;border-radius:8px;border:1px solid rgba(235,75,75,.4);
  background:rgba(235,75,75,.1);color:#eb4b4b;font-family:inherit;
  font-size:.9rem;font-weight:700;cursor:pointer;transition:all .2s;
  display:inline-flex;align-items:center;justify-content:center;
}
.trade-link-clear-btn:hover:not(:disabled){background:rgba(235,75,75,.2);border-color:rgba(235,75,75,.6)}
.trade-link-clear-btn:disabled{opacity:.45;cursor:not-allowed}

.accent-colors{display:flex;gap:8px;flex-wrap:wrap}
.accent-swatch{width:28px;height:28px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:all .2s;box-shadow:0 0 0 1px rgba(255,255,255,.1);padding:0;position:relative;display:flex;align-items:center;justify-content:center}
.accent-swatch:hover{transform:scale(1.15);box-shadow:0 0 0 2px rgba(255,255,255,.2)}
.accent-swatch.active{box-shadow:0 0 0 2px var(--text);transform:scale(1.1)}
.accent-swatch.active::after{content:'\f00c';font-family:'Font Awesome 6 Free';font-weight:900;font-size:.65rem;color:#fff;text-shadow:0 0 2px rgba(0,0,0,.5)}

.mode-toggle{
  display:flex;
  background:linear-gradient(180deg,var(--surface),var(--bg2));
  border-radius:50px;
  overflow:hidden;
  border:1px solid var(--border);
  position:relative;
  padding:4px;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.03);
}
.mode-toggle::before{
  content:'';
  position:absolute;
  top:4px;bottom:4px;
  width:calc(50% - 4px);
  border-radius:50px;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));
  transition:transform .4s cubic-bezier(.25,.8,.25,1), box-shadow .4s ease;
  z-index:0;
  box-shadow:0 4px 16px rgba(var(--accent-rgb),.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.mode-toggle[data-active="cs"]::before{transform:translateX(100%)}
.mode-btn{
  padding:8px 20px;
  font-size:.8rem;
  font-weight:700;
  cursor:pointer;
  border:none;
  background:transparent;
  color:var(--muted);
  transition:color .3s, transform .2s;
  font-family:inherit;
  position:relative;
  z-index:1;
  border-radius:50px;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.mode-btn.active{color:#0a0a12}
.mode-btn:hover:not(.active){color:var(--text); transform:translateY(-1px)}

.confirm-modal-overlay{
  position:fixed;inset:0;z-index:3000;
  display:flex;align-items:center;justify-content:center;
  background:rgba(6,6,12,.85);backdrop-filter:blur(8px);
  opacity:0;pointer-events:none;transition:opacity .35s;
}
.confirm-modal-overlay.active{opacity:1;pointer-events:auto}
.confirm-modal-card{
  width:min(92vw,420px);
  background:var(--surface);border:1px solid var(--border);
  border-radius:18px;padding:28px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
  transform:scale(.95) translateY(10px);
  transition:transform .4s cubic-bezier(.25,.8,.25,1);
  text-align:center;
}
.confirm-modal-overlay.active .confirm-modal-card{transform:scale(1) translateY(0)}
.price-drop-arrow{
  display:inline-flex;align-items:center;gap:10px;
  margin:16px 0;padding:10px 18px;
  background:linear-gradient(135deg,rgba(235,75,75,.1),rgba(235,75,75,.03));
  border:1px solid rgba(235,75,75,.3);border-radius:12px;
}
.price-drop-arrow .pd-original{
  font-family:'Rajdhani',sans-serif;font-size:1.1rem;font-weight:700;color:#fff;
}
.price-drop-arrow .pd-arrow{
  color:#eb4b4b;font-size:1rem;
}
.price-drop-arrow .pd-sell{
  font-family:'Rajdhani',sans-serif;font-size:1.1rem;font-weight:800;color:#eb4b4b;
}
.price-drop-arrow .pd-original,
.price-drop-arrow .pd-sell{
  display:inline-flex;align-items:center;gap:4px;
}
.confirm-modal-btns{
  display:flex;gap:10px;justify-content:center;margin-top:8px;
}
.error-modal-card{
  display:flex;flex-direction:column;align-items:center;gap:14px;
}
.error-modal-icon{
  font-size:2.6rem;color:#eb4b4b;line-height:1;
}
#error-modal-text{
  color:var(--muted);font-size:.95rem;line-height:1.55;margin:0;
  max-width:380px;word-break:break-word;
}

.case-open-choice-overlay{
  position:fixed;inset:0;z-index:1000;
  display:flex;align-items:center;justify-content:center;
  background:rgba(6,6,12,.85);backdrop-filter:blur(8px);
  opacity:0;pointer-events:none;transition:opacity .35s;
}
.case-open-choice-overlay.active{opacity:1;pointer-events:auto}
.case-open-choice-card{
  width:min(92vw,512px);
  background:var(--surface);border:1px solid var(--border);
  border-radius:24px;padding:36px 32px;
  box-shadow:0 24px 80px rgba(0,0,0,.55);
  transform:scale(.95) translateY(10px);
  transition:transform .4s cubic-bezier(.25,.8,.25,1);
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
}
.case-open-choice-overlay.active .case-open-choice-card{transform:scale(1) translateY(0)}
.case-open-choice-label{
  font-size:.72rem;text-transform:uppercase;letter-spacing:1.5px;
  color:var(--muted);font-weight:700;margin:0;
}
.case-open-choice-item-name{
  font-size:1.15rem;font-weight:700;color:var(--text);
  font-family:'Jost',sans-serif;margin:0;
}
.case-open-choice-img{
  display:flex;justify-content:center;align-items:center;
  width:220px;height:220px;
}
.case-open-choice-img img{
  max-width:100%;max-height:100%;object-fit:contain;
}
.case-open-choice-actions{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;
  width:100%;
}
.case-open-choice-cancel{
  background:none;border:none;
  color:var(--muted);font-family:inherit;font-size:.82rem;font-weight:600;
  cursor:pointer;transition:color .2s;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:6px 12px;
}
.case-open-choice-cancel:hover{color:#eb4b4b;}
.case-open-choice-open{
  padding:12px 16px;border-radius:12px;border:none;
  background:linear-gradient(135deg,#2ecc71,#27ae60);color:#fff;
  font-family:inherit;font-size:.85rem;font-weight:800;cursor:pointer;
  transition:all .25s;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  box-shadow:0 2px 14px rgba(46,204,113,.3);
}
.case-open-choice-open:hover{transform:translateY(-2px);box-shadow:0 6px 24px rgba(46,204,113,.45);}
.case-open-choice-fast{
  padding:12px 16px;border-radius:12px;border:none;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));color:#0a0a12;
  font-family:inherit;font-size:.85rem;font-weight:800;cursor:pointer;
  transition:all .25s;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  box-shadow:0 2px 14px rgba(var(--accent-rgb),.3);
}
.case-open-choice-fast:hover{transform:translateY(-2px);box-shadow:0 6px 24px rgba(var(--accent-rgb),.45);}
#balance-amount{font-family:'Rajdhani',sans-serif;font-weight:700;}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button{
  -webkit-appearance:none;
  margin:0;
}
input[type=number]{
  -moz-appearance:textfield;
}
