:root {
  --bg: #050a18;
  --bg-elevated: #0a1428;
  --bg-card: #0f1d38;
  --bg-card-hover: #16294d;
  --border: rgba(250, 204, 21, 0.17);
  --border-strong: rgba(250, 204, 21, 0.34);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #eab308;
  --primary-hover: #ca8a04;
  --primary-soft: #facc15;
  --cta: #d97706;
  --cta-hover: #b45309;
  --offer: #10b981;
  --offer-hover: #059669;
  --request: #3b82f6;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --danger: #ef4444;

  --rarity-common: #94a3b8;
  --rarity-uncommon: #22c55e;
  --rarity-epic: #a855f7;
  --rarity-legendary: #f59e0b;
  --rarity-exotic: #ff4d6d;
  --rarity-standard: #cbd5e1;

  --shadow-surface:
    0 0 0 1px oklch(1 0 0 / 0.08),
    0 1px 0 0 oklch(1 0 0 / 0.06) inset,
    0 14px 34px -8px oklch(0 0 0 / 0.6);
  --shadow-surface-sm:
    0 0 0 1px oklch(1 0 0 / 0.07),
    0 1px 0 0 oklch(1 0 0 / 0.05) inset,
    0 6px 18px -4px oklch(0 0 0 / 0.45);
  --shadow-modal:
    0 0 0 1px oklch(1 0 0 / 0.13),
    0 1px 0 0 oklch(1 0 0 / 0.08) inset,
    0 28px 56px -12px oklch(0 0 0 / 0.8);
}

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

body {
  font-family: "Tajawal", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse 65% 40% at 85% -5%, rgba(234, 179, 8, 0.22), transparent 65%),
    radial-gradient(ellipse 55% 35% at 12% 0%, rgba(245, 158, 11, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(16, 185, 129, 0.07), transparent 65%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 2px;
}

.tabular {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-variant-numeric: tabular-nums;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

[dir="rtl"] .icon-dir {
  transform: scaleX(-1);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 10, 24, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  max-width: 1240px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.35));
}

.brand-title {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-pill {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.22);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.38);
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Outer radius (13px) = inner radius (8px) + padding (5px) */
.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(10, 20, 40, 0.9);
  padding: 5px;
  border-radius: 13px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-surface-sm);
  flex-wrap: wrap;
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  padding-block: 8px;
  padding-inline-start: 12px;
  padding-inline-end: 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  -webkit-tap-highlight-color: transparent;
}

.nav-tab:active {
  transform: scale(0.98);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.28), rgba(245, 158, 11, 0.14));
  color: var(--text);
  border-color: rgba(250, 204, 21, 0.35);
}

.nav-tab.active .icon {
  fill: currentColor;
  fill-opacity: 0.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-block: 9px;
  padding-inline: 15px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn.btn-icon {
  padding-inline-start: 13px;
  padding-inline-end: 15px;
}

.btn:active {
  transform: scale(0.96);
}

.btn.is-spinning .icon {
  animation: refreshSpin 0.65s linear infinite;
}

@keyframes refreshSpin {
  to { transform: rotate(360deg); }
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #fde047 0%, #eab308 55%, #d97706 100%);
  border-color: rgba(254, 240, 138, 0.55);
  color: #050a18;
  font-weight: 800;
  box-shadow: 0 6px 28px -3px rgba(250, 204, 21, 0.65), 0 0 22px -4px rgba(245, 158, 11, 0.5);
}

.btn-primary::after,
.btn-discord::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 52%;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.52) 50%, transparent 85%);
  transform: skewX(-22deg);
  animation: btnShimmer 2.6s ease-in-out infinite;
  pointer-events: none;
}

.btn-primary .icon {
  stroke-width: 2.35;
}

.btn-save {
  background: var(--offer);
  border-color: transparent;
  color: #032014;
  font-weight: 700;
}

