@import url("./root.css");
@import url("./reset.css");
@import url("./fonts.css");
@import url("./responsive.css");

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--colorDarkGrey);
    color: var(--colorWhite);
    font-family: 'texte', sans-serif;
    font-size: 16px;
    background-image: url("../media/images/bg.jpeg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'titre', sans-serif;
}

.flex {
    display: flex;
    flex-direction: row;
}

.column {
    display: flex;
    flex-direction: column;
}

.center {
    justify-content: center;
    align-items: center;
}

.text-center {
    text-align: center;
}

.x-center {
    justify-content: center;
}

.y-center {
    align-items: center;
}

.align {
    text-align: center;
}

.wrap {
    flex-wrap: wrap;
}

.pad-around {
    padding: 20px;
}

#player .card:not(.killed) {
    cursor: pointer;
    transform: scale(1);
    transition: all linear 0.2s;
}

#player .card:not(.killed):hover, .cardSelected {
    transform: scale(1.1)!important;
    z-index: 5!important;
    box-shadow: 4px 4px 8px gold, -4px -4px 8px gold!important;
}

.card {
    width: calc(25% - 20px);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
    margin: 10px;
    border: 2px solid #191919;
    position: absolute;
    top: 0;
}

.card:nth-child(1) {
    left: 0;
    z-index: 1;
}

.card:nth-child(2) {
    left: calc(25% - 40px);
    z-index: 2;
}

.card:nth-child(3) {
    left: calc(50% - 80px);
    z-index: 3;
}

.card:nth-child(4) {
    left: calc(75% - 120px);
    z-index: 4;
}

.card-avatar {
    width: calc(100% - 2px);
    height: 120px;
    margin: 10px auto;
    background-position: top 10px center;
    background-repeat: no-repeat;
    background-size: 81%;
    background-color: #191919;
    border-radius: 5px;
    border: 2px solid #5A5A5A;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.7) inset;
    transition: all linear 0.2s;
}

#player .card:not(.killed):hover .card-avatar, .cardSelected {
    background-position: top 0 center!important;
    background-size: 100%!important;
    background-color: #2D2D2D;
}

div.knight {
    background-image: var(--knigntBG);
}

p.knight {
    color: var(--knigntTitle);
}

div.warrior {
    background-image: var(--warriorBG);
}

p.warrior {
    color: var(--warriorTitle);
}

div.wizard {
    background-image: var(--wizardBG);
}

p.wizard {
    color: var(--wizardTitle);
}

.card-title {
    width: 100%;
    text-align: center;
    padding: 5px 0;
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 2px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
}

p.card-sub-title {
    text-align: center;
    width: 100%;
    padding: 5px 0;
    margin-top: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 2px;
}

.card ul {
    width: calc(100% - 22px);
    margin: auto;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    border: 2px solid #5A5A5A;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5) inset;
}

.card ul li {
    padding: 3px 0;
}

.card ul li b {
    letter-spacing: 2px;
    opacity: 0.7;
    font-size: 0.8em;
}

.relative {
    position: relative;
    height: 600px;
}

.title {
    font-size: 2em;
    font-weight: bold;
    text-transform: capitalize;
    width: max-content;
    padding: 20px 40px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 1000px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
    border: 1px solid #A9A9A9;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px auto;
    position: relative;
    z-index: 100;
}

#player .title::before {
    content: "\1F464";
    font-size: 27px;
    margin-right: 5px;
    height: 30px;
}

#computer .title::before {
    content: "\1F5A5";
    font-size: 27px;
    margin-right: 5px;
    height: 30px;
}

.cards-container {
    margin-left: 12%;
    height: 380px;
}

.cards-container::after {
    content: "";
    position: absolute;
    left: -12px;
    width: calc(100% - 70px);
    height: 70px;
    background-color: maroon;
    background-image: url(https://www.physimed.com/wp-content/uploads/2014/08/bigstock-Old-wood-texture-15078491-mod.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 4;
    bottom: -39px;
    border-radius: 10px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.8);
    border-bottom: 5px solid rgba(0, 0, 0, 0.5);
}

.killed {
    filter: grayscale(1);
    opacity: 0.8;
    z-index: 0!important;
    transform: scale(0.9);
    top: 12px;
}

.killed::before {
    content: "\1F480";
    position: absolute;
    top: -20px;
    right: calc(50% - 20px);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3C3C3C;
    border: 1px solid #E7E7E7;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.6);
    z-index: 1;
    border-radius: 100px;
    font-size: 1.2em;
}

#overlay, #overlayWin {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 200;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(transparent, transparent, #000);
    opacity: 0;
    visibility: hidden;
    transition: all linear 0.2s;
}

.displayOverlay {
    opacity: 1!important;
    visibility: visible!important;
}

#overlay h1, #overlayWin h1 {
    font-size: 5em;
    font-weight: bold;
    font-style: italic;
    color: gold;
    width: 100%;
    padding: 40px 0;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}