1+ * {
2+ margin : 0 ;
3+ padding : 0 ;
4+ box-sizing : border-box;
5+ }
6+
7+ body {
8+ height : 100vh ;
9+ overflow : hidden;
10+ display : flex;
11+ justify-content : center;
12+ align-items : center;
13+ }
14+
15+ .sky {
16+ width : 100% ;
17+ height : 100% ;
18+ position : relative;
19+ animation : skyChange 8s ease-in-out infinite;
20+ display : flex;
21+ justify-content : center;
22+ align-items : center;
23+ }
24+
25+ .celestial-body {
26+ position : relative;
27+ width : 200px ;
28+ height : 200px ;
29+ }
30+
31+ .sun {
32+ position : absolute;
33+ width : 120px ;
34+ height : 120px ;
35+ background : radial-gradient (circle, # ffd700 0% , # ffa500 100% );
36+ border-radius : 50% ;
37+ top : 40px ;
38+ left : 40px ;
39+ animation : fadeInOut 8s ease-in-out infinite;
40+ box-shadow : 0 0 60px rgba (255 , 215 , 0 , 0.8 ),
41+ 0 0 100px rgba (255 , 165 , 0 , 0.6 );
42+ }
43+
44+ .ray {
45+ position : absolute;
46+ width : 4px ;
47+ height : 30px ;
48+ background : linear-gradient (to bottom, # ffd700 0% , transparent 100% );
49+ top : 50% ;
50+ left : 50% ;
51+ transform-origin : center -30px ;
52+ animation : rotate 4s linear infinite;
53+ }
54+
55+ .ray1 { transform : rotate (0deg ); }
56+ .ray2 { transform : rotate (45deg ); }
57+ .ray3 { transform : rotate (90deg ); }
58+ .ray4 { transform : rotate (135deg ); }
59+ .ray5 { transform : rotate (180deg ); }
60+ .ray6 { transform : rotate (225deg ); }
61+ .ray7 { transform : rotate (270deg ); }
62+ .ray8 { transform : rotate (315deg ); }
63+
64+ .moon {
65+ position : absolute;
66+ width : 120px ;
67+ height : 120px ;
68+ background : radial-gradient (circle at 30% 30% , # f0f0f0 0% , # c0c0c0 100% );
69+ border-radius : 50% ;
70+ top : 40px ;
71+ left : 40px ;
72+ animation : fadeOutIn 8s ease-in-out infinite;
73+ box-shadow : 0 0 40px rgba (200 , 200 , 200 , 0.6 ),
74+ inset -10px -10px 20px rgba (0 , 0 , 0 , 0.1 );
75+ }
76+
77+ .crater {
78+ position : absolute;
79+ background : radial-gradient (circle, # a8a8a8 0% , # c0c0c0 100% );
80+ border-radius : 50% ;
81+ box-shadow : inset 2px 2px 4px rgba (0 , 0 , 0 , 0.2 );
82+ }
83+
84+ .crater1 {
85+ width : 20px ;
86+ height : 20px ;
87+ top : 30px ;
88+ left : 40px ;
89+ }
90+
91+ .crater2 {
92+ width : 15px ;
93+ height : 15px ;
94+ top : 60px ;
95+ left : 70px ;
96+ }
97+
98+ .crater3 {
99+ width : 12px ;
100+ height : 12px ;
101+ top : 50px ;
102+ left : 25px ;
103+ }
104+
105+ .star {
106+ position : absolute;
107+ width : 3px ;
108+ height : 3px ;
109+ background : white;
110+ border-radius : 50% ;
111+ animation : starTwinkle 8s ease-in-out infinite;
112+ box-shadow : 0 0 4px white;
113+ }
114+
115+ .star1 { top : 20% ; left : 15% ; animation-delay : 0s ; }
116+ .star2 { top : 30% ; left : 80% ; animation-delay : 1s ; }
117+ .star3 { top : 60% ; left : 20% ; animation-delay : 2s ; }
118+ .star4 { top : 70% ; left : 75% ; animation-delay : 1.5s ; }
119+ .star5 { top : 40% ; left : 50% ; animation-delay : 0.5s ; }
120+
121+ @keyframes skyChange {
122+ 0% , 100% {
123+ background : linear-gradient (to bottom, # 87ceeb 0% , # e0f6ff 100% );
124+ }
125+ 50% {
126+ background : linear-gradient (to bottom, # 0c1445 0% , # 1a237e 100% );
127+ }
128+ }
129+
130+ @keyframes fadeInOut {
131+ 0% , 100% {
132+ opacity : 1 ;
133+ transform : scale (1 );
134+ }
135+ 50% {
136+ opacity : 0 ;
137+ transform : scale (0.8 );
138+ }
139+ }
140+
141+ @keyframes fadeOutIn {
142+ 0% , 100% {
143+ opacity : 0 ;
144+ transform : scale (0.8 );
145+ }
146+ 50% {
147+ opacity : 1 ;
148+ transform : scale (1 );
149+ }
150+ }
151+
152+ @keyframes rotate {
153+ 0% {
154+ transform : rotate (0deg );
155+ }
156+ 100% {
157+ transform : rotate (360deg );
158+ }
159+ }
160+
161+ @keyframes starTwinkle {
162+ 0% , 40% , 100% {
163+ opacity : 0 ;
164+ }
165+ 50% , 90% {
166+ opacity : 1 ;
167+ }
168+ }
0 commit comments