:root {
  --browser-bg: #080b10;
  --browser-panel: #10151c;
  --browser-panel-2: #151b23;
  --browser-line: #29323d;
  --browser-line-soft: #202832;
  --browser-text: #e4e9ee;
  --browser-muted: #8d99a6;
  --browser-cyan: #00c6ff;
  --browser-green: #54d38a;
  --browser-amber: #e8b65a;
}

html.dark body {
  background: var(--browser-bg);
  color: var(--browser-text);
  letter-spacing: 0;
}

#root > .min-h-screen {
  background:
    linear-gradient(180deg, rgba(0, 198, 255, 0.035), transparent 220px),
    var(--browser-bg);
}

#root header {
  background: rgba(8, 11, 16, 0.96) !important;
  border-color: var(--browser-line) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

#root header > div {
  padding-right: 224px;
}

#root header a[aria-current="page"] {
  color: var(--browser-cyan) !important;
  background: rgba(0, 198, 255, 0.07);
}

#root header a[href="/#/"] > div:first-child {
  border-radius: 2px !important;
  background: var(--browser-cyan) !important;
  color: #021017 !important;
  box-shadow: 0 0 14px rgba(0, 198, 255, 0.18);
}

#root > .min-h-screen > div > .mb-4:first-child .grid > div {
  border-radius: 3px !important;
  border-color: var(--browser-line) !important;
  background: var(--browser-panel) !important;
  box-shadow: none !important;
}

/* Integrated search and filter command bar */
#root .classic-filterbar {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 8px !important;
  margin-bottom: 12px !important;
  padding: 10px;
  border: 1px solid var(--browser-line);
  border-radius: 3px;
  background: var(--browser-panel);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.16);
}

#root .classic-filterbar > .relative {
  min-width: 0;
}

#root .classic-filterbar input[type="text"],
#root .classic-filter-select {
  width: 100%;
  height: 38px;
  border: 1px solid #34404d !important;
  border-radius: 2px !important;
  background: #0b1016 !important;
  color: var(--browser-text) !important;
  font-size: 13px !important;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

#root .classic-filterbar input[type="text"] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

#root .classic-filter-select {
  padding: 0 30px 0 11px;
  appearance: auto;
}

#root .classic-filterbar input[type="text"]:focus,
#root .classic-filter-select:focus {
  border-color: var(--browser-cyan) !important;
  box-shadow: 0 0 0 2px rgba(0, 198, 255, 0.1);
}

#root .classic-filterbar .lg\:hidden {
  display: none !important;
}

/* Keep advanced filters available, but subordinate to the main bar. */
#root aside {
  width: 218px !important;
}

#root aside > div {
  padding: 10px !important;
  border: 1px solid var(--browser-line);
  border-radius: 3px;
  background: #0d1218;
}

#root aside select {
  display: none;
}

#root aside label:has(+ select) {
  display: none;
}

/* Classic browser table */
#root .classic-results-meta {
  margin: 0 !important;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--browser-line);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #0c1117;
  color: var(--browser-muted) !important;
}

#root .classic-table-head {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) minmax(150px, 0.62fr) minmax(160px, 0.62fr) minmax(240px, 1fr) 112px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--browser-line);
  background: #171d25;
  color: #aab4bf;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

#root .classic-table-head span {
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid var(--browser-line);
}

#root .classic-table-head span:last-child {
  border-right: 0;
  text-align: center;
}

#root .server-table {
  display: flex !important;
  flex-direction: column;
  gap: 0 !important;
  border: 1px solid var(--browser-line);
  border-top: 0;
  background: var(--browser-panel);
}

#root .server-table > a {
  display: grid !important;
  grid-template-columns: minmax(320px, 1.5fr) minmax(150px, 0.62fr) minmax(160px, 0.62fr) minmax(240px, 1fr) 112px;
  min-height: 70px;
  overflow: visible !important;
  border: 0 !important;
  border-bottom: 1px solid var(--browser-line-soft) !important;
  border-radius: 0 !important;
  background: var(--browser-panel) !important;
  box-shadow: none !important;
  color: var(--browser-text);
}

#root .server-table > a:nth-child(even) {
  background: #0d1218 !important;
}

#root .server-table > a:hover {
  z-index: 1;
  background: #18212a !important;
  box-shadow: inset 3px 0 0 var(--browser-cyan) !important;
}

#root .server-table > a > .relative.h-20 {
  grid-column: 1;
  grid-row: 1;
  height: auto !important;
  min-width: 0;
  overflow: visible !important;
  background: transparent !important;
  pointer-events: none;
}

#root .server-table > a > .relative.h-20 > img,
#root .server-table > a > .relative.h-20 > .absolute.inset-0 {
  display: none !important;
}

#root .server-table > a > .relative.h-20 > .absolute.right-2 {
  top: 4px !important;
  right: auto !important;
  left: 58px !important;
}

#root .server-table > a > .relative.h-20 > button {
  top: 23px !important;
  left: 10px !important;
  z-index: 3;
  border-radius: 2px !important;
  background: #171e26 !important;
  pointer-events: auto;
}

#root .server-table > a > .flex.flex-1.flex-col {
  display: contents !important;
}

