@import url('https://fonts.googleapis.com/css?family=Muli');
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Muli', sans-serif;
    background-color: #eff3f3;
}
div {
    margin: 0;
    padding: 0;
}
a {
    outline: none;
    text-decoration: none;
    cursor: pointer;
    font-size: 20px;
    color: #999a9a;
    -webkit-transition: .3s;
    transition: .3s;
}
a:hover, a:focus {
    color: #858787;
}
p {
    margin: 0;
}
@-webkit-keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@-webkit-keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
@-webkit-keyframes greenFlash {
    0% { color: #666; }
    40% { color: #66BB6A; }
    100% { color: #666; }
}
@keyframes greenFlash {
    0% { color: #666; }
    40% { color: #66BB6A; }
    100% { color: #666; }
}
@-webkit-keyframes blink {
    0% { opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes blink {
    0% { opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}
.fade-in, .fade-out, .flash, .blink-once {
    -webkit-animation-duration: 0.4s;
    animation-duration: 0.4s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}
.fade-in {
    -webkit-animation-name: fadeIn;
    animation-name: fadeIn;
}
.fade-out {
    -webkit-animation-name: fadeOut;
    animation-name: fadeOut;
}
.flash {
    -webkit-animation-duration: 0.5s;
    animation-duration: 0.5s;
    -webkit-animation-name: greenFlash;
    animation-name: greenFlash;
}
.blink-once {
    -webkit-animation-duration: 1.4s;
    animation-duration: 1.4s;
    -webkit-animation-name: blink;
    animation-name: blink;
}
.button {
    margin: 0 4px;
    padding: 8px 28px 10px;
    font-variant: small-caps;
    text-transform: lowercase;
    background: #dee0e0;
    background: rgba(222, 224, 224, 0.7);
}
.floating-box {
    top: 45px;
    left: 0;
    width: 100%;
    z-index: 2;
    position: absolute;
    font-size: 16px;
    text-align: center;
}
.floating-message {
    padding: 7px 18px;
    color: #66BB6A;
    display: inline;
    background-color: rgb(230, 232, 232);
    background-color: rgba(230, 232, 232, 0.6);
}
.overlay {
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 3;
    position: absolute;
    font-size: 16px;
    text-align: center;
    background-color: rgb(230, 232, 232);
    background-color: rgba(230, 232, 232, 0.6);
}
.overlay-content {
    position: absolute;
    bottom: 22%;
    width: 100%;
    text-align: center;
}
.top-right {
    top: 5px;
    right: 8px;
    position: absolute;
}
.hidden {
    display: none;
}


#game-container {
    display: flex;
    justify-content: center;
    margin: 85px 0;
    font-size: 19px;
}
#game-grid {
    flex: 0 0 auto;
    display: block;
    position: relative;
    margin: 0;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    border: 2px solid #e6e8e8;
    background-color: #eff3f3;
}
#game-stats {
    flex: 1 0 110px;
    max-width: 265px;
    position: relative;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    text-align: center;
    background-color: #e6e8e8;
    color: #999a9a;
}
#game-stats h3 {
    margin-top: 100px;
    font-size: 23px;
    color: #666;
}
.game-next-block {
    display: inline-block;
    border: 1px solid #dee0e0;
}
.game-next-block .grid-cell {
    height: 20px;
    width: 20px;
    border: 1px solid #dee0e0;
}
.game-next-block, .game-all-time {
    margin-bottom: 23px;
}
.game-stat-title {
    margin-bottom: 10px;
    font-size: 15px;
    font-variant: small-caps;
    text-transform: lowercase;
}
.game-stat {
    font-size: 15px;
    margin-bottom: 7px;
}
.game-stat-data {
    font-size: 16px;
    display: inline;
    color: #666;
}
#stats-overlay {
    font-size: 14px;
    color: #777;
    background-color: rgba(230, 232, 232, 0.95);
}
#stats-overlay-content table {
    margin: 0 auto;
    text-align: left;
}
#stats-overlay-content td {
    padding-bottom: 11px;
}
#stats-overlay-content td:first-child {
    font-weight: bold;
    text-align: right;
    padding-right: 13px;
}
#grid-overlay-text {
    color: #858787;
    margin-bottom: 30px;
}


.grid-container {
    font-size: 0;
}
.grid-row {
    margin: 0;
    display: block;
}
.grid-cell {
    margin: 0;
    height: 27px;
    width: 27px;
    display: inline-block;
    border: 1px solid #e6e8e8;
}
/* tetris shadow tiles */
.grid-cell.grid-cell-sd-i {
    background-color: rgba(77,208,225,0.18);
    border-color: rgba(38,198,218,0.18);
}
.grid-cell.grid-cell-sd-j {
    background-color: rgba(33,150,243,0.1);
    border-color: rgba(30,136,229,0.1);
}
.grid-cell.grid-cell-sd-l {
    background-color: rgba(255,152,0,0.18);
    border-color: rgba(251,140,0,0.18);
}
.grid-cell.grid-cell-sd-o {
    background-color: rgba(253,216,53,0.18);
    border-color: rgba(251,192,45,0.18);
}
.grid-cell.grid-cell-sd-s {
    background-color: rgba(156,204,101,0.18);
    border-color: rgba(139,195,74,0.18);
}
.grid-cell.grid-cell-sd-z {
    background-color: rgba(186,104,200,0.1);
    border-color: rgba(178,78,195,0.1);
}
.grid-cell.grid-cell-sd-t {
    background-color: rgba(244,67,54,0.1);
    border-color: rgba(229,57,53,0.1);
}
/* tetris tiles */
.grid-cell.grid-cell-i {
    background-color: #4dd0e1;
    border-color: #26c6da;
}
.grid-cell.grid-cell-j {
    background-color: #2196f3;
    border-color: #1e88e5;
}
.grid-cell.grid-cell-l {
    background-color: #ff9800;
    border-color: #fb8c00;
}
.grid-cell.grid-cell-o {
    background-color: #fdd835;
    border-color: #fbc02d;
}
.grid-cell.grid-cell-s {
    background-color: #9ccc65;
    border-color: #8bc34a;
}
.grid-cell.grid-cell-z {
    background-color: #ba68c8;
    border-color: #b24ec3;
}
.grid-cell.grid-cell-t {
    background-color: #f44336;
    border-color: #e53935;
}


@media(max-height: 680px) {
    #game-container {
        margin: 10px;
    }
}
@media(max-width: 520px) {
    html {
        background-color: #e9eaea;
    }
    body {
        background: none;
    }
    #game-container {
        margin: 3px;
        justify-content: flex-start;
    }
    .grid-cell {
        height: 22px;
        width: 22px;
    }
}