:root {
  --bg: #0f1115;
  --surface: #181a20;
  --surface-light: #1f222a;
  --border: #2a2f3a;
  --text: #e6e6e6;
  --text-muted: #a0a8b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #10a37f;
}

html,
body {
  font-family: "Segoe UI", Roboto, sans-serif;
  height: 100%;
  margin: auto;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  max-width: 600px;

}

/* HEADER */

header {
  margin-top: 1.5rem;
  text-align: center;
  padding: 1.2rem 1rem;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
}

#subtitle {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* MAIN */

main {
  margin: 1.8rem auto;
}

/* CONTROLS */

.controls,
.modules {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: nowrap;
  margin-top: 1.5rem;
}


label {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  gap: 0.25rem;

}

label[for="lang-select"] {
  margin-bottom: 0.5rem;
  /* ajusta o espaço desejado */
}

select {
  padding: 0.45rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface-light);
  color: var(--text);
  font-size: 0.8rem;
}

select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* BUTTON */

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem;
  border-radius: 5px;
  align-self: flex-end;
  margin-left: auto;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #2a2f3a;          /* cor mais neutra */
  color: var(--text-muted);     /* texto mais apagado */
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.btn-primary:disabled:hover {
  background: #2a2f3a;
  transform: none;
}

/* OUTPUT */

.output {
  margin-top: 1.2rem;
  padding: 1.2rem;
  background: var(--surface-light);
  border-radius: 8px;
  border: 1px solid var(--border);
  min-height: 60px;
}

/* REPOSITORY LINK */

.repo-link {
  margin: 0.5rem;
}

.repo-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.repo-link a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* FOOTER */

footer {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}