-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
104 lines (91 loc) · 2.06 KB
/
style.css
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
body {
font-family: 'Roboto', sans-serif;
background-image: url('background.jpg');
background-size: cover;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
}
.container {
background-color: rgba(255, 255, 255, 0.9);
padding: 20px;
border-radius: 10px;
margin-top: 30px;
}
#game-container {
display: grid;
grid-template-columns: repeat(var(--grid-size), 60px);
grid-gap: 5px;
margin-bottom: 20px;
justify-content: center;
}
.cell {
width: 60px;
height: 60px;
background-color: #e9ecef;
border: 1px solid #ced4da;
border-radius: 5px;
}
.cell.fly {
background-color: #28a745;
animation: pulse 1s infinite;
}
.cell.trap {
background-color: #dc3545;
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
}
70% {
box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
}
}
/* Анимация победы */
@keyframes winAnimation {
0% {
background-color: transparent;
}
50% {
background-color: rgba(40, 167, 69, 0.5);
}
100% {
background-color: transparent;
}
}
.win-animation {
animation: winAnimation 2s ease-in-out;
}
/* Анимация проигрыша */
@keyframes loseAnimation {
0% {
background-color: transparent;
}
50% {
background-color: rgba(220, 53, 69, 0.5);
}
100% {
background-color: transparent;
}
}
.lose-animation {
animation: loseAnimation 2s ease-in-out;
}
/* Стили для текста статуса игры */
#game-status {
font-size: 1.2em;
margin-top: 15px;
}
/* Адаптивность для мобильных устройств */
@media (max-width: 576px) {
.cell {
width: 40px;
height: 40px;
}
#game-container {
grid-template-columns: repeat(var(--grid-size), 40px);
}
}