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

*{
    font-family: 'Ubuntu';
    margin: 0;
    padding: 0;
}

:root{
    --gradient-color-red: linear-gradient(90deg, hsl(7, 89%, 46%) 15%, hsl(11, 93%, 68%) 100%);
    --gradient-color-orange : linear-gradient(90deg, hsl(22,89%,46%) 15%,hsl(54,90%,68%)100%);
    --gradient-color-yellow : linear-gradient(90deg,hsl(54,89%,46%) 15%,hsl(92,90%,45%)100%);
    --gradient-color-green : linear-gradient(90deg,hsl(92,89%,46%) 15%,hsl(92,90%,68%)100%);
}

body{
    background: #070707;
    color: #fff;
}

.battery{
    height: 100vh;
    display: grid;
    place-items: center;
    margin: 0 1.5rem;
}

.Bcard{
    position: relative;
    width: 270px;
    height: 240px;
    background: #222;
    padding: 0.5rem 1.5rem;
    border-radius: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
}

Btext{
    margin-bottom: 0.5rem;
}

.Bpercentage{
    font-size: 2.5rem;
}

.Bstatus{
    position: absolute;
    bottom: 3.5rem;
    display: flex;
    align-items: center;
    column-gap: 0.3rem;
    font-size: 0.8rem;
}

.Bstatus i{
    font-size: 1.25rem;
}

.Bpill{
    position: relative;
    width: 75px;
    height: 180px;
    background-color: #222;
    box-shadow: inset 20px 0 48px hsl(0, 0%, 16%), inset -4px 12px 48px hsl(0, 0%, 56%);
    border-radius: 3rem;
    justify-self: flex-start;
}

.Blevel{
    position: absolute;
    inset: 2px;
    border-radius: 3rem;
    overflow: hidden;
}

.Bliquid{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: var(--gradient-color-red);
    box-shadow: inset -10px 0 12px hsla(0, 0%, 0%, 0.1), inset 12px 0 12px hsla(0, 0%, 0%, 0.15);
    transition: 0.3s;
}

.Bliquid::after{
    content: "";
    position: absolute;
    height: 8px;
    box-shadow: inset 0 -3px 6px hsla(0, 0%, 0%, 0.2);
    left: 0;
    right: 0;
    margin: 0 auto;
    top: -4px;
    border-radius: 50%;
}

.green-color{
    background: var(--gradient-color-green);
}

.animated-green{
    background: var(--gradient-color-green);
    animation: animated-charging 1.2s infinite alternate;
}

.animated-red{
    background: var(--gradient-color-red);
    animation: animated-low 1.2s infinite alternate;
}

.animated-green, .animated-red, .green-color{
    -webkit-background-clip: text;
    color: transparent;
}

@keyframes animated-charging{
    0%{
        text-shadow: none;
    }
    100%{
        text-shadow: 0 0 6px hsl(92, 90%, 68%);
    }
}

@keyframes animated-low{
    0%{
        text-shadow: none;
    }
    100%{
        text-shadow: 0 0 8px hsl(7, 89%, 46%);
    }
}

.gradient-color-red, .green-color-red::after{
    background: var(--gradient-color-red);
}

.gradient-color-green, .green-color-green::after{
    background: var(--gradient-color-green);
}

.gradient-color-orange, .green-color-orange::after{
    background: var(--gradient-color-orange);
}

.gradient-color-yellow, .green-color-yellow::after{
    background: var(--gradient-color-yellow);
}