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

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-board {
    display: none;
    width: 100%;
    height: 500px;
    border-bottom: 15px solid rgb(32, 153, 32);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: linear-gradient(#87ceeb, #e0f6ff);
}

.start-info {
  margin-top: 40px;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  padding: 20px 30px;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #111;
  text-align: center;
}

.start-info p {
  margin-bottom: 14px;
  line-height: 1.6;
}

.start-info .site-link a {
  color: #0077cc;
  text-decoration: none;
  font-weight: bold;
}

.start-info .site-link a:hover {
  text-decoration: underline;
}

.start-info .warning {
  font-size: 0.85rem;
  color: #444;
  font-style: italic;
}


.start-screen, .game-board {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}



.clouds, .mario, .pipe {
    max-width: 100%;
    height: auto;
    user-select: none;
}


.game-board .clouds {
    animation: clouds-animation 20s infinite linear;
}

.pipe {
    position: absolute;
    bottom: 0;
    left: 100%;
    width: 80px;
    --pipe-speed: 1.5s;
    animation: pipe-animation var(--pipe-speed) infinite linear;
}


.mario {
    width: 150px;
    position: absolute;
    bottom: 0;
}

.jump {
    animation: jump 500ms ease-out;

}

.clouds {
    position: absolute;
    width: 450px;
    animation: clouds-animation 20s infinite linear;
}

.score {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    font-family: Arial, sans-serif;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 8px;
    user-select: none;
    z-index: 200;
}


.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    text-align: center;
    z-index: 100;
    display: none;
}

.game-over h2 {
    margin-bottom: 15px;
    font-size: 2rem;
    font-family: Arial, Helvetica, sans-serif;
}

.game-over button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #4caf50;
    color: white;
    transition: background-color 0.3s;
}

.game-over button:hover {
    background-color: #45a049;
    
}

.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(#87ceeb, #e0f6ff);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 101;
}

.start-screen .start-clouds {
    position: absolute;
    width: 450px;
    animation: start-clouds-animation 15s infinite linear; 
    top: 0;
}

.start-screen .start-mario {
    width: 180px;
    margin-bottom: 30px;
    animation: mario-running 0.8s steps(2) infinite;
}


.start-screen button {
  padding: 15px 30px;
  font-size: 1.2rem;
  border: solid 2px black;
  border-radius: 10px;
  cursor: pointer;
  background-color: #ff6f61;
  color: white;
  transition: background-color 0.3s ease, transform 0.5s ease;
}

.start-screen button:hover {
  background-color: #e06055;
  transform: matrix3d(0.6, 0.1, 0.7, 0, -0.5, 0.8, 0.1, 0, -0.6, -0.5, 0.5, 0, 0, 0, 0, 1);
}

.audio-toggle {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  background: white;
  border: none;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
}


@keyframes mario-running {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -330px 0;
    }
}

@keyframes jump {
    0% {
        bottom: 0;
    }

    40% {
        bottom: 180px;
    }

    50% {
        bottom: 180px;
    }

    60% {
        bottom: 180px;
    }

    100% {
        bottom: 0;
    }
}


@keyframes pipe-animation {
  from {
    left: 100%;
  }
  to {
    left: -80px;
  }
}


@keyframes clouds-animation {
    from {
        right: -450px;
    }

    to {
        right: 100%;
    }
}

@keyframes start-clouds-animation {
    from {
        right: -450px;
    }

    to {
        right: 100%;
    }
}