:root{
    --fourhundred: 400px;
    --fourhundredminustwenty: 380px;
    --fourhundredhalf: 200px;
}
body {
    background-color: Yellow;
    border: 2px solid Black;
    border-radius: 16px;
    font-family: verdana;
    margin-left: auto;
    margin-right: auto;
    max-width: 1560px;
    min-width: 256px;
    padding: 24px;
    color: #111111;
    text-align: center;
}
html {
    background-image: linear-gradient(to left, red,orange,yellow,green,blue); 
}
nav ul {
    list-style-type: none;
    background-color: #B577B5;
    border: 4px solid #111111;
    border-radius: 10px;
    font-family: verdana;
    font-weight: bold;
    padding: 16px;
}
nav ul li {
    display: inline;
    border-right: 2px solid #111111;
    padding-right: 8px;
    padding-left: 8px;
}
nav ul li:last-child {
    border-right: none;
}
nav ul li a {
    text-decoration: none;
    color: #111111;
}
nav .selected {
    color:#606060;
}
nav li a:hover {
    text-decoration: underline;
}
img {
    border: 2px solid #111111;
    border-radius: 16px;
}
.game{
    border: 3px solid black;
    height: 600px;
    width: var(--fourhundred);
    margin: auto;
}
.user{
    background-color: red;
    width: 100px;
    height: 20px;
/*    top: 380px;*/
    left: 150px;
    position: relative;
}
.ball{
    width: 20px;
    height: 20px;
    background-color: darkred;
    border-radius: 50%;
    position: relative;
    top:560px;
}
.animation{
    animation:slideY 5s infinite linear;
}
.balldiv{
    width: var(--fourhundred);
    height: 580px;
    position: relative;
    margin: auto;
    animation:slideX 1.0284s infinite linear;
}
@keyframes slideX{
    0%{left:0px;}
    50%{left:var(--fourhundredminustwenty);}
    100%{left:0px;}
}
@keyframes slideY{
    0%{top:560px;}
    50%{top:0px;}
    100%{top:560px;}
}
.left{
    z-index: 100;
    width: var(--fourhundredhalf);
    position: absolute;
    height: 600px;
}
.right{
    z-index: 100;
    width: var(--fourhundredhalf);
    margin-left: 200px;
    position: absolute;
    height: 600px;
}
button{
    font-size: 2rem;
    padding: 0.5rem 2rem;
    border: 3px solid black;
    border-radius: 0.3rem;
    margin: 1rem auto;
    display: none;
}
button:hover{
    background-color: black;
    color: white;
    cursor: pointer;
}

@media only screen and (max-width: 399px){
   .game,.left,.right{
        height: 400px;
    } 
    @keyframes slideY{
        0%{top:360px;}
        50%{top:0px;}
        100%{top:360px;}
    }
    .ball{
        top:360px;
    }
    .balldiv{
        height: 380px;
    }
}