:root {
    --min-unit: min(1vh, 1vw);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-family: 'Mediator',Arial,sans-serif;
}
html {
    height: 100%;
}
body {
    width: 100vmin;
    height: 100vmin;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ccc;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    
}
img, button{
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
img {
    pointer-events: none;
}
.startScreen, .endScreen, .game {
    position: relative;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
}
.startScreen {
    background: url('data/start_menu.png') center/cover;
}
.game {
    background: url('data/background.png') center/cover;
}
.endScreen {
    background: url('data/end_credits.png') center/cover;
}
.top, .bottom {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 50%;
}
.image {
    position: absolute;
    object-fit: contain;
    top: 50%;
    right: 0;
    width: 50%;
    transition: all 200ms ease-in-out;
}
.image.changed {
    top: 40%;
    right: 55%;
    width: 20%;
}
.avatar {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.1s ease;
    width: 40%;
    height: 40%;
}
.lightning {
    justify-content: center;
    align-items: center;
}
.light {
    position: absolute;
    width: 63%;
    height: 80%;
    top: 16%;
    right: 50%;
    transform: translateX(50%);
}
.dark {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    display: none;
}
.wound {
    position: absolute;
    width: 20%;
    top: -20%;
    transition: all 0.1s ease;
}
.expanded {
    width: 100vmin;
    top: 0;
}
.player2 {
    width: 20%;
    height: 100%;
    object-fit: contain;
    transition: all 0.1s ease;
    border-radius: 6%;
}
.ui_self, .ui_enemy {
    position: absolute;
    top: 1%;
    width: 50%;
    height: 10%;
    overflow: hidden;
}
.ui_self {
    left: 2%;
    justify-content: left;
    text-align: left;
}
.ui_enemy {
    right: 2%;
    justify-content: right;
    text-align: right;
}
.names {
    font-size: calc(5 * var(--min-unit));
    color: #000;
    text-shadow:
    -1px -1px 0 rgb(150, 150, 150),
    1px -1px 0 rgb(180, 180, 180),
    -1px 1px 0 rgb(180, 180, 180),
    1px 1px 0 rgb(180, 180, 180);
}
.heart {
    width: 4%;
    height: 4%;
    margin: 0.3%;
}
.hidden {
    display: none;
}
.start_ui {
    position: absolute;
    top: 10%;
    right: 50%;
    width: 100%;
    height: 80%;
    transform: translateX(50%);
    justify-content: center;
    text-align: left;
    z-index: 2; 
}
.menu_text {
    position: absolute;
    top: 5%;
    left: 25%;
    color: hsl(30, 100%, 29%);
    text-shadow:
    -1px -1px 0 #6d3701,
    1px -1px 0 #6d3701,
    -1px 1px 0 #6d3701,
    1px 1px 0 #6d3701;
    font-size: calc(9 * var(--min-unit));
}
.menuChoice {
    width: 100%;
    height: 100%;
}
#player1, #player2 {
    display: inline-block;
    transition: transform 1.2s ease;
}
.style_button {
    position: absolute;
    background-color: #964B00;
    color: white;
    border-radius: 6%;
    padding: 1.5% 2.5%;
    font-size: calc(6 * var(--min-unit));
    transform: translateX(50%);
}
.menu_button {
    width: 32%;
    bottom: 16%;
    right: 50%;
    transition: transform 1s ease;
}
.ready {
    bottom: 30%;
}
.restart_button {
    bottom: 10%;
    right: 50%;
    transform: translateX(50%);
}
.players {
    position: relative;
    top: 35%;
    left: 30%;
    width: 60%;
}
.end_text {
    position: absolute;
    top: 45%;
    left: 35%;
}
.end_logo {
    position: absolute;
    font-size: calc(8 * var(--min-unit));
    color: #ffca18;
    top: 12%;
    left: 27%;
}
.loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 100;
}
.spinner {
    width: 6%;
    height: 6%;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg);}}
.moving-img {
    position: absolute;
    background-image: url('data/ggs.png');
    background-size: cover;
    will-change: transform;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
    display: none;
    pointer-events: none;
}
.settings-btn {
    position: absolute;
    top: 1%;
    right: 1%;
    width: 8%;
    height: 8%;
    background-color: #ccc;
    border-radius: 15%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
}
.gear {
    width: 60%;
    height: 60%;
    transition: transform 0.5s ease-in-out;
}
.menu {
    position: absolute;
    font-size: calc(4 * var(--min-unit));
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 60%;
    padding: 2%;
    background-color: #EDC9AF;
    border: 2px solid #C2A080;
    border-radius: 4%;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 4;
    display: none;
    overflow: hidden;
}
.close-btn {
    position: absolute;
    top: 3%;
    right: 3%;
    width: 10%;
    height: 10%;
    background: #000;
    color: white;
    border: none;
    border-radius: 30%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(4 * var(--min-unit));
}
.info_text {
    margin-top: 10%;
}
.reloading {
    position: absolute;
    top: 0;
    width: 30%;
    left: -30%;
    transition: transform 0.5s ease, scale 0.2s ease-in-out;
}
.box {
    position: absolute;
    display: flex;
    gap: 4%;
    padding: 1.2% 1% 1.2% 1%;
    width: 26%;
    height: 10%;
    background-color: rgb(192, 192, 192);
    border-radius: 8%;
    transition: transform 0.2s ease-in-out;
    justify-content: center;
    overflow: hidden;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    outline: 2px solid #663300;
}
.element {
    width: 12%;
    display: flex;
    flex-direction: column;
    border-radius: 10%;
    overflow: hidden;
    outline: 1px solid #333;
}
.bullet_top {
    height: 30%;
    background-color: darkgray;
}
.bottom-true {
    height: 70%;
    background-color: red;
}
.bottom-false {
    height: 70%;
    background-color: gray;
}