
/* =========================================
   RoProfile! - Roblox Profile Explorer
   Dark Dashboard UI
   ========================================= */

:root {
  color-scheme: dark;

  --bg: #101010;
  --bg-secondary: #121212;
  --panel: rgba(23, 23, 23, 0.94);
  --panel-hover: #1d1d1d;
  --panel-soft: #191919;
  --input-bg: #111111;

  --border: #2b2b2b;
  --border-light: #353535;

  --text: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --accent: #5865f2;
  --accent-hover: #6875ff;
  --accent-soft: rgba(88, 101, 242, 0.14);

  --success: #4ade80;
  --danger: #f87171;
  --warning: #fbbf24;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 17px;
  --radius-xl: 22px;

  --shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
  --transition: 180ms ease;
  --motion-intensity: 1;
  --animation-intensity: 0.6;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================================
   RESET
   ========================================= */

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #414141 #101010;
  scrollbar-width: thin;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font-size: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

/* =========================================
   ANIMATED BACKGROUND
   ========================================= */

body::before,
body::after {
  position: fixed;
  z-index: -1;
  inset: -30%;
  content: "";
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(
      ellipse at 12% 20%,
      rgba(88, 101, 242, 0.12),
      transparent 35%
    ),
    radial-gradient(
      ellipse at 85% 65%,
      rgba(53, 83, 180, 0.08),
      transparent 38%
    ),
    radial-gradient(
      ellipse at 45% 100%,
      rgba(98, 69, 180, 0.06),
      transparent 35%
    );
  animation: background-drift 24s ease-in-out infinite alternate;
  will-change: transform;
}

body::after {
  inset: 0;
  opacity: 0.12;
  background-image: radial-gradient(#777 0.5px, transparent 0.5px);
  background-size: 6px 6px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  pointer-events: none;
}

@keyframes background-drift {
  0% {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }

  50% {
    transform: translate3d(2%, 1%, 0) scale(1.035);
  }

  100% {
    transform: translate3d(-1%, 2%, 0) scale(1.015);
  }
}

/* =========================================
   APP LAYOUT
   ========================================= */

.app {
  position: relative;
  width: min(100% - 56px, 1600px);
  min-height: 100vh;
  margin: 0 auto;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 11px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.brand-icon {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, #6875ff, #414bd3);
  box-shadow: 0 5px 20px rgba(88, 101, 242, 0.23);
  font-size: 21px;
  font-weight: 900;
}

.brand-exclamation {
  color: #8992ff;
}

.header-center {
  display: flex;
  justify-content: center;
  flex: 1;
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.25px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* =========================================
   BUTTONS
   ========================================= */

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.icon-button:hover {
  color: var(--text);
  background: var(--panel-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.primary-button {
  color: white;
  background: var(--accent);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.12);
}

.primary-button:hover {
  background: var(--accent-hover);
  box-shadow: 0 5px 18px rgba(88, 101, 242, 0.2);
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}

.secondary-button {
  border-color: var(--border);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
}

.secondary-button:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--panel-hover);
}

.secondary-button svg {
  width: 15px;
  height: 15px;
}

/* =========================================
   SEARCH
   ========================================= */

.search-section {
  padding: 32px 0 24px;
}

.search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}

.search-heading h1 {
  margin: 0 0 5px;
  font-size: clamp(23px, 2.2vw, 30px);
  font-weight: 750;
  letter-spacing: -1.1px;
}

.search-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.search-form {
  display: flex;
  width: min(100%, 760px);
  gap: 10px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 47px;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(17, 17, 17, 0.9);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input-wrapper:focus-within {
  border-color: rgba(104, 117, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.search-input-wrapper svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-input-wrapper input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.search-input-wrapper input::placeholder,
.section-search input::placeholder {
  color: #696970;
}

.search-input-wrapper input:focus-visible {
  outline: none;
}

.search-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  color: var(--text-secondary);
  font-size: 12px;
}

.status-indicator {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(88, 101, 242, 0.5);
}

.search-status.is-loading .status-indicator {
  animation: status-pulse 1s ease-in-out infinite;
}

.search-status.is-error .status-indicator {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.35);
}

.search-status.is-success .status-indicator {
  background: var(--success);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
}

@keyframes status-pulse {
  50% {
    opacity: 0.3;
    transform: scale(0.75);
  }
}

/* =========================================
   EMPTY STATE
   ========================================= */

.empty-state {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 70px;
  text-align: center;
  animation: fade-up 500ms ease both;
}

.empty-state-icon {
  display: grid;
  width: 65px;
  height: 65px;
  place-items: center;
  margin-bottom: 19px;
  border: 1px solid rgba(88, 101, 242, 0.2);
  border-radius: 20px;
  color: #8992ff;
  background: rgba(88, 101, 242, 0.09);
}

.empty-state-icon svg {
  width: 29px;
  height: 29px;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.empty-state p {
  max-width: 390px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* =========================================
   PANELS AND DASHBOARD
   ========================================= */

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(265px, 310px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding: 8px 0 45px;
  animation: fade-up 400ms ease both;
}

.profile-sidebar,
.dashboard-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 17px;
}

.dashboard-main {
  gap: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  gap: 12px;
  padding: 0 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.panel-heading h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

/* =========================================
   PROFILE CARD
   ========================================= */

.profile-card {
  position: relative;
}

.profile-cover {
  position: relative;
  height: 87px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(88, 101, 242, 0.26), transparent 60%),
    linear-gradient(140deg, #24233a, #171721 60%, #1d2034);
}

.profile-cover::before,
.profile-cover::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  transform: rotate(-25deg);
}

.profile-cover::before {
  top: -115px;
  right: -35px;
  width: 240px;
  height: 200px;
}

.profile-cover::after {
  top: -75px;
  right: -15px;
  width: 180px;
  height: 150px;
}

.profile-cover-glow {
  position: absolute;
  top: -65px;
  left: 15%;
  width: 190px;
  height: 150px;
  border-radius: 50%;
  background: rgba(88, 101, 242, 0.13);
  filter: blur(35px);
}

.profile-cover-label {
  position: absolute;
  right: 13px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
}

.profile-card-content {
  padding: 0 17px 17px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 83px;
  height: 83px;
  margin-top: -43px;
  margin-bottom: 13px;
}

.profile-avatar {
  width: 83px;
  height: 83px;
  border: 4px solid #191919;
  border-radius: 23px;
  background: #242424;
  object-fit: cover;
}

.verified-badge {
  position: absolute;
  right: -5px;
  bottom: -4px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 3px solid #191919;
  border-radius: 50%;
  color: white;
  background: #4b8dff;
}

.verified-badge svg {
  width: 13px;
  height: 13px;
  stroke: none;
  fill: currentColor;
}

.profile-identity {
  min-width: 0;
}

.profile-display-name {
  overflow-wrap: anywhere;
  margin: 0 0 3px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.7px;
  line-height: 1.25;
}

.profile-username {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-username:hover {
  color: #a9afff;
}

.profile-id-row {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  margin-top: 13px;
  padding: 5px 8px;
  border: 1px solid #303030;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.profile-id-label {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.profile-id-value {
  overflow: hidden;
  color: #c8c8d0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
}

.copy-button {
  display: grid;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.copy-button:hover {
  color: white;
  background: #303030;
}

.copy-button svg {
  width: 13px;
  height: 13px;
}

.profile-description-wrapper {
  margin-top: 22px;
}

.profile-description-wrapper h3 {
  margin: 0 0 7px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.profile-description {
  overflow-wrap: anywhere;
  margin: 0;
  color: #b8b8c0;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.profile-link {
  display: flex;
  width: 100%;
  margin-top: 20px;
}

/* =========================================
   SOCIAL STATS
   ========================================= */

.profile-stats {
  display: flex;
  flex-direction: column;
  padding: 5px 17px 9px;
}

.stat-item {
  display: flex;
  align-items: center;
  min-height: 61px;
  gap: 12px;
}

.stat-item + .stat-item {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.stat-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.friends-icon {
  color: #9c9dff;
  background: rgba(112, 115, 255, 0.1);
}

.followers-icon {
  color: #f4a4c2;
  background: rgba(244, 114, 182, 0.09);
}

.following-icon {
  color: #80c9ff;
  background: rgba(56, 189, 248, 0.09);
}

.stat-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.stat-value {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 11px;
}

/* =========================================
   ACCOUNT SIGNALS
   ========================================= */

.account-signal-list {
  padding: 4px 17px 10px;
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 39px;
  gap: 10px;
}

.signal-row + .signal-row {
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.signal-label {
  color: var(--text-secondary);
  font-size: 11px;
}

.signal-value {
  max-width: 58%;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.signal-value.is-verified,
.signal-value.is-success {
  color: var(--success);
}

.signal-value.is-false,
.signal-value.is-error {
  color: var(--danger);
}

/* =========================================
   AVATAR TOOLS
   ========================================= */

.avatar-preview {
  display: grid;
  min-height: 185px;
  place-items: center;
  margin: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(88, 101, 242, 0.1), transparent 65%),
    #111111;
}

.avatar-preview img {
  width: min(100%, 175px);
  max-height: 210px;
  object-fit: contain;
  transition: transform var(--transition);
}

.avatar-preview:hover img {
  transform: translateY(-3px);
}

.avatar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 13px 13px;
}

.avatar-actions .secondary-button {
  min-width: 0;
  padding: 0 8px;
  font-size: 10px;
}

/* =========================================
   BADGES AND LISTS
   ========================================= */

.section-count {
  display: inline-flex;
  min-width: 24px;
  height: 23px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid #333;
  border-radius: 7px;
  color: #c8c8d0;
  background: #202020;
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.section-search {
  display: flex;
  min-width: 0;
  width: 170px;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  transition: border-color var(--transition);
}

.section-search:focus-within {
  border-color: rgba(104, 117, 255, 0.65);
}

.section-search svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.section-search input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 10px;
}

.section-search input:focus-visible {
  outline: none;
}

.sidebar-badges > .section-search {
  width: auto;
  margin: 12px 13px;
}

.compact-list {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  padding: 0 13px 12px;
}

.list-placeholder {
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px dashed #303030;
  border-radius: 11px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

/* Shared styles for elements generated by JavaScript. */

.compact-list > *,
.content-grid > * {
  min-width: 0;
  animation: fade-up 250ms ease both;
}

.compact-list img,
.content-grid img {
  max-width: 100%;
}

.compact-list a,
.content-grid a {
  color: inherit;
}

.compact-list > a,
.compact-list > button,
.compact-list > .badge-item,
.compact-list > .list-item {
  display: flex;
  align-items: center;
  min-height: 52px;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition:
    background var(--transition),
    border-color var(--transition);
}

.compact-list > a:hover,
.compact-list > button:hover,
.compact-list > .badge-item:hover,
.compact-list > .list-item:hover {
  border-color: #383838;
  background: rgba(255, 255, 255, 0.045);
}

/* =========================================
   DASHBOARD WELCOME
   ========================================= */

.dashboard-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 5px 0 3px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #858cff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.dashboard-welcome h2 {
  margin: 0 0 4px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.8px;
}

.dashboard-welcome p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.dashboard-user-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #303030;
  border-radius: 9px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
}

.online-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.25);
}

/* =========================================
   METRICS
   ========================================= */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 142px;
  padding: 16px;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.metric-card:hover {
  border-color: #3a3a3a;
  background: rgba(29, 29, 29, 0.96);
  transform: translateY(-2px);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
}

.metric-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.metric-icon svg {
  width: 17px;
  height: 17px;
}

.games-metric-icon {
  color: #a6aaff;
  background: rgba(88, 101, 242, 0.12);
}

.groups-metric-icon {
  color: #82ceff;
  background: rgba(56, 189, 248, 0.1);
}

.badges-metric-icon {
  color: #f6ca80;
  background: rgba(251, 191, 36, 0.09);
}

.collectibles-metric-icon {
  color: #f0a7cb;
  background: rgba(244, 114, 182, 0.1);
}

.metric-value {
  display: block;
  overflow: hidden;
  margin-top: 13px;
  font-size: clamp(21px, 2.3vw, 29px);
  font-weight: 800;
  letter-spacing: -0.9px;
  line-height: 1.1;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.metric-description {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================
   DASHBOARD SECTIONS
   ========================================= */

.dashboard-section {
  padding-bottom: 14px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 15px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.section-heading-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.section-heading-title > div:last-child {
  min-width: 0;
}

.section-heading-title h2 {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 750;
}

.section-heading-title p {
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
}

.section-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 11px;
  color: #a2a8ff;
  background: rgba(88, 101, 242, 0.09);
}

.section-icon svg {
  width: 19px;
  height: 19px;
}

.section-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 9px;
}

.content-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  padding: 15px;
}

.groups-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.games-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.friends-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.collectibles-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid > .list-placeholder {
  grid-column: 1 / -1;
}

/* Generic content cards for JavaScript-generated items. */

.content-grid > a,
.content-grid > button,
.content-grid > article,
.content-grid > .group-card,
.content-grid > .game-card,
.content-grid > .friend-card,
.content-grid > .collectible-card,
.content-grid > .list-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition:
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.content-grid > a:hover,
.content-grid > button:hover,
.content-grid > article:hover,
.content-grid > .group-card:hover,
.content-grid > .game-card:hover,
.content-grid > .friend-card:hover,
.content-grid > .collectible-card:hover,
.content-grid > .list-item:hover {
  border-color: #3a3a3a;
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.content-grid > a img,
.content-grid > button img,
.content-grid > article img,
.content-grid > .group-card img,
.content-grid > .game-card img,
.content-grid > .friend-card img,
.content-grid > .collectible-card img,
.content-grid > .list-item img {
  width: 100%;
  max-height: 145px;
  border-radius: 8px;
  object-fit: cover;
}

.content-grid > .friends-grid img {
  max-width: 76px;
}

.content-grid h3,
.content-grid h4 {
  max-width: 100%;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.content-grid p {
  max-width: 100%;
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--text-secondary);
  font-size: 10px;
}

/* =========================================
   PAGINATION
   ========================================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 3px 15px 0;
}

.pagination-button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px;
  cursor: pointer;
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.pagination-button:not(:disabled):hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--panel-hover);
}

.pagination-page {
  min-width: 18px;
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* =========================================
   SETTINGS MODAL
   ========================================= */

.modal-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: modal-backdrop-in 180ms ease both;
}

.modal-panel {
  width: min(100%, 830px);
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #333;
  border-radius: 19px;
  background: #151515;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
  animation: modal-panel-in 220ms ease both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 83px;
  gap: 16px;
  padding: 17px 23px;
  border-bottom: 1px solid var(--border);
}

.modal-header .eyebrow {
  margin-bottom: 2px;
}

.modal-header h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.modal-close {
  width: 36px;
  height: 36px;
}

.settings-layout {
  display: grid;
  min-height: 410px;
  max-height: calc(100vh - 132px);
  grid-template-columns: 205px minmax(0, 1fr);
}

.settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 11px;
  border-right: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.settings-nav-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.settings-nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.settings-nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.settings-nav-item.active {
  border-color: rgba(88, 101, 242, 0.19);
  color: #c0c4ff;
  background: rgba(88, 101, 242, 0.13);
}

.settings-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding: 13px 10px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.settings-version {
  font-size: 11px;
  font-weight: 800;
}

.settings-version-number {
  color: var(--text-muted);
  font-size: 9px;
}

.settings-content {
  min-width: 0;
  overflow-y: auto;
  padding: 24px;
  scrollbar-color: #414141 transparent;
  scrollbar-width: thin;
}

.settings-tab-content {
  animation: fade-up 200ms ease both;
}

.settings-section-heading {
  margin-bottom: 21px;
}

.settings-section-heading h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.settings-section-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.7;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.setting-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.setting-info > label {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.setting-info > p {
  max-width: 410px;
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.65;
}

.setting-row-stacked {
  align-items: stretch;
  flex-direction: column;
  gap: 13px;
}

/* =========================================
   SWITCHES
   ========================================= */

.switch {
  position: relative;
  display: inline-flex;
  width: 39px;
  height: 23px;
  flex-shrink: 0;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid #414141;
  border-radius: 30px;
  background: #292929;
  transition:
    background var(--transition),
    border-color var(--transition);
}

.switch-track::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #a1a1aa;
  content: "";
  transition:
    transform var(--transition),
    background var(--transition);
}

.switch input:checked + .switch-track {
  border-color: var(--accent);
  background: var(--accent);
}

.switch input:checked + .switch-track::before {
  background: white;
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid #a5adff;
  outline-offset: 3px;
}

/* =========================================
   SETTINGS SELECT
   ========================================= */

.settings-select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #383838;
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: #1a1a1a;
  cursor: pointer;
  font-size: 11px;
  transition: border-color var(--transition);
}

.settings-select:focus {
  border-color: var(--accent);
}

.settings-select option {
  color: var(--text);
  background: #1a1a1a;
}

/* =========================================
   RANGE CONTROLS
   ========================================= */

.range-control {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.range-control input[type="range"] {
  width: 100%;
  height: 5px;
  margin: 7px 0;
  border-radius: 20px;
  outline: none;
  accent-color: var(--accent);
  background: #303030;
  cursor: pointer;
}

.range-control input[type="range"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 10px;
}

/* =========================================
   SETTINGS INFO
   ========================================= */

.settings-info-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 19px;
  padding: 13px;
  border: 1px solid rgba(88, 101, 242, 0.18);
  border-radius: 10px;
  background: rgba(88, 101, 242, 0.065);
}

.settings-info-card svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #9da4ff;
}

.settings-info-card p {
  margin: 0;
  color: #b7b8d3;
  font-size: 10px;
  line-height: 1.7;
}

/* =========================================
   FOOTER
   ========================================= */

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-brand-name {
  font-size: 12px;
  font-weight: 800;
}

.footer-brand > span:last-child {
  color: var(--text-muted);
  font-size: 10px;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 10px;
  text-align: right;
}

/* =========================================
   ANIMATION KEYFRAMES
   ========================================= */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-panel-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================
   OPTIONAL SETTINGS CLASSES
   script.js can toggle these on <html> or <body>
   ========================================= */

html.no-animations *,
html.no-animations *::before,
html.no-animations *::after {
  animation: none !important;
  scroll-behavior: auto !important;
  transition: none !important;
}

html.no-background-motion body::before {
  animation: none !important;
}

html.no-background-motion body::before {
  transform: none !important;
}

html.no-hover-animations .metric-card:hover,
html.no-hover-animations .content-grid > a:hover,
html.no-hover-animations .content-grid > button:hover,
html.no-hover-animations .content-grid > article:hover,
html.no-hover-animations .content-grid > .group-card:hover,
html.no-hover-animations .content-grid > .game-card:hover,
html.no-hover-animations .content-grid > .friend-card:hover,
html.no-hover-animations .content-grid > .collectible-card:hover {
  transform: none !important;
}

html.no-panel-motion .modal-panel,
html.no-panel-motion .settings-tab-content {
  animation: none !important;
}

html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================
   RESPONSIVE: MEDIUM SCREENS
   ========================================= */

@media (max-width: 1200px) {
  .app {
    width: min(100% - 36px, 1600px);
  }

  .dashboard {
    grid-template-columns: minmax(240px, 270px) minmax(0, 1fr);
    gap: 16px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 128px;
  }

  .games-grid,
  .friends-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collectibles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .section-heading-actions .section-search {
    width: min(220px, 60%);
  }
}

/* =========================================
   RESPONSIVE: TABLETS
   ========================================= */

@media (max-width: 850px) {
  .app {
    width: min(100% - 30px, 700px);
  }

  .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 13px;
  }

  .profile-card,
  .sidebar-badges {
    grid-row: span 2;
  }

  .profile-stats-panel,
  .account-signals,
  .avatar-tools {
    align-self: start;
  }

  .dashboard-main {
    gap: 15px;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collectibles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .header-subtitle {
    display: none;
  }

  .header-center {
    display: none;
  }

  .topbar {
    justify-content: space-between;
  }
}

/* =========================================
   RESPONSIVE: MOBILE
   ========================================= */

@media (max-width: 560px) {
  .app {
    width: calc(100% - 24px);
  }

  .topbar {
    min-height: 66px;
    gap: 10px;
  }

  .brand {
    gap: 8px;
    font-size: 17px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .search-section {
    padding-top: 24px;
  }

  .search-heading h1 {
    font-size: 25px;
  }

  .search-heading p {
    max-width: 330px;
    font-size: 12px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-input-wrapper {
    flex: auto;
    width: 100%;
  }

  .search-form .primary-button {
    width: 100%;
  }

  .dashboard {
    padding-top: 4px;
  }

  .profile-sidebar {
    display: flex;
    flex-direction: column;
  }

  .profile-sidebar > * {
    width: 100%;
  }

  .profile-cover {
    height: 95px;
  }

  .profile-card-content {
    padding: 0 16px 16px;
  }

  .dashboard-welcome {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-welcome h2 {
    font-size: 21px;
  }

  .dashboard-user-chip {
    align-self: flex-start;
  }

  .metrics-grid {
    gap: 9px;
  }

  .metric-card {
    min-height: 125px;
    padding: 12px;
  }

  .metric-label {
    font-size: 10px;
  }

  .metric-icon {
    width: 28px;
    height: 28px;
  }

  .metric-value {
    font-size: 24px;
  }

  .metric-description {
    font-size: 9px;
  }

  .section-heading {
    padding: 14px;
  }

  .section-heading-title {
    gap: 9px;
  }

  .section-heading-title h2 {
    font-size: 12px;
  }

  .section-heading-title p {
    font-size: 9px;
  }

  .section-icon {
    width: 34px;
    height: 34px;
  }

  .content-grid {
    gap: 8px;
    padding: 12px;
  }

  .groups-grid,
  .games-grid,
  .friends-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collectibles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid > a,
  .content-grid > button,
  .content-grid > article,
  .content-grid > .group-card,
  .content-grid > .game-card,
  .content-grid > .friend-card,
  .content-grid > .collectible-card,
  .content-grid > .list-item {
    padding: 9px;
  }

  .section-heading-actions {
    flex-wrap: wrap;
  }

  .section-heading-actions .section-search {
    width: 100%;
    max-width: none;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .footer-disclaimer {
    text-align: left;
  }

  /* Settings become a vertically scrollable mobile modal. */

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 19px 19px 0 0;
    border-bottom: 0;
  }

  .modal-header {
    min-height: 72px;
    padding: 13px 17px;
  }

  .settings-layout {
    display: flex;
    max-height: calc(92vh - 72px);
    flex-direction: column;
  }

  .settings-sidebar {
    display: flex;
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }

  .settings-sidebar::-webkit-scrollbar {
    display: none;
  }

  .settings-nav-item {
    min-width: max-content;
    min-height: 37px;
    gap: 7px;
    padding: 0 10px;
    font-size: 10px;
  }

  .settings-nav-item svg {
    width: 15px;
    height: 15px;
  }

  .settings-sidebar-footer {
    display: none;
  }

  .settings-content {
    padding: 19px 17px 28px;
  }

  .settings-section-heading h3 {
    font-size: 15px;
  }

  .setting-row {
    gap: 12px;
  }

  .setting-info > p {
    font-size: 10px;
  }
}

/* =========================================
   RESPONSIVE: SMALL MOBILE
   ========================================= */

@media (max-width: 360px) {
  .app {
    width: calc(100% - 18px);
  }

  .brand {
    font-size: 15px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    padding: 10px;
  }

  .metric-value {
    font-size: 21px;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .groups-grid,
  .games-grid,
  .friends-grid,
  .collectibles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-nav-item {
    padding: 0 8px;
  }
}