@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}

.wrapper {
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 2.5rem;
  border-radius: 22px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  max-width: 340px;
  width: 100%;
}

h1 {
  margin-bottom: 1.8rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  font-size: 2rem;
  text-shadow: 0 2px 12px #2228;
}

#container {
  width: 104px;
  height: 210px;
  margin: 0 auto 2rem auto;
  position: relative;
}

#battery {
  width: 100%;
  height: 100%;
  border: 5px solid #fff;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 6px 16px #0a193633 inset;
  transition: box-shadow .22s;
}

.battery-level {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(
    to top,
    #e53935 0%,     /* red */
    #ffb300 25%,    /* yellow */
    #f7e547 48%,    /* gold */
    #43e97b 74%,    /* green */
    #0099f7 100%    /* blue */
  );
  box-shadow: 0 0 12px 4px #fff5 inset;
  border-radius: 0 0 12px 12px;
  transition: height 0.7s cubic-bezier(.5,1.6,.4,1), box-shadow 0.6s;
  animation: none;
}

#battery.charged {
  box-shadow: 0 0 26px 0 #01ff7a88, 0 20px 50px #47f0f4cc;
}

#battery::after {
  content: '';
  position: absolute;
  top: 28%;
  right: -18px;
  width: 16px;
  height: 44%;
  background: #fff;
  border-top-right-radius: 7px;
  border-bottom-right-radius: 7px;
  box-shadow: 2px 2px 10px #ffe95360 inset;
}

button {
  background: linear-gradient(135deg, #4CAF50 60%, #81C784 100%);
  border: none;
  color: #fff;
  padding: 15px 35px;
  text-align: center;
  font-size: 17px;
  margin: 18px 2px 0 2px;
  font-weight: 700;
  border-radius: 28px;
  cursor: pointer;
  box-shadow: 0 6px 24px #4caf502a;
  transition: background 0.25s, box-shadow 0.2s;
  letter-spacing: 2px;
}

button:hover {
  background: linear-gradient(135deg,#43e97b,#38f9d7);
  color: #fffde4;
  box-shadow: 0 8px 22px #2dffb1aa;
}

#battery-status {
 margin-top: 1.6rem;
 font-size: 1.22rem;
 font-weight: 500;
 letter-spacing: .5px;
 min-height: 2.3em;
 color: #fffde3;
}

@media (max-width: 530px) {
.wrapper {
  width: 96%;
  padding: 1rem;

#container {
  width: 75px;
  height: 145px;
}
h1 {
  font-size: 1.3rem;
}
button {
  padding: 9px 14px;
  font-size: 0.99rem;
}
}
}