/* ===== VARIABLES ===== */
:root {
  --bg: #080c18;
  --bg2: #0d1220;
  --bg3: #121929;
  --bg4: #19213a;
  --card: #141b2e;
  --card-hover: #1a2440;
  --border: rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.14);

  --orange: #e8870a;
  --orange-light: #f5a030;
  --orange-dim: rgba(232,135,10,0.15);
  --orange-glow: rgba(232,135,10,0.3);

  --cyan: #00c8f0;
  --cyan-dim: rgba(0,200,240,0.12);

  --green: #00d68a;
  --green-dim: rgba(0,214,138,0.15);
  --red: #ff3e6c;
  --red-dim: rgba(255,62,108,0.15);

  --text: #e4eaf8;
  --text2: #8896b3;
  --text3: #5a6a88;

  /* Rarity colors */
  --consumer: #b0c3d9;
  --industrial: #5e98d9;
  --milspec: #4b69ff;
  --restricted: #8847ff;
  --classified: #d32ce6;
  --covert: #eb4b4b;
  --contraband: #e4ae39;
  --extraordinary: #f0d060;

  --font-heading: 'Rajdhani', 'Inter', sans-serif;
  --font-tech: 'Orbitron', monospace;
  --font-body: 'Inter', sans-serif;

  --radius: 8px;
  --radius-lg: 14px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  /* Disable iOS rubber-band horizontal scroll */
  overscroll-behavior-x: none;
  touch-action: pan-y;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.6;
  /* Disable horizontal overscroll / bounce */
  overscroll-behavior-x: none;
  touch-action: pan-y;
  /* Prevent text size adjustment on orientation change */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
select { cursor: pointer; font-family: inherit; }
input { font-family: inherit; }
img { display: block; max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ===== TICKER BAR ===== */
.ticker-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 32px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}
.ticker-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--red);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-content {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  font-size: 12px;
  border-right: 1px solid var(--border);
  color: var(--text2);
}
.ticker-item .ti-name { color: var(--text); font-weight: 500; }
.ticker-item .ti-price { color: var(--orange); }
.ticker-item .ti-change.up { color: var(--green); }
.ticker-item .ti-change.down { color: var(--red); }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  font-size: 11px;
}
.ticker-market-label { color: var(--text3); }
.ticker-market-val { font-weight: 700; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 32px; left: 0; right: 0;
  height: 64px;
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(8, 12, 24, 0.98);
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 32px; height: 32px;
}
.logo-icon svg { width: 100%; height: 100%; }
.logo-text {
  font-family: var(--font-tech);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
}
.logo-accent { color: var(--orange); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  transition: var(--transition);
  position: relative;
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg4);
}
.nav-link.active {
  color: var(--orange);
  background: var(--orange-dim);
}
.nav-link i { font-size: 12px; }
.signals-link { position: relative; }
.nav-badge-hot {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,135,10,0.5); }
  50% { box-shadow: 0 0 0 4px rgba(232,135,10,0); }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.nav-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 36px;
}
.nav-stat { display: flex; flex-direction: column; align-items: center; gap: 0; }
.ns-label { font-size: 10px; color: var(--text3); line-height: 1; }
.ns-val { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.2; }
.ns-val.green { color: var(--green); }
.nav-stat-div { width: 1px; height: 24px; background: var(--border); }

/* Auth nav buttons */
.auth-btn-group { display: flex; align-items: center; gap: 6px; }
.btn-nav-login {
  padding: 7px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); color: var(--text2);
  font-size: 13px; font-weight: 600; transition: var(--transition);
}
.btn-nav-login:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-dim); }
.btn-nav-register {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius);
  background: var(--orange-dim); border: 1px solid var(--orange);
  color: var(--orange); font-size: 13px; font-weight: 700; transition: var(--transition);
}
.btn-nav-register:hover { background: var(--orange); color: #000; transform: translateY(-1px); }

.nav-user-panel { display: flex; align-items: center; gap: 8px; }
.nav-bucks-badge {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg4); border: 1px solid var(--orange-glow);
  border-radius: 8px; padding: 5px 10px;
  font-family: var(--font-tech); font-size: 12px; font-weight: 700; color: var(--orange);
}
.nav-bucks-badge i { font-size: 11px; }
.btn-nav-cabinet {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--radius);
  background: var(--orange-dim); border: 1px solid var(--orange);
  color: var(--orange); font-size: 13px; font-weight: 700; transition: var(--transition);
}
.btn-nav-cabinet:hover { background: var(--orange); color: #000; }
.btn-nav-logout {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-nav-logout:hover { border-color: var(--red); color: var(--red); }

/* Drawer auth */
.drawer-auth-logged-out, .drawer-auth-logged-in { padding: 12px 16px; }
.drawer-auth-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); color: var(--text2);
  font-size: 14px; font-weight: 600; margin-bottom: 8px; transition: var(--transition);
}
.drawer-auth-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-dim); }
.drawer-reg { border-color: var(--orange-glow); color: var(--orange); background: var(--orange-dim); }
.drawer-user-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.drawer-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #000; font-weight: 900; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-tech);
}
.drawer-user-name { font-size: 14px; font-weight: 700; color: var(--text); }
.drawer-user-bucks { font-size: 12px; color: var(--orange); font-family: var(--font-tech); }