.btn-blue {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.btn-green {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.btn-discord {
  background: linear-gradient(135deg, #5865f2, #1e3a8a);
  border-color: rgba(250, 204, 21, 0.35);
  color: #fff;
  box-shadow: 0 8px 28px -4px rgba(88, 101, 242, 0.65), 0 0 18px -6px rgba(250, 204, 21, 0.35);
}

.fx-ripple {
  position: absolute;
  border-radius: 999px;
  background: rgba(254, 240, 138, 0.55);
  transform: scale(0);
  animation: fxRipple 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}

.fx-spark {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle, #fef08a 10%, #facc15 65%, transparent 100%);
  box-shadow: 0 0 10px 2px rgba(250, 204, 21, 0.85);
  pointer-events: none;
  z-index: 95;
  animation: fxSparkFly 0.58s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.btn-sm {
  padding-block: 6px;
  padding-inline: 10px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.btn-sm.btn-icon {
  padding-inline-start: 8px;
  padding-inline-end: 10px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.btn-icon-only {
  padding: 6px;
  min-width: 30px;
  min-height: 30px;
}

@media (hover: hover) {
  .nav-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
  }

  .btn:not(:disabled):hover {
    background: var(--bg-card-hover);
    transform: translateY(-1px);
  }

  .btn-primary:not(:disabled):hover {
    background: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #eab308 100%);
    box-shadow: 0 12px 34px -2px rgba(250, 204, 21, 0.8), 0 0 28px 0 rgba(245, 158, 11, 0.55);
    transform: translateY(-2px) scale(1.02);
  }

  .btn-save:not(:disabled):hover {
    background: var(--offer-hover);
  }

  .btn-discord:not(:disabled):hover {
    background: var(--discord-hover);
  }

  .btn-danger:not(:disabled):hover {
    background: rgba(239, 68, 68, 0.24);
  }

  .pill:hover {
    color: var(--text);
    border-color: var(--border-strong);
  }

  .trade-card:hover,
  .item-card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
  }

  .picker-row:hover {
    background: rgba(255, 255, 255, 0.04);
  }

  .landing-feature:hover {
    transform: translateY(-3px);
    background: rgba(22, 41, 77, 0.85);
  }

  .brand-home-btn:hover {
    opacity: 0.9;
  }
}

/* Main */
main {
  padding: 22px 0 64px;
}

/* Hero Banner: outer (26px) = inner stat/btn (10px) + padding (16px) */
.hero-banner {
  position: relative;
  border-radius: 26px;
  padding: 16px 20px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: var(--shadow-surface);
  background: var(--bg-card);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  pointer-events: none;
  outline: 1px solid oklch(1 0 0 / 0.1);
  outline-offset: -1px;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 10, 24, 0.94) 0%, rgba(10, 20, 40, 0.78) 55%, rgba(234, 179, 8, 0.22) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-title {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.hero-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-stat {
  background: rgba(5, 10, 24, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  min-width: 96px;
}

.hero-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.hero-stat-val {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Toolbar: outer (22px) = inner (10px) + padding (12px) */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  background: var(--bg-elevated);
  padding: 12px;
  border-radius: 22px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-surface-sm);
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1;
}

/* Segmented Filter: outer (13px) = inner (8px) + padding (5px) */
.segmented {
  display: inline-flex;
  background: var(--bg);
  padding: 5px;
  border-radius: 13px;
  border: 1px solid var(--border);
  gap: 4px;
}

.seg-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.seg-btn.active {
  background: rgba(234, 179, 8, 0.25);
  color: var(--text);
  border-color: rgba(250, 204, 21, 0.4);
}

.input,
.select,
.textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary-soft);
}

.search-input {
  min-width: 220px;
  flex: 1;
}

/* Pills */
.pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.pill.active {
  background: rgba(234, 179, 8, 0.24);
  border-color: var(--primary-soft);
  color: #fef08a;
}

/* Rarity */
.rarity-Common { --r-color: var(--rarity-common); }
.rarity-Uncommon { --r-color: var(--rarity-uncommon); }
.rarity-Epic { --r-color: var(--rarity-epic); }
.rarity-Legendary { --r-color: var(--rarity-legendary); }
.rarity-Exotic { --r-color: var(--rarity-exotic); }
.rarity-Standard { --r-color: var(--rarity-standard); }

.rarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--r-color);
  background: color-mix(in srgb, var(--r-color) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--r-color) 38%, transparent);
}

.rarity-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--r-color);
}

/* Simple Offer / Request Cards: outer (24px) = inner thumb (10px) + padding (14px) */
.trades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 14px;
}

