.gz-zui-rank {
  --gz-zui-bg: linear-gradient(145deg, #ffffff, #eef6fb);
  --gz-zui-border: rgba(15, 23, 42, 0.08);
  --gz-zui-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --gz-zui-text: #0f172a;
  --gz-zui-muted: #64748b;
  --gz-zui-accent: #0284c7;
  --gz-zui-accent-soft: rgba(2, 132, 199, 0.12);
  --gz-zui-panel: rgba(255, 255, 255, 0.9);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--gz-zui-text);
}

.gz-zui-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gz-zui-border);
  border-radius: 28px;
  background: var(--gz-zui-bg);
  box-shadow: var(--gz-zui-shadow);
  padding: 28px;
}

.gz-zui-shell::before,
.gz-zui-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(28px);
  opacity: 0.6;
}

.gz-zui-shell::before {
  width: 220px;
  height: 220px;
  top: -90px;
  right: -60px;
  background: rgba(14, 165, 233, 0.16);
}

.gz-zui-shell::after {
  width: 180px;
  height: 180px;
  bottom: -80px;
  left: -50px;
  background: rgba(251, 191, 36, 0.16);
}

.gz-zui-header,
.gz-zui-toolbar,
.gz-zui-status-bar,
.gz-zui-stats,
.gz-zui-top-three,
.gz-zui-list {
  position: relative;
  z-index: 1;
}

.gz-zui-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gz-zui-header-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.gz-zui-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gz-zui-header-actions {
  margin-left: auto;
}

.gz-zui-kicker {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gz-zui-accent-soft);
  color: var(--gz-zui-accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gz-zui-header-title {
  margin: 12px 0 0;
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.12;
}

.gz-zui-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gz-zui-type-tabs.is-hidden,
.gz-zui-header-meta.is-hidden,
.gz-zui-filters.is-hidden,
.gz-zui-refresh.is-hidden,
.gz-zui-stats.is-hidden,
.gz-zui-top-three.is-hidden {
  display: none !important;
}

.gz-zui-type-tab,
.gz-zui-filter-button,
.gz-zui-refresh {
  border: none;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.gz-zui-type-tab {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #475569;
  font-weight: 700;
}

.gz-zui-type-tab.is-active {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: #fff;
  box-shadow: 0 10px 30px rgba(29, 78, 216, 0.25);
}

.gz-zui-more-button {
  display: none;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.gz-zui-more-button:hover {
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7;
}

.gz-zui-header-meta {
  min-width: 180px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  text-align: right;
}

.gz-zui-meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--gz-zui-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gz-zui-last-updated {
  font-size: 14px;
}

.gz-zui-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.gz-zui-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gz-zui-filter-button {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--gz-zui-muted);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-weight: 600;
}

.gz-zui-filter-button.is-active {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}

.gz-zui-refresh {
  padding: 12px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #fff;
  font-weight: 700;
}

.gz-zui-type-tab:hover,
.gz-zui-filter-button:hover,
.gz-zui-refresh:hover,
.gz-zui-top-card:hover,
.gz-zui-list-item:hover {
  transform: translateY(-2px);
}

.gz-zui-status-bar {
  margin-top: 16px;
}

.gz-zui-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
  font-size: 13px;
  font-weight: 600;
}

.gz-zui-status.is-cached {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.gz-zui-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.gz-zui-stat-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(12px);
}

.gz-zui-stat-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gz-zui-muted);
  font-size: 13px;
}

.gz-zui-stat-value {
  font-size: 22px;
}

.gz-zui-top-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.gz-zui-top-card,
.gz-zui-list-item {
  text-decoration: none;
  color: inherit;
}

.gz-zui-top-card {
  position: relative;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.gz-zui-top-card.top-1 {
  background: linear-gradient(180deg, rgba(255, 250, 232, 0.98), rgba(255, 237, 199, 0.82));
}

.gz-zui-top-card.top-2 {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.85));
}

.gz-zui-top-card.top-3 {
  background: linear-gradient(180deg, rgba(255, 244, 235, 0.98), rgba(254, 215, 170, 0.85));
}

.gz-zui-top-card-badge img {
  width: 46px;
  height: 46px;
}

.gz-zui-top-rank {
  margin-top: 8px;
  color: var(--gz-zui-muted);
  font-weight: 700;
}

