:root {
  --bg: #14171c;
  --panel: #1d2129;
  --line: #2b303a;
  --text: #e7e9ee;
  --muted: #8b93a3;
  --accent: #ff7a45;
  --accent-dim: #cc5f34;
  --success: #6fcf97;
  --danger: #eb5757;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}
.badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
}
.badge.online { color: var(--success); border-color: var(--success); }
.badge.offline { color: var(--danger); border-color: var(--danger); }

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
}
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem;
}
h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; margin: 0 0 0.4rem; }
h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; margin: 0 0 0.4rem; }
.sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.3rem; }
code {
  background: rgba(255, 122, 69, 0.12);
  color: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 1.2rem;
  transition: border-color 0.15s ease;
  text-align: center;
  padding: 0.5rem;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone input { display: none; }

.controls { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.3rem; }
.controls label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  gap: 0.6rem;
}
.controls input[type="number"] {
  width: 90px; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); border-radius: 6px; padding: 0.35rem 0.5rem;
}
.controls input[type="range"] { flex: 1; accent-color: var(--accent); }
.checkbox-label { justify-content: flex-start; gap: 0.5rem; }
.checkbox-label input { accent-color: var(--accent); }

button#submit-btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--accent);
  color: #14171c;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
button#submit-btn:hover { background: var(--accent-dim); }
button#submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

#result-message { font-size: 0.85rem; margin-top: 1rem; color: var(--muted); }
#result-message.success { color: var(--success); }
#result-message.error { color: var(--danger); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  max-height: 420px;
  overflow-y: auto;
}
.gallery img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}
.empty-state { color: var(--muted); font-size: 0.9rem; }

.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}
