-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
160 lines (146 loc) · 3.53 KB
/
Copy pathstyle.css
File metadata and controls
160 lines (146 loc) · 3.53 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
* {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
:root {
--bg: #0f1226;
--road: #1e243b;
--lane: #9aa3c3;
--car: #e63946;
--obstacle: #118ab2;
--hud: #eaeaf2;
--accent: #ffd166;
}
html, body {
height: 100%;
margin: 0;
background: radial-gradient(1000px 600px at 50% -20%, #2a2f57 0%, var(--bg) 60%);
font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
color: var(--hud);
}
.hud {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 56px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
background: linear-gradient(180deg, rgba(15,18,38,0.9), rgba(15,18,38,0.3));
backdrop-filter: blur(6px);
z-index: 10;
}
.hud .hint { opacity: 0.8; font-size: 14px; }
#game {
position: relative;
width: 360px;
height: 600px;
margin: 80px auto 20px;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0,0,0,0.6);
background: #0b0e22;
}
#road {
position: absolute;
inset: 0;
margin: 0 40px;
background: var(--road);
border-radius: 12px;
overflow: hidden;
}
.lane-mark {
position: absolute;
width: 6px;
height: 140%;
top: -20%;
background: repeating-linear-gradient(
to bottom,
rgba(255,255,255,0.8) 0 18px,
rgba(255,255,255,0) 18px 42px
);
filter: drop-shadow(0 0 4px rgba(255,255,255,0.5));
opacity: 0.7;
}
.lane-mark.center { left: calc(50% - 3px); }
.lane-mark.left { left: calc(33.33% - 3px); opacity: 0.25; }
.lane-mark.right { left: calc(66.66% - 3px); opacity: 0.25; }
.car {
position: absolute;
bottom: 24px;
left: 50%;
width: 44px;
height: 74px;
margin-left: -22px;
background: linear-gradient(180deg, #ff6b6b, var(--car));
border-radius: 10px;
box-shadow: 0 8px 18px rgba(230,57,70,0.4), inset 0 -6px 0 rgba(0,0,0,0.25);
}
.car::before,
.car::after {
content: "";
position: absolute;
width: 8px;
height: 18px;
background: #222b45;
border-radius: 2px;
top: 10px;
}
.car::before { left: 6px; }
.car::after { right: 6px; }
#player {
z-index: 3;
}
.obstacle {
position: absolute;
width: 44px;
height: 74px;
background: linear-gradient(180deg, #48cae4, var(--obstacle));
border-radius: 10px;
box-shadow: 0 8px 18px rgba(17,138,178,0.35), inset 0 -6px 0 rgba(0,0,0,0.25);
}
#obstacles { position: absolute; inset: 0; z-index: 2; }
.overlay {
position: fixed;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(5,7,18,0.65);
z-index: 20;
}
.hidden { display: none; }
.modal {
width: 90%;
max-width: 420px;
padding: 24px;
border-radius: 14px;
background: linear-gradient(180deg, #1b2040, #151935);
box-shadow: 0 16px 40px rgba(0,0,0,0.6);
text-align: center;
}
.modal h1 { margin: 0 0 8px; }
.modal p { margin: 0 0 16px; opacity: 0.9; }
.modal button {
border: 0;
padding: 10px 16px;
margin: 0 6px;
border-radius: 10px;
background: var(--accent);
color: #2a2a2a;
font-weight: 700;
cursor: pointer;
}
.modal button:hover { filter: brightness(1.05); }
/* Animations */
@keyframes scrollMarks {
0% { transform: translateY(0); }
100% { transform: translateY(42px); }
}
#road .lane-mark { animation: scrollMarks 0.45s linear infinite; }
/* Responsive tweak */
@media (max-width: 420px) {
#game { width: 92vw; height: 70vh; margin-top: 76px; }
}