* {
    margin: 0;
    box-sizing: border-box;
}


@font-face {
    font-family: 'Sancreek';
    src: url('../fonts/Sancreek-Regular.ttf');
}

@font-face {
    font-family: 'Chunkfive';
    src: url('../fonts/chunkfive.regular.ttf');
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url("../img/body-bg-1.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    font-family: 'Sancreek', 'arial', 'Helvetica', 'sans-serif';
}


h1 {
    font-size: 60px;
}


#canvas-box {
    /* width: 720px; */
    /* height: 480px; */
    position: relative;
}


#game-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    border: 2px solid black;
    background-image: url(../img/9_intro_outro_screens/start/startscreen_1.png);
    background-size: 100% 100%;
    display: flex;
    justify-content: center;
    background-repeat: no-repeat;
}

.game-over-overlay {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    background-image: none !important;
    background-color: rgba(255, 0, 0, 0.7);
    animation: fadeOutRed 2s; /* Die Animation dauert 1 Sekunde */
}

@keyframes fadeOutRed {
    0% {
        background-color: rgba(255, 0, 0, 0); /* Vollständig undurchsichtiges Rot */
    }
    100% {
        background-color: rgba(255, 0, 0, 0.7); /* Transparentes Rot */
    }
}

#btn-box {
    display: flex;
    margin-top: 48px;
    gap: 48px;
}


.button {
    background-color: #FFD907;
    width: 50px;
    height: 50px;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: black;
    font-size: 32px;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.2));
}

.button:hover {
    background-color: #FAD5A0;
    transform: scale(1.05);
}

.btn-back {
    position: absolute;
    top: 32px;
    right: 32px;
}


.d-block {
    display: block;
}

.d-hide {
    display: none !important;
}

#start-container {
    display: flex;
}

h2 {
    margin: 16px 0 8px 0;
}

.menu-btn {
    display: block;
    position: absolute;
}

#movement-box {
    margin-top: 16px;
    color: white;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 8px;
    width: 720px;
}

h3 {
    font-weight: 100;
}

#rules {
    background-color: rgba(0, 0, 0, 0.8);
    width: 100%;
    padding: 32px;
    color: white;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.rules-cd-img {
    filter: invert();
    width: 20px;
    margin-bottom: -4px;
}

p {
    font-weight: 100;
    font-family: 'arial', 'Helvetica', 'sans-serif';
    margin-bottom: 8px;
}

.img-btn {
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.counter-box {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 200px;
    margin: 0 0 16px 0;
    background-color: #FFD907;
    padding: 8px;
    border-radius: 999px;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.4));
    animation: slideInLeft 1s;
}

.from-left-animation {
    animation: slideInRight 1s;
}

@keyframes slideInRight {
    0% {
        transform: translateX(125%);
        opacity: 0;
    }
    100% {
        transform: translateX(0%);
        opacity: 1;
    }
}


@keyframes slideInLeft {
    0% {
        transform: translateX(-125%);
        opacity: 0;
    }
    100% {
        transform: translateX(0%);
        opacity: 1;
    }
}

.counter-box img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.counter-box h2 {
    margin: 0;
}

#show-scores-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#rules h2 {
    font-size: 36px;
}

table {
    border-collapse: collapse;
}

table tr th {
    border-bottom: 3px solid white;
    width: 60px;
    height: 40px;
}

th img  {
    width: 30px;
    object-fit: cover;
}

table tr td {
    height: 40px;
    text-align: center;
    border-bottom: 1px solid white;
}

tbody {
    margin-top: 8px;
}

.img-time {
    filter: invert();
}

.victory-overlay {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    background-image: none !important;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeInBlack 3s;
}


@keyframes fadeInBlack {
    0% {
        background-color: rgba(0, 0, 0, 0); 
    }
    100% {
        background-color: rgba(0, 0, 0, 0.7); 
    }
}

#fullscreen {
    position: absolute;
    width: 25px;
    bottom: 8px;
    right: 8px;
    filter: invert();
    cursor: pointer;
}

#mute {
    position: absolute;
    width: 25px;
    bottom: 8px;
    right: 40px;
    filter: invert();
    cursor: pointer;
}

.btn-animation-over {
    opacity: 0;
    animation: fadeInButtonsOver 1.5s forwards;
    
}

@keyframes fadeInButtonsOver {
    80% {opacity: 0;}
    100% {opacity: 1;}
}

.btn-animation-victory {
    opacity: 0;
    animation: fadeInButtonsVictory 3s forwards;
}

@keyframes fadeInButtonsVictory {
    80% {opacity: 0;}
    100% {opacity: 1;}
}


#fullscreen:hover {
    transform: scale(1.1);
}

#mute:hover {
    transform: scale(1.1);
}

#status-txt {
    letter-spacing: 4px;
    color: white;
    animation: scaleBigger 1s;
    text-transform: uppercase;
}

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

.controls-desktop {
    display: flex;
    justify-content: space-between;
    width: 99%;
}

.controls-mobile {
    display: none
}


canvas {
    /* background-color: black;
    border: 2px solid black; */
    display: block;
}

.d-none {
    display:none !important;
}

#footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: #FAD5A0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#footer a {
    text-decoration: none;
    color: black;
    font-size: 14px;
}

#footer a:hover {
    text-decoration: underline;
}

.no-score h2 {
    font-size: 24px !important;
    font-weight: 100;
}
