:root {
  --bg: #080a10;
  --panel: rgba(15, 18, 27, 0.86);
  --panel-solid: #10131d;
  --line: rgba(141, 153, 190, 0.16);
  --line-strong: rgba(177, 190, 235, 0.28);
  --text: #f4f7ff;
  --muted: #77819d;
  --soft: #aab8ee;
  --blue: #1479ff;
  --blue-soft: rgba(20, 121, 255, 0.18);
  --red: #ff3969;
  --green: #13c98b;
  --gold: #f0a31b;
  --violet: #8857ff;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(20, 121, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 84% 8%, rgba(255, 57, 105, 0.12), transparent 26rem),
    linear-gradient(180deg, #090b12 0%, #06070b 100%);
  color: var(--text);
  font-family: Sora, sans-serif;
}

button,
input,
select {
  font: inherit;
}

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

@keyframes ambient-drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(18px, -12px, 0) rotate(8deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(20, 121, 255, 0); }
  50% { box-shadow: 0 0 28px rgba(20, 121, 255, 0.22); }
}

@keyframes shimmer-pass {
  from { transform: translateX(-140%) skewX(-18deg); }
  to { transform: translateX(240%) skewX(-18deg); }
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.48; transform: scale(1); }
  50% { opacity: 0.86; transform: scale(1.08); }
}

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

@keyframes menu-drop {
  from { transform: translateY(-4px); }
  to { transform: translateY(0); }
}

.page-shell {
  isolation: isolate;
  margin: 0 auto;
  min-height: 100vh;
  overflow: hidden;
  padding: 30px 24px 24px;
  position: relative;
  width: min(1840px, 100%);
}

.page-shell--narrow {
  width: min(1040px, 100%);
}

.page-shell--player {
  width: min(1180px, 100%);
}