.gz-zui-top-avatar img,
.gz-zui-list-avatar img {
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.gz-zui-top-avatar,
.gz-zui-list-avatar {
  position: relative;
}

.gz-zui-avatar-icon {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.gz-zui-avatar-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gz-zui-top-avatar img {
  width: 84px;
  height: 84px;
  margin: 12px auto 0;
  border: 4px solid rgba(255, 255, 255, 0.8);
}

.gz-zui-top-name-line,
.gz-zui-list-name-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gz-zui-list-name-line {
  justify-content: flex-start;
}

.gz-zui-inline-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.gz-zui-member-badge {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #21d4a7, #11b981);
  display: inline-flex;
  position: relative;
  flex: 0 0 14px;
}

.gz-zui-member-badge::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}

.gz-zui-top-name {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 800;
}

.gz-zui-top-subtitle,
.gz-zui-top-secondary {
  margin-top: 8px;
  color: var(--gz-zui-muted);
  font-size: 13px;
}

.gz-zui-top-primary {
  margin-top: 10px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
}

.gz-zui-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 14px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.gz-zui-status-pill.status-spending,
.gz-zui-status-pill.status-comments {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
}

.gz-zui-status-pill.status-active {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.gz-zui-status-pill.status-permanent {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.gz-zui-status-pill.status-expired {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.gz-zui-status-pill.status-unknown {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.gz-zui-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.gz-zui-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.gz-zui-list-item {
  display: grid;
  grid-template-columns: 50px 56px minmax(0, 1fr) minmax(140px, auto) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.gz-zui-list-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-weight: 800;
}

.gz-zui-list-item.top-1 .gz-zui-list-rank {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
}

.gz-zui-list-item.top-2 .gz-zui-list-rank {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  color: #fff;
}

.gz-zui-list-item.top-3 .gz-zui-list-rank {
  background: linear-gradient(135deg, #fdba74, #ea580c);
  color: #fff;
}

.gz-zui-list-avatar img {
  width: 52px;
  height: 52px;
}

.gz-zui-list-user strong,
.gz-zui-list-metric strong {
  display: block;
}

.gz-zui-list-user span,
.gz-zui-list-metric span {
  display: block;
  margin-top: 4px;
  color: var(--gz-zui-muted);
  font-size: 13px;
}

.gz-zui-list-metric {
  text-align: right;
}

.gz-zui-list-cta {
  display: flex;
  justify-content: flex-end;
}

.gz-zui-list-cta .gz-zui-status-pill {
  margin-top: 0;
}

.gz-zui-empty,
.gz-zui-inline-notice {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(148, 163, 184, 0.3);
  color: var(--gz-zui-muted);
  text-align: center;
}

.gz-zui-layout-list .gz-zui-top-three,
.gz-zui-layout-compact .gz-zui-top-three,
.gz-zui-layout-sidebar .gz-zui-top-three {
  display: none;
}

.gz-zui-layout-list .gz-zui-list-item,
.gz-zui-layout-compact .gz-zui-list-item {
  grid-template-columns: 46px 52px minmax(0, 1fr) minmax(128px, auto) auto;
}

.gz-zui-layout-sidebar .gz-zui-shell {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gz-zui-layout-sidebar .gz-zui-shell::before,
.gz-zui-layout-sidebar .gz-zui-shell::after,
.gz-zui-layout-sidebar .gz-zui-kicker {
  display: none;
}

.gz-zui-layout-sidebar .gz-zui-header {
  gap: 10px;
}

.gz-zui-layout-sidebar .gz-zui-header-top {
  align-items: center;
  gap: 12px;
}

.gz-zui-layout-sidebar .gz-zui-header-main {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.gz-zui-layout-sidebar .gz-zui-header-title {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
}

.gz-zui-layout-sidebar .gz-zui-type-tabs {
  flex: 1 1 auto;
  min-width: 0;
  gap: 16px;
  margin-top: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gz-zui-layout-sidebar .gz-zui-type-tabs::-webkit-scrollbar {
  display: none;
}

.gz-zui-layout-sidebar .gz-zui-type-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0 0 7px;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  box-shadow: none;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}

.gz-zui-layout-sidebar .gz-zui-type-tab:hover,
.gz-zui-layout-sidebar .gz-zui-type-tab.is-active {
  transform: none;
}

.gz-zui-layout-sidebar .gz-zui-type-tab.is-active {
  border-bottom-color: #0ea5e9;
  background: transparent;
  box-shadow: none;
  color: #0ea5e9;
}

.gz-zui-layout-sidebar .gz-zui-header-actions {
  flex: 0 0 auto;
  margin-left: 0;
  gap: 10px;
}

.gz-zui-layout-sidebar .gz-zui-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 34px;
  padding: 0 14px;
  white-space: nowrap;
  border-color: rgba(15, 23, 42, 0.18);
  color: #374151;
  font-size: 12px;
}

.gz-zui-layout-sidebar .gz-zui-header-meta,
.gz-zui-layout-sidebar .gz-zui-toolbar,
.gz-zui-layout-sidebar .gz-zui-status-bar,
.gz-zui-layout-sidebar .gz-zui-stats {
  display: none !important;
}

.gz-zui-layout-sidebar .gz-zui-list {
  gap: 16px;
  margin-top: 16px;
}

.gz-zui-layout-sidebar .gz-zui-list-item {
  grid-template-columns: 26px 56px minmax(0, 1fr) 70px;
  gap: 10px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gz-zui-layout-sidebar .gz-zui-list-item:hover {
  transform: none;
}

.gz-zui-layout-sidebar .gz-zui-list-rank {
  width: 22px;
  height: 22px;
  background: #ececec;
  color: #555;
  font-size: 12px;
}

.gz-zui-layout-sidebar .gz-zui-list-item.top-1 .gz-zui-list-rank {
  background: #f6c844;
  color: #2d2d2d;
}

.gz-zui-layout-sidebar .gz-zui-list-item.top-2 .gz-zui-list-rank {
  background: #d6e3ea;
  color: #475569;
}

.gz-zui-layout-sidebar .gz-zui-list-item.top-3 .gz-zui-list-rank {
  background: #d9b084;
  color: #46321d;
}

.gz-zui-layout-sidebar .gz-zui-list-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f0f2f5;
}

.gz-zui-layout-sidebar .gz-zui-avatar-icon {
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  padding: 2px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}

.gz-zui-layout-sidebar .gz-zui-list-user {
  min-width: 0;
}

.gz-zui-layout-sidebar .gz-zui-list-name-line {
  gap: 6px;
  min-width: 0;
}

.gz-zui-layout-sidebar .gz-zui-list-user strong {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gz-zui-layout-sidebar .gz-zui-list-user span {
  margin-top: 4px;
  color: #99a1af;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gz-zui-layout-sidebar .gz-zui-list-metric,
.gz-zui-layout-sidebar .gz-zui-status-pill {
  display: none;
}

.gz-zui-layout-sidebar .gz-zui-list-cta {
  justify-content: flex-end;
}

.gz-zui-layout-sidebar .gz-zui-inline-icon {
  display: none;
}

.gz-zui-layout-sidebar .gz-zui-action-button {
  min-width: 60px;
  min-height: 34px;
  padding: 0 14px;
  background: linear-gradient(135deg, #12b6f5, #049be5);
  box-shadow: none;
  font-size: 12px;
}

.gz-zui-layout-sidebar .gz-zui-member-badge {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.gz-zui-layout-sidebar .gz-zui-member-badge::after {
  inset: 3px;
}

.gz-zui-layout-sidebar .gz-zui-empty {
  padding: 8px 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #9ca3af;
  text-align: left;
}

.gz-zui-layout-compact .gz-zui-shell {
  padding: 22px;
}

.gz-zui-layout-compact .gz-zui-header-title {
  font-size: 24px;
}

.gz-zui-layout-compact .gz-zui-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gz-zui-rank.is-loading {
  opacity: 0.92;
}

@media (max-width: 991px) {
  .gz-zui-header,
  .gz-zui-header-top,
  .gz-zui-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .gz-zui-header-meta {
    text-align: left;
  }

  .gz-zui-stats,
  .gz-zui-top-three {
    grid-template-columns: 1fr;
  }

  .gz-zui-list-item {
    grid-template-columns: 44px 52px minmax(0, 1fr);
  }

  .gz-zui-layout-sidebar .gz-zui-list-item {
    grid-template-columns: 24px 50px minmax(0, 1fr) 64px;
  }

  .gz-zui-list-metric,
  .gz-zui-list-cta {
    grid-column: 1 / -1;
    padding-left: 58px;
    text-align: left;
    justify-content: flex-start;
  }

  .gz-zui-layout-sidebar .gz-zui-list-cta {
    grid-column: auto;
    padding-left: 36px;
    justify-content: flex-end;
  }

  .gz-zui-layout-sidebar .gz-zui-header-top {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .gz-zui-shell {
    padding: 18px;
    border-radius: 22px;
  }

  .gz-zui-type-tabs,
  .gz-zui-filters {
    gap: 8px;
  }

  .gz-zui-type-tab,
  .gz-zui-filter-button {
    width: 100%;
    justify-content: center;
  }

  .gz-zui-stats {
    grid-template-columns: 1fr;
  }

  .gz-zui-layout-sidebar .gz-zui-type-tab {
    width: auto;
  }

  .gz-zui-layout-sidebar .gz-zui-header-title {
    font-size: 16px;
  }

  .gz-zui-layout-sidebar .gz-zui-type-tabs {
    gap: 12px;
  }

  .gz-zui-layout-sidebar .gz-zui-more-button {
    min-width: 70px;
    padding: 0 12px;
  }

  .gz-zui-layout-sidebar .gz-zui-list-item {
    grid-template-columns: 22px 46px minmax(0, 1fr) 62px;
    gap: 8px;
  }

  .gz-zui-layout-sidebar .gz-zui-list-avatar img {
    width: 46px;
    height: 46px;
  }
}
