body {
  background: #cde;
}

div {
  margin: 0;
  padding: 0;
}

/* Set child containers to Android color */
div div {
  background: #A4CA39;
  position: relative;
}

.android {
  height: 404px;
  width: 334px;
  margin: 100px auto;
}

.head, .head-click {
  width: 220px;
  height: 100px;
  top: 32px;
  left: 58px;
  border-radius: 110px 110px 0 0;
}

.l-eye, .r-eye {
  background: #fff;
  width: 20px;
  height: 20px;
  position: absolute;
  top: 42px;
  border-radius: 10px;
  z-index: 2;
}
.l-eye {
  left: 50px;
}
.r-eye {
  right: 50px;
}

.l-ant, .r-ant {
  width: 6px;
  height: 50px;
  position: absolute;
  top: -34px;
  border-radius: 3px;
}
.l-ant {
  left: 50px;
  transform: rotate(-30deg);
}
.r-ant {
  right: 50px;
  transform: rotate(30deg);
}

.body, .body-click {
  width: 220px;
  height: 184px;
  top: 40px;
  left: 58px;
  border-radius: 0 0 25px 25px;
}

.l-arm, .r-arm, .l-leg, .r-leg {
  width: 50px;
  position: absolute;
}

.l-arm, .r-arm {
  height: 150px;
  border-radius: 25px;
}
.l-arm {
  left: -58px;
}
.r-arm {
  right: -58px;
}

.l-leg, .r-leg {
  height: 80px;
  top: 184px;
  border-radius: 0 0 25px 25px;
}
.l-leg {
  left: 45px;
}
.r-leg {
  right: 45px;
}

/* Hover animations */

/* Head tilt, anchored at bottom left corner */
.head:hover {
  transform: rotate(-5deg);
  transform-origin: bottom left;
  -webkit-transform: rotate(-5deg);
  -webkit-transform-origin: bottom left;
  -moz-transform: rotate(-5deg);
  -moz-transform-origin: bottom left;
}

/* Arm goes out to left, anchored at top */
.l-arm:hover {
  transform: rotate(15deg);
  transform-origin: 50% 25px;
  -webkit-transform: rotate(15deg);
  -webkit-transform-origin: 50% 25px;
  -moz-transform: rotate(15deg);
  -moz-transform-origin: 50% 25px;
}

/* Arm goes out to right, anchored at top */
.r-arm:hover {
  transform: rotate(-15deg);
  transform-origin: 50% 25px;
  -webkit-transform: rotate(-15deg);
  -webkit-transform-origin: 50% 25px;
  -moz-transform: rotate(-15deg);
  -moz-transform-origin: 50% 25px;
}

/* Both legs slide up when moused over, appearing like steps */
.l-leg:hover, .r-leg:hover {
  transform: translate(0, -25%);
}

/* Click animations */

/* Body click */
.body-click {
  top: 0;
  left: 0;
  background: transparent;
}

/* Becomes active when clicked, making picture appear above torso */
.body-click:active {
  background: url(spongebob.jpg);
}

/* Eye click */
/* Becomes active when clicked, changing shape to winking eye */
.l-eye:active, .r-eye:active {
  height: 5px;
  border-radius: 0;
  top: 52px;
}

/* Head click */
/* Parent container for hat -- is just for organization, no display */
.head-click {
  top: 0;
  left: 0;
  background: transparent;
  z-index: 1;
}

/* Draw top of hat, with border bottom as hat strap */
.head-click:active .hat-top {
  width: 80px;
  height: 80px;

  left: 70px;
  top: -90px;

  background: black;
  border-radius: 15% 15% 0 0;
  border-bottom: 10px solid white;
}

/* Draw hat brim -- it's an ellipse! */
.head-click:active .hat-brim {
  width: 160px;
  height: 10px;

  left: 30px;
  top: -90px;

  background: black;
  border-radius: 40%;
}

/* Right arm click displays phone in "hand" */
.r-arm:active .r-click {
  width: 100px;
  height: 100px;
  
  position: fixed;
  bottom: 0;

  background-color: transparent;
  background-image: url(transparent-phone.png);
  background-size: contain;
  transform: rotate(30deg);
}