/* Portfolio header actions */
.portfolio-header-actions { display: flex; gap: 8px; }
.btn-to-cabinet {
  display: flex; align-items: center; gap: 6px;
  background: var(--orange); color: #000; border: none;
}
.btn-to-cabinet:hover { filter: brightness(1.1); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: calc(32px + 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,135,10,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,135,10,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
  animation: grid-drift 20s linear infinite;
}
@keyframes grid-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(60px); }
}
.hero-glow-1 {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,135,10,0.12) 0%, transparent 70%);
  top: -100px; left: -200px;
  z-index: 1;
  animation: glow-drift1 8s ease-in-out infinite;
}
.hero-glow-2 {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,200,240,0.08) 0%, transparent 70%);
  bottom: -100px; right: 100px;
  z-index: 1;
  animation: glow-drift2 10s ease-in-out infinite;
}
@keyframes glow-drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.1); }
}
@keyframes glow-drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -40px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 680px;
  padding-left: 80px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--orange);
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -0.5px;
}
.hero-accent {
  background: linear-gradient(135deg, var(--orange), var(--orange-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary-hero {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #000;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow: 0 4px 24px var(--orange-glow);
}
.btn-primary-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px var(--orange-glow);
  filter: brightness(1.1);
}
.btn-outline-hero {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-heading);
  border-radius: var(--radius);
  transition: var(--transition);
}
.btn-outline-hero:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
  transform: translateY(-2px);
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.h-stat { text-align: center; }
.h-stat-val {
  font-family: var(--font-tech);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.h-stat-label { font-size: 11px; color: var(--text3); margin-top: 4px; }
.h-stat-sep { width: 1px; height: 36px; background: var(--border); }

/* Hero Showcase */
.hero-showcase {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.showcase-card {
  width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  animation: float-card 4s ease-in-out infinite;
}
.showcase-card:nth-child(2) { animation-delay: -2s; }
.showcase-card:hover {
  transform: translateY(-4px) !important;
  border-color: var(--orange);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 30px var(--orange-dim);
}
@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.sc-rarity-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.sc-rarity-bar.covert { background: linear-gradient(90deg, transparent, var(--covert), transparent); }
.sc-rarity-bar.classified { background: linear-gradient(90deg, transparent, var(--classified), transparent); }
.sc-rarity-bar.restricted { background: linear-gradient(90deg, transparent, var(--restricted), transparent); }
.sc-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 10px;
}
.covert-badge { background: rgba(235,75,75,0.15); color: var(--covert); border: 1px solid rgba(235,75,75,0.3); }
.classified-badge { background: rgba(211,44,230,0.15); color: var(--classified); border: 1px solid rgba(211,44,230,0.3); }
.sc-weapon-art {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
}
.weapon-silhouette {
  height: 60px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 0 12px currentColor);
}
.weapon-silhouette.awp {
  width: 180px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 60'%3E%3Crect x='10' y='25' width='150' height='8' rx='4' fill='%23eb4b4b' opacity='0.9'/%3E%3Crect x='140' y='20' width='30' height='18' rx='3' fill='%23eb4b4b' opacity='0.7'/%3E%3Crect x='30' y='20' width='12' height='18' rx='2' fill='%23eb4b4b' opacity='0.6'/%3E%3Ccircle cx='160' cy='29' r='6' fill='none' stroke='%23eb4b4b' stroke-width='2' opacity='0.8'/%3E%3C/svg%3E");
}
.weapon-silhouette.ak {
  width: 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 60'%3E%3Crect x='5' y='26' width='140' height='7' rx='3' fill='%23d32ce6' opacity='0.9'/%3E%3Crect x='120' y='20' width='25' height='16' rx='3' fill='%23d32ce6' opacity='0.7'/%3E%3Crect x='35' y='21' width='10' height='15' rx='2' fill='%23d32ce6' opacity='0.6'/%3E%3Crect x='60' y='30' width='30' height='10' rx='2' fill='%23d32ce6' opacity='0.5'/%3E%3C/svg%3E");
}
.sc-info { margin-top: 4px; }
.sc-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sc-wear { font-size: 11px; color: var(--text3); margin-top: 2px; }
.sc-price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.sc-price { font-family: var(--font-tech); font-size: 16px; font-weight: 700; color: var(--text); }
.sc-change { font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 3px; }
.sc-change.up { color: var(--green); }
.sc-change.down { color: var(--red); }
.sc-buy-btn {
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  background: var(--orange-dim);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
}
.sc-buy-btn:hover {
  background: var(--orange);
  color: #000;
}

/* ===== SECTIONS COMMON ===== */
.section {
  padding: 80px 0;
  position: relative;
}
.section:nth-child(even) { background: var(--bg2); }
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 20px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.3px;
}
.section-title i { color: var(--orange); }
.section-subtitle { font-size: 14px; color: var(--text3); margin-top: 6px; }
.section-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--orange-dim);
  border: 1px solid var(--orange);
  color: var(--orange);
}
.title-badge-hot {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: white;
}

