*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --font-mono: 'Courier New', Courier, monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.github-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.github-link:hover {
  color: var(--text);
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* Controls */
.controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"],
select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: var(--font-ui);
}

input[type="text"]:focus,
select:focus {
  border-color: var(--accent);
}

.selects {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.selects label {
  flex: 1;
  min-width: 120px;
}

/* Preview */
.preview-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  padding: 1.5rem;
  min-height: 160px;
}

#preview {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.3;
  color: var(--text);
  white-space: pre;
  margin: 0;
}

/* Actions */
.actions {
  display: flex;
  justify-content: flex-end;
}

button {
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #0d1117;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  transition: background 0.15s, transform 0.1s;
}

button:hover {
  background: var(--accent-hover);
}

button:active {
  transform: scale(0.97);
}

button.copied {
  background: var(--success);
}

/* Responsive */
@media (max-width: 600px) {
  main {
    padding: 1rem;
  }

  header {
    padding: 0.75rem 1rem;
  }
}
