-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
159 lines (149 loc) · 3.39 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
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
.container {
flex: 1;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 1fr);
background: rgb(9, 8, 25);
}
.card {
position: relative;
display: flex;
justify-content: center;
align-items: center;
margin: 10px;
background: linear-gradient(rgba(25, 31, 50, 0.2), rgb(4 8 20 / 0.01)),
rgb(4 8 20 / 0.8);
box-shadow: inset 0 0 0 1px rgb(200 200 220 / 0.16),
inset 0 0 5px -3px var(--color), inset 0 12px 48px 0 rgb(160 220 240 / 0.08),
inset 0 0 120px -100px var(--color);
border-radius: 16px;
color: var(--color);
overflow: hidden;
}
.card::before {
content: "";
position: absolute;
inset: 0;
background-image: radial-gradient(var(--color) 8%, transparent 8%),
radial-gradient(var(--color) 8%, transparent 8%),
radial-gradient(var(--color) 8%, transparent 8%),
radial-gradient(var(--color) 8%, transparent 8%);
background-position: 0% 0%, 0% 100%, 100% 0%, 100% 100%;
background-size: 40px 40px;
background-repeat: no-repeat;
filter: drop-shadow(0 0 6px var(--color));
}
.card::after {
content: "";
position: absolute;
inset: 0;
background-color: var(--color);
opacity: 0.2;
-webkit-mask-image: radial-gradient(90% 90% at 50% 50%, transparent, black);
mask-image: radial-gradient(90% 90% at 50% 50%, transparent, black);
filter: url(#noiseFilter);
z-index: 1;
}
.button {
--w: 180px;
--h: 60px;
--icon-size: 25px;
--text-color: rgb(210 210 240);
--box-glow-color: transparent;
--box-glow-blur: 20px;
position: relative;
min-width: var(--w);
min-height: var(--h);
border-radius: var(--h);
display: flex;
justify-content: center;
align-items: center;
border: none;
font-family: "Montserrat";
color: var(--text-color);
background: rgb(4 8 20 / 0.8);
box-shadow: 0 0 0 1px rgb(200 200 220 / 0.22),
0 0 var(--box-glow-blur) var(--box-glow-color),
inset 0 0 26px -10px var(--box-glow-color);
overflow: hidden;
cursor: pointer;
transition: box-shadow 500ms ease;
z-index: 2;
}
.button::before {
content: "";
position: absolute;
inset: 0;
background: rgb(200 200 220 / 0.1);
box-shadow: inset 0 0px 24px 0 rgb(170 230 250 / 0.12);
border-radius: var(--h);
z-index: 1;
transition: transform 500ms ease, box-shadow 500ms ease;
}
.text,
.icon {
z-index: 2;
}
.text {
transform: translateX(-50%);
font-family: "Montserrat";
transition: transform 500ms ease;
}
.icon {
position: absolute;
width: var(--icon-size);
height: var(--icon-size);
left: 0;
transform: translateX(calc((var(--w)) / 2 + 8px));
transition: transform 500ms ease, color 500ms ease;
}
svg {
width: 100%;
height: 100%;
fill: currentColor;
}
.button:active {
--box-glow-blur: 36px;
}
.button:hover,
.button:active {
--box-glow-color: var(--color);
}
.button:hover::before,
.button:active::before {
transform: translateX(65%);
box-shadow: inset 0 0px 0px 0 transparent;
}
.button:hover .text,
.button:active .text {
transform: translateX(0%);
animation-play-state: running;
}
.button:hover .icon,
.button:active .icon {
transform: translateX(calc(var(--w) - var(--icon-size) - 19px));
color: var(--color);
}
.button:focus-visible {
outline: none;
}
.button:focus-visible:not(:hover, :active) {
--box-glow-color: rgb(114 114 114 / 0.5);
}
@media (max-width: 500px) {
.container {
grid-template-columns: 1fr;
grid-template-rows: auto;
}
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
width: 100%;
height: 100vh;
overflow: hidden;
display: flex;
}