#root .server-table > a > .flex.flex-1.flex-col > .flex.items-start {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  padding: 22px 10px 8px 48px;
}

#root .server-table h3 {
  font-size: 13px !important;
  line-height: 1.3;
}

#root .server-table h3 + div {
  grid-column: 3;
}

#root .server-table .h-9.w-9 {
  width: 36px !important;
  height: 36px !important;
  border-radius: 2px !important;
  border-color: #384452 !important;
}

/* Keep every server logo inside the designated icon cell. */
#root .server-table .classic-icon-frame {
  position: relative;
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #384452;
  border-radius: 2px;
  background: #171e26;
}

#root .server-table .classic-server-icon-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  border: 0 !important;
  border-radius: 0 !important;
}

#root .server-table .classic-non-icon-image {
  display: none !important;
}

#root .server-table .classic-icon-frame[data-fallback="true"]::before,
#root .server-table .classic-icon-frame[data-fallback="true"]::after {
  content: "";
  position: absolute;
  left: 9px;
  width: 16px;
  height: 7px;
  border: 1px solid var(--browser-muted);
  border-radius: 1px;
}

#root .server-table .classic-icon-frame[data-fallback="true"]::before {
  top: 8px;
}

#root .server-table .classic-icon-frame[data-fallback="true"]::after {
  top: 19px;
}

#root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 0 !important;
  padding: 0 12px;
  border-left: 1px solid var(--browser-line-soft);
}

#root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 .text-xs {
  display: block !important;
}

#root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 .text-xs > span:first-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--browser-text);
}

#root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 .text-xs > span:last-child {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}

#root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 .h-1\.5 {
  height: 3px !important;
  border-radius: 0 !important;
}

#root .server-table > a > .flex.flex-1.flex-col > .mt-2.flex,
#root .server-table > a > .flex.flex-1.flex-col > .mt-auto {
  grid-column: 4;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  margin: 0 !important;
  padding: 8px 12px !important;
  border-left: 1px solid var(--browser-line-soft);
}

#root .server-table > a > .flex.flex-1.flex-col > .mt-auto {
  opacity: 0;
  pointer-events: none;
}

#root .server-table > a .rounded.bg-muted\/60,
#root .server-table > a .rounded.bg-primary\/15 {
  border: 1px solid #34404b;
  border-radius: 2px !important;
  background: #1a222b !important;
  color: #b2bdc8 !important;
}

#root .classic-region {
  grid-column: 3;
  grid-row: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px 12px;
  border-left: 1px solid var(--browser-line-soft);
  color: var(--browser-muted);
  font-size: 12px;
}

#root .classic-region strong {
  overflow: hidden;
  color: #d5dce2;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#root .classic-live {
  margin-top: 3px;
  color: var(--browser-green);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

#root .classic-live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--browser-green);
}

#root .classic-connect {
  grid-column: 5;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  min-width: 86px;
  padding: 8px 10px;
  border: 1px solid #168bb0;
  border-radius: 2px;
  background: #0d526a;
  color: #eafcff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  transition: background 150ms ease, border-color 150ms ease;
}

#root .classic-connect:hover {
  border-color: var(--browser-cyan);
  background: #107594;
}

@media (max-width: 1100px) {
  #root .classic-filterbar {
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(125px, 160px));
  }
  #root .classic-table-head,
  #root .server-table > a {
    grid-template-columns: minmax(260px, 1.35fr) 145px 145px minmax(180px, 0.8fr) 102px;
  }
}

@media (max-width: 820px) {
  #root header > div { padding-right: 190px; }
  #root .classic-filterbar { grid-template-columns: 1fr 1fr; }
  #root .classic-filterbar > .relative { grid-column: 1 / -1; }
  #root .classic-table-head { display: none; }
  #root .server-table { border-top: 1px solid var(--browser-line); }
  #root .server-table > a {
    grid-template-columns: minmax(0, 1fr) 128px 96px;
    min-height: 84px;
  }
  #root .server-table > a > .flex.flex-1.flex-col > .flex.items-start { grid-column: 1; }
  #root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 { grid-column: 2; }
  #root .classic-region { display: none; }
  #root .server-table > a > .flex.flex-1.flex-col > .mt-2.flex,
  #root .server-table > a > .flex.flex-1.flex-col > .mt-auto { display: none !important; }
  #root .classic-connect { grid-column: 3; }
}

@media (max-width: 560px) {
  #root header > div { padding-right: 150px; }
  #root header nav { display: none; }
  #root .classic-filterbar { grid-template-columns: 1fr; }
  #root .classic-filterbar > .relative { grid-column: 1; }
  #root .server-table > a {
    grid-template-columns: minmax(0, 1fr) 86px;
    min-height: 92px;
  }
  #root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 {
    grid-column: 1;
    align-self: end;
    padding: 0 8px 7px 48px;
    border-left: 0;
  }
  #root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 .text-xs > span:last-child,
  #root .server-table > a > .flex.flex-1.flex-col > .mt-2\.5 .h-1\.5 { display: none !important; }
  #root .classic-connect { grid-column: 2; min-width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  #root .classic-connect,
  #root .classic-filterbar input,
  #root .classic-filter-select { transition: none; }
}