@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: no-repeat center center/cover;
    background-image: linear-gradient(
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0.5)
    ),
    url("../img/castle.jpg");

    overflow: hidden;

    color: white;
    font-family: "MedievalSharp", sans-serif;

    padding-bottom: 150px;
}

textarea {
    width: 100%;
    height: 100%;
    resize: none;
    outline: none;

    overflow: -moz-scrollbars-none;

    background-color: #030508;
    color: white;
}

textarea::-webkit-scrollbar {
    width: 0 !important;
}

h1 {
    text-align: center;
    font-size: 50px;
}

img {
    max-width: 75px;
    max-height: 75px;
    object-fit: cover;
}

/* Grid Start */

.parent {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    column-gap: 5px;
    row-gap: 5px;
}

.title {
    grid-area: 1 / 1 / 2 / 10;
}

.gamelog {
    grid-area: 2 / 3 / 8 / 8;
}

#player-info {
    grid-area: 2 / 8 / 8 / 9;

    text-align: center;
    padding-top: 50px;
}

#inventory {
    grid-area: 2 / 2 / 8 / 3;

    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.flex-row {
    grid-area: 2 / 2 / 8 / 3;
    flex-direction: column;
}

#reset {
    grid-area: 8 / 2 / 9 / 3;
}

#next {
    grid-area: 8 / 8 / 9 / 9;
}

#yes {
    grid-area: 8 / 4 / 9 / 5;
}

#no {
    grid-area: 8 / 6 / 9 / 7;
}

#save {
    grid-area: 9 / 3 / 10 / 5;
}

#load {
    grid-area: 9 / 6 / 10 / 8;
}

/* Grid End */

#potion-shop,
#sword-shop,
#shield-shop {
    margin-bottom: 50px;
}

#item1 {
    text-align: center;
    display: none;
}

#item2 {
    text-align: center;
    display: none;
}

#item3 {
    text-align: center;
    display: none;
}

.btn {
    min-width: 130px;
    height: 40px;
    color: #fff;
    padding: 5px 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    outline: none;
    border-radius: 5px;
    border: none;
    background: #343a40;
    box-shadow: 0 5px #212529;
}

.btn:hover {
    box-shadow: 0 3px #212529;
    top: 1px;
}
  
.btn:active {
    box-shadow: 0 0 #212529;
    top: 5px;
}

.btn:disabled {
    background-color: gray;
    box-shadow: 0 0 gray;
}

.flex-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 159px;
}

.flex-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

#potion-shop {
    margin-right: 20px;
    display: none;
}

#sword-shop {
    margin-right: 20px;
    display: none;
}

#shield-shop {
    margin-right: 20px;
    display: none;
}

@media (max-width: 700px) {
    body {
        overflow-x: hidden;
        width: 100%;
        -webkit-box-sizing: border-box;
           -moz-box-sizing: border-box;
                box-sizing: border-box;
    }

    h1 {
        margin-left: 75px;
        font-size: 30px;
    }

    .parent {
        grid-template-columns: repeat(10, 1fr);
        grid-template-rows: repeat(11, 1fr);

        max-height: 1000px;
    }

    .title {
        max-height: 100px;
    }
    
    .gamelog {
        grid-area: 3 / 1 / 7 / 11;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    #player-info {
        grid-area: 9 / 2 / 10 / 9;
    
        text-align: center;
        padding-top: 10px;
    }
    
    #inventory {
        grid-area: 2 / 1 / 3 / 11;
    
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        align-items: center;
    }

    .flex-row {
        grid-area: 2 / 1 / 3 / 11;
    }

    .flex-col {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    #potion-shop,
    #sword-shop,
    #shield-shop {
        margin-right: 20px;
        margin-bottom: 0px;
    }

    #reset {        
        grid-area: 1 / 1 / 2 / 2;
    }
    
    #next {
        grid-area: 8 / 6 / 9 / 11;
        margin-top: -25px;
    }
    
    #yes {
        grid-area: 7 / 1 / 8 / 6;
    }
    
    #no {
        grid-area: 7 / 6 / 8 / 11;
    }
    
    #save {
        grid-area: 8 / 1 / 9 / 6;
        margin-top: -25px;
    }
    
    #load {
        grid-area: 1 / 10 / 2 / 11;
    }
    
    img {
        max-width: 75px;
        max-height: 75px;
        object-fit: cover;
    }

    .btn {
        min-width: 80px;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 345px) {
    h1 {
        font-size: 20px;
        padding-top: 10px;
    }

    .gamelog {
        grid-area: 3 / 1 / 6 / 11;
    }

    #next {
        grid-area: 7 / 6 / 8 / 11;
        margin-top: 0px;
    }
    
    #yes {
        grid-area: 6 / 1 / 7 / 6;
    }
    
    #no {
        grid-area: 6 / 6 / 7 / 11;
    }
    
    #save {
        grid-area: 7 / 1 / 8 / 6;
        margin-top: 0px;
    }
}