:root {
  color-scheme: dark;
  font-family: "Segoe UI", sans-serif;
  background: #101318;
  color: #eee7dc;
}

body {
  margin: 0;
}

h1,
h2,
p {
  margin: 0;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #2c3340;
}

h1 {
  font-size: 1.25rem;
  font-weight: 650;
}

#server-name,
.empty {
  color: #b7b1a8;
  margin-top: 4px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pill {
  border: 1px solid #3a4250;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.86rem;
}

.pill.ok {
  color: #b6f3c6;
  border-color: #2f6b45;
  background: #163224;
}

.pill.warn {
  color: #ffe0a8;
  border-color: #7a5a22;
  background: #3a2c12;
}

.pill.bad {
  color: #ffc2b8;
  border-color: #7a332c;
  background: #3a1816;
}

.pill.wait {
  color: #c9c3ba;
}

main {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  padding: 16px 22px 28px;
}

.card {
  background: #181d25;
  border: 1px solid #2c3340;
  padding: 14px;
  min-width: 0;
}

.view {
  grid-row: span 2;
}

.log-card {
  grid-column: 1 / -1;
}

h2 {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 10px;
}

#player-count {
  color: #b7b1a8;
  font-weight: 500;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #2c3340;
  vertical-align: middle;
}

tr.watching td {
  background: #243044;
}

.row-actions {
  display: flex;
  gap: 6px;
}

button {
  font: inherit;
  background: #d7a15f;
  color: #1b140c;
  border: 0;
  padding: 7px 10px;
  cursor: pointer;
}

#sound {
  background: #243044;
  color: #eee7dc;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

video,
img {
  width: 100%;
  background: #000;
  margin-top: 10px;
}

.actions {
  margin-top: 10px;
}

.channel {
  padding: 8px 0;
  border-bottom: 1px solid #2c3340;
}

.channel strong {
  display: block;
}

.channel span {
  color: #b7b1a8;
}

#log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow: auto;
}

#log li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #2c3340;
}

#log time {
  color: #8f897f;
  font-variant-numeric: tabular-nums;
}

#log .ok span {
  color: #b6f3c6;
}

#log .warn span {
  color: #ffe0a8;
}

#log .error span {
  color: #ffc2b8;
}

@media (max-width: 900px) {
  header,
  main {
    display: block;
  }

  .pills {
    margin-top: 12px;
    justify-content: flex-start;
  }

  .card {
    margin-top: 12px;
  }
}