/* ===== HOT DEALS ===== */
.hot-deals-section { position: relative; overflow: hidden; }
.hot-deals-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}
.deals-timer-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
}
.deals-countdown {
  font-family: var(--font-tech);
  font-size: 16px;
  color: var(--orange);
  font-weight: 700;
  background: var(--orange-dim);
  padding: 4px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--orange-glow);
}

.hot-deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.deal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  animation: fade-in-up 0.5s ease both;
}
.deal-card:hover {
  transform: translateY(-5px);
  border-color: var(--orange);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 30px var(--orange-dim);
}
.deal-card-top {
  padding: 14px 14px 10px;
  position: relative;
}
.deal-rarity-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.deal-discount-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: linear-gradient(135deg, var(--red), #ff6b6b);
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(255,62,108,0.4);
}
.deal-hot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--orange);
  background: var(--orange-dim);
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.deal-weapon-area {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
}
.deal-weapon-icon {
  font-size: 52px;
  opacity: 0.9;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.deal-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-top: 8px;
}
.deal-item-wear { font-size: 11px; color: var(--text3); margin-top: 2px; }
.deal-card-bottom {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
}
.deal-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.deal-price-new {
  font-family: var(--font-tech);
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
}
.deal-price-old {
  font-size: 13px;
  color: var(--text3);
  text-decoration: line-through;
}
.deal-timer {
  font-size: 11px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}
.deal-timer-val {
  font-family: var(--font-tech);
  color: var(--orange);
  font-size: 12px;
}
.deal-meta { display: flex; align-items: center; justify-content: space-between; }
.deal-roi {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-dim);
  padding: 3px 8px;
  border-radius: 4px;
}
.deal-snipe-btn {
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #000;
  font-size: 12px;
  font-weight: 800;
  border-radius: var(--radius);
  transition: var(--transition);
  letter-spacing: 0.5px;
}
.deal-snipe-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px var(--orange-glow);
}

/* ===== MARKET ===== */
.market-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  height: 38px;
  transition: var(--transition);
  min-width: 220px;
}
.search-box:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
}
.search-box i { color: var(--text3); font-size: 13px; }
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  width: 100%;
}
.search-box input::placeholder { color: var(--text3); }
.sort-select {
  height: 38px;
  padding: 0 36px 0 12px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238896b3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: var(--transition);
}
.sort-select:focus { border-color: var(--orange); }
.sort-select option { background: var(--bg3); }

