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

[hidden] { display: none !important; }

button, a, input, label { touch-action: manipulation; }

:root {
  --bg: #0e0e10;
  --surface: #18181b;
  --surface2: #1f1f23;
  --border: #2a2a30;
  --text: #efeff1;
  --muted: #8b8b99;
  --accent: #0066ff;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

::selection { background: rgba(0,102,255,0.35); color: #fff; }

html, body { overscroll-behavior: none; }

html {
  scrollbar-width: thin;
  scrollbar-color: #3a3a42 transparent;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #34343c;
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #45454f; }
::-webkit-scrollbar-corner { background: transparent; }

.hero {
  text-align: center;
  padding: 40px 24px 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0,102,255,0.12) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow 7s ease-in-out infinite;
}

@keyframes hero-glow {
  0%, 100% { opacity: 0.75; }
  50%      { opacity: 1; }
}

.hero-title {
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 14px;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s;
}
.hero-title:hover { opacity: 0.85; }

.hero-title .name {
  background: linear-gradient(180deg, #ffffff 0%, #9a9aa6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .tld {
  font-size: 0.34em;
  font-weight: 700;
  color: var(--accent);
  vertical-align: super;
  margin-left: 3px;
  text-shadow: 0 0 18px rgba(0,102,255,0.5);
}

.hero-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 32px;
  line-height: 1.55;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.15s, transform 0.15s;
}

.stat-pill:hover {
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.stat-pill-value {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-pill-label {
  color: var(--muted);
}

.stat-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-pill-dot.total  { background: var(--muted); }
.stat-pill-dot.active { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.6); }
.stat-pill-dot.inactive { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.stat-pill-dot.banned { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.6); }

.controls-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14,14,16,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.35;
  pointer-events: none;
}

#search,
#usd-search {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  padding: 13px 22px 13px 48px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#search::placeholder,
#usd-search::placeholder { color: var(--muted); }
#search:focus,
#usd-search:focus {
  border-color: rgba(255,255,255,0.55);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.search-hint {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 7px;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}

.search-clear:hover {
  color: var(--text);
  transform: translateY(-50%) scale(1.15);
}

.search-wrap.has-value .search-hint { display: none; }
.search-wrap.has-value .search-clear { display: flex; }

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  flex: 0 1 auto;
  justify-content: flex-start;
}

.sort-side {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#view-usd .controls-row { justify-content: center; }

@media (max-width: 560px) {
  .controls-row { flex-direction: column; align-items: stretch; gap: 0; }
  .filters { justify-content: center; }
  .sort-side { justify-content: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
  .controls-row .count { margin-top: 14px; }

  .controls-bar { display: contents; }
  .controls {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(14,14,16,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
  }
  .controls-filters { padding: 12px 20px 0; }
}

.filter-btn,
.sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
  user-select: none;
}

.filter-btn:hover,
.sort-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
}

.filter-btn.active,
.sort-btn.active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.55);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35);
}

.fb-icon { display: inline-flex; align-items: center; color: var(--muted); margin-right: -1px; }
.fb-icon svg { width: 15px; height: 15px; display: block; }
.fb-vbadge svg { width: 16px; height: 16px; }

#btn-verified.active {
  background: rgba(0,102,255,0.12);
  border-color: rgba(0,102,255,0.55);
  box-shadow: 0 0 0 1px rgba(0,102,255,0.35);
}
#btn-alts.active {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.55);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.35);
}
#btn-banned.active,
#usd-btn-banned.active {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.55);
  box-shadow: 0 0 0 1px rgba(239,68,68,0.35);
}

#btn-verified .fb-vbadge { filter: grayscale(1) opacity(0.45); transition: filter 0.15s; }
#btn-verified.active .fb-vbadge { filter: none; }

#btn-alts.active .fb-inactive { color: #f59e0b; }
#btn-banned.active .fb-banned,
#usd-btn-banned.active .fb-banned { color: #ef4444; }

.sort-arrow { font-size: 11px; opacity: 0.7; }

.clear-btn {
  display: none;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.clear-btn.visible { display: inline-flex; }
.clear-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}
.clear-btn svg { width: 13px; height: 13px; }

