forked from pepae/ShutterAPIHongbao
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
245 lines (212 loc) · 5.27 KB
/
styles.css
File metadata and controls
245 lines (212 loc) · 5.27 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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/* General Styling */
body {
font-family: 'Arial', sans-serif;
background-color: #ffe6e6; /* Light pink for a festive feel */
color: #333;
margin: 0;
padding: 0;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
text-align: center;
}
.title {
color: #d32f2f;
font-size: 3rem;
margin-bottom: 40px;
font-weight: bold;
}
.section {
margin-bottom: 50px;
padding: 20px;
border-radius: 10px;
background-color: #fff; /* White card effect */
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}
.section.hidden {
display: none; /* Hide sections initially */
}
.section h2 {
color: #d32f2f;
font-size: 2rem;
margin-bottom: 20px;
font-weight: bold;
}
/* Text Sections */
.details,
.link,
#redeem-result {
display: none; /* Default hidden */
font-size: 1rem;
color: #333;
background-color: rgba(211, 47, 47, 0.1); /* Light red background for contrast */
padding: 10px;
border-radius: 6px;
margin-top: 10px;
word-wrap: break-word;
overflow-wrap: break-word; /* Ensure long words wrap */
white-space: normal; /* Allow multi-line text */
text-align: left; /* Align text for readability */
}
/* Hide empty elements */
.details.hidden,
.link.hidden,
#redeem-result.hidden {
display: none; /* Hide these elements when the hidden class is applied */
}
.link {
background-color: #d32f2f;
color: #fff;
font-weight: bold;
padding: 10px 15px;
margin: 10px auto;
border-radius: 6px;
text-decoration: none;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Add shadow for link box */
overflow-wrap: break-word;
text-align: left;
}
.details:not(.hidden):not(:empty),
.link:not(.hidden):not(:empty),
#redeem-result:not(.hidden):not(:empty) {
display: block; /* Show only if not hidden and has content */
}
.link:hover {
background-color: #a52828;
}
/* Input and Button Styling */
.input {
display: block;
width: 90%;
margin: 10px auto;
padding: 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 1.2rem;
}
.button {
background-color: #d32f2f;
color: #fff;
border: none;
padding: 12px 30px;
font-size: 1.2rem;
border-radius: 6px;
cursor: pointer;
margin-top: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Button shadow */
transition: background-color 0.3s ease, transform 0.2s ease;
}
.button:hover {
background-color: #a52828;
transform: scale(1.05); /* Slight hover effect */
}
.hongbao-visual {
display: block; /* Ensure the envelope is always visible */
background: linear-gradient(145deg, #d32f2f, #e53935); /* Beveled gradient */
border: 2px solid #a52828; /* Darker red border */
width: 180px;
height: 240px;
margin: 40px auto 0; /* Balanced margin */
position: relative;
border-radius: 10px; /* Smooth edges */
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Realistic shadow */
overflow: visible; /* Allow flap visibility */
}
/* Top Flap (Closed State) */
.hongbao-visual::before {
content: '';
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 120px 90px 0 90px; /* Triangular flap */
border-color: #b71c1c transparent transparent transparent; /* Flap color */
top: 0;
left: 0;
transform-origin: 50% 0; /* Pivot point */
transform: rotateX(0); /* Default closed state */
transition: transform 0.6s ease-in-out; /* Smooth animation */
z-index: 10; /* Flap above content */
}
/* Opened Envelope */
.hongbao-visual.opened::before {
transform: rotateX(-120deg); /* Pivot flap upward */
top: 0; /* Keep flap attached visually */
}
/* Countdown Styling */
.countdown {
font-size: 1.5rem;
font-weight: bold;
color: #d32f2f;
margin-top: 10px;
}
/* Mobile Responsiveness */
@media (max-width: 600px) {
.title {
font-size: 2.5rem;
}
.section {
padding: 15px;
}
.hongbao-visual {
width: 140px;
height: 200px;
margin: 20px auto;
}
.hongbao-visual::before {
border-width: 100px 70px 0 70px;
}
}
.shutter-link {
color: #d32f2f; /* Match the theme color */
font-weight: bold;
text-decoration: underline;
margin-top: 10px;
display: inline-block; /* Align properly */
transition: color 0.3s ease;
}
.shutter-link:hover {
color: #a52828; /* Darker red for hover effect */
}
.hidden {
display: none !important;
}
/* Smaller and Grey Styling */
.secondary-label {
font-size: 0.9rem;
color: #888; /* Lighter grey */
}
.secondary-input {
font-size: 0.9rem;
color: #888;
border-color: #ccc;
}
/* Smaller Button */
.button.small {
font-size: 0.9rem;
padding: 8px 15px;
margin-top: 10px;
display: block; /* Ensure it appears below other buttons */
width: fit-content;
margin: 10px auto; /* Center align */
}
select.input {
width: 93.4%;
margin: 10px auto;
padding: 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 1.2rem;
background-color: white;
}
.disclaimer-box {
border: 2px dashed #d32f2f;
background-color: #ffecec;
color: #d32f2f;
padding: 10px;
margin: 20px 0;
font-weight: bold;
text-align: left;
}