:root {
  --nexus-server-glass: rgb(15 17 24 / 62%);
  --nexus-server-line: rgb(255 255 255 / 10%);
  --nexus-server-muted: rgb(255 255 255 / 58%);
}

.servers_wrap { display:grid; width:100%; gap:12px; grid-template-columns:repeat(auto-fill,minmax(240px,280px)) !important; justify-content:start; }

.server_block.nexus-server-card {
  position:relative; min-height:255px; height:255px; padding:16px !important; border-radius:17px;
  overflow:hidden; isolation:isolate; cursor:pointer; display:flex; flex-direction:column; justify-content:space-between;
  background:var(--card); border:1px solid var(--nexus-server-line); box-shadow:0 12px 40px rgb(0 0 0 / 16%);
  transition:transform .22s ease, border-color .22s ease, box-shadow .22s ease; contain:paint;
}
.server_block.nexus-server-card:hover { transform:translateY(-4px); border-color:rgb(255 255 255 / 20%); box-shadow:0 20px 55px rgb(0 0 0 / 25%); }
.server_block.nexus-server-card:focus-visible { outline:2px solid var(--span); outline-offset:3px; }

.server_map_image { position:absolute; z-index:-3; inset:0; overflow:hidden; }
.server_map_image .map { width:100%; height:100%; object-fit:cover; transition:transform .28s ease; opacity:.78;  }
.server_block:hover .server_map_image .map { transform:scale(1.025); }
.nexus-server-overlay { position:absolute; z-index:-2; inset:0; background:linear-gradient(180deg,rgb(5 7 12 / 28%) 0%,rgb(5 7 12 / 50%) 42%,rgb(5 7 12 / 94%) 100%),linear-gradient(90deg,rgb(5 7 12 / 48%),transparent 70%); }
.nexus-server-card::after { content:""; position:absolute; inset:auto 0 0; height:2px; background:var(--span); opacity:.6; transform:scaleX(.35); transform-origin:left; transition:transform .4s ease; }
.nexus-server-card:hover::after { transform:scaleX(1); }