.count {
  font-size: 13px;
  color: var(--muted);
  width: 100%;
  text-align: center;
  margin: 0 auto;
  font-variant-numeric: tabular-nums;
}

main {
  padding: 24px 20px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

#grid,
#usd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

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

.card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  color: #fff;
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
  animation: card-in 0.32s ease backwards;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  opacity: 0;
  transition: opacity 0.18s ease;
  background: linear-gradient(160deg,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.25) 35%,
    rgba(255,255,255,0.05) 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}

.card:hover::before { opacity: 1; }

.card.banned { border-color: rgba(239,68,68,0.45); }
.card.banned::before {
  background: linear-gradient(160deg,
    rgba(255,90,90,0.95) 0%,
    rgba(255,70,70,0.3) 35%,
    rgba(255,50,50,0.06) 70%);
}
.card.banned .card-overlay {
  background:
    linear-gradient(to top,
      rgba(48,6,6,0.86) 0%,
      rgba(40,6,6,0.32) 28%,
      transparent 50%),
    linear-gradient(to top, rgba(150,28,28,0.18), transparent 55%);
}
.card.banned .card-avatar {
  filter: grayscale(1) brightness(0.82);
  transition: transform 0.35s ease, filter 0.35s ease;
}
.card.banned:hover .card-avatar { filter: grayscale(0.55) brightness(0.95); }
.card-banned-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  background: rgba(239,68,68,0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.card.inactive { border-color: rgba(255,255,255,0.12); }
.card.inactive::before {
  background: linear-gradient(160deg,
    rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0.04) 70%);
}
.card.inactive .card-avatar {
  filter: grayscale(1) brightness(0.82);
  transition: transform 0.35s ease, filter 0.35s ease;
}
.card.inactive:hover .card-avatar { filter: grayscale(0.55) brightness(0.95); }
.card-inactive-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  background: rgba(38,38,44,0.95);
  color: rgba(255,255,255,0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.card-usd {
  color: #34d399;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.2;
  margin-bottom: 3px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent), 0 18px 44px rgba(0,0,0,0.55);
}

.tab:focus-visible,
.scope-btn:focus-visible, .scope-opt:focus-visible,
.add-user-btn:focus-visible,
.filter-btn:focus-visible, .sort-btn:focus-visible, .clear-btn:focus-visible,
.search-clear:focus-visible, .modal-close:focus-visible, .tg-btn:focus-visible,
.gsum-refresh:focus-visible, .gsum-add:focus-visible,
.ag-add:focus-visible, .ag-share-copy:focus-visible, .ag-reset:focus-visible,
#scroll-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--surface2);
  transition: transform 0.35s ease;
}

.card:hover .card-avatar { transform: scale(1.05); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.3) 28%,
    transparent 48%
  );
}

.card-aura {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}
.card-aura .ap {
  position: absolute;
  width: var(--w);
  height: var(--w);
  color: #fff;
  animation: card-aura-tw var(--d) ease-in-out infinite;
}
.card-aura .ap svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 2px #eaf6ff) drop-shadow(0 0 6px rgba(110,190,255,0.85));
}
@keyframes card-aura-tw {
  0%, 100% { opacity: 0; transform: scale(0.25); }
  50%      { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .card-aura .ap { animation: none; opacity: 0.85; }
}

.card-footer {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
  font-size: 12px;
}

.card-age {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  cursor: default;
}

.age-short {
  display: inline-block;
  max-width: 36px;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s ease;
}

.card-age:hover .age-short {
  max-width: 0;
  opacity: 0;
}

.age-expanded {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: max-width 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s ease 0.08s;
}

.card-age:hover .age-expanded {
  max-width: 160px;
  opacity: 1;
}

.card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px 12px 12px;
}

.card-display-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.card-display {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
  letter-spacing: -0.1px;
}

