* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #0f1115;
  color: #e7eaf0;
}
header {
  padding: 18px 24px 10px;
  border-bottom: 1px solid #252b36;
}
h1 { margin: 0 0 8px; font-size: 28px; }
h2 { margin: 0 0 8px; font-size: 20px; }
p { margin: 0; }
.controls {
  padding: 16px 24px;
  border-bottom: 1px solid #252b36;
}
.top-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.wide-label { grid-column: span 2; }
.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.checkbox-label input { width: auto; }
input, select, textarea, button {
  border-radius: 10px;
  border: 1px solid #374151;
  background: #161b22;
  color: #f1f5f9;
}
input, select {
  padding: 10px 12px;
}
textarea {
  width: 100%;
  min-height: 360px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}
button {
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 600;
}
button:hover { filter: brightness(1.12); }
.button-row {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.wide-actions { grid-column: span 4; }
main {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  padding: 20px 24px 32px;
}
.left, .right { min-width: 0; }
#tv-container {
  height: 760px;
  border: 1px solid #252b36;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0d12;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0b0d12;
  border: 1px solid #252b36;
  border-radius: 12px;
  padding: 12px;
  min-height: 300px;
}
.hint {
  margin: 8px 0 12px;
  color: #b7c0cd;
  font-size: 13px;
}
@media (max-width: 1200px) {
  .top-grid { grid-template-columns: 1fr 1fr; }
  .wide-label, .wide-actions { grid-column: span 2; }
  main { grid-template-columns: 1fr; }
  #tv-container { height: 520px; }
}
@media (max-width: 720px) {
  .top-grid { grid-template-columns: 1fr; }
  .wide-label, .wide-actions { grid-column: span 1; }
}
