body {
    padding: 0;
    margin: 0;    
    background: rgb(51,43,55);
    background: radial-gradient(circle, rgba(51,43,55,1) 0%, rgba(51,43,55,1) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color:#fff;
    font-family: 'MedievalSharp', cursive;
    user-select: none;
}


main {
    display:flex;
    flex-direction: row;
    margin:6vh 5vw;
    justify-content: center;
    width:86vw;
    gap: 2rem;
} 

.character-card {
    height: 370px;
    margin-top: .5rem;
    width: 15rem;
    height: 22rem;
    padding: 1vh 1vw 7rem;
    font-size: 1.6rem;
    color: white;
    border-radius: 14px;
    position: relative;
    background: #231d24;
    text-align: center;
    border: 0.2rem solid #000721;
    box-shadow: inset 0px 0px 6px 2px rgba(100,100,100,0.2),
                0px 0px 10px rgba(117,182,214,0.2);
}

.name {
    margin: 1rem 0;
    width:100%;
    letter-spacing: 0.08em;
    font-size: 100%;
}

.avatar {
    width: 14rem;
    height: 15rem;
    border: 2px solid #000721;
    opacity: 0.8;
    border-radius: 10px;
    background-color: rgba(0, 7, 33, 0.8);
}

.health {
    font-size:1.1rem;
    font-weight: normal;
    width:90%;
    text-align: left;
    margin: 1vh 5%;
    color:#ccc;
    letter-spacing: 0.03em
}

.health b {
    font-weight: bold;
    color:#fff;
}

.health-bar-outer {
    background: #171217;
    height: 0.45rem;
    width:90%;
    margin: 0 5%;
    border-radius: 2px;
}

.health-bar-outer .health-bar-inner {
    background: #466d34;
    height: 100%;
    border-radius: 2px;
}

.health-bar-outer .health-bar-inner.danger {
    background:#d1435f;
}

.dice-container {
    width:100%;
    height: 17%;
    position: absolute;
    bottom:0;
    left:0px;
    right:0;
    background: #000721;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .7rem;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}


.dice, .placeholder-dice{
    height:60px;
    width:20px;
    background: #fff;   
    border-radius: 5px;
    border:1px solid #666;
    color:#000721;
    text-align: center;
    line-height: 7.2vh;
}

.dice-container .placeholder-dice{
    background-color: transparent;
}

.dice-container .dice, .dice-container .placeholder-dice{
    height: 4rem;
    width: 4rem;
    line-height: 4rem;
}

button {
    margin: .5rem 0;
    font-family: 'MedievalSharp', cursive;
    background-color: #fcc02a;
    border: 2px solid #963404;
    outline: none;
    padding: 0 1.8rem;
    text-align: center;
    text-decoration: none;
    font-size: 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    color:#963404;
    height:4rem;
    box-shadow: 0px 6px 10px -4px rgba(0,0,0,0.4);
}

button:active {
    background-color: #c2b28c;
    box-shadow: 0 5px #666;
    transform: translateY(4px);
}

.disabled {
    background-color: #c2b28c;
}


button:focus { outline: 0 }

.end-game{
    width: 45rem;
    margin: 3rem 0 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50px;
}

.end-game > h2 {
    font-size: 3.5rem;
    padding: 0;
    margin: 1rem 0 0 0;
}

.end-game > h3{
    font-size: 1.5rem;
    width: 80%;
    margin: 0 auto;
    padding: 2rem 0 1.5rem;
}

.end-emoji{
    font-size: 80px;
    margin: 0.2em 0 1.5rem;
}

.back{
    font-size: 1.2rem;
    margin: .5rem 0 0 0;
    color: red;
}

.container {
    width: 200px;
    text-align: center;
    margin: 10em;
    background: rgb(23, 12, 29, 0.7);
    padding: 4em 10em 4em 10em;
    border-radius: 20px;
}

#story-body {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    width: 100%;
    height: 106%;
    background: rgb(51,43,55);
}

#story-container {
    position: relative;
    z-index: 1;
    margin-top: 10em;
    width: 600px;
    background: rgb(23, 12, 29, 0.7);
    padding: 4em 5em 4em 5em;
    border-radius: 20px;
    text-align: center;
    margin: 4rem auto;
}

#story-container > p {
    font-size: 25px;
}

#story-container > h1{
    font-size: 45px;
}

/* Shop */
.shop-info {
    z-index: 3;
    display: flex;
    position: absolute;
    top: 0%;
    left: 0%;
    height: 40px;
    margin: 0.9em 0 0 1.4em;
}

#coins {
    padding: 0 0em 0 0em;
    margin: 0.5em 0;
    font-size: 2.2rem;
    text-shadow: 1px 1px #cccccc;
}

.coins-info {
    display: flex;
}