.badge {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-bottom: 1px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.badge svg { width: 12px; height: 12px; }

.card-username {
  position: relative;
  height: 1.5em;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.uname-ogu,
.uname-rblx {
  position: absolute;
  inset: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.uname-rblx {
  opacity: 0;
  transform: translateY(5px);
  color: rgba(255,255,255,0.72);
}

.card:hover .card-username.animatable .uname-ogu {
  opacity: 0;
  transform: translateY(-5px);
}

.card:hover .card-username.animatable .uname-rblx {
  opacity: 1;
  transform: translateY(0);
}

#sentinel, #usd-sentinel { height: 1px; }

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  padding: 40px 20px;
  line-height: 1.6;
}

.no-results.with-more { padding: 24px 20px 4px; }

.no-results strong { color: var(--text); font-weight: 600; }

.show-more-card {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  border: 1.5px dashed rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.18s;
  animation: card-in 0.32s ease backwards;
}
.show-more-card:hover {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  transform: translateY(-4px);
}
.show-more-plus {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s;
}
.show-more-card:hover .show-more-plus { transform: scale(1.08); }
.show-more-plus svg { width: 22px; height: 22px; }
.show-more-count { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.show-more-cats { font-size: 12px; line-height: 1.45; opacity: 0.85; }

.controls-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 20px;
}

.scope-dd { position: relative; }
.scope-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 7px 14px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.scope-btn:hover { border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.06); }
.scope-count { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.scope-caret { width: 14px; height: 14px; color: var(--muted); transition: transform 0.15s; }
.scope-dd.open .scope-caret { transform: rotate(180deg); }
.scope-menu {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 200;
  min-width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 5px; box-shadow: 0 12px 32px rgba(0,0,0,0.55);
  display: flex; flex-direction: column; gap: 2px;
}
.scope-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--text); font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 9px 12px; cursor: pointer; white-space: nowrap; text-align: left;
  transition: background 0.12s;
}
.scope-opt:hover { background: rgba(255,255,255,0.07); }
.scope-opt.selected { background: rgba(0,102,255,0.16); }
.scope-opt-count { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.add-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.add-user-btn:hover {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
}
.add-user-btn:active { transform: scale(0.97); }
.add-user-btn svg { width: 15px; height: 15px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8,8,10,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlay-in 0.18s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 26px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  animation: modal-in 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.modal-close svg { width: 18px; height: 18px; }

.modal-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.modal-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 22px;
  max-width: 300px;
}

.tg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  background: #2aabee;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.tg-btn:hover { background: #1f9ad8; }
.tg-btn:active { transform: scale(0.98); }
.tg-btn.copied { background: #2e9e5b; }
.tg-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.tabs-wrap {
  display: flex;
  justify-content: safe center;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;

  background:
    linear-gradient(to right, var(--bg) 32%, rgba(14,14,16,0)) left center,
    linear-gradient(to left,  var(--bg) 32%, rgba(14,14,16,0)) right center,
    radial-gradient(farthest-side at 0   50%, rgba(255,255,255,0.22), rgba(255,255,255,0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(255,255,255,0.22), rgba(255,255,255,0)) right center;
  background-repeat: no-repeat;
  background-size: 44px 100%, 44px 100%, 16px 100%, 16px 100%;
  background-attachment: local, local, scroll, scroll;
  background-color: var(--bg);
}
.tabs-wrap::-webkit-scrollbar { display: none; }
.tabs { display: flex; gap: 6px; align-items: center; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  border-top: 2px solid transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px;
  white-space: nowrap;
  opacity: 0.5;
  transition: opacity 0.15s, border-color 0.15s;
}
.tab-icon {
  display: inline-flex;
  flex: 0 0 auto;
}
.tab-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.tab:hover { opacity: 0.8; }
.tab.active { opacity: 1; font-weight: 800; border-top-color: var(--accent); }

html[data-tab="usd"] #view-roblox,
html[data-tab="games"] #view-roblox,
html[data-tab="usd"] #hero-title-main,
html[data-tab="games"] #hero-title-main,
html[data-tab="usd"] #hero-stats,
html[data-tab="games"] #hero-stats { display: none; }
html[data-tab="usd"] #view-usd,
html[data-tab="games"] #view-games,
html[data-tab="usd"] #hero-title-usd,
html[data-tab="games"] #hero-title-games { display: block; }
html[data-tab="usd"] .tab[data-tab="usd"],
html[data-tab="games"] .tab[data-tab="games"] { opacity: 1; font-weight: 800; border-top-color: var(--accent); }
html[data-tab="usd"] .tab[data-tab="roblox"],
html[data-tab="games"] .tab[data-tab="roblox"] { opacity: 0.5; font-weight: 600; border-top-color: transparent; }
html[data-tab="usd"] .hero,
html[data-tab="games"] .hero { padding: 30px 24px 20px; }

.tab.inprogress {
  opacity: 0.4;
  cursor: progress;
  color: var(--muted);
  background-image: linear-gradient(90deg,
    var(--muted) 0%, var(--muted) 42%,
    #ffffff 50%,
    var(--muted) 58%, var(--muted) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: tab-shine 3s ease-in-out infinite;
}
.tab.inprogress:hover { opacity: 0.55; }

@keyframes tab-shine {
  0%   { background-position: 100% 0; }
  28%  { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}

#tab-tooltip {
  position: fixed;
  z-index: 300;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}
#tab-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--surface2);
}
#tab-tooltip.show { opacity: 1; transform: translate(-50%, 0); }

#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#topbar.hidden { opacity: 0; }

#topbar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0,102,255,0.8), 0 0 3px rgba(0,102,255,0.5);
  transition: width 0.25s ease;
}

#topbar-label {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  pointer-events: none;
  transition: opacity 0.4s ease;
  white-space: nowrap;
}

#topbar-label.hidden { opacity: 0; }

#scroll-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 150;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.15s, color 0.15s;
  pointer-events: none;
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#scroll-top:hover {
  border-color: rgba(255,255,255,0.18);
  color: var(--text);
}

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton-card {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface2) 50%,
    var(--surface) 75%
  );
  background-size: 1200px 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 20px 56px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-sub { opacity: 0.7; margin-top: 4px; }