.nexus-server-top,.nexus-server-actions,.nexus-server-stats,.nexus-server-mapline,.nexus-server-capacity-head { position:relative; z-index:2; }
.nexus-server-top { display:flex; justify-content:space-between; align-items:center; min-height:24px; }
.nexus-server-status { display:inline-flex; align-items:center; gap:7px; padding:6px 10px; border-radius:999px; background:rgb(0 0 0 / 30%);  border:1px solid rgb(255 255 255 / 9%); color:#fff; font-size:10px; font-weight:700; letter-spacing:.08em; }
.nexus-status-dot { width:7px; height:7px; border-radius:50%; background:var(--orange); box-shadow:0 0 10px var(--orange); }
.nexus-server-card[data-online="1"] .nexus-status-dot,.nexus-modal-status[data-online="1"] .nexus-status-dot { background:var(--green); box-shadow:0 0 11px var(--green); }
.nexus-server-card[data-online="0"] .nexus-status-dot,.nexus-modal-status[data-online="0"] .nexus-status-dot { background:var(--red); box-shadow:0 0 11px var(--red); }
.nexus-server-card[data-online="1"] .nexus-status-text { color:var(--green); }
.nexus-server-card[data-online="0"] .nexus-status-text { color:var(--red); }
.nexus-server-badge { font-size:10px; font-weight:700; color:#fff; background:var(--span); border-radius:999px; padding:5px 9px; min-height:20px; }
.nexus-server-badge:empty { display:none; }

.nexus-server-content { position:relative; z-index:2; margin-top:auto; padding-top:36px; }
.server_name_ip { display:flex; align-items:center; gap:9px; width:max-content; max-width:100%; cursor:pointer; }
.server_name_custom { max-width:215px; color:#fff; font-size:16px; font-weight:800; line-height:1.15; letter-spacing:-.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.server_name_ip:hover .server_name_custom { color:var(--span); }
.btn-clipboard svg { width:16px; height:16px; fill:#fff; opacity:.6; transition:.25s; }
.server_name_ip:hover .btn-clipboard svg { fill:var(--span); opacity:1; }
.nexus-server-mapline { display:flex; align-items:center; gap:8px; margin-top:8px; }
.nexus-server-label { color:var(--nexus-server-muted); font-size:9px; font-weight:700; letter-spacing:.12em; }
.server_map_name { color:#fff; font-size:12px; font-weight:600; }
.nexus-server-stats { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-top:12px; }
.nexus-server-stat { min-width:0; padding:9px 10px; border-radius:11px; background:rgb(0 0 0 / 24%); border:1px solid rgb(255 255 255 / 7%);  }
.nexus-server-stat-label { display:block; font-size:8px; letter-spacing:.1em; color:var(--nexus-server-muted); margin-bottom:3px; }
.nexus-server-stat strong { display:block; color:#fff; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nexus-server-capacity { margin-top:9px; }
.nexus-server-capacity-head { display:flex; justify-content:space-between; color:rgb(255 255 255 / 62%); font-size:8px; font-weight:700; letter-spacing:.1em; margin-bottom:6px; }
.nexus-progress { height:5px; background:rgb(255 255 255 / 13%); }
.nexus-progress .progress-value { height:5px; min-width:0; transition:width .7s ease,background .3s; }
.nexus-server-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:11px; }
.nexus-server-actions .server_button { width:auto; min-width:40px; height:36px; padding:0 11px; gap:6px; border-radius:10px; display:flex; align-items:center; justify-content:center; color:var(--text-custom); background:rgb(0 0 0 / 28%); outline:1px solid rgb(255 255 255 / 12%); }
.nexus-server-actions .server_button:hover { outline-color:var(--span); color:var(--span); }
.nexus-server-actions .server_button svg { width:15px; height:15px; }
.nexus-server-actions .server_button span { font-size:9px; font-weight:800; }
.nexus-connect-btn { display:flex; align-items:center; gap:7px; height:36px; padding:0 12px; border:1px solid var(--span); border-radius:12px; background:var(--span); color:#fff; font-size:10px; font-weight:800; letter-spacing:.05em; cursor:pointer; transition:.25s; }
.nexus-connect-btn svg { width:14px; height:14px; fill:#fff; }
.nexus-connect-btn:hover { filter:brightness(1.1); transform:translateY(-1px); }

.servers_filter.nexus-servers-toolbar { display:flex; padding:6px; gap:10px; margin-bottom:14px; flex-direction:row; justify-content:space-between; align-items:center; border:1px solid var(--nexus-server-line); }
.filter_chips { display:flex; gap:5px; flex-wrap:wrap; }
.fill_width { flex:1 1 calc((100% / 10) - .5rem); }
a#updateservers { display:flex; flex:0 0 42px; background:var(--transparent-4-w); width:42px; height:42px; border-radius:12px; align-items:center; justify-content:center; cursor:pointer; }
a#updateservers svg { width:21px; height:21px; stroke:var(--text-custom); stroke-linecap:round; stroke-dasharray:100,150; stroke-dashoffset:0; }

/* Server details */
.modal-window-server { position:fixed; display:flex; inset:0; z-index:500; transition:opacity .3s,visibility .3s; background:rgb(0 0 0 / 68%);  opacity:0; visibility:hidden; justify-content:center; align-items:center; padding:20px; }
.modal_players_online.modal_show { opacity:1; visibility:visible; }
.modal-window-server > div { position:relative; width:min(860px,100%); max-height:min(820px,calc(100vh - 40px)); margin:0 auto; padding:0; transform:translateY(18px) scale(.97); background:var(--card); border:1px solid var(--nexus-server-line); border-radius:24px; box-shadow:0 30px 100px rgb(0 0 0 / 45%); z-index:5000; pointer-events:none; overflow:hidden; transition:transform .3s ease; }
.modal_players_online.modal_show > .modal-card { transform:translateY(0) scale(1); pointer-events:all; }
.nexus-modal-header { position:relative; height:250px; padding:24px 28px !important; overflow:hidden; }
.server-modal__bg { position:absolute; inset:0; height:100%; margin:0; }
.server-modal__bg img { position:absolute; left:50%; top:50%; width:100%; height:100%; object-fit:cover; transform:translate(-50%,-50%); opacity:.7; }
.server-modal__bg .shadow { position:absolute; inset:0; background:linear-gradient(180deg,rgb(5 7 12 / 30%),var(--card)),linear-gradient(90deg,rgb(5 7 12 / 55%),transparent); }
.modal-btn__close { position:absolute; top:18px; right:18px; z-index:4; display:flex; align-items:center; justify-content:center; width:38px; height:38px; padding:0; border-radius:12px; background:rgb(0 0 0 / 28%);  opacity:.85; transition:.25s; }
.modal-btn__close:hover { opacity:1; background:rgb(0 0 0 / 45%); }
.modal-btn__close svg { width:20px; height:20px; fill:#fff; }
.server-modal__header { position:relative; z-index:2; height:100%; width:100%; display:flex; align-items:flex-end; }
.nexus-modal-title-wrap { width:100%; }
.nexus-modal-status { display:inline-flex; align-items:center; gap:7px; color:#fff; font-size:10px; font-weight:800; letter-spacing:.08em; margin-bottom:9px; }
.nexus-modal-server-name { color:#fff; font-size:clamp(24px,4vw,40px); line-height:1.05; font-weight:850; letter-spacing:-.035em; max-width:90%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.map_name_block { margin-top:12px; }
.server_map_now_play_text { color:var(--nexus-server-muted); font-size:9px; letter-spacing:.12em; }
.server_map_name_second { color:var(--text-custom); font-size:17px; font-weight:700; }
.nexus-modal-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; padding:14px 24px; border-bottom:1px solid var(--nexus-server-line); }
.nexus-modal-metrics > div { padding:11px 13px; border-radius:12px; background:var(--transparent-2-w); }
.nexus-modal-metrics span { display:block; font-size:8px; color:var(--nexus-server-muted); letter-spacing:.1em; margin-bottom:4px; }
.nexus-modal-metrics strong { display:block; color:var(--text-custom); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nexus-players-heading { display:flex; justify-content:space-between; align-items:center; padding:18px 24px 5px; color:var(--text-custom); font-size:12px; font-weight:800; letter-spacing:.05em; }
.nexus-players-heading b { display:inline-flex; min-width:20px; justify-content:center; margin-left:5px; padding:2px 6px; border-radius:999px; background:var(--button); font-size:10px; }
.nexus-players-heading span:last-child { color:var(--nexus-server-muted); font-size:9px; font-weight:600; }
.nexus-mon-header { margin:8px 24px 5px !important; width:calc(100% - 48px) !important; }
.mon_list_scroll { max-height:300px; overflow:hidden; overflow-y:auto; width:calc(100% - 48px); margin:0 24px 10px; }
.nexus-modal-footer { margin:0 24px; padding:16px 0 22px; display:flex; gap:16px; align-items:center; border-top:1px solid var(--nexus-server-line); }
.nexus-modal-footer .button { min-height:42px; border-radius:11px; flex:0 0 auto; }
.nexus-modal-footer .modal-btn_copy { min-width:155px; }
.nexus-modal-footer .nexus-modal-play { min-width:155px; }
.nexus-modal-play { background:var(--span) !important; border-color:var(--span) !important; color:#fff !important; }

@media (max-width:700px) {
  .servers_wrap { grid-template-columns:1fr !important; }
  .server_block.nexus-server-card { min-height:255px; height:255px; }
  .nexus-server-stats { grid-template-columns:1fr 1fr; }
  .nexus-server-geo { grid-column:1 / -1; }
  .nexus-modal-header { height:230px; padding:20px !important; }
  .nexus-modal-metrics { grid-template-columns:1fr 1fr; padding:12px 16px; }
  .nexus-players-heading { padding-left:16px; padding-right:16px; }
  .nexus-mon-header { margin-left:16px !important; margin-right:16px !important; width:calc(100% - 32px) !important; }
  .mon_list_scroll { width:calc(100% - 32px); margin-left:16px; margin-right:16px; }
  .nexus-modal-footer { margin-left:16px; margin-right:16px; }
  .nexus-modal-footer .non_mob { display:none; }
  .nexus-modal-footer { gap:10px; }
  .nexus-modal-footer .button { flex:1; justify-content:center; min-width:0 !important; }
}

@media (max-width:420px) {
  .nexus-server-actions .server_button { display:none; }
  .nexus-connect-btn { flex:1; justify-content:center; }
  .nexus-server-card { padding:14px !important; }
  .nexus-modal-server-name { font-size:25px; }
}

/* Existing monitoring list styles kept compatible with the template. */
.mon_header { padding:8px 15px; display:grid; grid-template-columns:2.5fr .5fr .58fr; background-color:var(--transparent-2-w); border-radius:8px; user-select:none; justify-items:start; }
.mon_header span { font-size:12px; font-weight:400; color:var(--text-custom); display:flex; gap:10px; align-items:center; }
.mon_list_body li { height:44px; background:transparent; border:1px solid var(--transparent-2-w); border-radius:8px; display:grid; grid-template-columns:2.5fr .5fr .58fr; padding:15px; margin:0; transition:.3s; position:relative; justify-items:start; align-content:center; }
.mon_list_body li:not(:last-child) { margin-bottom:3px; }
.mon_list_body li span { font-size:11px; font-weight:500; transition:.3s; align-items:center; justify-content:center; text-align:center; color:var(--text-custom); }
.mon_player_name { white-space:nowrap; width:120px; overflow:hidden; text-overflow:ellipsis; text-align:left !important; justify-content:flex-start !important; align-items:center !important; }
li.hover_mon:nth-of-type(2n) { background:var(--transparent-2-w); border:1px solid transparent; }
.hover_mon:hover span { color:var(--default-text-color); }
.players_modal { background:var(--button); color:var(--text-default) !important; padding:2px 6px; border-radius:6px; font-size:11px !important; }
@media (max-width:768px) { .mon_header { grid-template-columns:2fr .6fr; } .mon_list_body li { grid-template-columns:2fr .6fr; } .non_mob { display:none !important; } }
@media (min-width:768.9px) { .non_mob { display:flex; } }

.nexus-player-number { display:inline-flex; width:22px; margin-right:7px; color:var(--span); font-size:9px; font-weight:800; }
.nexus-no-players { grid-template-columns:1fr !important; justify-content:center; text-align:center; color:var(--nexus-server-muted); }
.nexus-connect-btn:disabled { opacity:.45; cursor:not-allowed; filter:grayscale(1); }

@media (hover:none) {
  .server_block.nexus-server-card:hover { transform:none; box-shadow:0 12px 40px rgb(0 0 0 / 16%); }
  .server_block:hover .server_map_image .map { transform:none; }
}

/* Nexus monitor v3 refinements */
.server_block.nexus-server-card { padding-bottom:58px !important; }
.nexus-server-content { padding-bottom:2px; }
.nexus-server-actions {
  position:absolute;
  left:16px;
  right:16px;
  bottom:14px;
  z-index:6;
  margin-top:0;
  pointer-events:none;
}
.nexus-server-actions > * { pointer-events:auto; }
.nexus-server-actions .server_button { flex:0 0 auto; }
.nexus-connect-btn { flex:0 0 auto; }

/* Modal styled after the requested compact server-detail layout. */
.modal-window-server > div { width:min(960px,100%); border-radius:20px; }
.nexus-modal-header { height:230px; padding:24px 28px !important; }
.nexus-modal-server-name { font-size:clamp(34px,5vw,48px); letter-spacing:-.045em; }
.nexus-modal-title-wrap { padding-bottom:2px; }
.nexus-modal-chips { display:flex; flex-wrap:wrap; gap:7px; margin-top:15px; }
.nexus-modal-chip {
  display:inline-flex; align-items:center; gap:7px; min-height:31px; padding:7px 11px;
  border:1px solid rgb(255 255 255 / 9%); border-radius:9px; background:rgb(9 12 20 / 58%);
  color:#fff; backdrop-filter:blur(5px);
}
.nexus-modal-chip b { font-size:8px; color:var(--nexus-server-muted); letter-spacing:.08em; font-weight:800; }
.nexus-modal-chip strong { font-size:10px; font-weight:800; white-space:nowrap; }
.nexus-modal-serverline {
  display:flex; align-items:center; justify-content:space-between; gap:15px;
  padding:12px 24px; border-bottom:1px solid var(--nexus-server-line); background:rgb(0 0 0 / 8%);
}
.nexus-modal-serverline > span:first-child {
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:var(--nexus-server-muted); font-size:10px; font-weight:700;
}
.nexus-modal-address { display:flex; align-items:center; gap:7px; flex:0 0 auto; }
.nexus-modal-address b { color:var(--nexus-server-muted); font-size:8px; letter-spacing:.08em; }
.nexus-modal-address strong { color:var(--text-custom); font-size:10px; }
.nexus-players-heading { padding-top:16px; }
.mon_header.nexus-mon-header { border-radius:10px; }
.mon_list_scroll { max-height:310px; }
.mon_list_body li { min-height:48px; height:48px; border-radius:7px; }
.nexus-modal-footer { gap:12px; padding-top:14px; }
.nexus-modal-footer .modal-btn_copy { min-width:160px; }
.nexus-modal-footer .nexus-modal-play { min-width:190px; }

@media (max-width:700px) {
  .nexus-modal-header { height:220px; padding:20px !important; }
  .nexus-modal-serverline { padding-left:16px; padding-right:16px; }
  .nexus-modal-address { display:none; }
  .nexus-modal-chips { gap:5px; }
  .nexus-modal-chip { min-height:29px; padding:6px 9px; }
  .nexus-modal-footer { gap:10px; }
}

/* Nexus monitor v4: roomier cards + two-column server details. */
.servers_wrap { grid-template-columns:repeat(auto-fill,minmax(285px,320px)) !important; gap:14px; }
.server_block.nexus-server-card { min-height:292px; height:292px; padding:17px !important; }
.server_name_custom { max-width:250px; font-size:17px; }
.nexus-server-content { padding-top:42px; }
.nexus-server-stats { gap:9px; margin-top:13px; }
.nexus-server-stat { padding:10px 11px; }
.nexus-server-actions { left:17px; right:17px; bottom:14px; gap:9px; }
.nexus-server-actions .server_button, .nexus-connect-btn { height:38px; }
.nexus-server-actions .server_button span, .nexus-connect-btn span { font-size:10px; }

.nexus-modal-body { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(310px,.85fr); gap:14px; padding:16px 24px 18px; }
.nexus-modal-panel { min-width:0; border:1px solid var(--nexus-server-line); border-radius:14px; background:rgb(255 255 255 / 2%); overflow:hidden; }
.nexus-modal-players-panel { padding-bottom:8px; }
.nexus-modal-players-panel .nexus-players-heading { padding:14px 14px 5px; }
.nexus-modal-players-panel .nexus-mon-header { margin:8px 12px 5px !important; width:calc(100% - 24px) !important; }
.nexus-modal-players-panel .mon_list_scroll { width:calc(100% - 24px); margin:0 12px 8px; max-height:300px; }
.nexus-modal-leaderboard-panel { padding:14px; display:flex; flex-direction:column; }
.nexus-leaderboard-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:2px 2px 12px; }
.nexus-leaderboard-kicker { display:block; color:var(--nexus-server-muted); font-size:8px; font-weight:800; letter-spacing:.12em; margin-bottom:3px; }
.nexus-leaderboard-head strong { display:block; color:var(--text-custom); font-size:16px; line-height:1.1; }
.nexus-leaderboard-count { min-width:24px; padding:4px 7px; border-radius:999px; background:var(--button); color:var(--text-default); font-size:9px; font-weight:800; text-align:center; }
.nexus-leaderboard-list { display:flex; flex-direction:column; gap:5px; min-height:258px; }
.nexus-leaderboard-row { display:grid; grid-template-columns:24px 28px minmax(0,1fr) auto; align-items:center; gap:8px; min-height:34px; padding:5px 7px; border-radius:9px; background:rgb(255 255 255 / 3%); }
.nexus-leaderboard-row:nth-child(1) { background:rgb(56 112 255 / 15%); }
.nexus-leaderboard-row img { width:27px; height:27px; border-radius:8px; object-fit:cover; background:rgb(255 255 255 / 5%); }
.nexus-leaderboard-place { color:var(--span); font-size:8px; font-weight:900; text-align:center; }
.nexus-leaderboard-name { min-width:0; color:var(--text-custom); font-size:10px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nexus-leaderboard-row strong { color:var(--text-custom); font-size:10px; font-weight:900; white-space:nowrap; }
.nexus-leaderboard-empty { min-height:258px; display:flex; align-items:center; justify-content:center; color:var(--nexus-server-muted); font-size:10px; text-align:center; }
.nexus-leaderboard-actions { display:flex; gap:7px; margin-top:10px; }
.nexus-leaderboard-link, .nexus-leaderboard-connect { min-height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; gap:7px; padding:0 11px; font-size:9px; font-weight:800; text-decoration:none; cursor:pointer; }
.nexus-leaderboard-link { flex:1; color:var(--span); background:rgb(255 255 255 / 5%); border:1px solid var(--nexus-server-line); }
.nexus-leaderboard-link svg { width:14px; height:14px; }
.nexus-leaderboard-connect { flex:1.05; color:#fff; background:var(--span); border:1px solid var(--span); }
.nexus-leaderboard-connect svg { width:14px; height:14px; fill:#fff; }
.nexus-modal-footer { margin:0 24px; }

@media (max-width:900px) {
  .nexus-modal-body { grid-template-columns:1fr; }
  .nexus-modal-leaderboard-panel { order:2; }
  .nexus-leaderboard-list { min-height:0; }
  .nexus-leaderboard-empty { min-height:100px; }
}
@media (max-width:700px) {
  .servers_wrap { grid-template-columns:1fr !important; }
  .server_block.nexus-server-card { min-height:292px; height:292px; }
  .nexus-modal-body { padding:12px 16px 14px; gap:10px; }
  .nexus-modal-footer { margin-left:16px; margin-right:16px; }
}

/* Nexus monitor v5 — card redesign: image top + solid information panel bottom. */
.servers_wrap {
  grid-template-columns: repeat(auto-fill, minmax(300px, 320px)) !important;
  gap: 16px;
}

.server_block.nexus-server-card {
  min-height: 350px;
  height: 350px;
  padding: 0 !important;
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
}

.server_map_image {
  inset: 0 0 auto 0;
  height: 198px;
  z-index: 0;
}

.server_map_image .map {
  opacity: .86;
  transform: scale(1.001);
  transition: opacity .25s ease, transform .35s ease;
}

.server_block.nexus-server-card:hover .server_map_image .map {
  transform: scale(1.018);
}

/* Only the image gets the darkening gradient now. */
.nexus-server-overlay {
  inset: 0 0 auto 0;
  height: 198px;
  z-index: 1;
  background:
    linear-gradient(180deg, rgb(5 7 12 / 24%) 0%, rgb(5 7 12 / 8%) 42%, rgb(5 7 12 / 62%) 100%),
    linear-gradient(90deg, rgb(5 7 12 / 28%), transparent 72%);
}

.nexus-server-top {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 15px;
  right: 15px;
}

.nexus-server-content {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 158px;
  margin: 0;
  padding: 14px 15px 54px;
  background: var(--card);
  border-top: 1px solid rgb(255 255 255 / 7%);
  box-shadow: 0 -16px 30px rgb(0 0 0 / 16%);
}

.server_name_ip {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.server_name_custom {
  max-width: calc(100% - 28px);
  font-size: 16px;
}

.nexus-server-mapline {
  margin-top: 7px;
}

.nexus-server-stats {
  gap: 7px;
  margin-top: 10px;
}

.nexus-server-stat {
  padding: 7px 9px;
  border-radius: 9px;
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 7%);
}

.nexus-server-stat-label {
  font-size: 7px;
  margin-bottom: 2px;
}

.nexus-server-stat strong {
  font-size: 11px;
}

.nexus-server-capacity {
  margin-top: 8px;
}

.nexus-server-capacity-head {
  margin-bottom: 5px;
}

.nexus-server-actions {
  position: absolute;
  z-index: 5;
  left: 15px;
  right: 15px;
  bottom: 12px;
  margin: 0;
  gap: 8px;
  justify-content: stretch;
}

.nexus-server-actions .server_button,
.nexus-connect-btn {
  height: 38px;
}

.nexus-server-actions .server_button {
  flex: 0 0 108px;
  min-width: 108px;
  padding: 0 9px;
}

.nexus-connect-btn {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

@media (max-width: 700px) {
  .servers_wrap {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .server_block.nexus-server-card {
    width: 100%;
    min-height: 350px;
    height: 350px;
  }
}

/* Nexus monitor v6 — clean vertical card layout. */
.servers_wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 320px)) !important;
  gap: 16px;
  justify-content: start;
}

.server_block.nexus-server-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 320px;
  min-height: 0;
  height: auto;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
}

.server_map_image {
  position: relative;
  inset: auto;
  flex: 0 0 185px;
  height: 185px;
  overflow: hidden;
  z-index: 0;
}

.server_map_image .map {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .88;
  transform: none;
  transition: transform .3s ease, opacity .3s ease;
}

.server_block.nexus-server-card:hover .server_map_image .map {
  transform: scale(1.025);
  opacity: .94;
}

.nexus-server-overlay {
  position: absolute;
  inset: 0 0 auto 0;
  height: 185px;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(5 7 12 / 20%) 0%, rgb(5 7 12 / 3%) 45%, rgb(5 7 12 / 62%) 100%),
    linear-gradient(90deg, rgb(5 7 12 / 25%), transparent 72%);
}

.nexus-server-top {
  position: absolute;
  top: 14px;
  left: 15px;
  right: 15px;
  z-index: 4;
}

.nexus-server-content {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 2;
  height: auto;
  margin: 0;
  padding: 13px 15px 0;
  background: var(--card);
  border-top: 1px solid rgb(255 255 255 / 7%);
  box-shadow: none;
}

.server_name_ip {
  width: 100%;
  max-width: 100%;
}

.server_name_custom {
  max-width: calc(100% - 28px);
  font-size: 16px;
  line-height: 1.2;
}

.nexus-server-mapline {
  margin-top: 7px;
}

.nexus-server-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.nexus-server-stat {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgb(255 255 255 / 3%);
  border: 1px solid rgb(255 255 255 / 7%);
}

.nexus-server-stat-label {
  font-size: 7px;
  margin-bottom: 3px;
}

.nexus-server-stat strong {
  font-size: 11px;
  line-height: 1.2;
}

.nexus-server-capacity {
  margin-top: 9px;
  padding-bottom: 12px;
}

.nexus-server-capacity-head {
  margin-bottom: 5px;
}

.nexus-server-actions {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 3;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  gap: 8px;
  margin: 0;
  padding: 0 15px 15px;
  background: var(--card);
}

.nexus-server-actions .server_button,
.nexus-connect-btn {
  height: 38px;
  box-sizing: border-box;
}

.nexus-server-actions .server_button {
  flex: 0 0 108px;
  min-width: 108px;
  padding: 0 9px;
}

.nexus-connect-btn {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

@media (max-width: 700px) {
  .servers_wrap {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .server_block.nexus-server-card {
    width: 100%;
  }
}
