-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSoccerPongPage.css
More file actions
77 lines (68 loc) · 1.38 KB
/
SoccerPongPage.css
File metadata and controls
77 lines (68 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* src/styles/SoccerPongPage.css */
.game-area {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
max-width: 800px; /* Match GAME_WIDTH */
margin: 0 auto;
position: relative;
}
canvas {
display: block;
background-color: #1a202c; /* Dark background for the game */
}
.score-board {
color: #cbd5e0; /* Light gray text */
margin-bottom: 10px;
}
.game-over-message,
.start-game-message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgba(0, 0, 0, 0.7);
padding: 20px;
border-radius: 10px;
z-index: 10;
color: white;
text-align: center;
}
.game-over-message button,
.start-game-message button {
margin-top: 15px;
cursor: pointer;
}
.goal-animation {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 4rem;
font-weight: bold;
animation: goalFlash 1s ease-out forwards;
z-index: 10;
text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.goal-animation.player-goal {
color: #ff4500; /* OrangeRed */
}
.goal-animation.ai-goal {
color: #4b0082; /* Indigo */
}
@keyframes goalFlash {
0% {
opacity: 0;
transform: translate(-50%, -50%) scale(0.5);
}
50% {
opacity: 1;
transform: translate(-50%, -50%) scale(1.2);
}
100% {
opacity: 0;
transform: translate(-50%, -50%) scale(1.5);
}
}