:root {
  --bg: #050505;
  --panel: rgba(15, 15, 15, 0.92);
  --panel-2: rgba(19, 8, 3, 0.82);
  --line: rgba(255, 111, 0, 0.32);
  --line-soft: rgba(255, 111, 0, 0.16);
  --orange: #ff6f00;
  --gold: #ffd36a;
  --green: #35ff85;
  --red: #ff5f4e;
  --text: #f7f7f7;
  --muted: #bca996;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    repeating-linear-gradient(0deg, rgba(255, 111, 0, 0.05) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(255, 111, 0, 0.04) 0 1px, transparent 1px 58px),
    radial-gradient(circle at 72% 12%, rgba(255, 111, 0, 0.16), transparent 34%),
    linear-gradient(135deg, #050100, #0c0300 58%, #020100);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

button {
  cursor: pointer;
  font: inherit;
}

.shell {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.topbar,
.card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel), var(--panel-2));
  box-shadow: inset 0 0 28px rgba(255, 111, 0, 0.05), 0 0 28px rgba(0, 0, 0, 0.25);
}

.topbar {
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
}

.kicker,
.card-head p {
  margin: 0 0 6px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: #fff3d8;
}

h1 {
  font-size: clamp(26px, 4vw, 44px);
}

h2 {
  font-size: 19px;
}

.pill {
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.34);
  text-align: center;
  font-weight: 800;
}

.pill.online {
  color: var(--green);
  border-color: rgba(53, 255, 133, 0.32);
  background: rgba(53, 255, 133, 0.08);
}

.pill.error {
  color: var(--red);
  border-color: rgba(255, 95, 78, 0.35);
  background: rgba(255, 95, 78, 0.08);
}

.grid {
  display: grid;
  grid-template-columns: 1.05fr 1.45fr 0.9fr;
  gap: 14px;
  margin-top: 14px;
}

.card {
  min-width: 0;
  border-radius: 14px;
  padding: 16px;
}

.last-event {
  grid-column: 1 / -1;
}

.status-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
  color: var(--muted);
}

.status-list b {
  color: var(--green);
  text-align: right;
}

.url-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.url-box span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px;
  color: #dff7ff;
  background: rgba(0, 0, 0, 0.35);
}

.url-box button,
.events-head button {
  border: 1px solid rgba(255, 111, 0, 0.45);
  border-radius: 10px;
  padding: 11px 14px;
  color: #050100;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  font-weight: 800;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.counter-grid div {
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.counter-grid strong {
  color: var(--gold);
  font-size: 28px;
}

.counter-grid span {
  color: var(--muted);
  font-size: 12px;
}

pre {
  min-height: 120px;
  overflow: auto;
  margin: 16px 0 0;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px;
  color: #dff7ff;
  background: rgba(0, 0, 0, 0.32);
}

.events-card {
  margin-top: 14px;
}

.events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.events-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.event-item,
.empty {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.24);
}

.event-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.event-item strong,
.event-item small,
.event-item span {
  display: block;
}

.event-item small {
  margin-top: 5px;
  color: #fff3d8;
}

.event-item span,
.empty {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.event-item code {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--gold);
  background: rgba(255, 111, 0, 0.12);
}

@media (max-width: 900px) {
  .topbar,
  .events-head {
    align-items: stretch;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .last-event {
    grid-column: auto;
  }

  .url-box,
  .event-item {
    grid-template-columns: 1fr;
  }
}