.hero.compact { padding: 30px 24px 20px; }
.hero.compact .hero-desc { margin-bottom: 0; }

.usd-credit {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: -8px;
  padding: 0 20px 16px;
}
.usd-credit a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.usd-credit a:hover { color: var(--accent); }

.hero-title-games,
.hero-title-usd {
  font-size: clamp(30px, 5vw, 46px);
  background: linear-gradient(180deg, #ffffff 0%, #9a9aa6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes view-fade { from { opacity: 0; } to { opacity: 1; } }
#view-roblox, #view-games, #view-usd,
#hero-title-main, #hero-title-games, #hero-title-usd { animation: view-fade .25s ease; }

@media (max-width: 500px) {
  .hero { padding: 40px 20px 40px; }
  #grid,
  #usd-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .search-hint { display: none; }
}

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

@keyframes livepulse { 0%,100%{opacity:1;} 50%{opacity:0.45;} }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,0.7); flex-shrink: 0;
  animation: livepulse 2s ease-in-out infinite;
}

.games-summary {
  display:flex; align-items:center; justify-content:center;
  gap:14px; flex-wrap:wrap; padding:2px 20px 16px;
}
.gsum-main { display:flex; align-items:center; gap:9px; }
.gsum-num { font-size:19px; font-weight:800; letter-spacing:-.4px; font-variant-numeric:tabular-nums; line-height:1; }
.gsum-label { font-size:13px; color:var(--muted); }
.gsum-sep { width:1px; height:18px; background:var(--border); }
.gsum-sub { font-size:13px; color:var(--muted); }
.gsum-sub b { color:var(--text); font-weight:700; }
.gsum-refresh {
  display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:50%;
  background:var(--surface); border:1px solid var(--border); color:var(--muted);
  cursor:pointer; transition: color .15s, border-color .15s, background .15s;
}
.gsum-refresh:hover { color:var(--text); border-color:rgba(255,255,255,.25); background:var(--surface2); }
.gsum-refresh svg { width:15px; height:15px; }
@keyframes spin { to { transform: rotate(360deg); } }
.gsum-refresh.spinning svg { animation: spin .6s linear; }

.games-main { padding:26px 20px 40px; max-width:1300px; margin:0 auto; overflow-x:clip; }
.games-render.skeletons { display:flex; flex-direction:column; gap:8px; max-width:760px; margin:0 auto; }
.games-error {
  max-width:600px; margin:40px auto; text-align:center;
  color:var(--muted); font-size:14px; line-height:1.6;
}
.games-error strong { color:var(--text); }

