.toggle-rating {
    display: none;
}

.float-button {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 20% 0 0 20%;
    background-color: #605dba;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.toggle-rating:checked~.float-button {
    right: 300px;
    top: calc(50% - 103px);
    transform: translateY(0);
}

.float-button span {
    user-select: none;
}

.rating-panel {
    position: fixed;
    right: -300px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 998;
    border-radius: 0 0 0 10px;
    padding: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 997;
}

.toggle-rating:checked~.rating-panel {
    right: 0;
}

.toggle-rating:checked~.overlay {
    opacity: 1;
    visibility: visible;
}

.rating-header {
    margin-bottom: 20px;
    text-align: center;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    direction: rtl;
}

.star {
    color: #ddd;
    font-size: 30px;
    cursor: pointer;
}

.star:hover,
.star:hover~.star {
    color: #ffd700;
}

.star.selected {
    color: #ffd700;
}