.trade-card {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-surface);
  transition: transform 0.18s ease, background 0.18s ease;
}

.trade-card.status-done {
  opacity: 0.56;
}

.trade-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.type-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.type-OFFER {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.42);
}

.type-REQUEST {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.42);
}

.item-head {
  display: flex;
  gap: 14px;
  align-items: center;
}

.item-thumb {
  width: 86px;
  height: 86px;
  border-radius: 10px;
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--r-color, #ffffff) 22%, transparent), rgba(5, 10, 24, 0.85) 75%);
  border: 1px solid transparent;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--r-color, #ffffff) 32%, transparent),
    0 4px 12px oklch(0 0 0 / 0.4) inset;
  padding: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(5, 10, 24, 0.58);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
}

.price-label {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.price-ref {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.price-val {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 1.08rem;
  font-weight: 700;
  color: #34d399;
}

.discord-tag {
  color: #c7d2fe;
  font-weight: 700;
  background: rgba(88, 101, 242, 0.2);
  border: 1px solid rgba(88, 101, 242, 0.35);
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trade-avatar {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  object-fit: cover;
  outline: 1px solid oklch(1 0 0 / 0.14);
  outline-offset: -1px;
}

.discord-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(88, 101, 242, 0.18);
  border: 1px solid rgba(88, 101, 242, 0.42);
  border-radius: 999px;
  padding: 4px 12px 4px 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e0e7ff;
}

[dir="rtl"] .discord-user-pill {
  padding: 4px 6px 4px 12px;
}

.discord-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  outline: 1px solid oklch(1 0 0 / 0.14);
  outline-offset: -1px;
}

.redirect-copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 6px 10px;
  font-family: "Oxanium", monospace;
  font-size: 0.8rem;
  color: #fde047;
  direction: ltr;
}

.redirect-copy-row span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.trade-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Catalog Grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 14px;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid transparent;
  box-shadow: var(--shadow-surface-sm);
  border-radius: 24px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.item-title {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
}

.item-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.item-price {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 0.98rem;
  font-weight: 700;
  color: #34d399;
}

.item-price.none {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.78rem;
}

/* Admin Panel: outer (28px) = inner (10px) + padding (18px) */
.panel {
  background: var(--bg-card);
  border: 1px solid transparent;
  box-shadow: var(--shadow-surface);
  border-radius: 28px;
  padding: 18px;
  margin-bottom: 18px;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  font-size: 0.86rem;
}

.admin-table th {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

/* Modal & Picker Overlays */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 18, 0.76);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
  overscroll-behavior: contain;
}

/* Outer (28px) = inner (10px) + padding (18px) */
.modal {
  background: var(--bg-card);
  border: 1px solid transparent;
  box-shadow: var(--shadow-modal);
  border-radius: 28px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Outer (13px) = inner row (8px) + padding (4px) + border (1px) */
.picker-results {
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 4px;
  background: var(--bg);
}

.picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.picker-row:last-child {
  border-bottom: none;
}

.picker-row.selected {
  background: rgba(234, 179, 8, 0.22);
}

.picker-row-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.picker-row-info img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

/* Landing Screen */
.landing-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding-bottom: 28px;
}

.landing-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.landing-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  outline: 1px solid oklch(1 0 0 / 0.1);
  outline-offset: -1px;
}

