/* It starts completely empty. I wish you luck. */
body {
    margin: 1rem;
}

#wrapper {
    display: grid;
    grid-template-areas:
        "logo" 
        "menu" 
        "intro" 
        "playground" 
        "footer";
}

h1.game { 
    grid-area: logo; 
    width: 500px;
    height: 345px;
    background: url("../images/tetris-logo.png") no-repeat;
    text-indent: -9999px;
}

ul.menu { 
    grid-area: menu; 
}

#introduction { 
    grid-area: intro; 
    margin: 2rem;
}

#tetgrid { 
    grid-area: playground; 
}

footer { 
    grid-area: footer; 
}

@media screen and (min-width: 850px) {
    #wrapper {
        grid-template-areas:
            "logo       intro"
            "menu       menu"
            "playground playground"
            "footer     footer";
        grid-template-columns: 500px 1fr;
        grid-template-rows: 345px auto auto auto;
    }
}

ul.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.menu a {
    display: block;
    background: gray;
    padding: 10px;
    color: white;
    text-decoration: none;
    transition: transform 0.1s ease-in, background-color 0.5s linear;
}

.menu li {
    width: 25%;
}

.menu a:hover {
    background: red;
    color: yellow;
    transform: scale(1.1);
}

@media screen and (max-width: 550px) {
    .menu li {
        width: 100%;
    }
}

ul.menu ul li {
    width: 100%;
}

ul.menu ul {
    display: none; 
}

ul.menu li:hover ul {
    display: flex; 
}

.menu .submenu li>a:hover {
    background: red;
    color: yellow;
}
.menu .submenu>a:after {
    content: "+";
    padding-left: 5px;
}

#tetgrid {
    display: grid;
    grid-template-columns: repeat(6, 100px);
    grid-template-rows: repeat(6, 100px);
}

img {
    transition-property: transform;
    transition-duration: 2s;
}

img:hover {
    transform: rotate(-90deg);
}

#o {
    grid-column: 1 / 3;
    grid-row: 1 / span 2;
}

#i {
    grid-column: 3 / -1;
    grid-row: 1 / span 1;
}
#z {
    grid-column: 2 / span 2;
    grid-row: 3 / span 2;
}
#z img {
    transform-origin: 0 0;
}

#j {
    grid-column: 4 / span 2;
    grid-row: 2 / span 3;
}

#l {
    grid-column: 1 / span 2;
    grid-row: 4 / span 3;
}

#s {
    grid-column: 5 / span 2;
    grid-row: 4 / span 2;
}

#t {
    grid-column: 3 / span 3;
    grid-row: 5 / span 2;
}
