|
| 1 | +/* Reset */ |
| 2 | +* { |
| 3 | + margin: 0; |
| 4 | + padding: 0; |
| 5 | + box-sizing: border-box; |
| 6 | +} |
| 7 | + |
| 8 | +body { |
| 9 | + overflow: hidden; |
| 10 | + background: #0b0b2c; |
| 11 | + height: 100vh; |
| 12 | + font-family: 'Poppins', sans-serif; |
| 13 | +} |
| 14 | + |
| 15 | +/* Night sky */ |
| 16 | +.night-sky { |
| 17 | + position: relative; |
| 18 | + width: 100vw; |
| 19 | + height: 100vh; |
| 20 | + background: linear-gradient(to top, #0b0b2c 0%, #1a1a40 100%); |
| 21 | + overflow: hidden; |
| 22 | +} |
| 23 | + |
| 24 | +/* Moon */ |
| 25 | +.moon { |
| 26 | + position: absolute; |
| 27 | + top: 50px; |
| 28 | + right: 50px; |
| 29 | + width: 100px; |
| 30 | + height: 100px; |
| 31 | + background: radial-gradient(circle at 30% 30%, #fff, #ddd); |
| 32 | + border-radius: 50%; |
| 33 | + box-shadow: 0 0 60px #fff; |
| 34 | + animation: moonMove 30s linear infinite alternate; |
| 35 | +} |
| 36 | +@keyframes moonMove { |
| 37 | + 0% { transform: translateY(0) translateX(0);} |
| 38 | + 50% { transform: translateY(10px) translateX(-20px);} |
| 39 | + 100% { transform: translateY(0) translateX(0);} |
| 40 | +} |
| 41 | + |
| 42 | +/* Stars */ |
| 43 | +.stars span { |
| 44 | + position: absolute; |
| 45 | + width: 2px; |
| 46 | + height: 2px; |
| 47 | + background: #fff; |
| 48 | + border-radius: 50%; |
| 49 | + opacity: 0.8; |
| 50 | + animation: twinkle 2s infinite alternate; |
| 51 | +} |
| 52 | +.stars span:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; } |
| 53 | +.stars span:nth-child(2) { top: 15%; left: 50%; animation-delay: 0.5s; } |
| 54 | +.stars span:nth-child(3) { top: 40%; left: 70%; animation-delay: 1s; } |
| 55 | +.stars span:nth-child(4) { top: 30%; left: 30%; animation-delay: 1.2s; } |
| 56 | +.stars span:nth-child(5) { top: 50%; left: 80%; animation-delay: 0.8s; } |
| 57 | +.stars span:nth-child(6) { top: 60%; left: 20%; animation-delay: 1.5s; } |
| 58 | +.stars span:nth-child(7) { top: 70%; left: 60%; animation-delay: 1.8s; } |
| 59 | +.stars span:nth-child(8) { top: 80%; left: 40%; animation-delay: 2s; } |
| 60 | +.stars span:nth-child(9) { top: 25%; left: 75%; animation-delay: 2.2s; } |
| 61 | +.stars span:nth-child(10){ top: 35%; left: 15%; animation-delay: 0.3s; } |
| 62 | +@keyframes twinkle { |
| 63 | + 0% { opacity: 0.3; transform: scale(1);} |
| 64 | + 50% { opacity: 1; transform: scale(1.5);} |
| 65 | + 100% { opacity: 0.3; transform: scale(1);} |
| 66 | +} |
| 67 | + |
| 68 | +/* Shooting star */ |
| 69 | +.shooting-star { |
| 70 | + position: absolute; |
| 71 | + width: 2px; |
| 72 | + height: 100px; |
| 73 | + background: linear-gradient(45deg, #fff, rgba(255,255,255,0)); |
| 74 | + top: 0; |
| 75 | + left: -10%; |
| 76 | + transform: rotate(-45deg); |
| 77 | + animation: shoot 4s linear infinite; |
| 78 | +} |
| 79 | +@keyframes shoot { |
| 80 | + 0% { left: -10%; top: 0; opacity: 0;} |
| 81 | + 10% { opacity: 1;} |
| 82 | + 100% { left: 110%; top: 100%; opacity: 0;} |
| 83 | +} |
| 84 | + |
| 85 | +/* Ground */ |
| 86 | +.ground { |
| 87 | + position: absolute; |
| 88 | + bottom: 0; |
| 89 | + width: 100%; |
| 90 | + height: 120px; |
| 91 | + background: linear-gradient(to top, #0d0d0d, transparent); |
| 92 | +} |
| 93 | + |
| 94 | +/* Tent */ |
| 95 | +.tent { |
| 96 | + position: absolute; |
| 97 | + bottom: 120px; |
| 98 | + left: 50%; |
| 99 | + transform: translateX(-50%); |
| 100 | + width: 160px; |
| 101 | + height: 100px; |
| 102 | + background: linear-gradient(135deg, #ff4500, #8b0000); |
| 103 | + clip-path: polygon(50% 0%, 0% 100%, 100% 100%); |
| 104 | + box-shadow: 0 0 20px rgba(255, 69, 0, 0.3); |
| 105 | + border-left: 2px solid #fff4; |
| 106 | + border-right: 2px solid #fff4; |
| 107 | +} |
| 108 | + |
| 109 | +/* Campfire */ |
| 110 | +.campfire { |
| 111 | + position: absolute; |
| 112 | + bottom: 120px; |
| 113 | + left: calc(50% + 140px); |
| 114 | + width: 40px; |
| 115 | + height: 40px; |
| 116 | + display: flex; |
| 117 | + justify-content: center; |
| 118 | + align-items: flex-end; |
| 119 | +} |
| 120 | + |
| 121 | +/* Logs */ |
| 122 | +.logs { |
| 123 | + position: absolute; |
| 124 | + width: 40px; |
| 125 | + height: 8px; |
| 126 | + background: #6b4226; |
| 127 | + transform: rotate(25deg); |
| 128 | + border-radius: 2px; |
| 129 | +} |
| 130 | +.logs::after { |
| 131 | + content: ''; |
| 132 | + position: absolute; |
| 133 | + width: 40px; |
| 134 | + height: 8px; |
| 135 | + background: #6b4226; |
| 136 | + transform: rotate(-50deg); |
| 137 | + top: 2px; |
| 138 | + left: 0; |
| 139 | + border-radius: 2px; |
| 140 | +} |
| 141 | + |
| 142 | +/* Flame */ |
| 143 | +.flame { |
| 144 | + position: absolute; |
| 145 | + bottom: 12px; |
| 146 | + width: 14px; |
| 147 | + height: 28px; |
| 148 | + background: radial-gradient(circle, #fffa70 0%, #ff7f00 60%, #ff0000 100%); |
| 149 | + border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; |
| 150 | + animation: flicker 0.3s infinite alternate; |
| 151 | +} |
| 152 | + |
| 153 | +/* Smoke */ |
| 154 | +.smoke { |
| 155 | + position: absolute; |
| 156 | + bottom: 35px; |
| 157 | + width: 10px; |
| 158 | + height: 30px; |
| 159 | + background: radial-gradient(circle, rgba(255,255,255,0.2), transparent); |
| 160 | + border-radius: 50%; |
| 161 | + animation: smokeRise 3s linear infinite; |
| 162 | +} |
| 163 | + |
| 164 | +/* Animations */ |
| 165 | +@keyframes flicker { |
| 166 | + 0% { transform: scale(1) translateY(0);} |
| 167 | + 25% { transform: scale(1.1) translateY(-2px);} |
| 168 | + 50% { transform: scale(0.9) translateY(1px);} |
| 169 | + 75% { transform: scale(1.05) translateY(-1px);} |
| 170 | + 100% { transform: scale(1) translateY(0);} |
| 171 | +} |
| 172 | +@keyframes smokeRise { |
| 173 | + 0% { transform: translateY(0) scaleX(1);} |
| 174 | + 50% { transform: translateY(-40px) scaleX(1.2);} |
| 175 | + 100% { transform: translateY(-80px) scaleX(1); opacity: 0;} |
| 176 | +} |
0 commit comments