1- * { box-sizing : border-box; margin : 0 ; padding : 0 ; }
1+ * , * :: before , * :: after { box-sizing : border-box; margin : 0 ; padding : 0 ; }
22
33: root {
44 --bg : # 1a1a2e ;
@@ -37,6 +37,38 @@ header .subtitle {
3737 font-size : 0.9rem ;
3838}
3939
40+ header .github-link {
41+ margin-left : auto;
42+ display : inline-flex;
43+ align-items : center;
44+ gap : 6px ;
45+ background : var (--border );
46+ color : var (--text );
47+ text-decoration : none;
48+ padding : 8px 14px ;
49+ border-radius : 6px ;
50+ border : 1px solid var (--primary );
51+ font-size : 0.9rem ;
52+ font-weight : 500 ;
53+ transition : background-color 0.15s , color 0.15s , border-color 0.15s ;
54+ }
55+
56+ header .github-link : focus-visible {
57+ outline : 2px solid var (--success );
58+ outline-offset : 2px ;
59+ }
60+
61+ header .github-link : hover {
62+ background : var (--primary );
63+ color : var (--bg );
64+ }
65+
66+ header .github-link svg {
67+ width : 18px ;
68+ height : 18px ;
69+ fill : currentColor;
70+ }
71+
4072main {
4173 max-width : 900px ;
4274 margin : 0 auto;
@@ -61,29 +93,74 @@ main {
6193
6294.key {
6395 cursor : pointer;
64- transition : background 0.05s ;
96+ transition : background-color 0.05s ;
6597 user-select : none;
6698}
6799
100+ .key : focus-visible {
101+ outline : 2px solid var (--success );
102+ outline-offset : 2px ;
103+ z-index : 10 ;
104+ }
105+
68106.key .white {
69107 width : 40px ;
70108 height : 100% ;
71- background : linear-gradient (180deg , # fff 0% , # e8e8e8 100% );
72- border : 1px solid # 999 ;
109+ background : linear-gradient (180deg , # fff 0% , # f5f5f5 85 % , # e0e0e0 100% );
110+ border : 1px solid # aaa ;
73111 border-radius : 0 0 5px 5px ;
74112 position : relative;
75113 z-index : 1 ;
114+ box-shadow : 0 2px 4px rgba (0 , 0 , 0 , 0.2 );
76115}
77116
78117.key .black {
79118 width : 24px ;
80- height : 60% ;
81- background : linear-gradient (180deg , # 444 0% , # 111 100% );
119+ height : 58% ;
120+ background : linear-gradient (180deg ,
121+ # 555 0% ,
122+ # 444 2% ,
123+ # 333 5% ,
124+ # 222 20% ,
125+ # 1a1a1a 80% ,
126+ # 111 95% ,
127+ # 080808 100% );
82128 border : 1px solid # 000 ;
129+ border-top : none;
83130 border-radius : 0 0 4px 4px ;
84131 position : absolute;
85132 z-index : 2 ;
86- margin-left : -12px ;
133+ left : auto;
134+ right : -12px ;
135+ box-shadow :
136+ -1px 0 0 # 000,
137+ 1px 0 0 # 000,
138+ 0 0 3px 1px rgba (0 , 0 , 0 , 0.5 ),
139+ 0 4px 6px rgba (0 , 0 , 0 , 0.6 ),
140+ inset 0 -1px 2px rgba (255 , 255 , 255 , 0.05 ),
141+ inset 0 1px 0 rgba (80 , 80 , 80 , 0.3 );
142+ }
143+
144+ .key .black ::before {
145+ content : '' ;
146+ position : absolute;
147+ top : 0 ;
148+ left : 1px ;
149+ right : 1px ;
150+ height : 6px ;
151+ background : linear-gradient (180deg , # 777 0% , # 555 40% , # 333 100% );
152+ border-radius : 1px 1px 3px 3px ;
153+ }
154+
155+ .key .black ::after {
156+ content : '' ;
157+ position : absolute;
158+ top : 2px ;
159+ left : 4px ;
160+ right : 4px ;
161+ height : 3px ;
162+ background : linear-gradient (90deg , transparent 0% , rgba (255 , 255 , 255 , 0.15 ) 50% , transparent 100% );
163+ border-radius : 2px ;
87164}
88165
89166.key .white .active , .key .white : active {
@@ -193,7 +270,7 @@ button {
193270 padding : 8px 14px ;
194271 font-size : 0.85rem ;
195272 cursor : pointer;
196- transition : all 0.15s ;
273+ transition : background-color 0.15 s , color 0.15 s , border-color 0.15s ;
197274 display : inline-flex;
198275 align-items : center;
199276 gap : 6px ;
@@ -252,3 +329,11 @@ button:disabled {
252329# status .ready { color : var (--success ); }
253330# status .error { color : # ff6b6b ; }
254331# status .playing { color : var (--primary ); }
332+
333+ /* Accessibility: Reduced motion preference */
334+ @media (prefers-reduced-motion : reduce) {
335+ * , * ::before , * ::after {
336+ transition : none !important ;
337+ animation : none !important ;
338+ }
339+ }
0 commit comments