body {
    width: 100%;
    margin: 0;
    color: black;
}
body.dark {
    background-color: black;
    color:#BBB
}

#messages {
    width: 100%;
}
@media screen and (max-width: 25em) {
    #messages {
        width: calc(100% - 3em);
    }
}
.title {
    text-align: center;
    white-space: nowrap;
    font-size: 1.7em;
    font-family: 'Corbel', 'Trebuchet MS', Arial, sans-serif;
    margin-top: 0.5em;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 900;
}

#game-container {
    width: 100%;
    overflow-x: hidden;
}
#game-container.small {
    font-size: 0.72em;
}
#game-container.tiny {
    font-size: 0.549em;
}

#game {
    position: relative;
    left: 0;
    width: 100%;
}
#game.transition {
    transition: left 1000ms ease;
    left: -100%;
    width: 200%;
}
#game.transition.slow {
    transition: left 5000ms ease;
}
#game * {
    box-sizing: content-box;
}

.level {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}
#game.transition .level {
    width: 50%;
}


.bottle {
    width: 3em;
    height: 20em;
    padding-top: 1em;
    margin: 1em;
    margin-top: 3em;
    transition: margin 300ms, padding 500ms, border 500ms;
    border: 0.25em solid black;
    border-top: 0;
    border-radius: 0 0 1.75em 1.75em;

    position: relative;
    display: inline-flex;
    flex-direction: column-reverse;
    vertical-align: text-bottom;
    touch-action: manipulation;
}
.dark .bottle {
    border-color: gray;
}

.capped {
    padding-top: 0;
    border-top: 1em solid black;
}

.selected-bottle {
    margin-top: 1em;
    margin-bottom: 2em;
}

.water {
    width: 3em;
    height: 0;
}
.water.detached {
    position: absolute;
    transform: translateY(2.04em);
    z-index: -1;
}

.bottle .water:first-of-type, .water.detached.bottom {
    border-radius: 0 0 1.75em 1.75em;
}

#level-no {
    height: 2.5em;
    font-size: 2.5em;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: #CCC;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}
.dark #level-no {
    color: #444;
}

#toolbar {
    height: 2.5em;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
}
#toolbar div {
    display: inline-block;
    cursor: pointer;
    font-size: 2.5em;
    height: 1.5em;
    width: 1.5em;
    padding: 0;
    text-align: center;
    touch-action: manipulation;
    color: black
}
.dark #toolbar div {
    color: #BBB
}
#toolbar div.inactive {
    display: none;
}

#menu > div {
    margin-top: 1em;
}
input[type="checkbox"] {
    width: 2em;
    height: 2em;
    vertical-align: middle;
}
input[type="number"] {
    font-size: 1em;
    vertical-align: middle;
    margin-top: -0.2em;
    width: 5em;
}
select {
    background-color: white;
    font-size: 0.8em;
}
