1+ .back-to-top {
2+ position : fixed;
3+ bottom : 3rem ;
4+ right : 2rem ;
5+ left : auto;
6+ transform : none;
7+ z-index : 98 ;
8+ width : 56px ;
9+ height : 56px ;
10+ border-radius : 50% ;
11+ background : var (--color-brand-primary );
12+ border : 3px solid # fff ;
13+ color : # fff ;
14+ cursor : pointer;
15+ display : flex;
16+ align-items : center;
17+ justify-content : center;
18+ font-size : 1.5rem ;
19+ line-height : 1 ;
20+ padding : 0 ;
21+ box-shadow : 0 8px 24px rgba (0 , 242 , 254 , 0.35 ), inset 0 0 20px rgba (255 , 255 , 255 , 0.1 );
22+ transition : all 0.3s cubic-bezier (0.34 , 1.56 , 0.64 , 1 );
23+ animation : slideUpButton 0.4s ease-out;
24+ flex-shrink : 0 ;
25+ backdrop-filter : blur (10px );
26+ }
27+
28+ /* Footer variant - inline button */
29+ .back-to-top--footer {
30+ position : static;
31+ bottom : auto;
32+ right : auto;
33+ width : 52px ;
34+ height : 52px ;
35+ margin : 0 0 0 auto;
36+ animation : none;
37+ }
38+
39+ @keyframes slideUpButton {
40+ from {
41+ opacity : 0 ;
42+ transform : translateY (40px ) scale (0.8 );
43+ }
44+ to {
45+ opacity : 1 ;
46+ transform : translateY (0 ) scale (1 );
47+ }
48+ }
49+
50+ .back-to-top : hover {
51+ background : var (--color-brand-primary );
52+ box-shadow : 0 12px 32px rgba (0 , 242 , 254 , 0.5 ), inset 0 0 20px rgba (255 , 255 , 255 , 0.2 );
53+ transform : translateY (-6px ) scale (1.08 );
54+ border-color : # 00f2fe ;
55+ }
56+
57+ .back-to-top--footer : hover {
58+ transform : scale (1.08 );
59+ }
60+
61+ .back-to-top : active {
62+ transform : translateY (-2px ) scale (0.96 );
63+ box-shadow : 0 4px 16px rgba (0 , 242 , 254 , 0.4 ), inset 0 0 20px rgba (255 , 255 , 255 , 0.1 );
64+ }
65+
66+ /* Footer back-to-top container */
67+ .footer-back-to-top {
68+ margin-left : auto;
69+ display : flex;
70+ align-items : center;
71+ padding : 0 1rem ;
72+ }
73+
74+ /* Arrow icon — perfectly centered inside the circle */
75+ .back-to-top-icon {
76+ width : 24px ;
77+ height : 24px ;
78+ stroke-width : 3 ;
79+ display : block;
80+ position : absolute;
81+ top : 50% ;
82+ left : 50% ;
83+ transform : translate (-50% , -50% );
84+ pointer-events : none;
85+ }
86+
87+ /* Home Page Specific Styles */
88+ body .home-page .back-to-top {
89+ background : rgba (0 , 242 , 254 , 0.95 );
90+ box-shadow : 0 6px 20px rgba (0 , 242 , 254 , 0.4 );
91+ }
92+
93+ body .home-page .back-to-top : hover {
94+ background : var (--color-brand-primary );
95+ box-shadow : 0 10px 28px rgba (0 , 242 , 254 , 0.55 );
96+ }
97+
98+ @media screen and (max-width : 768px ) {
99+ .back-to-top {
100+ bottom : 2.5rem ;
101+ right : 1.5rem ;
102+ width : 52px ;
103+ height : 52px ;
104+ font-size : 1.3rem ;
105+ }
106+
107+ .footer-back-to-top {
108+ padding : 0 0.5rem ;
109+ }
110+ }
111+
112+ @media screen and (max-width : 480px ) {
113+ .back-to-top {
114+ bottom : 2rem ;
115+ right : 1rem ;
116+ width : 48px ;
117+ height : 48px ;
118+ font-size : 1.1rem ;
119+ border : 2px solid # fff ;
120+ }
121+
122+ .back-to-top--footer {
123+ width : 48px ;
124+ height : 48px ;
125+ }
126+
127+ .footer-back-to-top {
128+ padding : 0 ;
129+ flex : 1 ;
130+ text-align : right;
131+ }
132+ }
133+
134+ @media screen and (max-height : 700px ) {
135+ .back-to-top {
136+ bottom : 2rem ;
137+ }
138+ }
139+
140+ @media screen and (max-height : 600px ) {
141+ .back-to-top {
142+ bottom : 1.5rem ;
143+ }
144+ }
0 commit comments