:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
  margin: 0;
  padding: 24px;
  background: #1b1d1f;
  color: #e6e6e6;
  display: flex;
  justify-content: center;
}
main {
  width: min(960px, 100%);
  background: rgba(24, 25, 27, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px 28px 32px;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.6);
}
.top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
}
h1 {
  margin: 0;
  font-size: 26px;
  color: #71d6ff;
  letter-spacing: 0.6px;
}
section {
  margin-bottom: 24px;
}
fieldset {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0;
}
legend {
  padding: 0 10px;
  font-size: 15px;
  color: #9fc9ff;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 16px;
  margin-bottom: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #b5bcc7;
}
label.inline {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1d68ff;
}
input[type="number"],
select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 12, 14, 0.6);
  color: inherit;
}
button {
  cursor: pointer;
  border-radius: 10px;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #2094ff, #1d68ff);
  color: #fff;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:not(:disabled):hover {
  transform: translateY(-1px);
}
textarea {
  width: 100%;
  min-height: 360px;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.4;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 14, 0.7);
  color: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.row + .row {
  margin-top: 12px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.tab-button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 12, 14, 0.4);
  color: inherit;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tab-button:hover {
  border-color: rgba(113, 214, 255, 0.6);
}
.tab-button[aria-selected="true"] {
  background: linear-gradient(135deg, #2094ff, #1d68ff);
  border-color: transparent;
  color: #fff;
}
.tab-panels {
  position: relative;
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
.status-light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.4);
  background: #ff4d4f;
  box-shadow: 0 0 8px rgba(255, 77, 79, 0.6);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.status-light.status-connected {
  background: #32d070;
  box-shadow: 0 0 8px rgba(50, 208, 112, 0.6);
}
.status-light.status-disconnected {
  background: #ff4d4f;
  box-shadow: 0 0 8px rgba(255, 77, 79, 0.6);
}
.status-message {
  margin-left: auto;
  font-size: 13px;
  color: #9bcf83;
  min-height: 18px;
}
.status-message.error {
  color: #ff9b9b;
}
.help {
  font-size: 12px;
  color: #7f8794;
}
