body, * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
}

body {
    background: #000;
    color: #eee;
    font-size: 18px;
    font-family: Helvetica, Tahoma, Geneva, Verdana, sans-serif;
    touch-action: manipulation;
}

a {
    color: #aff;
    text-decoration: underline;
}

.screen {
    background: linear-gradient(#1f1f4b 50%, #300f1a);
    opacity: 0;
    pointer-events: none;
    position: absolute;
    overflow: hidden;
    height: 100%;
    width: 100%;
    will-change: transform, filter;
    transition: transform .6s ease-in;
}

.about-screen {
    background: linear-gradient(#181125 50%, #2b0b0e);
    background-repeat: repeat-x;
    background-position-y: center;
    animation: slide-clouds 8s linear infinite;
    will-change: background-position-x;
}

.cloud-bg {
    background:  url(clouds.png), linear-gradient(#325 50%, #5e2538);
    background-repeat: repeat-x;
    background-position-y: center;
    animation: slide-clouds 8s linear infinite;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    font-size: 30px;
}

.logo {
    text-align: center;
    font-size: 35px;
    font-weight: 900;
    color: #ff6;
    line-height: 100px;
    margin-bottom: 40px;
    width: 100%;
}

.logo img {
    width: 100px;
    display: block;
    margin: 0 auto;
}

.about {
    padding-top: 20px;
    text-align: center;
    font-size: 0.8em;
}

.about-star {
    opacity: 0.8;
}

.nav {
    color: #faf;
    text-decoration: none;
    background: #636;
    display: block;
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    padding: 15px;
    border: #faf 8px solid;
    width: 100%;
    margin-bottom: 40px;
    will-change: transform, filter;
    transition: transform .2s ease-in-out, filter .5s ease-in;
}

.nav:hover {
    transform: scale(1.1);
    filter: brightness(150%);
}

.thread-wrap {
    position: absolute;
    will-change: transform;
    transition: transform 1s ease-in-out;
    z-index: 1;
}

.thread {
    transform-origin: 50% 0;
    animation: swing 4s ease-in-out infinite;
    display: inline-block;
    position: relative;
    width: 2px;
    border-radius: 5px;
    will-change: transform;
    transition: transform 1s ease-in-out;
}

img, a, label, .logo {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}

.star {
    position: absolute;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.sheep-wrap {
    position: absolute;
    left: -50px;
}

.sheep {
    width: 100px;
    height: 100px;
    animation: swing-soft 4s ease-in-out infinite;
}

#back {
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
}

#time, #count {
    pointer-events: none;
    position: absolute;
    bottom: 0;
    font-size: 35px;
    font-weight: 300;
    padding: 20px;
}

#time {
    position: absolute;
    left: 0;
}

#count {
    right: 0;
}

#settings {
    text-align: right;
    font-size: 16px;
}

.checkbox {
    position: absolute;
    opacity: 0;
}

.checkbox + label {
    position: relative;
    cursor: pointer;
    padding: 0;
}

.checkbox + label:before {
    content: '';
    margin-right: 10px;
    margin-top: 2px;
    display: inline-block;
    vertical-align: text-top;
    width: 12px;
    height: 12px;
    background: transparent;
    border: #faf 2px solid;
}

.checkbox:hover + label:before {
    border: #fff 2px solid;
}

.checkbox:checked + label:before {
    background: #faf;
}

.checkbox:checked + label:after {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    background: #faf;
    width: 2px;
    height: 2px;
    box-shadow: 
      2px 0 0 #325,
      4px 0 0 #325,
      4px -2px 0 #325,
      4px -4px 0 #325,
      4px -6px 0 #325,
      4px -8px 0 #325;
    transform: rotate(45deg);
}

.explosion {
    opacity: 0.6;
    will-change: transform;
    transition: transform .3s ease-in, opacity .3s ease-in;
    pointer-events: none;
}

.easter-egg {
    text-align: center;
}

.row {
    padding: 10px 0;
}

.spacer {
    display: inline-block;
    width: 100px;
}

.spacer-small {
    display: inline-block;
    width: 25px;
}

.play-sound {
    width: 75px;
    height: 75px;
}

@media screen and (max-height: 559px) {
    .container {
        padding: 10px;
        max-width: 400px;
    }
    .logo {
        margin-bottom: 0;
        line-height: 80px;
        font-size: 0.8em;
    }
    .logo img {
        width: 70px;
    }
    .nav {
        margin-bottom: 10px;
        font-size: 0.8em;
        border-width: 4px;
        padding: 8px;
    }
    .about {
        font-size: 0.5em;
    }
    .row {
        padding: 0;
    }
    .play-sound {
        width: 50px;
        height: 50px;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes swing {
    0%, 100% {
        transform: rotate(25deg);
    }
    50% {
        transform: rotate(-25deg);
    }
}

@keyframes swing-soft {
    0%, 100% {
        transform: rotate(15deg);
    }
    50% {
        transform: rotate(-15deg);
    }
}

@keyframes slide-clouds {
    0% {
      background-position-x: 0;
    }
    100% {
      background-position-x: -300px;
    }
}