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

/* Mobile-first base styles */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: #333;
  background: #fff;
  min-height: 100vh;
}

#root {
  width: 100%;
  min-height: 100vh;
}

#main {
  margin: 1em;
  max-width: 540px;
}

button {
  font: inherit;
  cursor: pointer;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* Table styles */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

th,
td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid #ddd;
}

th {
  background-color: #f5f5f5;
  font-weight: 600;
}

tr:hover {
  background-color: #f9f9f9;
}

form {
  margin: 1rem 0;
}

#add-player {
  input {
    width: 70%;
    margin-right: 2%;
  }

  button {
    width: 28%;
  }
}

#footer-controls form {
  display: inline;

  button {
    width: 10em;
    margin-right: 1em;
    margin-top: 1em;
  }
}

#scores {
  input {
    width: 3em;
  }

  th, td {
    text-align: center;
  }

  tfoot {
    font-weight: bold;
  }
}