.site-orbit {
  animation: ambient-drift 12s ease-in-out infinite;
  border: 1px solid rgba(80, 132, 255, 0.13);
  border-radius: 999px;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.site-orbit--one {
  height: 460px;
  right: -160px;
  top: -210px;
  width: 460px;
}

.site-orbit--two {
  bottom: 60px;
  height: 280px;
  left: -130px;
  width: 280px;
}

.loading-card,
.table-card,
.performance-card,
.player-hero {
  animation: rise-in 520ms cubic-bezier(0.19, 1, 0.22, 1) both;
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.table-card {
  overflow: hidden;
}

.loading-card {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 160px;
  padding: 32px;
  text-align: center;
}

.loading-card--error {
  border-color: rgba(255, 57, 105, 0.35);
  color: #ff7b98;
}

.table-toolbar {
  align-items: flex-start;
  animation: toolbar-in 520ms cubic-bezier(0.19, 1, 0.22, 1) 120ms both;
  background:
    radial-gradient(circle at 88% 20%, rgba(20, 121, 255, 0.13), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 30px 22px 28px;
  position: relative;
  z-index: 60;
}

.table-toolbar h1,
.performance-header h2,
.player-hero h1 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
  margin: 0;
}

.table-toolbar h1 {
  font-size: 15px;
}

.table-toolbar p,
.performance-header p,
.period-row {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.toolbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.search-box {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    #0b0d14;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  display: flex;
  gap: 9px;
  min-height: 44px;
  min-width: 284px;
  padding: 0 13px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-box:focus-within {
  border-color: rgba(72, 164, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(20, 121, 255, 0.12), 0 14px 34px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.search-box__icon {
  fill: none;
  flex: 0 0 auto;
  height: 18px;
  stroke: #8793b1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: stroke 180ms ease, transform 180ms ease;
  width: 18px;
}

.search-box:focus-within .search-box__icon {
  stroke: #7fb0ff;
  transform: scale(1.06);
}

.search-box input {
  background: transparent;
  border: 0;
  color: var(--text);
  outline: none;
  width: 100%;
}

.ghost-button,
.export-button,
.details-toggle,
.pagination button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
}

.ghost-button,
.pagination button {
  background: rgba(255, 255, 255, 0.02);
}

.filter-toggle {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #0b0d14;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #aab8ee;
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px 0 10px;
  transition: border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.filter-toggle:hover {
  border-color: rgba(72, 164, 255, 0.42);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  color: #f4f7ff;
  transform: translateY(-1px);
}

.filter-toggle input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.toggle-track {
  background: rgba(100, 116, 151, 0.26);
  border: 1px solid rgba(177, 190, 235, 0.2);
  border-radius: 999px;
  display: inline-flex;
  height: 24px;
  padding: 2px;
  transition: background 180ms ease, border-color 180ms ease;
  width: 46px;
}

.toggle-dot {
  background: linear-gradient(180deg, #d7def8, #7f8cab);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
  height: 18px;
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.19, 1, 0.22, 1), background 180ms ease;
  width: 18px;
}

.filter-toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, rgba(20, 121, 255, 0.92), rgba(19, 201, 139, 0.9));
  border-color: rgba(127, 176, 255, 0.64);
}

.filter-toggle input:checked + .toggle-track .toggle-dot {
  background: #fff;
  transform: translateX(20px);
}

.toggle-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.column-menu-wrap {
  position: relative;
}

.show-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #0b0d14;
  gap: 9px;
  min-height: 44px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.show-button:hover,
.show-button[aria-expanded="true"] {
  border-color: rgba(72, 164, 255, 0.42);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.columns-button__icon {
  fill: none;
  height: 17px;
  stroke: #8aa4d7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.show-button small {
  background: rgba(20, 121, 255, 0.14);
  border: 1px solid rgba(72, 164, 255, 0.25);
  border-radius: 999px;
  color: #9dc3ff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 7px;
}

.column-menu {
  animation: menu-drop 160ms ease both;
  background: #08101f;
  border: 1px solid rgba(141, 153, 190, 0.24);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  isolation: isolate;
  min-width: 320px;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 80;
}

.column-menu::before {
  background:
    radial-gradient(circle at 96% 0%, rgba(20, 121, 255, 0.16), transparent 9rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
  border-radius: inherit;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.column-menu[hidden] {
  display: none;
}

.column-menu__top {
  border-bottom: 1px solid rgba(141, 153, 190, 0.12);
  display: grid;
  gap: 10px;
  padding: 2px 2px 12px;
}

.column-menu__top strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
}

.column-menu__top span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
}

.column-menu__actions {
  display: flex;
  gap: 8px;
}

.column-menu__actions button {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(141, 153, 190, 0.14);
  border-radius: 999px;
  color: #bdd0ff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  min-height: 28px;
  padding: 0 10px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.column-menu__actions button:hover {
  background: rgba(20, 121, 255, 0.14);
  border-color: rgba(72, 164, 255, 0.32);
  transform: translateY(-1px);
}

.column-option-list {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  max-height: 330px;
  overflow: auto;
  padding-right: 3px;
  scrollbar-color: rgba(141, 153, 190, 0.36) transparent;
  scrollbar-width: thin;
}

.column-option {
  align-items: center;
  border-radius: 10px;
  color: #d8e2ff;
  cursor: pointer;
  display: grid;
  font-size: 12px;
  gap: 9px;
  grid-template-columns: 18px minmax(0, 1fr) 48px;
  min-height: 34px;
  padding: 0 8px;
  transition: background 150ms ease, color 150ms ease;
}

.column-option:hover {
  background: rgba(255, 255, 255, 0.045);
}

.column-option input {
  accent-color: var(--blue);
  height: 14px;
  margin: 0;
  width: 14px;
}

.column-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-option small {
  color: var(--muted);
  font-size: 10px;
  justify-self: end;
  text-transform: uppercase;
}

.column-option.is-locked {
  cursor: default;
  opacity: 0.78;
}

.export-button {
  background:
    linear-gradient(135deg, rgba(20, 121, 255, 0.98), rgba(0, 196, 255, 0.64)),
    #1479ff;
  border-color: rgba(127, 176, 255, 0.56);
  box-shadow: 0 14px 34px rgba(20, 121, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  gap: 9px;
  min-height: 44px;
  overflow: hidden;
  padding: 0 18px;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.export-button::after {
  animation: glow-breathe 2.8s ease-in-out infinite;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.38), transparent 62%);
  content: "";
  height: 70px;
  pointer-events: none;
  position: absolute;
  right: -22px;
  top: -24px;
  width: 70px;
}

.export-button:hover {
  box-shadow: 0 18px 42px rgba(20, 121, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  filter: saturate(1.12);
  transform: translateY(-2px);
}

.export-button:active {
  transform: translateY(0);
}

.export-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.export-button__shine {
  animation: shimmer-pass 2.9s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  height: 130%;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: -12%;
  width: 45%;
}

.export-button__icon {
  fill: none;
  height: 18px;
  position: relative;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
  z-index: 1;
}

.export-button__label {
  font-weight: 900;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.export-button.is-exporting .export-button__icon {
  animation: pulse-glow 900ms ease-in-out infinite;
}

.overview-strip {
  background:
    linear-gradient(90deg, rgba(20, 121, 255, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
  z-index: 1;
}

.overview-strip div {
  border-right: 1px solid rgba(141, 153, 190, 0.1);
  padding: 16px 20px;
}

.overview-strip span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.overview-strip strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
}

.table-scroll {
  max-height: min(68vh, 760px);
  overflow: auto;
  position: relative;
  scrollbar-color: rgba(141, 153, 190, 0.36) rgba(255, 255, 255, 0.04);
  scrollbar-width: thin;
  z-index: 1;
}

.table-scroll::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(141, 153, 190, 0.34);
  border-radius: 999px;
}

.governor-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 3400px;
  width: 100%;
}

.governor-table th,
.governor-table td {
  border-bottom: 1px solid rgba(141, 153, 190, 0.09);
  color: var(--soft);
  font-size: 14px;
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
}

.governor-table th {
  background: rgba(16, 19, 29, 0.96);
  color: #8e99b8;
  font-size: 13px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 4;
}

.governor-table .governor-name-col {
  background:
    linear-gradient(90deg, #0b0d14 0%, #0b0d14 84%, rgba(11, 13, 20, 0.92) 100%);
  box-shadow: 22px 0 34px rgba(0, 0, 0, 0.48);
  left: 0;
  position: sticky;
  z-index: 3;
}

.governor-table th.governor-name-col {
  background:
    linear-gradient(90deg, #10131d 0%, #10131d 84%, rgba(16, 19, 29, 0.94) 100%);
  z-index: 7;
}

.governor-table tbody tr:hover .governor-name-col {
  background:
    linear-gradient(90deg, #101827 0%, #101827 84%, rgba(16, 24, 39, 0.94) 100%);
}

.governor-table tbody tr {
  animation: rise-in 420ms cubic-bezier(0.19, 1, 0.22, 1) both;
  animation-delay: calc(var(--row-index, 0) * 24ms);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.governor-table tbody tr:hover {
  background: rgba(20, 121, 255, 0.07);
  box-shadow: inset 3px 0 0 rgba(20, 121, 255, 0.75);
  transform: translateX(2px);
}

.empty-state {
  text-align: center;
}

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

.governor-link strong,
.power-cell {
  color: #fff;
  font-weight: 800;
}

.governor-link small,
.alliance-cell small,
.muted-cell {
  color: var(--muted);
  display: block;
  font-size: 11px;
}

.alliance-cell {
  text-align: center;
}

.governor-name-col {
  min-width: 270px;
}

.table-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
}

.table-footer label,
.pagination {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 10px;
  font-size: 13px;
}

.table-footer select {
  background: #0b0d14;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  min-height: 34px;
  padding: 0 12px;
}

.page-number-list {
  align-items: center;
  display: flex;
  gap: 6px;
}

.pagination .page-number {
  min-width: 36px;
  padding: 0 10px;
}

.pagination .page-number.is-active {
  background:
    linear-gradient(135deg, rgba(20, 121, 255, 0.94), rgba(0, 196, 255, 0.52)),
    #1479ff;
  border-color: rgba(127, 176, 255, 0.58);
  color: #fff;
  font-weight: 900;
}

.page-ellipsis {
  color: #59647f;
  font-size: 13px;
  min-width: 24px;
  text-align: center;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.player-avatar {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  position: relative;
}

.player-avatar--sm {
  height: 42px;
  width: 42px;
}

.player-avatar--lg {
  height: 144px;
  width: 144px;
}

.player-avatar__image,
.player-avatar__fallback {
  border-radius: 999px;
  height: 74%;
  inset: 13%;
  object-fit: cover;
  position: absolute;
  width: 74%;
}

.player-avatar__image {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.player-avatar__fallback {
  align-items: center;
  background: linear-gradient(135deg, #1f6fff, #fe425e);
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
}

.player-avatar__frame {
  height: 100%;
  left: 0;
  object-fit: contain;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 2;
}

.back-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(141, 153, 190, 0.16);
  border-radius: 999px;
  color: #7fb0ff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 16px;
  min-height: 36px;
  padding: 0 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.back-link:hover {
  border-color: rgba(72, 164, 255, 0.42);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.player-hero {
  background:
    radial-gradient(circle at top right, rgba(20, 121, 255, 0.2), transparent 26rem),
    radial-gradient(circle at 10% 20%, rgba(19, 201, 139, 0.08), transparent 18rem),
    linear-gradient(135deg, rgba(15, 18, 27, 0.94), rgba(9, 11, 18, 0.9));
  min-height: auto;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.player-hero::before {
  background:
    linear-gradient(rgba(141, 153, 190, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 153, 190, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
  position: absolute;
}

.player-hero__identity {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-left: 0;
  position: relative;
  z-index: 1;
}

.player-identity-copy {
  min-width: 0;
}

.eyebrow {
  color: #7fb0ff;
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.player-hero h1 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 0.98;
  max-width: 640px;
  overflow-wrap: anywhere;
}

.player-hero p {
  color: #9aa6c5;
  font-size: 12px;
  margin: 0;
}

.player-hero strong {
  display: inline-block;
  margin-top: 5px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.meta-badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(141, 153, 190, 0.16);
  border-radius: 999px;
  color: #d8e2ff;
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
}

.meta-badge small {
  color: #77819d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-side-stack {
  display: grid;
  gap: 10px;
  min-width: 190px;
}

.hero-updated-card,
.hero-rank-card {
  background:
    linear-gradient(180deg, rgba(20, 121, 255, 0.16), rgba(255, 255, 255, 0.025)),
    rgba(8, 10, 16, 0.48);
  border: 1px solid rgba(72, 164, 255, 0.28);
  border-radius: 18px;
  padding: 15px 16px;
  text-align: right;
}

.hero-updated-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(8, 10, 16, 0.42);
  border-color: rgba(141, 153, 190, 0.16);
  padding: 12px 14px;
}

.hero-updated-card span,
.hero-rank-card span,
.hero-rank-card small {
  color: #8793b1;
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-updated-card strong {
  color: #fff;
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  line-height: 1.25;
  margin-top: 6px;
}

.hero-rank-card strong {
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 34px;
  line-height: 1;
  margin: 4px 0;
}

.hero-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.hero-stat {
  background: rgba(8, 10, 16, 0.44);
  border: 1px solid rgba(141, 153, 190, 0.16);
  border-radius: 16px;
  min-height: 112px;
  padding: 16px;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.hero-stat:hover {
  background: rgba(8, 10, 16, 0.58);
  border-color: rgba(72, 164, 255, 0.28);
  transform: translateY(-2px);
}

.hero-stat span {
  color: #8793b1;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stat strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(23px, 3vw, 32px);
  margin-top: 8px;
}

.hero-stat small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric-pill {
  background: rgba(8, 10, 16, 0.54);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  min-width: 102px;
  padding: 9px 10px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.metric-pill:hover {
  background: rgba(8, 10, 16, 0.72);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.metric-pill strong {
  color: var(--text);
  display: block;
  font-size: 13px;
  margin: 0;
}

.metric-pill span {
  color: var(--muted);
  font-size: 11px;
}

.tone-green strong { color: var(--green); }
.tone-red strong { color: var(--red); }
.tone-gold strong { color: var(--gold); }
.tone-blue strong { color: #48a4ff; }
.tone-violet strong { color: var(--violet); }

.hero-info-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.hero-info-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(141, 153, 190, 0.14);
  border-radius: 14px;
  min-height: 90px;
  padding: 14px 15px;
}

.hero-info-card span {
  color: #77819d;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-info-card strong {
  color: #fff;
  display: block;
  font-size: 16px;
  margin: 7px 0 3px;
  overflow-wrap: anywhere;
}

.hero-info-card small {
  color: #9aa6c5;
  font-size: 12px;
}

.hero-info-card--wide {
  min-width: 0;
}

.lk-records {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.lk-records div {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(141, 153, 190, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
}

.lk-records strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  line-height: 1;
  margin: 0 0 5px;
}

.hero-updated,
.hero-compact {
  bottom: 12px;
  color: #9aa6c5;
  font-size: 11px;
  position: absolute;
  right: 20px;
  z-index: 1;
}

.hero-compact {
  bottom: auto;
  top: 18px;
}

.performance-card {
  margin-top: 16px;
  padding: 20px;
}

.performance-header {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.performance-header h2 {
  font-size: 18px;
}

.performance-header strong {
  color: #1686ff;
}

.details-toggle {
  background: rgba(20, 121, 255, 0.08);
  border-color: rgba(20, 121, 255, 0.48);
  color: #2291ff;
  min-height: 34px;
  padding: 0 12px;
  transition: background 180ms ease, transform 180ms ease;
}

.details-toggle:hover {
  background: rgba(20, 121, 255, 0.14);
  transform: translateY(-1px);
}

.detail-grid {
  animation: rise-in 360ms ease both;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0 0;
}

.detail-grid.is-hidden {
  display: none;
}

.detail-cell {
  background: rgba(255, 255, 255, 0.026);
  border: 1px solid rgba(141, 153, 190, 0.14);
  border-radius: 12px;
  min-height: 68px;
  padding: 12px;
}

.detail-cell strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
}

.detail-cell span {
  color: var(--muted);
  font-size: 11px;
}

.chart-shell {
  height: auto;
  margin-top: 12px;
  overflow: visible;
  position: relative;
}

.snapshot-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.breakdown-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.014)),
    rgba(8, 10, 16, 0.42);
  border: 1px solid rgba(141, 153, 190, 0.14);
  border-radius: 16px;
  padding: 16px;
}

.compact-panel {
  grid-column: 1 / -1;
}

.breakdown-panel__header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.breakdown-panel h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  margin: 0;
}

.breakdown-panel p {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row__top {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 7px;
}

.bar-row__top span {
  color: #c1ccf4;
  font-size: 13px;
  font-weight: 800;
}

.bar-row__top strong {
  color: #fff;
  font-size: 13px;
}

.bar-track {
  background: rgba(141, 153, 190, 0.12);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.bar-track span {
  animation: rise-in 420ms ease both;
  background: linear-gradient(90deg, #6f7f9f, #b8c2e4);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.bar-row.tone-green .bar-track span { background: linear-gradient(90deg, #0f9f70, #13c98b); }
.bar-row.tone-blue .bar-track span { background: linear-gradient(90deg, #1479ff, #59b6ff); }
.bar-row.tone-gold .bar-track span { background: linear-gradient(90deg, #c47a0b, #f0a31b); }
.bar-row.tone-violet .bar-track span { background: linear-gradient(90deg, #6b42dc, #9b78ff); }
.bar-row.tone-red .bar-track span { background: linear-gradient(90deg, #d72f58, #ff668b); }

.activity-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.activity-tile {
  background: rgba(255, 255, 255, 0.026);
  border: 1px solid rgba(141, 153, 190, 0.14);
  border-radius: 13px;
  min-height: 74px;
  padding: 12px;
}

.activity-tile span {
  color: #8793b1;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-tile strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  margin-top: 8px;
}

.site-footer {
  color: #66708d;
  display: flex;
  gap: 18px;
  font-size: 12px;
  justify-content: space-around;
  padding: 30px 0 0;
}

.footer-link {
  background: transparent;
  border: 0;
  color: #7f8aa8;
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition: color 180ms ease, transform 180ms ease;
}

.footer-link:hover {
  color: #7fb0ff;
  transform: translateY(-1px);
}

.info-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 22px;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 50;
}

.info-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.info-modal__overlay {
  backdrop-filter: blur(8px);
  background: rgba(4, 6, 11, 0.72);
  inset: 0;
  position: absolute;
}

.info-modal__card {
  animation: rise-in 260ms cubic-bezier(0.19, 1, 0.22, 1) both;
  background:
    radial-gradient(circle at top right, rgba(20, 121, 255, 0.16), transparent 18rem),
    linear-gradient(135deg, rgba(15, 18, 27, 0.98), rgba(8, 10, 16, 0.96));
  border: 1px solid rgba(141, 153, 190, 0.2);
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-width: 580px;
  padding: 24px;
  position: relative;
  width: min(100%, 580px);
}

.info-modal__card h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 25px;
  letter-spacing: -0.03em;
  margin: 0 36px 12px 0;
}

.info-modal__body {
  color: #b6c2e8;
  display: grid;
  font-size: 13px;
  gap: 10px;
  line-height: 1.65;
}

.info-modal__body p {
  margin: 0;
}

.modal-action-link {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(20, 121, 255, 0.98), rgba(0, 196, 255, 0.64)),
    #1479ff;
  border: 1px solid rgba(127, 176, 255, 0.56);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(20, 121, 255, 0.2);
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  min-height: 40px;
  padding: 0 16px;
}

.modal-action-link:hover {
  transform: translateY(-1px);
}

.info-modal__close {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(141, 153, 190, 0.2);
  border-radius: 999px;
  color: #c8d4f7;
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  position: absolute;
  right: 18px;
  top: 18px;
  transition: background 180ms ease, transform 180ms ease;
  width: 34px;
}

.info-modal__close:hover {
  background: rgba(20, 121, 255, 0.12);
  transform: rotate(8deg);
}

@media (max-width: 900px) {
  .page-shell {
    padding: 12px;
    width: 100%;
  }

  .table-toolbar,
  .performance-header,
  .period-row,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar {
    gap: 16px;
    padding: 20px 16px;
  }

  .table-toolbar h1 {
    font-size: 18px;
    line-height: 1.15;
  }

  .table-toolbar p {
    font-size: 11px;
  }

  .toolbar-actions {
    display: grid;
    gap: 10px;
    justify-content: flex-start;
    width: 100%;
  }

  .search-box {
    min-width: 100%;
  }

  .column-menu-wrap,
  .filter-toggle,
  .show-button,
  .export-button {
    justify-content: center;
    width: 100%;
  }

  .column-menu {
    left: 0;
    min-width: 100%;
    right: 0;
  }

  .overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-strip div {
    padding: 13px 14px;
  }

  .overview-strip strong {
    font-size: 18px;
  }

  .hero-honors {
    grid-template-columns: 1fr;
  }

  .hero-summary-grid,
  .hero-info-grid,
  .snapshot-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-panel {
    grid-column: auto;
  }

  .table-scroll {
    max-height: calc(100vh - 310px);
    min-height: 420px;
  }

  .governor-table {
    min-width: 3000px;
  }

  .governor-table th,
  .governor-table td {
    font-size: 13px;
    padding: 12px 10px;
  }

  .governor-name-col {
    min-width: 218px;
  }

  .governor-link {
    gap: 9px;
  }

  .player-avatar--sm {
    height: 38px;
    width: 38px;
  }

  .table-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 14px 16px;
  }

  .table-footer label {
    justify-content: space-between;
    width: 100%;
  }

  .pagination {
    justify-content: space-between;
    width: 100%;
  }

  .page-number-list {
    flex: 1;
    justify-content: center;
    overflow: hidden;
  }

  .pagination button {
    flex: 0 0 40px;
    padding: 0;
  }

  .pagination .page-number {
    flex-basis: 36px;
    min-width: 36px;
  }

  .page-ellipsis {
    min-width: 18px;
  }

  .player-hero {
    padding: 18px;
  }

  .player-hero__identity {
    align-items: flex-start;
    gap: 16px;
    grid-template-columns: 1fr;
  }

  .player-avatar--lg {
    height: 112px;
    width: 112px;
  }

  .player-hero h1 {
    font-size: 28px;
    line-height: 1.02;
  }

  .hero-meta {
    gap: 7px;
  }

  .meta-badge {
    font-size: 11px;
    min-height: 28px;
  }

  .hero-side-stack,
  .hero-rank-card,
  .hero-updated-card {
    text-align: left;
    width: 100%;
  }

  .hero-summary-grid {
    gap: 10px;
    margin-top: 18px;
  }

  .hero-stat,
  .hero-info-card,
  .breakdown-panel,
  .performance-card {
    border-radius: 14px;
    padding: 14px;
  }

  .hero-stat {
    min-height: 96px;
  }

  .hero-stat strong {
    font-size: 24px;
  }

  .lk-records {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lk-records div {
    padding: 9px;
  }

  .lk-records strong {
    font-size: 20px;
  }

  .performance-card {
    margin-top: 12px;
  }

  .details-toggle {
    width: 100%;
  }

  .bar-row__top {
    gap: 8px;
  }

  .bar-row__top strong {
    text-align: right;
  }

  .site-footer {
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    text-align: center;
  }

  .info-modal {
    padding: 14px;
  }

  .info-modal__card {
    border-radius: 16px;
    max-height: min(86vh, 640px);
    overflow: auto;
    padding: 20px;
  }

  .hero-updated,
  .hero-compact {
    position: static;
    margin-top: 10px;
  }
}

@media (max-width: 520px) {
  body {
    background:
      radial-gradient(circle at 18% 0%, rgba(20, 121, 255, 0.2), transparent 18rem),
      linear-gradient(180deg, #090b12 0%, #06070b 100%);
  }

  .page-shell {
    padding: 8px;
  }

  .table-card,
  .performance-card,
  .player-hero {
    border-radius: 12px;
  }

  .table-toolbar {
    padding: 18px 14px;
  }

  .overview-strip {
    grid-template-columns: 1fr;
  }

  .table-scroll {
    max-height: calc(100vh - 330px);
    min-height: 360px;
  }

  .governor-table {
    min-width: 2820px;
  }

  .governor-table th,
  .governor-table td {
    padding: 11px 9px;
  }

  .governor-name-col {
    min-width: 198px;
  }

  .player-avatar--sm {
    height: 34px;
    width: 34px;
  }

  .governor-link small,
  .alliance-cell small,
  .muted-cell {
    font-size: 10px;
  }

  .player-avatar--lg {
    height: 96px;
    width: 96px;
  }

  .player-hero h1 {
    font-size: 24px;
  }

  .hero-summary-grid,
  .activity-grid,
  .lk-records {
    grid-template-columns: 1fr;
  }

  .hero-stat strong,
  .activity-tile strong {
    font-size: 21px;
  }

  .table-footer select {
    min-width: 82px;
  }

  .pagination {
    gap: 7px;
  }

  .pagination button {
    flex-basis: 38px;
    min-height: 38px;
  }

  .page-number-list {
    gap: 4px;
  }

  .pagination .page-number {
    flex-basis: 32px;
    min-width: 32px;
  }
}

/* Power Breakdown and Activity Styles */
.breakdown-panel {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.compact-panel {
  padding: 16px;
}

.breakdown-panel__header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.breakdown-panel__header h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.breakdown-panel__header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.bar-list {
  padding: 16px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-row__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 6px;
}

.bar-row__top span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.bar-row__top strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.activity-grid {
  display: grid;
  gap: 12px;
}

.activity-tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.activity-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

/* Tone Colors */
.tone-green .bar-track span { background: var(--green); }
.tone-green .activity-tile::after { background: var(--green); }
.tone-green .bar-row__top strong { color: var(--green); }

.tone-blue .bar-track span { background: var(--blue); }
.tone-blue .activity-tile::after { background: var(--blue); }
.tone-blue .bar-row__top strong { color: var(--blue); }

.tone-gold .bar-track span { background: var(--gold); }
.tone-gold .activity-tile::after { background: var(--gold); }
.tone-gold .bar-row__top strong { color: var(--gold); }

.tone-violet .bar-track span { background: var(--violet); }
.tone-violet .activity-tile::after { background: var(--violet); }
.tone-violet .bar-row__top strong { color: var(--violet); }

.tone-red .bar-track span { background: var(--red); }
.tone-red .activity-tile::after { background: var(--red); }
.tone-red .bar-row__top strong { color: var(--red); }

.tone-slate .bar-track span { background: #8aa4d7; }
.tone-slate .activity-tile::after { background: #8aa4d7; }
.tone-slate .bar-row__top strong { color: #8aa4d7; }

/* Performance Section (Rokstats-style) */
.perf-select {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
  transition: border-color 180ms ease;
}
.perf-select:hover { border-color: rgba(72, 164, 255, 0.42); }

.perf-date-range {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 14px;
  white-space: nowrap;
}

.perf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 22px;
}

.perf-filter-btn {
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 0 14px;
  transition: all 180ms ease;
  white-space: nowrap;
}

.perf-filter-btn:hover {
  border-color: var(--btn-color, var(--blue));
  color: var(--text);
}

.perf-filter-btn.is-active {
  background: var(--btn-color, var(--blue));
  border-color: var(--btn-color, var(--blue));
  color: #fff;
  box-shadow: 0 0 12px color-mix(in srgb, var(--btn-color, var(--blue)) 40%, transparent);
}

.perf-filter-btn .tier-icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  border-radius: 50%;
}

.perf-filter-btn .btn-icon {
  font-size: 13px;
}

.perf-period {
  border-top: 1px solid var(--line);
  padding: 16px 22px;
}

.perf-period-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perf-period-header strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
}

.perf-period-header span {
  color: var(--muted);
  font-size: 13px;
  margin-left: 12px;
}

.perf-show-details {
  background: transparent;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: color 180ms ease;
}
.perf-show-details:hover { color: #7fb0ff; }

.perf-period-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.perf-change-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.perf-change-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.perf-change-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .perf-period-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .perf-period-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .perf-filters {
    padding: 8px 14px;
    gap: 6px;
  }
}

.is-hidden {
  display: none !important;
}


.main-nav {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 60;
}
.nav-links {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  padding: 6px;
  gap: 4px;
  box-shadow: var(--shadow);
}
.nav-item {
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 24px;
  transition: all 200ms ease;
}
.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(20, 121, 255, 0.2);
}
