body {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    gap: 1em;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background-color: black;
    color: white;
    font-family: 'Pixelify Sans', sans-serif;
    
}
canvas {
    background-color: #333;
    border: 4px white solid;
}

#main-menu-header {
    padding-top: 45%;
    padding-bottom: 1rem;
}

header {
    display: flex;
    flex-direction: column;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    margin-top: 1rem;
    margin-bottom: 0;
    text-shadow: 2px 2px #000;
}

#scoreboard {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    font-size: large;
    align-items: center;
    justify-content: center;
    margin-bottom: 1em;
}
.stamina {
    position: absolute;
    display: flex;
    flex-direction: row;
    bottom: 5rem;
    left: 1.25rem;
    gap: 0.5rem;
}
#stamina-bar {
    width: 12.50rem;
    height: 1.5em;
    background-color: #555;
}
#stamina-fill {
    height: 100%;
    background-color: white;
}

.invincibility {
    position: absolute;
    bottom: 7rem;
    left: 1.25rem;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}
#iframe-bar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#iframe-fill {
    height: 100%;
    width: 100%;
    background-color: white;
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.1s linear;
    display: none;
}

#iframe-timer {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.05) 4px,
        transparent 4px,
        transparent 8px
    );
    pointer-events: none;
    z-index: 100;
}

#main-menu,
#game {
    display: none; 
}

#main-menu {
    margin-top: 5em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: black;
    color: white;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: black;
    color: white;
    gap: 2em;
}

#game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

}

button {
    font-family: 'Pixelify Sans', sans-serif;
    background-color: black;
    border: 4px solid white;
    color: white;
    font-size: xx-large;
    width: 100%;
    padding: 1rem;
    cursor: pointer;
    transition: 0.5s;
    outline: none;
    text-transform: capitalize;
}

button:hover{
    background-color: white ;
    animation: Animate 0.8s steps(8) forwards;
    color:black;
}

.htp {
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100vw;
    height: 110vh;
    overflow: auto;
    background: rgba(0,0,0,0.8); 
    z-index: 50;
}

.htp-content{
    background-color: black;
    margin: auto;
    padding: 1.25rem;
    border: 4px solid white;
    width: 60%;
    height: 60%;
    z-index: 50;
    position: relative;
}

#htp-page-1 {
    display: block;
}

#htp-page-1 p {
    line-height: 1.25rem;
    padding-right: 3.25rem;
}

#htp-page-2 {
    display: none;
}

#htp-forward-button {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;  
    transform: translateY(-50%);
}

#htp-back-button {
    position: absolute;
    top: 50%;
    left: 1rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;  
    transform: translateY(-50%);
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: 0.5s;
  }
  
.close:hover,
.close:focus {
    color: #aaaaaa;
    text-decoration: none;
    cursor: pointer;
}

.movement {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.movement p{
    font-size: large;
}

.move-container {
    border: 4px solid white;
    width: 4em;
    height: 4em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.shift-container {
    border: 4px solid white;
    padding-left: 2rem;
    padding-right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.space-container {
    border: 4px solid white;
    padding-left: 6rem;
    padding-right: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.esc-container {
    border: 4px solid white;
    padding-left: 2rem;
    padding-right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.move-letter {
    font-size: x-large;
}

.horizontal {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

#pause-button {
    position: absolute;
    top: 3rem;
    left: 3rem;
    z-index: 90;
}

#pause-button button {
    font-family: 'Pixelify Sans', sans-serif;
    background-color: black;
    border: 4px solid white;
    color: white;
    font-size: x-large;
    width: 2.5em;
    height: 2.5em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
    outline: none;
}

#pause-button button:hover{
    background-color: white ;
    animation: Animate 0.8s steps(8) forwards;
    color:black;
}

#end-game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#end-game-content {
    background-color: black;
    padding: 1.5rem;
    text-align: center;
    max-width: 40%;
    width: 100%;
    border: 4px white solid;
}

#end-game-content button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Pixelify Sans', sans-serif;
    background-color: black;
    border: 4px solid white;
    color: white;
    font-size: medium;
    width: 7.5rem;
    height: 5rem;
    cursor: pointer;
    transition: 0.5s;
    outline: none;
    text-transform: capitalize;
}

#end-game-content button:hover{
    background-color: white ;
    animation: Animate 0.8s steps(8) forwards;
    color:black;
}

.integer-font {
    font-family: 'Aldrich', sans-serif;
}

#power-up-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#power-up-menu.hidden {
    display: none; 
}

#power-up-options {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
}

#power-up-options button {
    background-color: black;
    border: 4px solid white;
    color: white;
    font-size: large;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: 0.5s;
    outline: none;
    text-transform: capitalize;
}

#power-up-options button:hover {
    background-color: white;
    animation: Animate 0.8s steps(8) forwards;
    color: black;
}

#pause-overlay {
    display: none; 
    position: absolute; 
    justify-content: center;
    align-items: center;
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.8); 
    color: white; 
    font-size: 48px; 
    text-align: center;
    z-index: 10;
}
.pause-overlay-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.pause-overlay-content p {
    margin: 0;
}