.landing-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 18%, rgba(234, 179, 8, 0.28), transparent 48%),
    radial-gradient(circle at 18% 82%, rgba(245, 158, 11, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(5, 10, 24, 0.72) 0%, rgba(5, 10, 24, 0.92) 60%, #050a18 100%);
}

.landing-nav {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.landing-main {
  position: relative;
  z-index: 2;
  max-width: 1060px;
  width: 100%;
  margin: 24px auto;
  padding: 0 20px;
}

/* Outer (32px) = inner feature card (14px) + padding (18px) */
.landing-card {
  background: rgba(10, 20, 40, 0.84);
  backdrop-filter: blur(18px);
  border: 1px solid transparent;
  box-shadow: var(--shadow-modal);
  border-radius: 32px;
  padding: 28px 24px;
  text-align: center;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(234, 179, 8, 0.22);
  color: #fef08a;
  border: 1px solid rgba(250, 204, 21, 0.35);
  margin-bottom: 16px;
}

.landing-title {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 30%, #fde047 75%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-subtitle {
  max-width: 660px;
  margin: 0 auto 24px;
  font-size: 1rem;
  color: var(--text-muted);
}

.landing-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn-lg {
  padding-block: 13px;
  padding-inline: 24px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-lg.btn-icon {
  padding-inline-start: 22px;
  padding-inline-end: 24px;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
  text-align: start;
  margin-bottom: 22px;
}

.landing-feature {
  background: rgba(15, 29, 56, 0.8);
  border: 1px solid transparent;
  box-shadow: var(--shadow-surface-sm);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.landing-feature-img {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 10px;
  background: radial-gradient(circle at center, rgba(234, 179, 8, 0.25), rgba(5, 10, 24, 0.85) 75%);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.25);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.landing-feature-title {
  font-family: "Oxanium", "Tajawal", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.landing-feature-desc {
  font-size: 0.79rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.landing-pulse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.landing-pulse-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.landing-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.brand-home-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: start;
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--offer);
  color: #032014;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-modal);
  z-index: 80;
  font-size: 0.88rem;
  animation: toastSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: 24px;
}

/* ================= HIGH-IMPACT VISUAL FX & ANIMATIONS ================= */
#fxCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.95;
}

/* Pre-login Gate Mode: only centered logo + Discord login window */
.landing-gate-brand {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.landing-gate-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(250, 204, 21, 0.55));
  animation: floatSlow 3s ease-in-out infinite;
}

.landing-screen.is-locked .landing-nav,
.landing-screen.is-locked .landing-bg,
.landing-screen.is-locked .landing-eyebrow,
.landing-screen.is-locked .landing-title,
.landing-screen.is-locked .landing-subtitle,
.landing-screen.is-locked .landing-features,
.landing-screen.is-locked .landing-pulse,
.landing-screen.is-locked #landingGateNotice {
  display: none !important;
}

.landing-screen.is-locked {
  min-height: 100vh;
  padding: 0;
}

.landing-screen.is-locked .landing-main {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  z-index: 5;
}

.landing-screen.is-locked .landing-card {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 28px;
  text-align: center;
}

.landing-screen.is-locked > div:last-child {
  position: fixed !important;
  bottom: 14px;
  left: 0;
  right: 0;
  z-index: 6 !important;
}

.landing-screen.is-locked .landing-gate-brand {
  display: flex;
}

.landing-screen.is-locked .landing-actions {
  justify-content: center;
  margin: 0;
}

.landing-screen.is-locked #landingDiscordBtn {
  width: 100%;
  justify-content: center;
}

.fx-grid {
  position: fixed;
  inset: -25% -15% 0 -15%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(250, 204, 21, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 204, 21, 0.09) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 15%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 15%, transparent 85%);
  animation: gridDrift 14s linear infinite;
}

.fx-scanline {
  position: fixed;
  left: 0;
  right: 0;
  height: 2px;
  top: -10%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(90deg, transparent 5%, rgba(250, 204, 21, 0.55) 50%, transparent 95%);
  box-shadow: 0 0 24px 3px rgba(250, 204, 21, 0.35);
  animation: laserSweep 5.5s ease-in-out infinite;
}

.fx-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.42;
  will-change: transform;
}

.fx-orb-1 {
  width: 460px;
  height: 460px;
  top: -120px;
  right: -90px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.72), rgba(217, 119, 6, 0.14) 70%);
  animation: orbFloat1 11s ease-in-out infinite alternate;
}

.fx-orb-2 {
  width: 420px;
  height: 420px;
  bottom: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.85), rgba(56, 189, 248, 0.14) 70%);
  animation: orbFloat2 13s ease-in-out infinite alternate;
}

.fx-orb-3 {
  width: 300px;
  height: 300px;
  top: 42%;
  left: 48%;
  opacity: 0.22;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.7), transparent 72%);
  animation: orbFloat3 9s ease-in-out infinite alternate;
}

#appShell {
  position: relative;
  z-index: 2;
}

