:root {
  --bg-color: #fdfdfd;
  --text-color: #222222;
  --link-color: #0056b3;
  --focus-outline: #ffaa00;
  --table-border: #eaeaea;
}

@media (prefers-color-scheme: dark) {
  :root {
	--bg-color: #2b2b2b;
	--text-color: #fcfcf5;
	--link-color: #66b3ff;
	--table-border: #444444;
  }
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

main {
  width: 100%;
  max-width: 60ch;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus-outline);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Responsive Table Wrapper */
.table-responsive {
  margin-bottom: 1rem;
  border: 1px solid var(--table-border);
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Forces scrolling on small screens instead of squishing */
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--table-border);
}

th {
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.02);
}

@media (prefers-color-scheme: dark) {
  th { background-color: rgba(255, 255, 255, 0.05); }
}

input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem;
  border: 1px solid var(--table-border);
  border-radius: 4px;
  background-color: var(--bg-color);
  color: var(--text-color);
}

button {
  padding: 0.5rem 1rem;
  background-color: var(--link-color);
  color: var(--bg-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  opacity: 0.9;
}

/* Specific adjustment for the delete button */
td button {
  padding: 0.5rem;
  background-color: #cc3300;
}