@keyframes game_screen_moving {
    0%{
        background-position: 0 0;
    }
    100%{
        background-position: 0 600px;
    }
}

@keyframes show_screen {
    0%{
        transform: translateY(-500px);
        opacity: 0;
    }
    80%{
        transform: translateY(0);
        opacity: 1;
    }
    100%{
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes hide_screen {
    0%{
        transform: translateY(0);
        opacity: 1;
    }
    80%{
        transform: translateY(500px);
        opacity: 0;
    }
    100%{
        transform: translateY(500px);
        opacity: 0;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #121212;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url(img/back2.gif);
    background-repeat: repeat;
    width: 800px;
    height: 600px;
    position: relative;
    border: 1px solid white;
}

.hide_screen{
    animation: hide_screen .5s ease !important;
    position: absolute;
}

.show_screen{
    animation: show_screen .5s ease !important;
    position: absolute;
}

#game-screen{
    overflow: hidden;
    background-size: 400px 200px;
    animation: game_screen_moving 7s linear infinite;
}

#game-screen::before{
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url(img/back2.gif);
    background-repeat: repeat;
    top: -600px;
    animation: game_screen_moving 7s linear infinite;
}

.hidden {
    display: none !important;
}

h1 {
    margin-bottom: 20px;
    color: #4fc3f7;
}

.form-group {
    margin: 20px 0;
}

input {
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #4fc3f7;
    border-radius: 5px;
    background-color: #1e1e1e;
    color: white;
    outline: none;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #4fc3f7;
    color: #121212;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 10px;
}

button:hover {
    background-color: #29b6f6;
}

button:disabled {
    background-color: #616161;
    cursor: not-allowed;
}

#game-container {
    position: relative;

    width: 800px;
    height: 600px;
}

#game-canvas {
    border: 1px solid #ffffff;

    width: 800px;
    height: 600px;
}

#game-ui {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-size: 18px;
    text-shadow: 1px 1px 2px black;
}

#health-container {
    position: relative;
    margin-top: 10px;
    width: 200px;
    background-color: #333;
    border-radius: 5px;
    overflow: hidden;
}

#health-bar {
    height: 20px;
    background-color: #4CAF50;
    width: 100%;
    transition: width 0.3s;
}

#health-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    line-height: 20px;
}

#shield-indicator {
    margin-top: 10px;
    color: #00bcd4;
    font-weight: bold;
}

#leaderboard {
    margin: 20px 0;
    width: 100%;
    max-width: 500px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

th, td {
    padding: 10px;
    border: 1px solid #4fc3f7;
}

th {
    background-color: #1e1e1e;
}