/* Landing Card Intense Gold Halo & 3D Entrance */
.landing-card {
  position: relative;
  overflow: hidden;
  box-shadow:
    var(--shadow-modal),
    0 0 70px -15px rgba(250, 204, 21, 0.25);
  animation: landingReveal3D 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.landing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--glow-angle, 0deg),
    transparent 0deg,
    rgba(254, 240, 138, 0.95) 45deg,
    rgba(234, 179, 8, 0.95) 110deg,
    rgba(56, 189, 248, 0.75) 170deg,
    transparent 230deg,
    rgba(250, 204, 21, 0.85) 310deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: borderSpin 3.6s linear infinite;
}

@property --glow-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.landing-eyebrow {
  animation: fadeSlideUp 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.landing-title {
  background: linear-gradient(115deg, #ffffff 8%, #fef08a 30%, #facc15 52%, #fbbf24 72%, #ffffff 92%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 4px 20px rgba(250, 204, 21, 0.25));
  animation: fadeSlideUp 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.18s both, textShine 3.8s linear infinite;
}

.landing-subtitle {
  animation: fadeSlideUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both;
}

.landing-actions {
  animation: fadeSlideUp 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.34s both;
}

.landing-features {
  animation: fadeSlideUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.42s both;
}

.landing-pulse {
  animation: fadeSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.landing-feature {
  position: relative;
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
  --rx: 0deg;
  --ry: 0deg;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease, box-shadow 0.26s ease;
}

.landing-feature-img {
  animation: floatSlow 3.4s ease-in-out infinite;
}

.landing-feature:nth-child(2) .landing-feature-img {
  animation-delay: -1.1s;
}

.landing-feature:nth-child(3) .landing-feature-img {
  animation-delay: -2.2s;
}

.landing-pulse-dot {
  position: relative;
}

.landing-pulse-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  background: inherit;
  opacity: 0.75;
  animation: pulsePing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Interactive 3D Tilt + Gold Spotlight + Rarity Glow on Cards */
.trade-card,
.item-card {
  position: relative;
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
  --rx: 0deg;
  --ry: 0deg;
  transform-style: preserve-3d;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease, box-shadow 0.26s ease;
  animation: cardStaggerIn 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(min(var(--stagger, 0), 14) * 38ms);
}

.trade-card::before,
.item-card::before,
.landing-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    320px circle at var(--mx) var(--my),
    color-mix(in srgb, var(--r-color, #facc15) 30%, transparent),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
  z-index: 0;
}

.trade-card > *,
.item-card > *,
.landing-feature > * {
  position: relative;
  z-index: 1;
}

.item-thumb {
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
}

.item-thumb::after {
  content: "";
  position: absolute;
  inset: -30% auto -30% -90%;
  width: 45%;
  background: linear-gradient(110deg, transparent, rgba(254, 240, 138, 0.42), transparent);
  transform: skewX(-24deg);
  transition: left 0.45s ease;
  pointer-events: none;
}

.item-thumb img {
  transition: transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.28s ease;
}

.rarity-Exotic .item-thumb {
  animation: exoticPulse 2s ease-in-out infinite;
}

.rarity-Legendary .item-thumb {
  animation: legendaryPulse 2.3s ease-in-out infinite;
}

@media (hover: hover) {
  .trade-card:hover::before,
  .item-card:hover::before,
  .landing-feature:hover::before {
    opacity: 1;
  }

  .landing-feature:hover {
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-5px) scale(1.015);
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.45), 0 18px 36px -10px rgba(250, 204, 21, 0.28);
  }

  .trade-card:hover,
  .item-card:hover {
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-7px) scale(1.018);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--r-color, #facc15) 60%, transparent),
      0 22px 46px -10px color-mix(in srgb, var(--r-color, #eab308) 45%, rgba(0, 0, 0, 0.8));
  }

  .trade-card:hover .item-thumb,
  .item-card:hover .item-thumb {
    transform: scale(1.06);
  }

  .trade-card:hover .item-thumb::after,
  .item-card:hover .item-thumb::after {
    left: 145%;
  }

  .trade-card:hover .item-thumb img,
  .item-card:hover .item-thumb img {
    transform: scale(1.14) rotate(-4deg);
    filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--r-color, #facc15) 70%, transparent));
  }
}

/* Smooth Tab & Modal Animations */
.tab-panel:not(.hidden) {
  animation: tabFadeIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop:not(.hidden) {
  animation: backdropFade 0.22s ease both;
}

.modal-backdrop:not(.hidden) .modal {
  animation: modalPopIn 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(250, 204, 21, 0.16) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: heroSweep 4.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes laserSweep {
  0% { top: -6%; opacity: 0; }
  12% { opacity: 0.85; }
  88% { opacity: 0.85; }
  100% { top: 106%; opacity: 0; }
}

@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(52px); }
}

@keyframes orbFloat1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-85px, 70px, 0) scale(1.2); }
}