.category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cat-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.cat-tab:hover { border-color: var(--border-bright); color: var(--text); }
.cat-tab.active {
  background: var(--orange-dim);
  border-color: var(--orange);
  color: var(--orange);
}
.cat-tab i { font-size: 12px; }

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.item-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  animation: fade-in-up 0.4s ease both;
}
.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 24px var(--orange-dim);
}
.item-rarity-bar {
  height: 3px;
  width: 100%;
}
.item-rarity-bar.consumer { background: var(--consumer); }
.item-rarity-bar.industrial { background: var(--industrial); }
.item-rarity-bar.milspec { background: var(--milspec); }
.item-rarity-bar.restricted { background: linear-gradient(90deg, var(--restricted), #a060ff); }
.item-rarity-bar.classified { background: linear-gradient(90deg, var(--classified), #e060ff); }
.item-rarity-bar.covert { background: linear-gradient(90deg, var(--covert), #ff8080); }
.item-rarity-bar.contraband { background: linear-gradient(90deg, var(--contraband), #f0d060); }
.item-rarity-bar.extraordinary { background: linear-gradient(90deg, var(--extraordinary), #ffd700); }

.item-art {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 42px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.item-info { padding: 0 12px 12px; }
.item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.item-wear { font-size: 10px; color: var(--text3); margin-top: 2px; }
.item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.item-price {
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.item-change {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
}
.item-change.up { color: var(--green); }
.item-change.down { color: var(--red); }
.item-change i { font-size: 9px; }
.item-volume { font-size: 10px; color: var(--text3); margin-top: 4px; }

.load-more-wrap { text-align: center; }
.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-load-more:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
}

/* ===== CHARTS ===== */
.charts-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.chart-main-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.chart-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-item-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  height: 38px;
}
.chart-item-picker i { color: var(--text3); font-size: 13px; }
.chart-item-picker select {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  min-width: 200px;
}
.chart-period-tabs { display: flex; gap: 4px; }
.period-tab {
  padding: 7px 14px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
  font-family: var(--font-tech);
}
.period-tab:hover { color: var(--text); border-color: var(--border-bright); }
.period-tab.active {
  background: var(--orange-dim);
  border-color: var(--orange);
  color: var(--orange);
}

.chart-price-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.chart-cur-price {
  font-family: var(--font-tech);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}
.chart-cur-change {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.change-val { font-size: 14px; font-weight: 700; }
.change-val.up { color: var(--green); }
.change-val.down { color: var(--red); }
.change-period { font-size: 12px; color: var(--text3); }
.cph-right {
  display: flex;
  gap: 20px;
}
.chart-mini-stat { text-align: right; }
.cms-label { font-size: 11px; color: var(--text3); display: block; }
.cms-val { font-size: 13px; font-weight: 600; color: var(--text); }
.chart-wrap {
  height: 300px;
  position: relative;
}

/* Chart Sidebar */
.chart-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.csp-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.csp-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.csp-title i { color: var(--orange); font-size: 13px; }
.red-title i { color: var(--red); }
.movers-list { display: flex; flex-direction: column; gap: 8px; }
.mover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--bg4);
  transition: var(--transition);
  cursor: pointer;
}
.mover-item:hover { background: var(--card-hover); }
.mover-icon { font-size: 20px; flex-shrink: 0; }
.mover-info { flex: 1; min-width: 0; }
.mover-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mover-price { font-size: 11px; color: var(--text3); }
.mover-change { font-size: 12px; font-weight: 700; flex-shrink: 0; }
.mover-change.up { color: var(--green); }
.mover-change.down { color: var(--red); }

.cases-list { display: flex; flex-direction: column; gap: 8px; }
.case-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--bg4);
}
.case-item-left { display: flex; align-items: center; gap: 8px; }
.case-icon { font-size: 20px; }
.case-name { font-size: 12px; font-weight: 500; color: var(--text); }
.case-price { font-family: var(--font-tech); font-size: 12px; font-weight: 700; color: var(--text); }
.case-change { font-size: 11px; font-weight: 700; }
.case-change.up { color: var(--green); }

/* ===== PORTFOLIO ===== */
.portfolio-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}
.portfolio-left { display: flex; flex-direction: column; gap: 16px; }
.portfolio-value-card {
  background: linear-gradient(135deg, var(--card), #1a2a50);
  border: 1px solid var(--orange-glow);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.portfolio-value-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,135,10,0.1), transparent 70%);
}
.pvc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pvc-label { font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.pvc-value {
  font-family: var(--font-tech);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}
.pvc-change {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pvc-change.up { color: var(--green); }
.pvc-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--orange-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--orange);
}
.portfolio-chart-wrap { height: 120px; }

.portfolio-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ps-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ps-icon.invest { background: rgba(0,200,240,0.1); color: var(--cyan); }
.ps-icon.profit { background: var(--green-dim); color: var(--green); }
.ps-icon.roi { background: var(--orange-dim); color: var(--orange); }
.ps-icon.positions { background: rgba(136,71,255,0.1); color: var(--restricted); }
.ps-label { font-size: 11px; color: var(--text3); }
.ps-val { font-size: 15px; font-weight: 700; color: var(--text); }
.ps-val.up { color: var(--green); }

.portfolio-right { }
.holdings-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.holdings-table { }
.holdings-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.holding-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  align-items: center;
  margin-bottom: 4px;
}
.holding-row:hover { background: var(--bg4); }
.holding-item { display: flex; align-items: center; gap: 10px; }
.holding-icon { font-size: 24px; }
.holding-img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: var(--bg4); flex-shrink: 0; }
.holding-name { font-size: 12px; font-weight: 600; color: var(--text); }
.holding-wear { font-size: 10px; color: var(--text3); }
.holding-val { font-size: 13px; font-weight: 600; color: var(--text); }
.holding-val.up { color: var(--green); }
.holding-val.down { color: var(--red); }

.btn-connect-portfolio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(102,192,244,0.1);
  border: 1px solid rgba(102,192,244,0.3);
  border-radius: var(--radius);
  color: #66c0f4;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-connect-portfolio:hover {
  background: rgba(102,192,244,0.2);
  border-color: #66c0f4;
}

/* ===== SIGNALS ===== */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.signal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fade-in-up 0.4s ease both;
}
.signal-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.signal-card.buy-signal { border-left: 3px solid var(--green); }
.signal-card.sell-signal { border-left: 3px solid var(--red); }
.signal-card.hold-signal { border-left: 3px solid var(--orange); }
.signal-card.analysis { border-left: 3px solid var(--cyan); }
.signal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.signal-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 4px;
}
.signal-type.buy { background: var(--green-dim); color: var(--green); }
.signal-type.sell { background: var(--red-dim); color: var(--red); }
.signal-type.hold { background: var(--orange-dim); color: var(--orange); }
.signal-type.info { background: var(--cyan-dim); color: var(--cyan); }
.signal-time { font-size: 11px; color: var(--text3); }
.signal-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 14px;
}
.signal-body strong { color: var(--text); }
.signal-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.signal-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text3);
}
.signal-roi {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-left: auto;
}
.signal-roi.up { background: var(--green-dim); color: var(--green); }
.signal-roi.down { background: var(--red-dim); color: var(--red); }

