body {
  margin: 0;
  background: #0f172a;
  color: #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.monitor {
  min-height: 100vh;
  padding: 22px;
  box-sizing: border-box;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.status {
  display: flex;
  gap: 10px;
  align-items: center;
}
.level {
  border: 1px solid #334155;
  background: #111827;
  color: #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.card, .panel {
  background: #111827;
  border: 1px solid #263244;
  border-radius: 8px;
  padding: 16px;
}
.card h3 {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}
.card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  color: #fff;
}
.card span {
  color: #22c55e;
  font-size: 12px;
}
.layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
  margin-top: 14px;
}
.limits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
label {
  display: block;
  color: #94a3b8;
  font-size: 13px;
}
input, select {
  width: 100%;
  margin-top: 6px;
  box-sizing: border-box;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  padding: 9px;
}
button {
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: #16a34a;
  color: #fff;
  cursor: pointer;
}
.danger {
  background: #dc2626;
}
.switches {
  display: grid;
  gap: 10px;
}
.switches button {
  background: #1f2937;
  border: 1px solid #334155;
  text-align: left;
}
.switches button.on {
  background: #7f1d1d;
  border-color: #ef4444;
}
.log {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 13px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.game-grid div {
  border: 1px solid #263244;
  border-radius: 8px;
  padding: 12px;
  background: #0b1220;
}
.game-grid span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
}
.game-grid strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 22px;
}
.panel h3 {
  margin: 12px 0 8px;
  color: #cbd5e1;
  font-size: 14px;
}
.cluster-panel {
  overflow: hidden;
}
.cluster-ticker {
  margin: 4px 0 14px;
  overflow: hidden;
  border: 1px solid #22543d;
  border-radius: 8px;
  background: #06281f;
  color: #bbf7d0;
  font-size: 13px;
  line-height: 38px;
  white-space: nowrap;
}
.cluster-ticker div {
  display: inline-block;
  min-width: 100%;
  padding-left: 100%;
  animation: tickerMove 22s linear infinite;
}
.cluster-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.cluster-card {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #263244;
  border-radius: 10px;
  padding: 14px;
  background: #0b1220;
}
.computer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.computer-screen {
  position: relative;
  width: 130px;
  height: 86px;
  border: 5px solid #334155;
  border-radius: 10px;
  background: linear-gradient(180deg, #0b2f2a, #08111f);
  box-shadow: inset 0 0 18px rgba(34, 197, 94, .25), 0 16px 28px rgba(0, 0, 0, .22);
  box-sizing: border-box;
  overflow: hidden;
}
.computer-screen::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
  animation: screenSweep 3.6s ease-in-out infinite;
}
.screen-title {
  position: relative;
  z-index: 1;
  padding: 12px 12px 0;
  color: #86efac;
  font-size: 12px;
}
.screen-node {
  position: relative;
  z-index: 1;
  padding: 7px 12px 0;
  color: #e5e7eb;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.screen-wave {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .25);
  overflow: hidden;
}
.screen-wave span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  transition: width .4s ease;
}
.computer-stand {
  width: 28px;
  height: 18px;
  background: #334155;
}
.computer-base {
  width: 82px;
  height: 10px;
  border-radius: 999px;
  background: #475569;
}
.cluster-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cluster-title strong {
  color: #ffffff;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cluster-title em {
  color: #86efac;
  font-size: 12px;
  font-style: normal;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
  animation: livePulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
.cluster-desc {
  margin: 6px 0 10px;
  color: #94a3b8;
  font-size: 12px;
}
.metric-line {
  margin-top: 8px;
}
.metric-line div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #cbd5e1;
  font-size: 12px;
}
.metric-line b {
  color: #e5e7eb;
  font-weight: 600;
}
.metric-line i {
  display: block;
  height: 7px;
  margin-top: 5px;
  border-radius: 999px;
  background: #172033;
  overflow: hidden;
}
.metric-line em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  transition: width .4s ease;
}
.cluster-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 10px;
  color: #94a3b8;
  font-size: 12px;
}
.cluster-details span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th, td {
  border-bottom: 1px solid #263244;
  padding: 8px 6px;
  color: #cbd5e1;
  text-align: left;
}
th {
  color: #94a3b8;
  font-weight: 500;
}
.compress-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.compress-list span {
  display: block;
  border: 1px solid #263244;
  border-radius: 6px;
  padding: 10px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 13px;
}
.error {
  color: #fecaca;
  font-size: 13px;
  margin: 8px 0 0;
}
@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes screenSweep {
  0% { left: -40%; }
  45%, 100% { left: 110%; }
}
@media (max-width: 900px) {
  .grid, .layout, .limits, .compress-list, .cluster-cards, .cluster-card, .cluster-details { grid-template-columns: 1fr; }
  .header { align-items: flex-start; flex-direction: column; gap: 12px; }
}