.games-render.glow { display:flex; flex-direction:column; gap:8px; max-width:760px; margin:0 auto; }
.gb-row {
  position:relative; overflow:hidden; display:flex; align-items:center; gap:14px;
  padding:11px 16px 11px 12px; border-radius:14px;
  background:#141417; border:1px solid var(--border);
  text-decoration:none; color:var(--text);
  transition: transform .16s ease, border-color .16s ease;
  animation: card-in .32s ease backwards;
}

.gb-row::before {
  content:''; position:absolute; inset:0; z-index:0;
  background-image: var(--bg, none); background-size:cover; background-position:center;
  filter: blur(22px) saturate(1.3); transform: scale(1.35);
  opacity:.6; transition: opacity .2s ease;
}
.gb-row::after {
  content:''; position:absolute; inset:0; z-index:0;
  background: linear-gradient(90deg, rgba(14,14,16,.9) 0%, rgba(14,14,16,.64) 55%, rgba(14,14,16,.46) 100%);
}
.gb-row > * { position:relative; z-index:1; }
.gb-row:hover { transform: translate(-5px, -2px); border-color:rgba(255,255,255,.28); }
.gb-row:hover::before { opacity:.85; }
.gb-row:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.gb-rank { flex-shrink:0; width:24px; text-align:center; font-size:14px; font-weight:800; color:rgba(255,255,255,.6); font-variant-numeric:tabular-nums; text-shadow:0 1px 3px rgba(0,0,0,.6); }
.gb-row.top .gb-rank { color:#7cb0ff; }
.gb-icon { width:48px; height:48px; border-radius:12px; object-fit:cover; flex-shrink:0; box-shadow:0 2px 8px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.12); background:var(--surface2); }
.gb-mid { flex:1; min-width:0; }
.gb-name { font-size:15px; font-weight:700; letter-spacing:-.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 5px rgba(0,0,0,.6); }
.gb-creator { font-size:12px; color:rgba(255,255,255,.66); margin:0 0 7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 4px rgba(0,0,0,.55); }
.gb-bar { height:5px; border-radius:999px; background:rgba(0,0,0,.35); overflow:hidden; box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); }
.gb-bar-fill { height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg, var(--accent), #57a0ff); box-shadow:0 0 8px rgba(0,102,255,.5); transition: width .7s cubic-bezier(.2,.7,.3,1); }
.gb-stat { flex-shrink:0; display:flex; flex-direction:column; align-items:flex-end; gap:1px; min-width:58px; }
.gb-players { display:flex; align-items:center; gap:6px; font-size:15px; font-weight:800; font-variant-numeric:tabular-nums; text-shadow:0 1px 5px rgba(0,0,0,.65); }
.gb-players-label { font-size:11px; color:rgba(255,255,255,.66); text-shadow:0 1px 4px rgba(0,0,0,.55); }

.gb-players.empty { color:rgba(255,255,255,.6); }
.gb-off-icon { display:inline-flex; color:#ef6a6a; filter:drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.gb-off-icon svg { width:15px; height:15px; display:block; }
.gb-row.empty .gb-players-label { color:#e08a8a; }
.gb-go { flex-shrink:0; color:rgba(255,255,255,.6); display:flex; transform:translateX(-3px); opacity:0; transition: opacity .16s ease, transform .16s ease; }
.gb-row:hover .gb-go { opacity:1; transform:translateX(0); color:#fff; }
.gb-go svg { width:17px; height:17px; }
.gb-skel { height:72px; border-radius:14px; background:linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size:1200px 100%; animation: shimmer 1.8s ease-in-out infinite; }

@media (hover: none) {
  .gb-go { display:none; }
  .gb-row:active { transform: scale(.99); filter: brightness(1.12); }
}
@media (max-width: 560px) {
  .gb-go { display:none; }
  .gb-row { gap:11px; padding:10px 13px 10px 11px; }
  .gb-icon { width:44px; height:44px; }
  .gb-rank { width:16px; }
  .gb-stat { min-width:0; }
  .gb-name { font-size:14.5px; }
}

.gsum-add {
  display:inline-flex; align-items:center; gap:6px;
  background:var(--surface); border:1px solid var(--border); border-radius:999px;
  color:var(--text); font:600 13px/1 inherit; padding:8px 14px; cursor:pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.gsum-add:hover { border-color:rgba(255,255,255,.45); background:rgba(255,255,255,.06); }
.gsum-add:active { transform:scale(.97); }
.gsum-add svg { width:14px; height:14px; }

.gsum-refresh { position:relative; }
.gsum-refresh.cooling { opacity:.5; cursor:not-allowed; }
.gsum-refresh.cooling:hover { color:var(--muted); border-color:var(--border); background:var(--surface); }
.gsum-refresh[data-cooldown].cd-show::after {
  content: attr(data-cooldown);
  position:absolute; bottom:calc(100% + 9px); left:50%; transform:translateX(-50%);
  background:var(--surface2); border:1px solid var(--border); color:var(--text);
  font-size:12px; font-weight:600; white-space:nowrap; padding:5px 10px; border-radius:7px;
  box-shadow:0 6px 18px rgba(0,0,0,.5); pointer-events:none; z-index:300;
}
.gsum-refresh[data-cooldown].cd-show::before {
  content:''; position:absolute; bottom:100%; left:50%; transform:translateX(-50%);
  border:5px solid transparent; border-top-color:var(--surface2); z-index:300;
}

.games-notice {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:center;
  width:calc(100% - 40px); max-width:760px; margin:0 auto 14px; padding:11px 16px; border-radius:12px;
  background:rgba(245,158,11,.10); border:1px solid rgba(245,158,11,.4);
  color:#f4c777; font-size:13.5px; line-height:1.4;
}
.games-notice .gn-ico { font-size:15px; }
.games-notice b { color:#ffd27a; font-variant-numeric:tabular-nums; }
.games-notice .gn-retry {
  position:relative;
  background:rgba(245,158,11,.18); border:1px solid rgba(245,158,11,.5); color:#ffd27a;
  font:600 12px/1 inherit; padding:6px 12px; border-radius:999px; cursor:pointer; transition:background .15s;
}
.games-notice .gn-retry:hover { background:rgba(245,158,11,.3); }
.games-notice .gn-retry.cooling { opacity:.5; cursor:not-allowed; }
.games-notice .gn-retry.cooling:hover { background:rgba(245,158,11,.18); }
.games-notice .gn-retry[data-cooldown].cd-show::after {
  content: attr(data-cooldown);
  position:absolute; bottom:calc(100% + 9px); left:50%; transform:translateX(-50%);
  background:var(--surface2); border:1px solid var(--border); color:var(--text);
  font-size:12px; font-weight:600; white-space:nowrap; padding:5px 10px; border-radius:7px;
  box-shadow:0 6px 18px rgba(0,0,0,.5); pointer-events:none; z-index:300;
}
.games-notice .gn-retry[data-cooldown].cd-show::before {
  content:''; position:absolute; bottom:100%; left:50%; transform:translateX(-50%);
  border:5px solid transparent; border-top-color:var(--surface2); z-index:300;
}

.gb-row.loadingrow { cursor:default; }
.gb-row.loadingrow:hover { transform:none; border-color:var(--border); }
.gb-skel-box, .gb-skel-line {
  background:linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size:1200px 100%; animation: shimmer 1.8s ease-in-out infinite; border-radius:8px;
}
.gb-skel-box { width:48px; height:48px; border-radius:12px; flex-shrink:0; }
.gb-load-id { font-size:14px; font-weight:700; color:rgba(255,255,255,.82); }
.gb-load-note { font-size:11.5px; color:rgba(255,255,255,.5); margin-top:4px; display:flex; align-items:center; gap:6px; }
.gb-load-note .live-dot.retry { background:#f59e0b; box-shadow:0 0 8px rgba(245,158,11,.7); }

.ag-form { margin:0; }
.ag-field { display:flex; gap:8px; }
.ag-input {
  flex:1; min-width:0; background:var(--surface2); border:1px solid var(--border); border-radius:10px;
  color:var(--text); font-size:16px; font-family:inherit; padding:11px 13px; outline:none;
  transition: border-color .15s, box-shadow .15s;
}
.ag-input::placeholder { color:var(--muted); }
.ag-input:focus { border-color:rgba(255,255,255,.5); box-shadow:0 0 0 3px rgba(255,255,255,.08); }
.ag-input.invalid { border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.16); }
.ag-add {
  flex-shrink:0; background:var(--accent); border:none; border-radius:10px; color:#fff;
  font:700 14px/1 inherit; padding:0 18px; cursor:pointer; transition:background .15s, opacity .15s;
}
.ag-add:hover { background:#0a5ae0; }
.ag-add:disabled { opacity:.6; cursor:default; }
.ag-error { color:#f87171; font-size:12.5px; margin-top:9px; line-height:1.45; }
.ag-note { font-size:12px; color:var(--muted); margin-top:12px; display:flex; gap:7px; line-height:1.5; }
.ag-note svg { width:14px; height:14px; flex-shrink:0; margin-top:1px; }

.ag-share { margin-top:14px; padding:13px; border-radius:12px; background:var(--surface2); border:1px solid var(--border); }
.ag-share-head { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color:var(--text); margin-bottom:9px; }
.ag-share-head svg { width:14px; height:14px; flex-shrink:0; color:var(--accent); }
.ag-share-row { display:flex; gap:8px; }
.ag-share-url {
  flex:1; min-width:0; background:var(--bg); border:1px solid var(--border); border-radius:9px;
  color:var(--muted); font-size:12.5px; font-family:inherit; padding:9px 11px; outline:none;
  text-overflow:ellipsis; cursor:text;
}
.ag-share-url:focus { border-color:rgba(255,255,255,.4); color:var(--text); }
.ag-share-copy {
  flex-shrink:0; background:var(--accent); border:none; border-radius:9px; color:#fff;
  font:700 13px/1 inherit; padding:0 16px; cursor:pointer; transition:background .15s;
}
.ag-share-copy:hover { background:#0a5ae0; }
.ag-share-copy.done { background:#22c55e; }
#addgame-title { display:flex; align-items:center; gap:9px; }
.ag-title-icon { display:inline-flex; color:var(--accent); }
.ag-title-icon svg { width:20px; height:20px; }
.ag-list-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:20px 0 9px; }
.ag-list-title { font-size:11px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:var(--muted); }
.ag-reset { background:transparent; border:1px solid var(--border); border-radius:999px; color:var(--muted); font:600 11.5px/1 inherit; padding:5px 11px; cursor:pointer; transition:color .15s, border-color .15s, background .15s; white-space:nowrap; }
.ag-reset:hover:not(:disabled) { color:var(--text); border-color:rgba(255,255,255,.3); }
.ag-reset.armed { color:#f87171; border-color:rgba(239,68,68,.5); background:rgba(239,68,68,.1); }
.ag-reset:disabled { opacity:.4; cursor:default; }
.ag-list { display:flex; flex-direction:column; gap:6px; max-height:230px; overflow-y:auto; padding-right:8px; margin-right:-4px; scrollbar-width:thin; scrollbar-color:#3a3a42 transparent; }
.ag-list::-webkit-scrollbar { width:8px; }
.ag-list::-webkit-scrollbar-track { background:transparent; }
.ag-list::-webkit-scrollbar-thumb { background:#3a3a42; border-radius:999px; border:2px solid var(--surface); }
.ag-list::-webkit-scrollbar-thumb:hover { background:#4a4a54; }
.ag-empty { font-size:13px; color:var(--muted); padding:4px 0; }
.ag-item { display:flex; align-items:center; gap:10px; padding:7px; border-radius:10px; background:var(--surface2); border:1px solid var(--border); }
.ag-item-icon { width:32px; height:32px; border-radius:8px; object-fit:cover; flex-shrink:0; background:var(--surface); }
.ag-item-name { flex:1; min-width:0; font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-item-remove { flex-shrink:0; display:flex; align-items:center; justify-content:center; width:34px; height:34px; margin:0; border-radius:9px; background:transparent; border:none; color:var(--muted); font-size:20px; line-height:1; cursor:pointer; transition:color .15s, background .15s; }
.ag-item-remove:hover { color:#f87171; background:rgba(239,68,68,.12); }
