-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrockpaperscissor.css
More file actions
228 lines (201 loc) · 4.79 KB
/
Copy pathrockpaperscissor.css
File metadata and controls
228 lines (201 loc) · 4.79 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #f0f0f0, #c0c0c0);
overflow: hidden;
position: relative;
font-family: 'Arial', sans-serif;
animation: gradientAnimation 5s ease-in-out infinite; /* Apply gradient animation */
}
.container {
text-align: center;
z-index: 2;
}
.start-screen {
position: relative;
animation: fadeIn 1s ease-in-out; /* Fade-in effect for the start screen */
background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.1));
border-radius: 15px;
padding: 20px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
overflow: hidden; /* To contain the animated background */
}
.container::before {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 20px;
height: 20px;
background: rgba(255, 255, 255, 0.7);
border-radius: 50%;
animation: bubble 4s infinite;
opacity: 0.7;
}
@keyframes bubble {
0% {
transform: translateY(0);
opacity: 0.7;
}
100% {
transform: translateY(-200px);
opacity: 0;
}
}
/* Create multiple bubbles with different sizes and animations */
.container::after {
content: '';
position: absolute;
bottom: 0;
left: 30%;
width: 15px;
height: 15px;
background: rgba(255, 255, 255, 0.5);
border-radius: 50%;
animation: bubble 5s infinite;
animation-delay: 1s; /* Delay for staggered effect */
opacity: 0.5;
}
.container::nth-child(5) {
content: '';
position: absolute;
bottom: 0;
left: 70%;
width: 25px;
height: 25px;
background: rgba(255, 255, 255, 0.6);
border-radius: 50%;
animation: bubble 6s infinite;
animation-delay: 2s; /* Delay for staggered effect */
opacity: 0.6;
}
.background-image {
width: 464px;
height: auto;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
opacity: 0.5; /* Adjust opacity for background image */
animation: moveBackground 10s linear infinite; /* Background movement */
}
h1 {
margin-top: 20px; /* Space between image and title */
color: #333;
font-size: 2.5em; /* Increase font size for better visibility */
animation: slideIn 0.5s ease-in-out; /* Slide-in effect for the title */
}
h2 {
justify-content: center;
color: #3760f5;
overflow: hidden; /* Ensures the text is hidden until it is revealed */
white-space: nowrap; /* Prevents the text from wrapping */
border-right: 2px solid #3760f5; /* Creates a caret effect */
width: fit-content; /* Adjusts width to fit content */
animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite; /* Adjust duration and steps as needed */
}
.menu {
margin: 20px 0;
}
button {
padding: 15px 30px;
font-size: 20px;
margin: 0 10px;
cursor: pointer;
border: none;
border-radius: 5px;
background-color: #0021b341;
color: rgb(32, 23, 205);
transition: background-color 0.3s, transform 0.3s; /* Added transform for scaling */
animation: fadeIn 1s ease-in-out; /* Fade-in effect for buttons */
}
button:hover {
background-color: #0021b3;
transform: scale(1.05); /* Slightly scale up on hover */
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
color: #f0f0f0;
}
.hidden {
display: none;
}
.choices {
display: flex;
justify-content: center;
margin: 20px 0;
}
.choice {
background: none;
border: none;
cursor: pointer;
margin: 0 20px;
transition: transform 0.2s;
}
.choice img {
width: 100px;
height: 100px;
}
.choice:hover {
transform: scale(1.1);
}
#result {
margin-top: 20px;
font-size: 24px;
color: #333;
}
#scoreboard {
margin-top: 20px;
font-size: 20px;
color: #333;
}
#finalResult {
animation: slideIn 0.5s;
}
#result img {
width: 100px;
height: 100px;
margin: 10px;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideIn {
from { transform: translateY(-20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
@keyframes moveBackground {
0% { background-position: 0% 0%; }
100% { background-position: 100% 100%; }
}
@keyframes gradientAnimation {
0% {
background-color: rgba(0, 204, 255, 0.5);
}
50% {
background-color: rgba(0, 153, 255, 0.5);
}
100% {
background-color: rgba(0, 204, 255, 0.5);
}
}
@keyframes typing {
from {
width: 0;
}
to {
width: 100%;
}
}
@keyframes blink-caret {
from, to {
border-color: transparent;
}
50% {
border-color: #3760f5; /* Change this to match your text color */
}
}