* {
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
    font-family: 'VT323', monospace;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: rgb(0, 0, 0);
    flex-direction: column;
}

.ontop {
    position: absolute;
}

.logo-container {
    position: relative;
    height: 150px;
    width: 400px;
    top: 13px;
}
.main-logo {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 2;
}

.main-logo-hidden-box {
    position: absolute;
    left: calc(50% - 150px);
    top: 10px;
    display: block;
    height: 65%;
    width: 300px;
    box-shadow: 0 0 40px hotpink;
    z-index: 1;
}

h2 {
    font-size: 3em;
    color: #FEF6CD;
    text-transform: uppercase;
    letter-spacing: 0.5em;
}

header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100vw;
}

main {
    width: fit-content;
    margin: 0 auto;
}

header h2 {
    font-size: 3em;
    color: #FEF6CDff;
    text-transform: uppercase;
    letter-spacing: 0.5em;
}


.volume-container {
    /* display: flex; */
    position: fixed;
    right: 20px;
    top: 20px
    /* align-items: flex-end; */
    /* justify-content: flex-end;
    width: 100%; */
}

.volumeButton {
    background: transparent;
    border: none;
    /* position: relative; */
    /* bottom: -45px; */
    /* right: 10px; */
    /* z-index: 3; */
}

.volumeIcon {
    height: 50px;
    /* position: relative; */
    /* left: 120px; */
    /* right: 0px; */
    /* bottom: -3px; */
}

.main-container {
    background: transparent;
    border: 3px solid #f26c67;
    box-shadow: 0 0 14px hotpink;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    animation: fadeInMenu 2s ease 1;
}

.container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    background: linear-gradient(to right, #000000d0, #020121a8);
    padding: 0 6px 0 6px;
    border-radius: 8px;
}

.score-buttons-container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin-bottom: 3px;
}

.play-again,
.reset {
    /* padding: 15px 20px; */
    color: #fef6cd;
    background: linear-gradient(to bottom, #f26c67,#cc1e70, #99196c);
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 600;
    height: 3em;
    width: 129px;
    margin: 5px 6px 10px 6px;
}

.play-again:focus,
.main-menu__option:focus,
.reset:focus {
    color: #020121;
    background: linear-gradient(#fef6cd, #3be9f1);
}

.game {
    width: 675px;
    height: 555px;
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    transform-style: preserve-3d;
    perspective: 800px;
    justify-content: center;
    animation: sizeAnimationOneIntro 0.5s ease-in 1;
    z-index: 2;
    padding: 5px;
    flex-direction: column;
}

.item-outer-container {
    width: 100px;
    height: 100px;
    background: transparent;
    /* perspective: 200px; */
    border-radius: 8px;
    transform-style: preserve-3d;
    
}

.item-inner-container {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    border-radius: 8px;
    cursor: pointer;
    /* overflow: hidden;  */
    /* backface-visibility: hidden; */
    
}

.item-container {
    /* Ny container för att justera transform-egenskapen */
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    /* backface-visibility: hidden; */
    /* overflow: hidden; */
}

.item,
.item-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
    border-radius: 8px;
}

.item {
    /* position: absolute; */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    background: #fef6cd;
    transform: rotateY(180deg);
    transition: transform 0.5s, scale 0.3s;
    box-shadow: 0 0 0 white;
    /* border-radius: 10px; */
    cursor: pointer;
}

.item img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    outline: 0.5px solid #00f7ff;
}

.item-back {
    /* content: '';*/
    /*position: absolute; */
    /* inset: 0; */
    /* opacity: 0.8; */
    background: linear-gradient(72deg, #F26C67, #FEF6CD),
                url('../img/card_back.jpg');

    /* background: #F26C67; */
    /* transition: transform 0.5s; */
    /* transform: rotateY(0deg); */
    /* backface-visibility: hidden; */
    /* border-radius: 10px; */
    /* background-image: url('../img/card_back.jpg'); */
    /* background-blend-mode: hue; */
    background-blend-mode:multiply;
    background-size: cover;
    transition: transform 5s ease-in-out;
    backface-visibility: hidden;
    outline: 1px solid #f26c677c;
}

.item-inner-container:hover {
    /* scale: 1.01; */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.363);
    /* border: 5px double #ff9100; */
    animation: colorOutline 0.5s ease-out infinite;
    /* overflow: hidden; */
}
/* .item-back:hover{ 
    /* animation: scaleZoom 15s linear 1; */
    /* transform: scale(7);
    backface-visibility: hidden;
    z-index: -1;
}  */
/*tung effekt*/

/* @keyframes scaleZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(10);
    }
} */

