* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #0b1220;
  color: #e5e7eb;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.header p {
  margin: 0;
  color: #9ca3af;
}

.health {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111827;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  font-size: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9ca3af;
}

.card {
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #cbd5f5;
}

input, select {
  background: #0b1220;
  border: 1px solid #243145;
  border-radius: 10px;
  color: #e5e7eb;
  padding: 10px 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.row.space {
  justify-content: space-between;
}

.checkbox {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.btn {
  border: 1px solid #243145;
  background: #0b1220;
  color: #e5e7eb;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.btn.primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn.ghost {
  background: transparent;
  border-color: #334155;
  color: #94a3b8;
}

.hint {
  margin-top: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.meta {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

.hidden {
  display: none;
}

.streams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stream {
  background: #0b1220;
  border: 1px solid #243145;
  border-radius: 12px;
  padding: 12px;
}

.stream-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.stream-name {
  font-weight: 600;
}

.badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #243145;
}

.badge.ok {
  color: #10b981;
  border-color: #10b981;
}

.badge.bad {
  color: #f59e0b;
  border-color: #f59e0b;
}

.stream-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #9ca3af;
}

.stream-preview {
  margin-top: 10px;
  background: #0b1220;
  border: 1px solid #243145;
  border-radius: 12px;
  overflow: hidden;
}

.stream-preview video {
  width: 100%;
  display: block;
}

.stream-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.link {
  color: #60a5fa;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .grid, .streams {
    grid-template-columns: 1fr;
  }
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
}
