.beer-mug-widget {
    text-align: center;
    max-width: 320px;
    margin: 30px auto;
    font-family: 'Montserrat', sans-serif;
}

.beer-title-container {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.beer-status-title {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.beer-mug-container {
    display: flex;
    justify-content: center;
    perspective: 1000px;
    margin-bottom: 25px;
}

/* Glass Mug Base */
.beer-mug {
    position: relative;
    width: 140px;
    height: 200px;
    border: 6px solid rgba(255, 255, 255, 0.85);
    border-top: none;
    border-radius: 0 0 25px 25px;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), inset 0 0 15px rgba(255,255,255,0.2);
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease-in-out;
}

.beer-mug:hover {
    transform: scale(1.03) rotate(1deg);
}

.beer-mug:active {
    transform: scale(0.98);
}

/* Handle */
.beer-handle {
    position: absolute;
    right: -45px;
    top: 40px;
    width: 45px;
    height: 110px;
    border: 6px solid rgba(255, 255, 255, 0.85);
    border-left: none;
    border-radius: 0 30px 30px 0;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.15);
}

/* Inner contents */
.beer-glass-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0 0 19px 19px;
}

/* Beer Liquid */
.beer-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85%;
    background-color: #f4b223;
    background-image: linear-gradient(to right, #f4b223, #e59c11);
    transition: height 1.8s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Foam */
.beer-foam {
    position: absolute;
    bottom: 84%;
    left: -5%;
    width: 110%;
    height: 35px;
    display: flex;
    justify-content: space-around;
    transition: bottom 1.8s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.5s ease;
    opacity: 1;
    background-color: #ffffff; /* Fills all background gaps between bubbles with solid white */
    border-radius: 5px 5px 0 0;
}

.foam-bubble {
    width: 35px;
    height: 35px;
    background-color: #ffffff;
    border-radius: 50%;
    margin-top: -15px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

/* Dynamic State: Empty */
.beer-mug.is-empty .beer-liquid {
    height: 0% !important;
}

.beer-mug.is-empty .beer-foam {
    bottom: 0%;
    opacity: 0;
}

/* Refill Button */
.refill-btn {
    background-color: #cca052;
    border: none;
    color: #0d131a;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(204,160,82,0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.refill-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.refill-btn:hover {
    background-color: #e5be7a;
    box-shadow: 0 8px 20px rgba(204,160,82,0.5);
    transform: translateY(-2px);
}

/* Bubbles Animation */
.beer-bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.bubble {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    bottom: -10px;
    animation: bubble-up 3s infinite ease-in;
}

.bubble:nth-child(1) { left: 15%; width: 6px; height: 6px; animation-delay: 0.2s; animation-duration: 2.5s; }
.bubble:nth-child(2) { left: 35%; width: 10px; height: 10px; animation-delay: 0.8s; animation-duration: 3.2s; }
.bubble:nth-child(3) { left: 55%; width: 8px; height: 8px; animation-delay: 1.5s; animation-duration: 2.8s; }
.bubble:nth-child(4) { left: 75%; width: 12px; height: 12px; animation-delay: 0.4s; animation-duration: 3.5s; }
.bubble:nth-child(5) { left: 85%; width: 5px; height: 5px; animation-delay: 2s; animation-duration: 2s; }

@keyframes bubble-up {
    0% {
        bottom: -10px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: 100%;
        opacity: 0;
    }
}
