:root {
  --duration: 400ms;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --bounce: cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

* {
  box-sizing: border-box;
}

h1 {
  line-height: 1.15;
}

p {
  line-height: 1.5;
}

code {
  display: block;
  margin-bottom: 1rem;
  padding: 1rem;
  width: 100%;
  font-family: "Menlo", monospace;
  font-size: 14px;
  line-height: 1.4;
  color: #484848;
  background-color: #f3f3f3;
  border-radius: 2px;
}
code span {
  font-weight: bold;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: 100vh;
  max-width: 100px;
}

input {
  margin: 1rem 0;
  padding: 0.5rem;
  width: 100%;
  font-size: 1rem;
}

.copy-click {
  position: relative;
  padding-bottom: 2px;
  text-decoration: none;
  cursor: copy;
  color: #484848;
  border-bottom: 1px dashed #767676;
  transition: background-color calc(var(--duration) * 2) var(--ease);
}
.copy-click:after {
  content: attr(data-tooltip-text);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  padding: 8px 16px;
  white-space: nowrap;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 0 0 -12px rgba(0, 0, 0, 0);
  pointer-events: none;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: box-shadow calc(var(--duration) / 1.5) var(--bounce), opacity calc(var(--duration) / 1.5) var(--bounce), transform calc(var(--duration) / 1.5) var(--bounce);
}
.copy-click.is-hovered:after {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  opacity: 1;
  transform: translate(-50%, 0);
  transition-timing-function: var(--ease);
}
.copy-click.is-copied {
  background-color: yellow;
}
.copy-click.is-copied:after {
  content: attr(data-tooltip-text-copied);
}