:root {
  --bg: #08111d;
  --panel: #111c2b;
  --soft: #162436;
  --border: rgba(189, 215, 255, 0.14);
  --text: #edf5ff;
  --muted: #8fa7c2;
  --accent: #59c8ff;
  --success: #38d996;
  --danger: #ff6b7a;
  --warning: #ffbb52;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #06101b 0%, #0a1422 100%);
}
h1, h2, p { margin: 0; }
.page {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.panel {
  background: rgba(17, 28, 43, 0.96);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.login-panel {
  width: min(440px, 100%);
}
.topbar,
.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.hero {
  margin-bottom: 18px;
}
.command-panel {
  align-items: center;
}
.control-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.feedback {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 187, 82, 0.38);
  border-radius: 8px;
  background: rgba(255, 187, 82, 0.1);
  padding: 14px 16px;
}
.feedback[hidden] {
  display: none;
}
.spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--warning);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.game-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.game-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  min-height: 260px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}
.game-card:hover:not(:disabled) {
  border-color: rgba(89, 200, 255, 0.72);
  background: rgba(89, 200, 255, 0.09);
}
.game-card:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}
.game-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--soft);
}
.game-copy {
  display: grid;
  gap: 8px;
  padding: 14px;
}
.game-name {
  font-size: 1.15rem;
  font-weight: 800;
}
.game-desc {
  color: var(--muted);
  line-height: 1.35;
}
.game-state {
  align-self: end;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.muted {
  color: var(--muted);
  margin-top: 8px;
}
.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 12px 14px;
}
.btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(135deg, #3aa8ff, #26d7b0);
  color: #06101b;
}
.btn.muted {
  background: var(--soft);
  color: var(--text);
}
.btn.big {
  min-width: 220px;
}
.btn.compact {
  padding: 8px 10px;
  font-size: 0.85rem;
}
.btn.danger {
  background: rgba(255, 107, 122, 0.12);
  color: var(--danger);
}
.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.panel-title {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.status-line {
  font-size: 1.35rem;
  font-weight: 800;
}
.status-details {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}
.status-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.status-details dt {
  color: var(--muted);
  font-size: 0.82rem;
}
.status-details dd {
  margin: 0;
  font-weight: 700;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.status-healthy { color: var(--success); }
.status-warning { color: var(--warning); }
.status-down { color: var(--danger); }
.events {
  display: grid;
  gap: 10px;
}
.event {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.event:last-child {
  border-bottom: 0;
}
.notice.error {
  color: var(--danger);
}
@media (max-width: 760px) {
  .topbar,
  .hero {
    align-items: stretch;
    flex-direction: column;
  }
  .control-buttons {
    justify-content: stretch;
  }
  .control-buttons .btn {
    width: 100%;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .games {
    grid-template-columns: 1fr;
  }
  .btn.big {
    width: 100%;
  }
}
