-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.scss
166 lines (147 loc) · 2.89 KB
/
style.scss
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
@import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@700&family=Press+Start+2P&family=Righteous&display=swap");
:root {
--bar-fill: #57e705;
--bar-top: #6aff03;
--pixel-size: 7;
}
.healthbar {
z-index: 10;
position: fixed;
left: 0;
right: 0;
width: calc(30px * var(--pixel-size));
margin: 0 auto calc(2px * var(--pixel-size)) auto;
display: block;
}
.healthbar_fill {
width: 0%;
fill: var(--bar-fill);
transition: width 0.1s ease-in, fill 0.2s linear;
}
.healthbar_fill-top {
width: 0%;
fill: var(--bar-top);
}
.fill-bar-animation {
animation: fill-bar 4s ease-out forwards;
}
html,
body {
margin: 0;
padding: 0;
}
body {
font-family: Avenir, sans-serif;
background-color: #212121;
color: #fffce1;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
flex-direction: column;
}
p {
max-width: 70ch;
font-size: 1.4rem;
text-align: center;
line-height: 1.3;
}
.game {
position: absolute;
width: 100dvw;
height: 100dvh;
overflow: hidden;
bottom: 0;
}
.rpg-text-box {
color: hsl(348, 100%, 61%);
height: 100px;
left: 50%;
position: absolute;
bottom: 0;
transform: translate(-50%, calc(100% + 50px + 50px));
max-width: 500px;
width: 80vw;
line-height: 1.5em;
margin: 2em 0;
background: white;
border: 1px solid white;
padding: 1em;
font-size: 0.7rem;
font-family: "Press Start 2P", cursive;
font-weight: bolder;
border-radius: 0.2em;
box-shadow: 0 1px 0 1px black, inset 0 1px 0 1px black, 0 0 0 1px black,
inset 0 0 0 1px black, 3px 5px 0px 1px rgba(0, 0, 0, 0.25);
opacity: 0;
transition: all 250ms;
z-index: 10;
}
.rpg-text-box.visible {
opacity: 1;
transform: translate(-50%);
}
.code-editor {
position: absolute;
top: 0;
/* bottom: 0; */
left: 0;
right: 0;
background: black;
transition: all 500ms cubic-bezier(0.47, 1.64, 0.41, 0.8);
height: 0;
}
.code-editor.reveal {
height: 100%;
}
.monster {
width: 100%;
height: 100%;
position: absolute;
bottom: 25px;
display: flex;
align-items: center;
justify-content: center;
position: relative; /* Keep relative positioning for better layout control */
animation: rise-up 4s ease-out forwards, shake-constant 2s infinite;
img {
width: 100%;
max-width: 700px;
}
}
@keyframes fill-bar {
from {
width: 0%;
}
to {
width: 100%;
}
}
/* Keyframes for rising up */
@keyframes rise-up {
from {
transform: translateY(100%); /* Start below the original position */
}
to {
transform: translateY(0); /* End at the original position */
}
}
.monster .shake-constant {
animation-timing-function: cubic-bezier(
0.25,
0.1,
0.25,
1
); /* Smooth timing */
animation-duration: 2s; /* Slower shake timing */
}
#textbox2 {
display: flex;
align-items: center;
justify-content: center;
}
#canvas {
position: fixed;
z-index: 5;
pointer-events: none;
}