2024-07-30 16:49:02 +02:00

223 lines
3.6 KiB
CSS

/* General styles */
body, html {
font-family: Arial, sans-serif;
color: #00ffff;
background-color: #0a0a2a;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
overflow: hidden;
}
label {
margin: 10px 0 5px;
}
input {
padding: 10px;
margin: 5px 0 20px;
width: 200px;
}
button {
padding: 10px 20px;
cursor: pointer;
}
#game1 {
width: 810px;
height: 500px;
position: relative;
background-color: #000;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
}
.game-code {
font-size: 24px;
position: absolute;
top: 10px;
}
#gameCode {
left: 10px;
}
.name {
font-size: 24px;
position: absolute;
top: 30px;
}
#player1-name {
left: 10px; /* Adjust player score position */
}
#player2-name {
right: 10px; /* Adjust bot score position */
}
#game2 {
top: 60px;
width: 800px;
height: 400px;
position: absolute;
background-color: #000;
overflow: hidden;
border: 2px solid red; /* Add red border */
display: flex;
justify-content: center;
align-items: center;
}
.score {
font-size: 24px;
position: absolute;
top: 10px;
}
#player1-score {
left: 50px; /* Adjust player score position */
}
#player2-score {
right: 50px; /* Adjust bot score position */
}
.pad {
width: 10px;
height: 100px;
background-color: #ffffff;
position: absolute;
}
#player1-pad {
left: 10px;
}
#player2-pad {
right: 10px;
}
#ball {
width: 20px;
height: 20px;
background-color: #ff0000;
border-radius: 50%;
position: absolute;
}
.logo {
position: absolute;
top: 20px;
left: 20px;
font-size: 3rem;
color: #00ffff;
text-shadow: 0 0 15px #00ffff;
z-index: 20;
}
.stars {
position: absolute;
width: 100%;
height: 100%;
}
.star {
position: absolute;
background-color: #ffffff;
border-radius: 50%;
animation: twinkle 2s infinite alternate;
}
.background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.pong-elements {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 5;
pointer-events: none;
}
.paddle {
position: absolute;
width: 20px;
height: 100px;
background-color: #00ffff;
border-radius: 10px;
box-shadow: 0 0 15px #00ffff;
}
.paddle-left {
left: 50px;
animation: paddleMove 5s infinite alternate ease-in-out;
}
.paddle-right {
right: 50px;
animation: paddleMove 4s infinite alternate-reverse ease-in-out;
}
.ball_anim {
position: absolute;
width: 30px;
height: 30px;
background-color: #00ffff;
border-radius: 50%;
box-shadow: 0 0 20px #00ffff;
left: 80px;
top: 50%;
transform-style: preserve-3d;
animation: ballMove 3s linear infinite;
}
@keyframes paddleMove {
0% { transform: translateY(10vh); }
100% { transform: translateY(70vh); }
}
@keyframes ballMove {
0% {
transform: translateZ(0) scale(1);
}
50% {
transform: translateZ(-500px) scale(0.5);
}
100% {
transform: translateZ(0) scale(1);
}
}
.input-container {
margin-bottom: 2rem;
}
.container {
text-align: center;
background-color: rgba(0, 0, 40, 0.8);
padding: 3rem;
border-radius: 15px;
border: 3px solid #00ffff;
box-shadow: 0 0 30px #00ffff, inset 0 0 20px #00ffff;
position: relative;
z-index: 10;
max-width: 80%;
}