.coin-icon {
    width: 60px;
    height: 60px;
    padding: 0;
    margin: 0.4em 0 0 1.5em;
}

#shop-button {
    padding: 0 1em;
    height: 60px;
    border-radius: 50px;
}

#shop {
    position:absolute;
    top: 0.8%;
    left: 0%;
    margin: 0 1em;
    width: 470px;
    height: 750px;
    background: rgb(138, 123, 146);
    padding: 4.5em 1em 1em 1em;
    border-radius: 20px;
    z-index: 2;
    display: none;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shop-slot > img {
    width: 90px;
    height: 110px;
    margin: 0.6em .5rem 0;
    border-radius: 20px;
}

.shop-description {
    width: 250px;
    margin: .6rem .8rem;
    font-family: 'Times New Roman', Times, serif;
}

.shop-slot {
    display: flex;
    background-color: #171217;
    margin: 0.6em 0 0;
    padding: 1em;
    border-radius: 20px;
    height: 9rem;
}

.buy-button {
    text-align: center;
    width: 20px;
    height: 80px;
    padding: 1em 2.5em 1em 0.7em;
    font-size: 20px;
    margin: .6rem 0 0;
}

.price-label {
    font-weight: bold;
}
  
.price-value {
    color: gold;
}


.shake  {
    animation: shake 0.5s;
    animation-iteration-count: infinite;
}

@keyframes shake {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5px, 0); }
    20% { transform: translate(5px, 0); }
    30% { transform: translate(-5px, 0); }
    40% { transform: translate(5px, 0); }
    50% { transform: translate(-5px, 0); }
    60% { transform: translate(5px, 0); }
    70% { transform: translate(-5px, 0); }
    80% { transform: translate(5px, 0); }
    90% { transform: translate(-5px, 0); }
    100% { transform: translate(0, 0); }
}

@media(max-width: 1180px){
    /* Main Game */
    main {
        margin:5.5rem auto 2rem;
    } 

    .character-card {
        margin-top: .5rem;
        width: 15rem;
        height: 20rem;
    }

    .name {
        margin: .8rem 0;
    }

    .avatar {
        width: 14rem;
        height: 15rem;
    }

    .health {
        margin: 1.3vh 5%;
    }

    .health-bar-outer {
        height: 0.35rem;
    }

    .dice-container {
        gap: 1rem;
    }

    .dice-container .dice, .dice-container .placeholder-dice{
        height: 3.5rem;
        width: 3.5rem;
        line-height: 3.5rem;
    }
}

@media(max-width:768px) {
    /* Story */
    #story-body {
        width: 100%;
        height: 100%;
    }

    #story-container {
        width: 25rem;
        margin: 2rem auto 0 ;
        padding: 2rem ;
        margin: 3rem auto 0;
    }
    
    #story-container > p {
        font-size: 25px;
    }
    
    #story-container > h1{
        font-size: 40px;
    }

    #story-container > button {
        padding: 0 1.8rem;
        margin: 0 0 1rem;
        text-align: center;
        height:9vh;
        width: 170px;
        font-size: 1.5rem;
    }

    /* EndGame */
    .end-game{
        width: 40rem;
    }
    
    .end-game > h2 {
        font-size: 3rem;
        padding: 0;
        margin: 1rem 0 0 0;
    }
    
    .end-game > h3{
        font-size: 1.4rem;
    }

    /* Shop */
    #shop {
        margin: 0 .5em;
        width: 430px;
        height: 650px;
        padding: 4.8em 1.2em 1em;
    }

    .shop-slot > img {
        width: 100px;
        height: 100px;
    }

    .shop-description {
        width: 200px;
    }

    .shop-slot {
        padding: .5rem;
        width: 26rem;
        height: 8.5rem;
    }

    .buy-button {
        width: 30px;
        height: 80px;
        font-size: 20px;
    }

    .price-label {
        font-weight: bold;
        padding: 0;
        margin-left: .2rem;
    }
    
    .price-value {
        color: gold;
        margin: .5rem 0 0 .25rem;
    }

}

@media (max-width: 550px){

    .character-card {
        margin-top: .5rem;
        width: 13rem;
        height: 17rem;
    }

    .name {
        margin: .8rem 0;
        font-size: 1.4rem;
    }

    .avatar {
        width: 12rem;
        height: 12rem;
    }

    .dice-container .dice, .dice-container .placeholder-dice{
        height: 3.2rem;
        width: 3.2rem;
        line-height: 3.2rem;
    }

    #shop {
        padding: 4.8em .8em 1em;
    }

    /* EndGame */
    .end-game{
        width: 30rem;
    }
    
    .end-game > h2 {
        font-size: 2.5rem;
        padding: 0;
        margin: 1rem 0 0 0;
    }
    
    .end-game > h3{
        font-size: 1.3rem;
    }
}

