:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #0f141b;
  --border: #2d3748;
  --text: #e6edf3;
  --muted: #98a6b8;
  --primary: #2f81f7;
  --primary-2: #1f6feb;
  --success: #238636;
  --danger: #da3633;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #141b26 0%, var(--bg) 48%);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}
body { min-height: 100vh; }
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}
.panel {
  background: linear-gradient(180deg, rgba(22, 27, 34, 0.96), rgba(15, 20, 27, 0.96));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.panel-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}
.panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}

.badge-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(47, 129, 247, 0.12);
  border: 1px solid rgba(47, 129, 247, 0.35);
  color: #dceaff;
  font-size: 12px;
  font-weight: 700;
}
.field { display: block; margin-bottom: 16px; }
.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #d6deea;
}
input, textarea, button, a.download { font: inherit; }
input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #0f141b;
  color: var(--text);
  outline: none;
}
input:focus, textarea:focus { border-color: var(--primary); }
textarea {
  resize: vertical;
  min-height: 220px;
  line-height: 1.45;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
button, .download {
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}
button:hover, .download:hover { transform: translateY(-1px); }
button:disabled { opacity: 0.65; cursor: not-allowed; }
button.primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: white;
  font-weight: 700;
}
button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.status {
  margin-top: 16px;
  min-height: 24px;
  color: #c9d5e2;
  font-size: 14px;
}
.status.error { color: #ff9a9a; }
.download {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  background: var(--success);
  color: white;
  font-weight: 700;
}
.right-col {
  display: grid;
  gap: 14px;
}
.hidden { display: none; }
@media (max-width: 720px) {
  .page { padding: 12px; }
  .panel { padding: 14px; border-radius: 16px; }
  .panel-head { flex-direction: column; }
  .panel-head h1 { font-size: 22px; }
  textarea { min-height: 260px; }
  .actions { flex-direction: column; }
  button, .download { width: 100%; justify-content: center; }
}
