* {
    margin: 0;
    padding: 0
}

html,
code {
    font: 15px/22px arial, sans-serif
}

html {
    background: #fff;
    color: #222;
    padding: 15px
}

body {
    margin: 7% auto 0;
    max-width: 390px;
    min-height: 180px;
    padding: 30px 0 15px
}

*>body {
    background: url("robot.png") 100% 5px no-repeat;
    padding-right: 205px
}

p {
    margin: 11px 0 22px;
    overflow: hidden
}

ins {
    color: #777;
    text-decoration: none
}

a img {
    border: 0
}

@media screen and (max-width:772px) {
    body {
        background: none;
        margin-top: 0;
        max-width: none;
        padding-right: 0
    }
}

#logo {
    background: url("img/google.png") no-repeat;
    margin-left: -5px
}

#logo {
    display: inline-block;
    height: 54px;
    width: 150px
}

body {
    position: relative;
    min-width: 290px
}

*>body {
    background: none
}

p+p ins {
    display: block
}

#teaset,
#teacup {
    position: absolute
}

#teaset,
#teabot,
#teacup:before {
    top: 0;
    right: 0
}

#teaset:before,
#teabot,
#teabot:after,
#teabot:before,
#teacup:after,
#teacup:before {
    position: absolute;
    background: url("img/teapot.png") no-repeat;
    background-size: 236px 296px
}

#teaset:before,
#teabot:after,
#teabot:before,
#teacup:after,
#teacup:before {
    display: block;
    content: ''
}

#teaset {
    width: 278px;
    height: 247px
}

#teabot {
    z-index: 3;
    width: 236px;
    height: 175px;
    cursor: pointer;
    -moz-transition: -moz-transform 1s;
    -webkit-transition: -webkit-transform 1s;
    transition: transform 1s;
    -moz-transform-origin: 40% 55%;
    -ms-transform-origin: 40% 55%;
    -webkit-transform-origin: 40% 55%;
    transform-origin: 40% 55%
}

.google #teabot:hover {
    -moz-transform: rotate(-30deg);
    -ms-transform: rotate(-30deg);
    -webkit-transform: rotate(-30deg);
    transform: rotate(-30deg)
}

#teaset:before {
    bottom: 30px;
    right: 45px;
    width: 127px;
    height: 24px;
    background-position: -82px -272px
}

#teabot:before {
    top: 103px;
    left: 81px;
    width: 82px;
    height: 49px;
    background-position: 0 -242px;
    opacity: 0;
    -moz-transition: opacity .25s .1s;
    -webkit-transition: opacity .25s .1s;
    transition: opacity .25s .1s
}

#teabot:hover:before,
#teabot.tip:before {
    opacity: 1
}

#teacup {
    top: 180px;
    right: 110px;
    width: 168px;
    height: 67px
}

#teacup:after {
    z-index: 2;
    width: 100%;
    height: 100%;
    background-position: 0 -175px
}

@-webkit-keyframes pour {
    0% {
        background-position: -168px -175px
    }

    100% {
        background-position: -231px -175px
    }
}

@keyframes pour {
    0% {
        background-position: -168px -175px
    }

    100% {
        background-position: -231px -175px
    }
}

#teabot:after {
    top: 65px;
    left: -2px;
    width: 21px;
    height: 0;
    background-position: -168px -175px;
    opacity: 0;
    -moz-transition: all .5s;
    -webkit-transition: all .5s;
    transition: all .5s;
    -moz-transform: rotate(0);
    -ms-transform: rotate(0);
    -webkit-transform: rotate(0);
    transform: rotate(0);
    -webkit-animation: pour .3s steps(3) infinite;
    animation: pour .3s steps(3) infinite
}

.google #teabot:hover:after,
#teabot.pour:after {
    top: 58px;
    left: -20px;
    height: 90px;
    opacity: .7;
    -moz-transition-duration: 1s;
    -webkit-transition-duration: 1s;
    transition-duration: 1s;
    -moz-transform: rotate(30deg);
    -ms-transform: rotate(30deg);
    -webkit-transform: rotate(30deg);
    transform: rotate(30deg)
}

#teacup:before {
    width: 61px;
    height: 30px;
    background-position: -82px -242px
}

#teacup:before {
    z-index: 1;
    top: 3px;
    left: 17px;
    -moz-transition: -moz-transform 2s 1s;
    -webkit-transition: -webkit-transform 2s 1s;
    transition: transform 2s 1s;
    -moz-transform: translateY(15px);
    -ms-transform: translateY(15px);
    -webkit-transform: translateY(15px);
    transform: translateY(15px)
}

.google #teabot:hover+#teacup:before,
#teabot.pour+#teacup:before {
    -moz-transition-duration: 5s;
    -webkit-transition-duration: 5s;
    transition-duration: 5s;
    -moz-transform: none;
    -ms-transform: none;
    -webkit-transform: none;
    transform: none
}

@media (-webkit-min-device-pixel-ratio:1.5),
(min--moz-device-pixel-ratio:1.5),
(min-resolution:1.5dppx) {

    #teaset:before,
    #teabot,
    #teabot:after,
    #teabot:before,
    #teacup:after,
    #teacup:before {
        background-image: url("img/teapot_2x.png")
    }
}

@media (max-width:772px) {
    #teaset {
        margin: 20px
    }
}

@media (max-width:540px) {
    #teaset {
        margin: auto;
        position: relative
    }
}