html {
    height: 100%;
    width: 100%;
}

body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url(./img/body_background.jpeg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    margin: 0;
}

.bottom-bar {
    display: none;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.rotate-your-device{
    width: 100%;
    height: 100%;
    background-color: #feb47b90;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    position: fixed;
}

.rotating-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    color: white;
    text-align: center;
    animation: rotate 2s infinite alternate;
}

@media (hover: none) and (orientation: portrait) {
    /* Kombination der zwei werte - nur fÃ¼r mobile EndgerÃ¤te im portrait modus */

    .bottom-bar {
        display: flex;
    }
    .rotate-your-device{
        display: flex;
    }
}

@media (hover: none) and (orientation: landscape) {
    /* Kombination der zwei werte - nur fÃ¼r mobile EndgerÃ¤te im landscape modus */

    .bottom-bar {
        display: flex;
    }

    .rotate-your-device{
        display: none;
    }
}

/* Animation */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(90deg);
    }
}

main {
    background-color: rgba(255, 255, 255, 0.635);
    padding: 20px;
    border-radius: 12px;
    overflow-y: scroll;
}

canvas {
    background-color: black;
    display: none;
}

h1 {
    font-size: 48px;
}

.start-img {
    width: 200px;
}

.start-img:hover {
    cursor: pointer;
}

.menu-overlayer {
    background-color: transparent;
    width: 720px;
    height: 480px;
    margin: 0;
    z-index: 99;
    position: fixed;
    display: none;
    justify-content: center;
    align-items: flex-start;
}

.how-to-play-overlayer {
    background-color: transparent;
    width: 100vw;
    height: 100vh;
    margin: 0;
    z-index: 99;
    position: fixed;
    display: none;
    justify-content: center;
    align-items: center;
}

.menu {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.button {
    padding: 15px 30px;
    font-size: 20px;
    color: white;
    background-color: #4CAF50;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.8);
    animation: glow 1.5s infinite alternate, colorChange 3s infinite alternate;
}

.button:active {
    transform: scale(0.95);
}

.new-game {
    animation-delay: 0s;
    display: flex;
}

.continue {
    animation-delay: 0.5s;
    display: none;
}

.how-to-play {
    animation-delay: 1s;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(76, 175, 80, 0.8), 0 0 10px rgba(76, 175, 80, 0.6), 0 0 15px rgba(76, 175, 80, 0.4);
    }

    100% {
        text-shadow: 0 0 20px rgba(255, 87, 34, 1), 0 0 30px rgba(255, 87, 34, 0.8), 0 0 40px rgba(255, 87, 34, 0.6);
    }
}

@keyframes colorChange {
    0% {
        background-color: #4CAF50;
        border-color: #4CAF50;
    }

    25% {
        background-color: #FF4081;
        border-color: #FF4081;
    }

    50% {
        background-color: #FFC107;
        border-color: #FFC107;
    }

    75% {
        background-color: #3F51B5;
        border-color: #3F51B5;
    }

    100% {
        background-color: #4CAF50;
        border-color: #4CAF50;
    }
}

.button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(76, 175, 80, 1);
}

.upper-bar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    width: 100%;
}

#next-btn {
    display: none;
}

.jump-btn {
    margin-bottom: 10px;
}

.fullscreenBtn {
    background-color: rgba(255, 255, 255, 0.55);
    border: 0;
    font-size: 32px;
    margin: 2px;
    border-radius: 12px;
    padding: 3px;
}

.fullscreenBtn:hover {
    cursor: pointer;
    background-color: rgba(205, 123, 194, 0.381);
}

#pause-btn {
    padding-left: 7px;
    padding-top: 5px;
    padding-right: 0px;
    padding-bottom: 0px;
}

.btn {
    background-color: transparent;
    border: 0;
    font-size: 48px;
    color: white;
}

b {
    color: white;
    font-size: 32px;
    margin-bottom: 70px;
}

.restart-and-next-btn {
    font-size: 24px;
    color: black;
    background-color: rgba(255, 255, 255, 0.402);
    border: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    border-radius: 12px;
}

.restart-and-next-btn:hover {
    cursor: pointer;
    font-size: 28px;
    color: rgb(227, 164, 76);
    background-color: rgba(0, 0, 0, 0.256);
}

.btn:hover {
    cursor: pointer;
}

.game-restart-container {
    display: none;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    width: 200px;
    height: 300px;
    background-color: rgba(255, 255, 255, 0.555);
    border-radius: 12px;
    border: solid 2px rgba(232, 135, 135, 0.564);
}

#move-left {
    margin-right: 42px;
}

#jump {
    margin-right: 42px;
}

.how-to-play-container {
    background-color: #fff;
    width: 50%;
    height: 70%;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-y: scroll;
    animation: fadeIn 1s ease-in-out;
}

/* SCROLL BAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

.close-button {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 30px;
    background: transparent;
    border: none;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #f44336;
}

.title {
    font-size: 28px;
    margin-top: 40px;
    text-align: center;
    animation: glowingText 3s infinite alternate;
}

@keyframes glowingText {
    0% {
        text-shadow: 0 0 10px #ff7e5f, 0 0 20px #ff7e5f, 0 0 30px #feb47b;
        color: #ff7e5f;
    }

    25% {
        text-shadow: 0 0 10px #feb47b, 0 0 20px #feb47b, 0 0 30px #ff7e5f;
        color: #feb47b;
    }

    50% {
        text-shadow: 0 0 10px #4caf50, 0 0 20px #4caf50, 0 0 30px #4caf50;
        color: #4caf50;
    }

    75% {
        text-shadow: 0 0 10px #2196f3, 0 0 20px #2196f3, 0 0 30px #2196f3;
        color: #2196f3;
    }

    100% {
        text-shadow: 0 0 10px #673ab7, 0 0 20px #673ab7, 0 0 30px #673ab7;
        color: #673ab7;
    }
}

.bottom-section {
    margin-top: 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.controls,
.game-explanation {
    width: 100%;

    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 1s ease-out;
}

.controls h2,
.game-explanation h2 {
    font-size: 22px;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.controls ul {
    list-style-type: none;
    padding: 0;
    font-size: 18px;
    color: #555;
    margin-left: 20px;
}

.controls li {
    margin: 15px 0;
    animation: fadeInText 1s ease-out;
}

.game-explanation p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    text-align: center;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes fadeInText {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

#Congratulations{
    font-size: 16px;
    margin: 0;
    text-align: center;
    display: none;
}

@media only screen and (max-width: 720px) {
    canvas {
        width: 100%;
    }

    .menu-overlayer {
        width: 100%;
    }
}

@media only screen and (max-height: 480px) {
    #h1 {
        display: none;
    }

    canvas {
        height: 100vh;
    }

    .menu-overlayer {
        height: 100vh;
    }
}