-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidget.css
More file actions
126 lines (110 loc) · 2.42 KB
/
widget.css
File metadata and controls
126 lines (110 loc) · 2.42 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
:root {
--shadow: 0 2px 10px rgba(0,0,0,0.5);
}
body { margin: 0; background: transparent; font-family: Inter, Arial, sans-serif; }
#train-row {
position: absolute;
left: 48px; /* parked near left edge */
bottom: 48px;
display: flex;
align-items: flex-end;
gap: 14px;
}
.train-car {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
animation: chug 0.45s ease-in-out infinite alternate;
filter: drop-shadow(var(--shadow));
}
@keyframes chug {
from { transform: translateY(0); }
to { transform: translateY(-3px); }
}
/* Optional car frame image */
.car-frame {
width: var(--car-w, 120px);
height: var(--car-h, 84px);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
display: grid;
place-items: center;
padding: 6px;
}
/* Avatar */
.avatar {
border-radius: 50%;
border: 3px solid #fff;
box-shadow: var(--shadow);
object-fit: cover;
}
/* Amount badge above avatar */
.amount-badge {
position: absolute;
top: -22px;
left: 50%;
transform: translateX(-50%);
padding: 2px 8px;
border-radius: 999px;
font-weight: 800;
background: rgba(0,0,0,0.65);
box-shadow: var(--shadow);
}
/* Donor name under avatar */
.donor-name {
margin-top: 6px;
font-weight: 700;
text-shadow: 1px 1px 4px rgba(0,0,0,0.75);
}
/* Locomotive image */
.locomotive {
height: 120px; /* gets overridden from fields */
filter: drop-shadow(var(--shadow));
}
/* Scoreboard */
#scoreboard {
position: absolute;
top: 10%;
left: 50%;
transform: translateX(-50%);
background: rgba(0,0,0,0.6);
padding: 18px 22px;
border-radius: 12px;
color: #fff;
text-align: center;
min-width: 420px;
box-shadow: var(--shadow);
}
#scoreboard h2 { margin: 0 0 10px 0; font-size: 28px; }
#scoreboard .entry { margin: 4px 0; font-size: 20px; }
.hidden { display: none; }
/* Smoke container above locomotive */
#smoke-container {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
overflow: visible;
}
.smoke-puff {
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: none;
position: absolute;
will-change: transform, opacity;
}
@keyframes puff {
0% {
transform: translate(0, 0) scale(0.6);
opacity: 0.9;
}
100% {
transform: translate(var(--puff-x, 100px), var(--puff-y, -120px)) scale(1.4);
opacity: 0;
}
}