.joycon {
  width: 75px;
  height: 220px;
  display: inline-block;
  margin: 0 25px;
  border-top: 5px solid rgba(255, 255, 255, 0.4);
  border-bottom: 10px solid rgba(0, 0, 0, 0.1);
  position: relative;
}
.joycon:nth-child(1) {
  background-color: #00b2dc;
  border-top-left-radius: 50px;
  border-bottom-left-radius: 50px;
}
.joycon:nth-child(2) {
  background-color: #ff493e;
  border-top-right-radius: 50px;
  border-bottom-right-radius: 50px;
}

/* Joysticks */
.joystick {
  width: 35px;
  height: 35px;
  background: linear-gradient(to top right, #333, #60686b);
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  box-shadow: 0px 3px 0px rgba(0, 0, 0, 0.3);
  position: absolute;
}
.joystick:after {
  content: "";
  width: 27px;
  height: 27px;
  position: absolute;
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
}
.joycon:nth-child(1) .joystick {
  top: 40px;
  left: 20px;
}
.joycon:nth-child(2) .joystick {
  top: 110px;
  left: 20px;
}

/* Buttons */
.buttons {
  width: 55px;
  height: 55px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.joycon button {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  position: absolute;
  border: none;
  background: linear-gradient(to top right, #222, #666);
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  font-size: 8pt;
}
.joycon:nth-child(1) .buttons {
  top: 100px;
}
.joycon:nth-child(2) .buttons {
  top: 30px;
}
.joycon:nth-child(1) button {
  color: #252525;
}
.joycon:nth-child(2) button {
  color: #bbb;
}
.joycon button:nth-child(1) {
  left: 19px;
}
.joycon button:nth-child(2) {
  top: 19px;
}
.joycon button:nth-child(3) {
  left: 19px;
  bottom: 0;
}
.joycon button:nth-child(4) {
  top: 19px;
  right: 0;
}
.joycon button:before {
  content: "";
  width: 100%;
  height: 100%;
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  transform: rotate(40deg);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0;
}
.joycon:nth-child(1) button:nth-child(1):after {
  content: "▲";
}
.joycon:nth-child(1) button:nth-child(2):after {
  content: "◀";
}
.joycon:nth-child(1) button:nth-child(3):after {
  content: "▼";
}
.joycon:nth-child(1) button:nth-child(4):after {
  content: "►";
}
.joycon:nth-child(2) button:nth-child(1):after {
  content: "X";
}
.joycon:nth-child(2) button:nth-child(2):after {
  content: "Y";
}
.joycon:nth-child(2) button:nth-child(3):after {
  content: "B";
}
.joycon:nth-child(2) button:nth-child(4):after {
  content: "A";
}
button:active {
  box-shadow: none;
}
button:focus {
  outline: 0;
}

/* Start & Select */
.joycon span {
  position: absolute;
  top: 15px;
  width: 13px;
  height: 4px;
  background: #333;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.4);
}
.joycon:nth-child(1) span {
  right: 8px;
}
.joycon:nth-child(2) span {
  left: 8px;
}
.joycon:nth-child(2) span:after {
  content: "";
  width: 4px;
  height: 13px;
  background: #333;
  transform: translateX(-50%);
  position: absolute;
  left: 50%;
  top: -4px;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.4);
}

/* Sliders */
.joycon:before {
  content: "";
  width: 5px;
  height: 90%;
  background: #333;
  position: absolute;
  top: 6%;
}
.joycon:nth-child(1):before {
  right: -5px;
}
.joycon:nth-child(2):before {
  left: -5px;
}

/* Triggers */
.back-buttons:after {
  content: "";
  position: absolute;
  width: 140px;
  height: 90px;
  border-radius: 50px;
  border: 4px solid transparent;
  border-left: 4px solid #333;
}
.joycon:nth-child(1) .back-buttons:after {
  transform: rotate(45deg);
  top: 10px;
  left: -10px;
}
.joycon:nth-child(2) .back-buttons:after {
  transform: rotate(140deg);
  top: 8px;
  right: -7.5px;
}

/* Home & Capture */
.joycon i {
  width: 15px;
  height: 15px;
  background: #333;
  position: absolute;
  top: 170px;
}
.joycon:nth-child(1) i {
  right: 15px;
  border-radius: 2px;
}
.joycon:nth-child(1) i:after {
  content: "";
  width: 65%;
  height: 65%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border-top: 1px solid rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
}
.joycon:nth-child(2) i {
  left: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin: -3px;
  box-shadow: 0px 0px 1px #000;
}

figure {
  margin: 0;
  transform: translate(-50%, -50%);
  position: absolute;
  left: 50%;
  top: 50%;
  height: auto;
}