.btn-tg-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(41,182,246,0.1);
  border: 1px solid rgba(41,182,246,0.3);
  border-radius: var(--radius);
  color: #29b6f6;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 8px;
}
.btn-tg-channel:hover {
  background: rgba(41,182,246,0.2);
  border-color: #29b6f6;
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
  position: relative;
  overflow: hidden;
}
.footer-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 200px;
  background: radial-gradient(ellipse, rgba(232,135,10,0.05), transparent 70%);
  pointer-events: none;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer-logo {
  font-family: var(--font-tech);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 16px;
}
.footer-socials { display: flex; gap: 10px; }
.fsoc {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.fsoc:hover { transform: translateY(-3px); }
.fsoc.tg { color: #29b6f6; }
.fsoc.tg:hover { border-color: #29b6f6; background: rgba(41,182,246,0.1); }
.fsoc.dc { color: #7289da; }
.fsoc.dc:hover { border-color: #7289da; background: rgba(114,137,218,0.1); }
.fsoc.tw { color: var(--text2); }
.fsoc.tw:hover { border-color: var(--text2); background: rgba(255,255,255,0.05); }

.footer-nav-group h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.footer-nav-group a {
  display: block;
  font-size: 13px;
  color: var(--text3);
  padding: 4px 0;
  transition: var(--transition);
}
.footer-nav-group a:hover { color: var(--orange); padding-left: 4px; }

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-bottom p { font-size: 12px; color: var(--text3); }
.disclaimer { font-size: 11px !important; max-width: 400px; text-align: right; }

/* ===== ANIMATIONS ===== */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Rarity glow on item cards */
.item-card[data-rarity="covert"]:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 20px rgba(235,75,75,0.2); border-color: var(--covert) !important; }
.item-card[data-rarity="classified"]:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 20px rgba(211,44,230,0.2); border-color: var(--classified) !important; }
.item-card[data-rarity="restricted"]:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 20px rgba(136,71,255,0.2); border-color: var(--restricted) !important; }
.item-card[data-rarity="extraordinary"]:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 20px rgba(228,174,57,0.25); border-color: var(--extraordinary) !important; }

/* Wear bar */
.wear-bar-wrap { margin-top: 6px; }
.wear-bar-track {
  height: 3px;
  background: var(--bg4);
  border-radius: 2px;
  overflow: hidden;
}
.wear-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--orange), var(--red));
}