.item-back:hover {
    background: linear-gradient(72deg, #F26C67, #FEF6CD),
                url('../img/card_back_hover.jpg');
    background-blend-mode:color;
    background-size: cover;
    /* transition: transform 5s ease-in-out; */
    backface-visibility: hidden;
    outline: 1px solid #f26c677c;
}
.boxOpen {
    transform: rotateY(180deg);
    transition: transform 0.5s;
}


/* .boxOpen:after,
.boxMatch:after {
    transform: rotateY(180deg);
    transition: transform 0.5s;
} */

.boxMatch {
    /* animation: backgroundAnimation 0.01s ease-in-out 2; */
    /* transform: rotateY(-720deg);
    transition: transform 0.5s, box-shadow 1.5s, opacity 3s;
    box-shadow: 0 0 20px rgb(255, 196, 129);
    opacity: 0; */
    cursor: default;
}

.boxMatchAnimation {
    transform: rotateY(-720deg);
    transition: transform 0.5s, box-shadow 1.5s, opacity 3s;
    box-shadow: 0 0 20px rgb(255, 196, 129);
    opacity: 0;
    cursor: default;
}

.score-board-container {
    height: 566px;
    width: 300px;
    /* background: #020121; */
    background: #020121;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    border-radius: 8px;
}

.score-board {
    flex-grow: 2;
    padding: 20px;
    align-self: flex-start;
}

.score-board h3 {
    color: #3be9f1;
}

h3 {
    font-size: 2em;
    color: #fef6cd;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.history {
    flex-grow: 1;
    height: 360px;
    width: 250px;
    background: linear-gradient(to bottom, #000, #020121);
    color: #f26c67;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    align-items:baseline;
    border-radius: 12px;
    /* border: 2px solid #F26C67; */
    /* box-shadow: 0 0 1px #F26C67; */
    margin-bottom: 10px;
    overflow: hidden;
}

.history h4 {
    font-size: 1.5em;
    padding: 8px;
    text-align: center;
    text-transform: uppercase;
}

.history-event {
    margin-top: 4px;
    color: #3be8f1e3;
}
.history-event::first-letter {
    /* font-size: 0.7em; */
    /* color: #3be8f12c; */
    letter-spacing: -2px;
}

.history-event:nth-child(3) {
    color: #3be8f1;
}
.history-event:nth-child(4) {
    color: #3be8f1ec;
}
.history-event:nth-child(5) {
    color: #3be8f1d7;
}
.history-event:nth-child(6) {
    color: #3be8f1be;
}
.history-event:nth-child(7) {
    color: #3be8f1a4;
}
.history-event:nth-child(8) {
    color: #3be8f18e;
}
.history-event:nth-child(8) {
    color: #3be8f180;
}
.history-event:nth-child(9) {
    color: #3be8f16e;
}
.history-event:nth-child(10) {
    color: #3be8f162;
}
.history-event:nth-child(11) {
    color: #3be8f156;
}
.history-event:nth-child(12) {
    color: #3be8f148;
}
.history-event:nth-child(13) {
    color: #3be8f13d;
}
.history-event:nth-child(14) {
    color: #3be8f12a;
}
.history-event:nth-child(15) {
    color: #3be8f11a;
}
.history-event:nth-child(16) {
    color: #3be8f115;
}
.history-event:nth-child(17) {
    color: #3be8f110;
}






.line-thing {
    display: block;
    height: 2px;
    width: 85%;
    background: linear-gradient(to right, transparent, #f26c67, #3be9f1, #f26c67, transparent);
    margin-left: 10%;
}

.pvm-menu,
.main-menu,
.pre-menu {
    text-align: center;
    /* margin-top: 50px; */
    /* height: 440px;
    width: 800px; */
    background: #020121;
    padding: 25px;
    border-radius: 10px;
    border: 3px solid #f26c67;
    box-shadow: 0 0 14px hotpink;
    display: flex;
    flex-direction: column;
    height: 460px;
    width: 600px;
    animation: fadeInMenu 2s ease 1;
}

.main-menu {
    display: flex;
    justify-content: space-between;
}

@keyframes fadeInMenu {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 100%;
    }
}

.pvm-menu button,
.main-menu button,
.pre-menu button {
    padding: 15px 20px;
    color: #fef6cd;
    background: linear-gradient(to bottom, #f26c67,#cc1e70, #99196c);
    border: none;
    border-radius: 8px;
    font-size: 1.3em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 600;
    height: 2.8em;
    margin: 10px;
}

.score-buttons-container button:hover,
.pvm-menu button:hover,
.main-menu button:hover,
.pre-menu button:hover {
    outline: 2px solid #f26c67;
    box-shadow: 0 0 5px hotpink;
}

.main-menu button {
    width: 217x;
}

.pvp-menu__button-container,
.pvm-menu__button-container {
    display: flex;
    flex-direction: column;
    width: 300px;

}

.pre-menu,
.pvm-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

form {
    margin-bottom: 10px;
    margin-top: 10px;
    color: white;    
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 1.3em;
    text-transform: uppercase;
    text-align: start;
}

input {
    width: 200px;
    padding: 5px;
    margin-bottom: 15px;
    border-radius: 7px;
    border: 2px solid #f26c67;
    font-size: 1.8em;
}

.player {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 1.3em;
    color: #fef6cd;
    margin-top: 10px;
    width: 250px;
}

.active-player {
    color: #c8ff00; 
    font-weight: bold;
    animation: sizeAnimation 0.8s ease-in-out infinite, sizeAnimationOne 0.8s ease-in-out 1;
    border-radius: 8px;
    padding: 0 8px 0 8px;
    font-size: 1em;
}

@keyframes sizeAnimation {
    0%, 100% {
        transform: scale(1);
        outline: 0px dotted #ff00bf;
    }
    50% {
        transform: scale(1.2);
        outline: 4px double #00f7ff;
    }
}

@keyframes sizeAnimationOne {
    0%, 100% {
        transform: scale(1);
        color: #c8ff00;
    }
    50% {
        transform: scale(1.5);
        color: #ff00bf;
    }
}

@keyframes colorOutline {
    0%, 100% {
        outline: 1px double #3be9f1;
    }
    33% {
        outline: 10px double hotpink;
        z-index: 3;
    }
    66% {
        outline: 5px double #f26c67;
    }
}

/* @keyframes backgroundAnimation {
    0%, 100% {
        background: #00f7ff;
    }
    25% {
        background: #ff00c8;
    }
    50% {
        background: #ff9100;
    }
    75% {
        background: #33ff00;
    }
} */

.draw-notice,
.winner-notice {
    text-align: center;
    background: linear-gradient(to bottom,  #f26c67 10%, #cc1e70 80%, #99196c); 
    color: #fef6cd;
    padding: 25px;
    border-radius: 10px;
    border: 3px solid #f26c67;
    box-shadow: 0 0 14px hotpink;
    display: flex;
    flex-direction: column;
    width: 200px;
    animation: fadeInOutNotice 3s ease 1;
    position: absolute;
    left: calc(50% - 100px);
    z-index: 4;
}

@keyframes fadeInOutNotice {
    0% {
        opacity: 0;
        bottom: 30%;
        box-shadow: 0 0 14px #3be9f1;
    }
    25% {
        opacity: 1;
        bottom: 50%;
    }
    50% {
        box-shadow: 0 0 300px #ffffff;
    }
    90% {
        opacity: 1;
        bottom: 50%;
    }
    100% {
        opacity: 0;
        bottom: 70%;
        box-shadow: 0 0 14px hotpink;
    }
}

.alert-notice {
    text-align: center;
    background: linear-gradient(to bottom,  #f26c67 10%, #cc1e70 80%, #99196c); 
    color: #fef6cd;
    padding: 25px;
    border-radius: 10px;
    border: 3px solid #f26c67;
    box-shadow: 0 0 14px hotpink;
    display: flex;
    flex-direction: column;
    width: 200px;
    animation: fadeInOutNoticeAlert 1.5s ease 1;
    position: absolute;
    left: calc(50% - 100px);
    z-index: 4;
}

@keyframes fadeInOutNoticeAlert {
    0% {
        opacity: 0;
        bottom: 30%;
    }
    25% {
        opacity: 1;
        bottom: 50%;
    }
    90% {
        opacity: 1;
        bottom: 50%;
    }
    100% {
        opacity: 0;
        bottom: 70%;
    }
}

.shakeAnimation {
    /* animation-delay: 0.5s; */
    animation: shake 0.1s ease-in;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0px);
    }
    20% {
        transform: translateX(10px);
    }
    40% {
        transform: translateX(-10px);
    }
    60% {
        transform: translateX(5px);
    }
    80% {
        transform: translateX(-5px);
    }
}

/* .sizeChangeIntro {
    animation: sizeChangeIntroAnimation_items 0.4s ease-in 1;
    transition: opacity 0.3s;
    opacity: 1;
} */

/* .opacityZero {
    opacity: 0;
} */

@keyframes sizeAnimationOneIntro {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

/* @keyframes sizeChangeIntroAnimation_items {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
} */

.main-menu__image-display {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    width: 100%;
    height: 200px;
}

.showImageMain__default img {
    width: 200px;
    height: 200px;
}

.showImageMain__PVP,
.showImageMain__PVM {
    display: flex;
    flex: 1;
    flex-direction: row;
}

.showImageMain__PVP img,
.showImageMain__PVM img {
    height: 150px;
}

.showImageMain__default,
.showImageMain__PVP,
.showImageMain__PVM {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    animation: fadeInMenu 1s ease 1;
    width: 100%;
}

.showImageMain__default {
    display: flex;
}

@keyframes fadeInMenu {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 100%;
    }
}