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
:root {
--surface: #e7e9ef;
--dark-shadow: #b8bdc9;
--light-shadow: #ffffff;
--ink: #485062;
--violet: #7066dd;
--gold: #ffc665;
}
.aurora-switch {
position: relative;
display: inline-grid;
gap: 14px;
cursor: pointer;
user-select: none;
font-family: Arial, sans-serif;
}
.aurora-switch input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.aurora-track {
position: relative;
display: block;
width: 210px;
height: 96px;
overflow: hidden;
border-radius: 48px;
background: var(--surface);
box-shadow:
inset 9px 9px 16px var(--dark-shadow),
inset -9px -9px 16px var(--light-shadow);
transition: background .45s ease;
}
.aurora-stars {
position: absolute;
top: 37px;
right: 20px;
color: #aeb4c0;
font-size: 17px;
letter-spacing: 5px;
opacity: .35;
transform: translateX(10px);
transition: .45s ease;
}
.aurora-core {
position: absolute;
top: 12px;
left: 12px;
display: grid;
width: 72px;
height: 72px;
place-items: center;
border-radius: 50%;
color: #9ca3b2;
background: linear-gradient(145deg, #f8f9fc, #cdd1da);
box-shadow:
8px 8px 14px #b3b8c4,
-8px -8px 14px #ffffff;
transition:
transform .55s cubic-bezier(.34, 1.56, .64, 1),
color .35s ease,
box-shadow .45s ease,
background .45s ease;
}
.aurora-spark {
font-size: 26px;
transition: transform .5s ease;
}
.aurora-labels {
display: flex;
justify-content: space-between;
padding: 0 12px;
color: var(--ink);
font-size: 10px;
font-weight: 800;
letter-spacing: 1.4px;
}
.aurora-labels span:last-child {
opacity: .35;
transition: opacity .35s ease;
}
.aurora-switch input:checked + .aurora-track {
background: #dcd9f2;
}
.aurora-switch input:checked + .aurora-track .aurora-core {
transform: translateX(114px);
color: #fff7d7;
background: linear-gradient(145deg, #9b90f5, #5e55c9);
box-shadow:
8px 8px 15px #aaa5d1,
-7px -7px 15px #ffffff,
0 0 22px #8278e8;
}
.aurora-switch input:checked + .aurora-track .aurora-spark {
transform: rotate(180deg) scale(1.15);
}
.aurora-switch input:checked + .aurora-track .aurora-stars {
color: var(--gold);
opacity: 1;
transform: translateX(0);
}
.aurora-switch input:checked ~ .aurora-labels span:first-child {
opacity: .35;
}
.aurora-switch input:checked ~ .aurora-labels span:last-child {
opacity: 1;
}
.aurora-switch:has(input:focus-visible) .aurora-track {
outline: 3px solid #7066dd;
outline-offset: 5px;
}
You need to sign in before you can write a comment.