/* Utility */
.up { color: var(--green) !important; }
.down { color: var(--red) !important; }
.text-orange { color: var(--orange); }

/* ===== ITEM ART IMAGE ===== */
.item-art {
  position: relative;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.item-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  transition: transform 0.3s ease;
}
.item-card:hover .item-art img { transform: scale(1.05); }
.item-art-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--text3);
  font-family: var(--font-tech);
}

.deal-weapon-area { position: relative; overflow: hidden; }
.deal-weapon-img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  padding: 4px;
  transition: transform 0.3s ease;
}
.deal-card:hover .deal-weapon-img { transform: scale(1.06); }

.sc-weapon-art img.sc-weapon-img {
  width: 100%;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: transform 0.3s ease;
}
.showcase-card:hover .sc-weapon-img { transform: scale(1.04); }

.mover-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--bg4);
  flex-shrink: 0;
}

/* ===== HAMBURGER BUTTON ===== */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  margin-left: auto;
  transition: var(--transition);
  flex-shrink: 0;
}
.hamburger-btn:hover { border-color: var(--orange); background: var(--orange-dim); }
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== MOBILE DRAWER ===== */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1997;
  backdrop-filter: blur(4px);
}
.mobile-overlay.active { display: block; }

.mobile-drawer {
  position: fixed;
  top: 0; right: -100%;
  width: min(320px, 85vw);
  height: 100dvh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 1998;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
}
.mobile-drawer.open { right: 0; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-logo {
  font-family: var(--font-tech);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.drawer-close {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.drawer-close:hover { border-color: var(--red); color: var(--red); }

.drawer-steam-btn {
  margin: 16px;
  padding: 12px 16px;
  background: rgba(102,192,244,0.1);
  border: 1px solid rgba(102,192,244,0.3);
  border-radius: var(--radius);
  color: #66c0f4;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.drawer-steam-btn:hover { background: rgba(102,192,244,0.2); }
.drawer-steam-btn i { font-size: 18px; }

.drawer-links {
  padding: 8px;
  flex: 1;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}
.drawer-link:hover, .drawer-link:active {
  color: var(--text);
  background: var(--bg4);
}
.drawer-link i { width: 20px; color: var(--orange); text-align: center; }
.drawer-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: white;
  margin-left: auto;
}

.drawer-stats {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ds-item { display: flex; align-items: center; justify-content: space-between; }
.ds-label { font-size: 12px; color: var(--text3); }
.ds-val { font-size: 13px; font-weight: 700; color: var(--text); font-family: var(--font-tech); }
.ds-val.green { color: var(--green); }
.ds-val.up { color: var(--green); }

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8,12,24,0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  z-index: 995;
  align-items: center;
  justify-content: space-around;
}
.mbn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.mbn-item i { font-size: 18px; line-height: 1; }
.mbn-item:hover, .mbn-item.active {
  color: var(--orange);
}
.mbn-item.active i { text-shadow: 0 0 12px var(--orange-glow); }

/* ===== PWA INSTALL MODAL ===== */
.pwa-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.pwa-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.pwa-modal {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, #161e35, #0f1524);
  border-top: 1px solid rgba(232,135,10,0.3);
  border-radius: 20px 20px 0 0;
  z-index: 2001;
  padding: 0 20px 32px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.6), 0 -2px 0 rgba(232,135,10,0.2);
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pwa-modal.open {
  transform: translateY(0);
}

/* Drag handle + close */
.pwa-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0 6px;
  position: relative;
}
.pwa-modal-drag {
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}
.pwa-modal-close {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text2);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.pwa-modal-close:hover { background: rgba(255,255,255,0.15); color: var(--text); }

/* App card */
.pwa-app-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.pwa-app-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(232,135,10,0.3);
  flex-shrink: 0;
}
.pwa-app-meta { flex: 1; }
.pwa-app-name {
  font-family: var(--font-tech);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}
.pwa-app-name span { color: var(--orange); }
.pwa-app-tagline { font-size: 13px; color: var(--text3); margin-top: 2px; }
.pwa-app-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--orange);
}
.pwa-app-stars span { color: var(--text2); margin-left: 4px; font-size: 12px; font-weight: 600; }

