* {
  box-sizing: border-box;
}

html {
  background: #000;
  height: 100%;
  font: normal 16px FreeSans, Helvetica, sans-serif;
}

body {
  margin: 0;
  min-height: 100%;
  position: relative;
  color: #fff;
  background: url('/img/drink.jpg') no-repeat;
  background-position: 100% 0;
  background-size: contain;
  background-attachment: fixed;
}

#background {
  width: 100%;
  position: fixed;
  top: -100px;
  left: 0;
  z-index: -1;
}

#wrapper {
  width: 600px;
  max-width: 100%;
  padding: 50px;
  margin: 0;
  font-size: 1.5rem;
}

#wrapper h1 {
  font-size: 3rem;
}

#wrapper button {
  background: #333;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s ease;
}

#wrapper button:hover {
  background: #444;
}

#wrapper input[type=text] {
  height: 50px;
  padding: 0.2rem 0.8rem;
  font-size: 1.5rem;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.3s ease;
}

#wrapper input[type=text]:focus {
  border-color: #888;
}

#add-drink {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

#add-drink input {
  flex-grow: 1;
}

#add-drink input::placeholder {
  color: #888;
}

#add-drink button {
  width: 100px;
  height: 50px;
  padding: 0.2rem 0.8rem;
  font-size: 1.25rem;
}

ul#drink-list {
  list-style: none;
  padding-left: 0;
  margin-top: 2rem;
}

#drink-list li {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
}

#drink-list li:not(:last-child) {
  border-bottom: 1px solid #333;
}

#drink-list li input[type=text] {
  background: #000;
  border-color: #000;
  flex-grow: 1;
  flex-shrink: 1;
  width: 100%;
  max-width: 100%;
}

#drink-list li input[type=text]:focus {
  background: #1a1a1a;
  border-color: #888;
}

#drink-list button.save {
  visibility: hidden;
  flex-grow: 0;
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  font-size: 1.25rem;
}

#drink-list button.delete {
  opacity: 0.5;
  width: 2rem;
  height: 2rem;
  flex-grow: 0;
  flex-shrink: 0;
  font-size: 1.25rem;
  margin-right: 0.8rem;
}

#drink-list button.delete:hover {
  opacity: 1;
}

#background-credit {
  position: fixed;
  bottom: 5px;
  right: 10px;
  font-size: 10px;
  opacity: 0.3;
  white-space: nowrap;
}

#background-credit a {
  color: #fff;
}

#widget-wrapper {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
}

@media (max-width: 500px) {
  html {
    font-size: 12px;
  }

  #wrapper h1 {
    font-size: 2.5rem;
  }

  #wrapper {
    padding: 6rem 1rem 0 1rem;
  }

  #add-drink {
    flex-direction: column;
    gap: 0.8rem;
    max-width: 100%;
  }

  #add-drink input {
    width: 100%;
  }

  #add-drink button {
    width: 100%;
  }

  #widget-wrapper {
    top: auto;
    right: auto;
  }

  #remotestorage-widget {
    top: auto;
    right: auto;
    position: relative;
  }
}
