|
| 1 | +/* stylelint-disable */ |
| 2 | +@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap"); |
| 3 | + |
| 4 | +* { |
| 5 | + margin: 0; |
| 6 | + padding: 0; |
| 7 | + box-sizing: border-box; |
| 8 | + font-family: "Poppins", sans-serif; |
| 9 | +} |
| 10 | + |
| 11 | +section { |
| 12 | + position: relative; |
| 13 | + display: flex; |
| 14 | + justify-content: center; |
| 15 | + align-items: center; |
| 16 | + min-height: 100vh; |
| 17 | +} |
| 18 | + |
| 19 | +section.dark { |
| 20 | + background: #161623; |
| 21 | +} |
| 22 | + |
| 23 | +section::before { |
| 24 | + content: ""; |
| 25 | + position: absolute; |
| 26 | + width: 240px; |
| 27 | + height: 240px; |
| 28 | + background: linear-gradient(#6cff47, #3d1046); |
| 29 | + border-radius: 50%; |
| 30 | + transform: translate(-150px, -100px); |
| 31 | +} |
| 32 | + |
| 33 | +section.dark::before { |
| 34 | + background: linear-gradient(#ffc107, #e91e63); |
| 35 | +} |
| 36 | + |
| 37 | +section::after { |
| 38 | + content: ""; |
| 39 | + position: absolute; |
| 40 | + width: 250px; |
| 41 | + height: 250px; |
| 42 | + background: linear-gradient(#f10050, rgb(8, 216, 253)); |
| 43 | + border-radius: 50%; |
| 44 | + transform: translate(150px, 100px); |
| 45 | +} |
| 46 | + |
| 47 | +section.dark::after { |
| 48 | + background: linear-gradient(#2196f3, #31ff38); |
| 49 | +} |
| 50 | + |
| 51 | +.box { |
| 52 | + position: relative; |
| 53 | + width: 240px; |
| 54 | + height: 300px; |
| 55 | + background: rgba(255, 255, 255, 0.1); |
| 56 | + z-index: 1; |
| 57 | + box-shadow: 0 25px 45px rgba(0, 0, 0, 0.25); |
| 58 | + border: 1px solid rgba(255, 255, 255, 0.25); |
| 59 | + border-right: 1px solid rgba(255, 255, 255, 0.1); |
| 60 | + border-bottom: 1px solid rgba(255, 255, 255, 0.1); |
| 61 | + backdrop-filter: blur(25px); |
| 62 | + border-radius: 10px; |
| 63 | + display: flex; |
| 64 | + justify-content: center; |
| 65 | + align-items: center; |
| 66 | +} |
| 67 | + |
| 68 | +.content { |
| 69 | + display: flex; |
| 70 | + justify-content: center; |
| 71 | + align-items: center; |
| 72 | + flex-direction: column; |
| 73 | +} |
| 74 | + |
| 75 | +.box h3 { |
| 76 | + color: #000; |
| 77 | + font-weight: 500; |
| 78 | + font-size: 1.2rem; |
| 79 | + letter-spacing: 1px; |
| 80 | +} |
| 81 | + |
| 82 | +section.dark .box h3 { |
| 83 | + color: #fff; |
| 84 | +} |
| 85 | + |
| 86 | +.batteryShape { |
| 87 | + position: relative; |
| 88 | + width: 140px; |
| 89 | + height: 65px; |
| 90 | + margin: 20px 0; |
| 91 | + border: 3px solid #333; |
| 92 | + border-radius: 10px; |
| 93 | +} |
| 94 | + |
| 95 | +section.dark .batteryShape { |
| 96 | + border: 3px solid #fff; |
| 97 | +} |
| 98 | + |
| 99 | +.batteryShape::before { |
| 100 | + content: ""; |
| 101 | + position: absolute; |
| 102 | + top: 50%; |
| 103 | + right: -12px; |
| 104 | + transform: translateY(-50%); |
| 105 | + width: 7px; |
| 106 | + height: 16px; |
| 107 | + background: #333; |
| 108 | + border-top-right-radius: 4px; |
| 109 | + border-bottom-right-radius: 4px; |
| 110 | +} |
| 111 | + |
| 112 | +section.dark .batteryShape::before { |
| 113 | + background: #fff; |
| 114 | +} |
| 115 | + |
| 116 | +.batteryShape::after { |
| 117 | + content: ""; |
| 118 | + position: absolute; |
| 119 | + top: 0; |
| 120 | + left: 0; |
| 121 | + width: 100%; |
| 122 | + height: 50%; |
| 123 | + background: rgba(255, 255, 255, 0.1); |
| 124 | +} |
| 125 | + |
| 126 | +.level { |
| 127 | + position: absolute; |
| 128 | + top: 4px; |
| 129 | + left: 4px; |
| 130 | + right: 4px; |
| 131 | + bottom: 4px; |
| 132 | + |
| 133 | + /* background: #333; */ |
| 134 | + overflow: hidden; |
| 135 | +} |
| 136 | + |
| 137 | +.percentage { |
| 138 | + position: absolute; |
| 139 | + top: 0; |
| 140 | + left: 0; |
| 141 | + height: 100%; |
| 142 | + width: 50%; |
| 143 | + background: linear-gradient(90deg, #ffeb3b, #27ff00); |
| 144 | + border-radius: 4px; |
| 145 | +} |
| 146 | + |
| 147 | +section.dark .percentage { |
| 148 | + background: linear-gradient(90deg, #ffeb3b, #27ff00); |
| 149 | +} |
| 150 | + |
| 151 | +.percent { |
| 152 | + color: #000; |
| 153 | + font-size: 2em; |
| 154 | + font-weight: 700; |
| 155 | +} |
| 156 | + |
| 157 | +section.dark .percent { |
| 158 | + color: #fff; |
| 159 | +} |
| 160 | + |
| 161 | +.toggle { |
| 162 | + position: absolute; |
| 163 | + top: 20px; |
| 164 | + right: 20px; |
| 165 | + background: #070716; |
| 166 | + width: 30px; |
| 167 | + height: 30px; |
| 168 | + cursor: pointer; |
| 169 | + border-radius: 50%; |
| 170 | + display: flex; |
| 171 | + justify-content: center; |
| 172 | + align-items: center; |
| 173 | +} |
| 174 | + |
| 175 | +.dark .toggle { |
| 176 | + background: #fff; |
| 177 | +} |
| 178 | + |
| 179 | +.toggle::before { |
| 180 | + content: "\f186"; |
| 181 | + font-family: fontAwesome; |
| 182 | + color: #fff; |
| 183 | +} |
| 184 | + |
| 185 | +.dark .toggle::before { |
| 186 | + content: "\f185"; |
| 187 | + color: #161623; |
| 188 | +} |
0 commit comments