@keyframes orbFloat2 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(90px, -60px, 0) scale(1.22); }
}

@keyframes orbFloat3 {
  from { transform: translate3d(-30px, -20px, 0) scale(0.9); }
  to { transform: translate3d(40px, 35px, 0) scale(1.25); }
}

@keyframes borderSpin {
  to { --glow-angle: 360deg; }
}

@keyframes landingReveal3D {
  from { opacity: 0; transform: perspective(1000px) rotateX(10deg) translateY(34px) scale(0.94); }
  to { opacity: 1; transform: perspective(1000px) rotateX(0deg) translateY(0) scale(1); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardStaggerIn {
  from { opacity: 0; transform: translateY(22px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes textShine {
  0% { background-position: 0% center; }
  100% { background-position: 220% center; }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

@keyframes pulsePing {
  0% { transform: scale(0.85); opacity: 0.9; }
  80%, 100% { transform: scale(2.8); opacity: 0; }
}

@keyframes btnShimmer {
  0%, 42% { left: -70%; }
  100% { left: 145%; }
}

@keyframes fxRipple {
  to { transform: scale(3.8); opacity: 0; }
}

@keyframes fxSparkFly {
  from { opacity: 1; transform: translate(0, 0) scale(1.1); }
  to { opacity: 0; transform: translate(var(--sx, 30px), var(--sy, -30px)) scale(0.1); }
}

@keyframes exoticPulse {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(255, 77, 109, 0.55), 0 0 22px -2px rgba(255, 77, 109, 0.55), 0 4px 12px oklch(0 0 0 / 0.4) inset;
  }
  50% {
    box-shadow: 0 0 0 1.5px rgba(255, 77, 109, 0.95), 0 0 36px 2px rgba(255, 77, 109, 0.8), 0 4px 12px oklch(0 0 0 / 0.4) inset;
  }
}

@keyframes legendaryPulse {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.55), 0 0 20px -2px rgba(250, 204, 21, 0.45), 0 4px 12px oklch(0 0 0 / 0.4) inset;
  }
  50% {
    box-shadow: 0 0 0 1.5px rgba(254, 240, 138, 0.95), 0 0 32px 2px rgba(250, 204, 21, 0.72), 0 4px 12px oklch(0 0 0 / 0.4) inset;
  }
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes backdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.88) translateY(18px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translate(-50%, 20px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes heroSweep {
  0%, 38% { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}

/* Verification & Admin Analytics */
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(234, 179, 8, 0.16));
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-surface-sm);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.42);
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.banned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.trade-card.status-expired {
  opacity: 0.48;
}

a.discord-tag {
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

@media (hover: hover) {
  a.discord-tag:hover {
    background: rgba(88, 101, 242, 0.34);
    border-color: rgba(165, 180, 252, 0.6);
    transform: translateY(-1px);
  }
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-kpi-card {
  background: var(--bg-card);
  border: 1px solid transparent;
  box-shadow: var(--shadow-surface-sm);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-kpi-label {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.admin-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  background: rgba(234, 179, 8, 0.2);
  color: #fef08a;
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.rank-pill.rank-1 {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.rank-pill.rank-2 {
  background: rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.45);
}

.rank-pill.rank-3 {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.42);
}

/* Language Switcher: outer (11px) = inner (7px) + padding (3px) + border (1px) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
}

.lang-opt {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.lang-opt.active {
  background: rgba(234, 179, 8, 0.28);
  border-color: rgba(250, 204, 21, 0.45);
  color: var(--text);
}

@media (hover: hover) {
  .lang-opt:not(.active):hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #fxCanvas,
  .fx-grid,
  .fx-scanline,
  .fx-orb {
    display: none !important;
  }
}