/* Features row */
.pwa-features {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pwa-feat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
}
.pwa-feat i { color: var(--orange); font-size: 12px; }

/* Platform sections */
.pwa-platform { }
.pwa-platform-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.pwa-platform-title i.fa-android { color: #3DDC84; font-size: 18px; }
.pwa-platform-title i.fa-apple { color: #fff; font-size: 18px; }

/* Big install button */
.pwa-big-install-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #000;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 24px var(--orange-glow);
}
.pwa-big-install-btn:active {
  transform: scale(0.98);
  filter: brightness(0.95);
}
.pwa-big-install-btn i { font-size: 18px; }
.pwa-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin-top: 10px;
}

/* iOS Steps */
.pwa-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}
.pwa-step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.pwa-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #000;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-tech);
}
.pwa-step-body {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.pwa-step-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--orange-dim);
  border: 1px solid var(--orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pwa-step-icon svg {
  width: 22px; height: 22px;
  stroke: var(--orange);
}
.pwa-step-text { flex: 1; }
.pwa-step-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.pwa-step-text span {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.4;
}
.pwa-step-text .fa-arrow-up-from-bracket {
  font-size: 11px;
  color: #66c0f4;
}
.pwa-step-arrow {
  text-align: center;
  padding: 4px 0;
  color: var(--text3);
  font-size: 13px;
}

/* iOS arrow at bottom */
.pwa-ios-arrow-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(102,192,244,0.08), rgba(102,192,244,0.04));
  border: 1px dashed rgba(102,192,244,0.3);
  border-radius: 12px;
  color: #66c0f4;
  font-size: 13px;
  font-weight: 600;
  animation: arrow-bounce 1.5s ease-in-out infinite;
}
.pwa-ios-arrow-hint i { font-size: 16px; }
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .hero-showcase { display: none; }
  .hero-content { max-width: 100%; padding: 60px 40px; }
  .charts-layout { grid-template-columns: 1fr; }
  .chart-sidebar-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .portfolio-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-stats { display: none; }
  .hamburger-btn { display: flex; }
  .btn-steam span { display: none; }
  .btn-steam { padding: 8px 12px; }
  .btn-steam i { font-size: 20px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .chart-sidebar-panel { grid-template-columns: 1fr; }
  .hero-content { padding: 40px 24px; }
  .hero-title { font-size: 40px; }
  .holdings-header { display: none; }
  .holding-row { grid-template-columns: 1fr 1fr; gap: 4px; }
  .holding-row > :nth-child(3),
  .holding-row > :nth-child(4) { display: none; }
}

