-
Notifications
You must be signed in to change notification settings - Fork 41.8k
Expand file tree
/
Copy pathstyle.css
More file actions
87 lines (80 loc) · 2.54 KB
/
style.css
File metadata and controls
87 lines (80 loc) · 2.54 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
html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
font-family: 'Poppins', sans-serif;
background: radial-gradient(circle at center, #0f0f0f, #000);
display: flex;
justify-content: center;
align-items: center;
overflow: auto; /* allow scrolling if needed */
}
/* Responsive circular layout */
.keys {
position: relative;
width: min(80vw, 500px);
height: min(80vw, 500px);
margin: auto;
}
.key {
position: absolute;
width: 90px;
height: 90px;
border-radius: 50%;
border: 0.4rem solid #00ffff;
background: rgba(0, 0, 0, 0.5);
color: #fff;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-shadow: 0 0 1rem #00ffff;
box-shadow: 0 0 2rem rgba(0, 255, 255, 0.2);
transform-origin: center center;
transition: border-color 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}
/* Circular positions — still fixed */
.key:nth-child(1) { transform: rotate(0deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(0deg); }
.key:nth-child(2) { transform: rotate(40deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(-40deg); }
.key:nth-child(3) { transform: rotate(80deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(-80deg); }
.key:nth-child(4) { transform: rotate(120deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(-120deg); }
.key:nth-child(5) { transform: rotate(160deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(-160deg); }
.key:nth-child(6) { transform: rotate(200deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(-200deg); }
.key:nth-child(7) { transform: rotate(240deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(-240deg); }
.key:nth-child(8) { transform: rotate(280deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(-280deg); }
.key:nth-child(9) { transform: rotate(320deg) translate(calc(min(80vw, 500px) / 2.5)) rotate(-320deg); }
kbd {
font-size: 2.8rem;
}
.sound {
font-size: 1rem;
color: #00ffff;
text-transform: uppercase;
letter-spacing: .1rem;
}
/* Glow animation, replays on every press */
.playing {
animation: crazyPulse 0.4s ease forwards;
}
@keyframes crazyPulse {
0% {
border-color: #00ffff;
box-shadow: 0 0 2rem #00ffff;
background: rgba(0, 0, 0, 0.5);
transform: scale(1);
}
50% {
border-color: #ff00ff;
box-shadow: 0 0 3rem #ff00ff, 0 0 6rem #00ffff;
background: radial-gradient(circle, #ff00ff 10%, #000 90%);
transform: scale(1.4);
}
100% {
border-color: #00ffff;
box-shadow: 0 0 2rem #00ffff;
background: rgba(0, 0, 0, 0.5);
transform: scale(1);
}
}