* {
    box-sizing: border-box;

}
body, html {
    height: 100%;
}

body {
background: #7a2525;
background: linear-gradient(312deg, rgba(122, 37, 37, 1) 0%, rgba(0, 0, 0, 1) 54%, rgba(0, 0, 0, 1) 100%);
    color: #ffffff;
    font-family: "Playfair Display";
    /* background-image: url(../images/background.jpg); */
    /* background-position: center center;
    background-repeat: no-repeat;
    background-size: cover; */
}

button {
    cursor: pointer;
    font-weight: 600;
}

button:hover {
    opacity: 0.9;
}

button:focus-visible {
    outline: none;
}

.main{
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: 100%;
    width: 100%;
    margin: 0 auto;
}

.field-box {
    margin-left: 40px;
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 30px;
    padding: 10px 0px;
    margin: 0px;
}

.game-rules {
    display: none;
    flex-direction: column;
    gap:20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.list-rules {
    display: flex;
    flex-direction: column;
    gap:20px;
    max-width: 600px;
}

.list-rules img {
    width: 20px;
}

.game-rules__close-btn {
    font-weight: 600;
    cursor: pointer;
}

.game-rules__close-btn:hover {
    opacity: 0.9;
}

.modal-overlay {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #000000dd;
    z-index: 999;
}

.field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative; 
    width: 1208px;
    height: 728px;
    margin: 0 auto;
    border: 4px solid;
}

.field .tile {
    position: absolute;
    width: 30px;
    height: 30px;
    background-size: 100%;
    background-image: url(../images/tile-.png);
    z-index: 5;
}

.field .tileW {
    background-image: url(../images/tile-W.png);
}

.field .tileE {
    background-image: url(../images/tile-E.png);
    z-index: 10;
}

.field .tileP {
    background-image: url(../images/tile-P.png);
    z-index: 10;
}

.field .tileHP {
    background-image: url(../images/tile-HP.png);
    z-index: 9;
}

.field .tileSW {
    background-image: url(../images/tile-SW.png);
    z-index: 9;
}

.field .tile .health {
    background-color: #ff0000;
    z-index: 11;
    position: absolute;
    left: 0px;
    top: 0px;
    height: 4px;
    border-radius: 10px;
}

.field .tileP .health {
    background-color: #00ff00;
    z-index: 11;
    position: absolute;
    left:
    0px;
    top: 0px;
    height: 4px;
    border-radius: 10px;
}

.game-info {
    display: flex;
    gap: 20px;
    font-size: 20px;
    font-weight: 600;
    line-height: 20px;
}

.game-info p {
    position: relative;
    width: 55px;
    margin-top: 10px;
}

.game-info span {
    position: absolute;
    top: -2px;
    padding-left: 2px;
}

.game-info img {
    width: 22px;
    height: 22px;
}

.low-health {
    border: 4px solid #ff0000;
    box-shadow: rgb(255 0 0 / 50%) 0px 0px 10px 8px;
}

.low-health-text {
    color: #ff0000;
}

.game-over {
    display: none;
    flex-direction: column;
    gap:20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.sword {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.sword-img {
    width: 100%;
    min-width: 300px;
    max-height: 900px;
}

@media (max-width: 1600px) {
    .field {
        width: 1008px;
        height: 608px;
    }

    .field .tile .health {
        height: 3px;
    }

    .sword-img {
        max-height: 700px;
    }
}

@media (max-width: 1368px) {
    .field {
        width: 808px;
        height: 488px;
    }

    .field .tile .health {
        height: 2px;
    }

    .sword-img {
        max-height: 500px;
    }
}

@media (max-width: 1200px) {
    .field-box {
        margin-left: 0px;
    }

    .sword {
        display: none;
    }
}