mirror of
https://github.com/AudebertAdrien/ft_transcendence.git
synced 2025-12-16 22:17:48 +01:00
321 lines
6.0 KiB
CSS
321 lines
6.0 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 {
|
|
background-color: #00ffff;
|
|
color: #000033;
|
|
border: none;
|
|
padding: 1rem 2rem;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
border-radius: 10px;
|
|
margin-top: 1rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 2px;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: #000033;
|
|
color: #00ffff;
|
|
box-shadow: 0 0 20px #00ffff;
|
|
}
|
|
|
|
#game1 {
|
|
width: 810px;
|
|
height: 500px;
|
|
position: relative;
|
|
background-color: #000;
|
|
border: 3px solid #00ffff;
|
|
box-shadow: 0 0 30px #00ffff, inset 0 0 20px #00ffff;
|
|
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 white;
|
|
/* 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;
|
|
background-color: #00ffff;
|
|
border-radius: 10px;
|
|
box-shadow: 0 0 15px #00ffff;
|
|
}
|
|
|
|
#player2-pad {
|
|
right: 10px;
|
|
background-color: #00ffff;
|
|
border-radius: 10px;
|
|
box-shadow: 0 0 15px #00ffff;
|
|
}
|
|
|
|
#ball {
|
|
width: 20px;
|
|
height: 20px;
|
|
background-color: #00ffff;
|
|
border-radius: 50%;
|
|
position: absolute;
|
|
}
|
|
|
|
.logo {
|
|
position: absolute;
|
|
top: 20px;
|
|
left: 20px;
|
|
z-index: 20;
|
|
}
|
|
|
|
.logo img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
.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%;
|
|
}
|
|
|
|
/* Styles pour la barre de navigation */
|
|
.navbar {
|
|
position: absolute; /* Positionne la barre de navigation relativement à son conteneur */
|
|
top: 10px; /* Ajuste la position du menu déroulant par rapport au haut */
|
|
right: 10px; /* Ajuste la position du menu déroulant par rapport à la droite */
|
|
padding: 10px;
|
|
}
|
|
|
|
/* Styles pour le bouton du menu burger */
|
|
.burger-menu {
|
|
font-size: 24px;
|
|
background: none;
|
|
border: none;
|
|
color: #00ffff; /* Couleur du texte du bouton */
|
|
cursor: pointer;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.burger-menu:hover {
|
|
color: #ffffff; /* Couleur du texte au survol */
|
|
}
|
|
|
|
/* Styles pour le menu déroulant */
|
|
.dropdown-content {
|
|
display: none;
|
|
position: absolute;
|
|
top: 100%; /* Positionne le menu directement sous le bouton */
|
|
right: 0; /* Aligne le menu avec le bouton */
|
|
margin-top: 10px; /* Espace entre le bouton et le menu */
|
|
background-color: #1a1a2e; /* Couleur de fond du menu */
|
|
color: #ffffff; /* Couleur du texte du menu */
|
|
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
|
|
border-radius: 5px;
|
|
z-index: 1;
|
|
width: max-content; /* Ajuste la largeur du menu en fonction du contenu */
|
|
}
|
|
|
|
/* Affiche le menu déroulant lorsqu'il est actif */
|
|
.dropdown-content.show {
|
|
display: block;
|
|
}
|
|
|
|
/* Styles pour les liens du menu déroulant */
|
|
.dropdown-content a {
|
|
color: #ffffff; /* Couleur du texte des liens */
|
|
padding: 12px 16px;
|
|
text-decoration: none;
|
|
display: block;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Ligne de séparation entre les éléments */
|
|
transition: background-color 0.3s ease; /* Transition pour le fond au survol */
|
|
}
|
|
|
|
/* Styles pour les liens au survol */
|
|
.dropdown-content a:hover {
|
|
background-color: #333; /* Couleur de fond au survol */
|
|
color: #00ffff; /* Couleur du texte au survol */
|
|
}
|