:root {
  --bg: #0b0f2e;
  --bg2: #12183f;
  --panel: rgba(22, 28, 72, 0.82);
  --line: rgba(255, 120, 255, 0.28);
  --text: #e8e9ff;
  --muted: #a8add8;
  --pink: #ff4fd8;
  --cyan: #39f3ff;
  --yellow: #ffe566;
  --red: #ff3b5c;
  --green: #3dff9a;
  --orange: #ff9f43;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: Outfit, system-ui, sans-serif;
  background: #0b0f2e;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 10% -10%, #5b1fff55, transparent 55%),
    radial-gradient(900px 500px at 90% 0%, #ff4fd855, transparent 50%),
    linear-gradient(180deg, #0b0f2e 0%, #16122f 50%, #0a0d24 100%);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #fff; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.4rem 1.1rem 3rem;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  padding: 1.2rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  max-width: 640px;
}

.logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 79, 216, 0.12);
  border: 2px solid var(--pink);
  box-shadow: 0 0 18px #ff4fd866;
  font-size: 1.4rem;
}

.eyebrow {
  margin: 0 0 .2rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", Outfit, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: .01em;
}

.sub {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .7rem;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: .95rem;
  color: #fff;
  padding: .7rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), #7a5cff);
  box-shadow: 0 8px 24px rgba(255, 79, 216, 0.28);
  transition: transform .15s ease, filter .15s ease;
}

.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-discord {
  background: linear-gradient(135deg, #5865f2, #7289da);
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.35);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--muted);
}
.btn-ghost:hover { color: #fff; border-color: var(--cyan); }

.gate {
  margin: 1.2rem 0 1.5rem;
  padding: 1.6rem 1.4rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.gate-title {
  margin: 0 0 .4rem;
  font-family: "Space Grotesk", Outfit, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}
.gate-text {
  margin: 0 0 1rem;
  color: var(--muted);
}
.gate-err {
  margin: 1rem 0 0;
  color: var(--red);
  font-weight: 600;
}

.pills {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  background: rgba(61, 255, 154, 0.12);
  border: 1px solid rgba(61, 255, 154, 0.35);
  color: var(--green);
  font-size: .85rem;
  font-weight: 700;
}

.pill.soft {
  background: rgba(57, 243, 255, 0.1);
  border-color: rgba(57, 243, 255, 0.3);
  color: var(--cyan);
}

.pill strong { color: #fff; font-weight: 800; }

.status {
  min-height: 1.4em;
  margin: 0 0 .85rem;
  color: var(--muted);
  font-size: .9rem;
}

.status.err { color: var(--red); }

.host-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 0 0 1rem;
}

.host-stat {
  padding: .9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(14, 18, 48, 0.72);
  box-shadow: var(--shadow);
}

.host-stat .label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}

.host-stat .label .hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  opacity: .85;
}

.host-stat .value {
  font-family: "Space Grotesk", Outfit, sans-serif;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .55rem;
  word-break: break-word;
}

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

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width .25s ease;
}

.bar.warn > i { background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.bar.hot > i { background: linear-gradient(90deg, var(--orange), var(--red)); }

.bar-limit {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: rgba(255, 255, 255, 0.75);
  transform: translateX(-1px);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(14, 18, 48, 0.72);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th, td {
  padding: .8rem .95rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 120, 255, 0.12);
}

th {
  position: sticky;
  top: 0;
  background: rgba(18, 24, 63, 0.96);
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 800;
  z-index: 1;
}

tbody tr:hover td {
  background: rgba(255, 79, 216, 0.06);
}

td.name {
  font-weight: 700;
  font-family: "Space Grotesk", Outfit, sans-serif;
  white-space: nowrap;
}

td.ports, td.image {
  color: var(--muted);
  font-size: .88rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-word;
}

td.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.badge.running { color: var(--green); background: rgba(61, 255, 154, 0.12); border: 1px solid rgba(61, 255, 154, 0.3); }
.badge.exited, .badge.dead, .badge.created { color: var(--muted); background: rgba(168, 173, 216, 0.1); border: 1px solid rgba(168, 173, 216, 0.25); }
.badge.paused { color: var(--yellow); background: rgba(255, 229, 102, 0.1); border: 1px solid rgba(255, 229, 102, 0.3); }
.badge.restarting { color: var(--orange); background: rgba(255, 159, 67, 0.12); border: 1px solid rgba(255, 159, 67, 0.35); }
.badge.unknown { color: var(--red); background: rgba(255, 59, 92, 0.12); border: 1px solid rgba(255, 59, 92, 0.3); }

.status-detail {
  display: block;
  margin-top: .25rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.uptime {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.usage {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.usage .sub {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  margin-top: 2px;
  white-space: normal;
}

.usage.hot { color: #ff9aa8; }
.usage.warn { color: #ffe566; }

.mini-bar {
  position: relative;
  margin-top: .35rem;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  max-width: 120px;
}

.mini-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.mini-bar.warn > i { background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.mini-bar.hot > i { background: linear-gradient(90deg, var(--orange), var(--red)); }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 900px) {
  .host-bar { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .actions { align-items: stretch; width: 100%; }
  .btn { width: 100%; }
  .pills { justify-content: flex-start; }
}
