:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --border: #30363d;
  --error: #f85149;
  --success: #3fb950;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem;
}

header {
  margin-bottom: 2rem;
}

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

.api-hint {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.api-label {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}

#api-base {
  display: block;
  width: 100%;
  max-width: 32rem;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

#api-base:focus {
  outline: none;
  border-color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.row {
  margin-bottom: 0.75rem;
}

.row label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

input[type="text"],
input[type="date"],
input[type="url"] {
  width: 100%;
  max-width: 20rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

button {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

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

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.result {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.result.error {
  color: var(--error);
}

.result.success {
  color: var(--success);
}

.table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

th, td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.download-row {
  margin-top: 0.75rem;
}

.download-row a {
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
}

.download-row a:hover {
  text-decoration: underline;
}
