:root {
  color-scheme: light dark;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #10141f;
  color: #e9edf5;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  display: grid;
  gap: 1rem;
}

.header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
}

.header p {
  margin: 0.4rem 0 0;
  color: #b5bfce;
}

.panel {
  background: #171d2c;
  border: 1px solid #2a3550;
  border-radius: 12px;
  padding: 1rem;
}

.help-panel summary {
  list-style: none;
}

.help-panel summary::-webkit-details-marker {
  display: none;
}

.help-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: #e9edf5;
  user-select: none;
}

.help-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.45em;
  color: #7d93c4;
  transition: transform 0.15s ease;
}

.help-panel[open] .help-summary::before {
  transform: rotate(90deg);
}

.help-summary:hover {
  color: #c8d4f0;
}

.help-content {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #2a3550;
  color: #b5bfce;
  font-size: 0.95rem;
  line-height: 1.55;
}

.help-steps {
  margin: 0;
  padding-left: 1.25rem;
}

.help-steps li {
  margin-bottom: 0.55rem;
}

.help-steps li:last-child {
  margin-bottom: 0;
}

.help-content code {
  font-size: 0.9em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: #0f1421;
  border: 1px solid #3a496d;
  color: #e4e9f5;
}

.help-note {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid #2a3550;
  font-size: 0.9rem;
  color: #9aa8c4;
}

#robots-form {
  display: grid;
  gap: 0.7rem;
}

label {
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border-radius: 8px;
  border: 1px solid #3a496d;
  background: #0f1421;
  color: #f2f5fb;
  padding: 0.65rem;
}

textarea {
  resize: vertical;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.output-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

button {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  background: #3f68ff;
  color: #fff;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

button.ghost {
  background: #2c3958;
}

#output {
  margin: 0.9rem 0 0;
  min-height: 230px;
  background: #0f1421;
  border: 1px solid #3a496d;
  border-radius: 8px;
  padding: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.status {
  margin: 0.8rem 0 0;
  color: #a8b6d8;
  min-height: 1.2rem;
}

@media (min-width: 900px) {
  .app {
    grid-template-columns: 1fr 1fr;
  }

  .header,
  .help-panel {
    grid-column: 1 / -1;
  }
}
