/* Global Reset */
* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    background-color: black;
}

.arrowkeys{
    width: 15rem;
    height: 15rem;
    margin: 0;
    padding: 0;
}

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

#startScreen h1 {
    font-size: 4em;
    color: white;
    margin-bottom: 20px;
}

#startScreen button {
    font-family: "Sofadi One", sans-serif;
    font-size: 2em;
    padding: 10px 20px;
    background-color: #db162f;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

#startScreen button:hover {
    background-color: #b11224;
    transform: scale(1.1);
}

#startScreen button:active {
    transform: scale(0.95);
}


.handjet-title {
    font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings: 
        "ELGR" 1.7,
        "ELSH" 9.6;
        color: white;
}



header, #instructions {
    text-align: center;
}

header > h1 {
    font-weight: 800;
    font-size: 3em;
    display: inline-block;
    margin: 5px auto 10px;
}

#instructions > p {
    font-size: 2em;
    color: #db162f;
}

main {
    width: 100vw;
    height: 90vh;
    position: relative;
}

#playSpace {
    background-color: #2A0A5E;
    width: 90vw;
    height: 80vh;
    border: 1px solid black;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero {
    width:25px;
    height: 25px;
    position: absolute;
    background-color: #FF00FF;
    transition: top 0.1s, left 0.1s;
    border-radius: 50%; 
    font-size: 0px;
}

/* Obstacle Boxes */
.obstacle {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #00FFFF;
    border: 2px solid black;
    border-radius: 5px; 
}

#hero, .obstacle {
    transition: transform 0.1s, background-color 0.3s;
}
#instructionsScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    color: white;
    text-align: center;
}

#instructionsScreen h2 {
    font-size: 3em;
    margin-bottom: 20px;
}

#instructionsScreen p {
    font-size: 1.5em;
    margin-bottom: 10px;
}

#instructionsScreen button {
    font-family: "Sofadi One", sans-serif;
    font-size: 2em;
    padding: 10px 20px;
    background-color: #db162f;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

#instructionsScreen button:hover {
    background-color: #b11224;
    transform: scale(1.1);
}

#instructionsScreen button:active {
    transform: scale(0.95);
}
#endScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    color: white;
    font-family: "Handjet", sans-serif;
    text-align: center;
}

#endScreen h1 {
    font-size: 4em;
    margin-bottom: 20px;
}

#endScreen button {
    font-family: "Sofadi One", sans-serif;
    font-size: 2em;
    padding: 10px 20px;
    background-color: #db162f;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

#endScreen button:hover {
    background-color: #b11224;
    transform: scale(1.1);
}

#endScreen button:active {
    transform: scale(0.95);
}

.enemy {
    background-color: green;
    border-radius: 50%;
    position: absolute;
}

.bullet {
    background-color: red;
    border-radius: 50%;
    position: absolute;
}

.metabolism-item {
    background-color: orange;  
    border-radius: 50%;        
    position: absolute;
    width: 30px;
    height: 30px;
    animation: floatItem 2s ease-in-out infinite; 
}

@keyframes floatItem {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}



#victoryScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    color: white;
    font-family: "Handjet", sans-serif;
    text-align: center;
}

#victoryScreen h1 {
    font-family: "Handjet", sans-serif;
    font-size: 4em;
    color: white;
    margin-bottom: 20px;
}

#victoryScreen button {
    font-family: "Sofadi One", sans-serif;
    font-size: 2em;
    padding: 10px 20px;
    background-color: #db162f;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

#victoryScreen button:hover {
    background-color: #b11224;
    transform: scale(1.1);
}

#victoryScreen button:active {
    transform: scale(0.95);
}

.target {
    width: 50px;
    height: 50px;
    position: absolute; 
    background-color: #FFA500;
    border-radius: 50%; /* Circular shape */
    animation: pulseTarget 1.5s infinite ease-in-out;
    transition: transform 0.2s ease;
}

@keyframes pulseTarget {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

#targetCounter {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 20px;
    color: white;
}

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

#winScreen h1 {
    font-size: 4rem;
    margin-bottom: 20px; 
    color: #FFD700;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); 
}

#winScreen button {
    padding: 15px 30px;
    font-size: 1.5rem; 
    background-color: #4CAF50;
    color: white; 
    border: none; 
    border-radius: 10px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}

#winScreen button:hover {
    background-color: #45a049; 
    transform: scale(1.1); 
}

@media screen and (max-width: 600px) {

    main {
        width: 50vw;
        height: autovh;
        position: relative;
    }
}