
.rating-stars {
    display: inline-flex;
}
.star {
    position: relative;
    font-size: 26px;
    color: #ddd;  /* empty star */
    margin-right: 4px;
    width: 26px;
    height: 26px;
    cursor: pointer;
}

.star-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;        /* JS dynamically sets this */
    overflow: hidden;
    color: gold;
    pointer-events: none;
    font-size: 26px;
}

.star::before {
    content: "★";      /* always visible empty star */
    position: absolute;
    top: 0;
    left: 0;
    color: #ddd;
}
/* Hover effect */
.star:hover .star-fill,
.star:hover ~ .star .star-fill {
    width: 0%;
}

.star:hover .star-fill {
    width: 100%;
}

.rating-message {
    margin-top: 6px;
    font-size: 14px;
    color: green;
}