@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }
  .ticker-bar { display: none; }
  /* navbar top/height/padding-top and body padding-bottom are set in the safe-area block below */

  .hero-content {
    padding: 32px 20px 40px;
    gap: 20px;
  }
  .hero-title { font-size: 34px; line-height: 1.1; }
  .hero-subtitle { font-size: 14px; }
  .hero-cta { flex-direction: column; gap: 10px; }
  .btn-primary-hero, .btn-outline-hero { width: 100%; justify-content: center; padding: 14px 20px; }
  .hero-stats-row { gap: 8px; justify-content: space-between; }
  .h-stat-val { font-size: 16px; }
  .h-stat-label { font-size: 10px; }
  .h-stat-sep { height: 28px; }

  .section { padding: 48px 0; }
  .section-header { flex-direction: column; gap: 12px; }
  .section-title { font-size: 22px; }

  .hot-deals-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .deal-card-top { padding: 12px 10px 8px; }
  .deal-card-bottom { padding: 8px 10px 12px; }
  .deal-weapon-img { height: 70px; }
  .deal-price-new { font-size: 16px; }

  .market-controls { flex-direction: column; width: 100%; gap: 8px; }
  .search-box { min-width: unset; width: 100%; }
  .sort-select { width: 100%; }
  .category-tabs { gap: 6px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
  .category-tabs::-webkit-scrollbar { display: none; }
  .cat-tab { white-space: nowrap; flex-shrink: 0; }
  .market-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .charts-layout { grid-template-columns: 1fr; gap: 14px; }
  .chart-sidebar-panel { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .chart-controls-row { flex-direction: column; gap: 10px; align-items: stretch; }
  .chart-item-picker { width: 100%; }
  .chart-item-picker select { width: 100%; }
  .chart-period-tabs { justify-content: center; }
  .chart-price-header { flex-direction: column; gap: 12px; }
  .cph-right { justify-content: space-between; }
  .chart-cur-price { font-size: 26px; }
  .chart-wrap { height: 220px; }

  .portfolio-left { gap: 12px; }
  .portfolio-stats-grid { grid-template-columns: 1fr 1fr; }
  .pvc-value { font-size: 26px; }

  .signals-grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-nav-group:last-child { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .disclaimer { text-align: center !important; }

  .nav-container { gap: 0; }
  .nav-logo { flex: 1; }
  .nav-actions { gap: 8px; }
}

@media (max-width: 480px) {
  .hot-deals-grid { grid-template-columns: 1fr 1fr; }
  .market-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .item-art { height: 75px; }
  .portfolio-stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .h-stat-sep { display: none; }
  .h-stat { text-align: left; }
  .footer-top { grid-template-columns: 1fr; }

  .chart-controls-row { gap: 8px; }
  .period-tab { padding: 6px 10px; font-size: 11px; }
}

@media (max-width: 360px) {
  .market-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .item-card .item-name { font-size: 11px; }
  .item-price { font-size: 12px; }
}

/* ── Safe area: desktop (ticker visible, navbar below ticker) ── */
@media (min-width: 769px) {
  .ticker-bar {
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(32px + env(safe-area-inset-top, 0px));
  }
}

/* ── Safe area: mobile (ticker hidden, navbar at very top) ── */
@media (max-width: 768px) {
  .navbar {
    top: 0;
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(64px + env(safe-area-inset-top, 0px));
  }
  .hero {
    padding-top: calc(64px + env(safe-area-inset-top, 0px));
  }
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Quick Buy Modal (main page) ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px); z-index: 2000;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-backdrop.active { opacity: 1; pointer-events: all; }
.trade-modal {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: min(480px, 100%); background: var(--bg2);
  border: 1px solid var(--border); border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  z-index: 2001; transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.6);
}
.trade-modal.open { transform: translateX(-50%) translateY(0); }
.tm-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tm-header h3 { font-size: 18px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.tm-header h3 i { color: var(--orange); }
.tm-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.tm-close:hover { background: rgba(255,255,255,0.15); }
.tm-item-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg4); border-radius: var(--radius);
  padding: 12px; margin-bottom: 16px;
}
.tm-item-row img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: var(--bg3); }
.tm-item-name { font-size: 14px; font-weight: 700; color: var(--text); }
.tm-item-price { font-size: 13px; color: var(--orange); margin-top: 4px; font-family: var(--font-tech); }
.tm-qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 14px; color: var(--text2); }
.qty-control { display: flex; align-items: center; }
.qty-control button {
  width: 36px; height: 36px; background: var(--bg4);
  border: 1px solid var(--border); color: var(--text); font-size: 18px;
  cursor: pointer; transition: var(--transition);
}
.qty-control button:first-child { border-radius: 8px 0 0 8px; }
.qty-control button:last-child { border-radius: 0 8px 8px 0; }
.qty-control button:hover { border-color: var(--orange); color: var(--orange); }
.qty-control input {
  width: 50px; height: 36px; background: var(--bg4);
  border: 1px solid var(--border); border-left: none; border-right: none;
  color: var(--text); font-size: 14px; font-weight: 700; text-align: center;
  outline: none; font-family: var(--font-tech);
}
.tm-total-row { font-size: 14px; color: var(--text2); margin-bottom: 8px; }
.tm-total-row strong { color: var(--orange); font-family: var(--font-tech); font-size: 16px; }
.tm-balance-row { font-size: 12px; color: var(--text3); margin-bottom: 16px; }
.btn-buy-confirm {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--orange), #ffaa44);
  color: #000; font-size: 15px; font-weight: 800;
  border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition); box-shadow: 0 4px 20px var(--orange-glow);
}
.btn-buy-confirm:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-buy-confirm:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.tm-dep-hint {
  text-align: center; font-size: 12px; color: var(--text3); margin-top: 12px;
}
.tm-dep-hint a { color: var(--orange); text-decoration: underline; cursor: pointer; }
/* Quick buy toast */
.qb-toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 20px;
  font-size: 14px; font-weight: 600; color: var(--text);
  z-index: 3000; opacity: 0; pointer-events: none;
  transition: all 0.3s ease; white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.qb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.qb-toast.success { border-color: #00d68a; color: #00d68a; }
.qb-toast.error { border-color: #ff3e6c; color: #ff3e6c; }
