.feedback {
    --normal: #eceaf3;
    --normal-shadow: #d9d8e3;
    --normal-mouth: #9795a4;
    --normal-eye: #595861;
    --active: #f8da69;
    --active-shadow: #f4b555;
    --active-mouth: #f05136;
    --active-eye: #313036;
    --active-tear: #76b5e7;
    --active-shadow-angry: #e94f1d;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.feedback li {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--normal);
    box-shadow: inset 3px -3px 4px var(--normal-shadow);
    transition: background 0.4s, box-shadow 0.4s, transform 0.3s;
    cursor: pointer;
}

.feedback li div {
    width: 100%;
    height: 100%;
    position: relative;
    transform: perspective(240px) translateZ(4px);
}

.feedback li div svg {
    fill: none;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    position: absolute;
}

.feedback li div svg.eye {
    stroke: var(--normal-eye);
    width: 7px;
    height: 4px;
    top: 17px;
}

.feedback li div svg.eye.left {
    left: 9px;
}

.feedback li div svg.eye.right {
    left: 23px;
}

.feedback li div svg.mouth {
    stroke: var(--normal-mouth);
    width: 18px;
    height: 7px;
    left: 11px;
    top: 23px;
}

/* Angry */
.feedback li.angry div:before,
.feedback li.angry div:after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background: var(--normal-eye);
    top: 13px;
}

.feedback li.angry div:before {
    left: 9px;
    transform: rotate(20deg);
}

.feedback li.angry div:after {
    left: 23px;
    transform: rotate(-20deg);
}

.feedback li.angry svg.eye {
    stroke-dasharray: 4.55;
    stroke-dashoffset: 8.15;
}


/* Sad */
.feedback li.sad div:before,
.feedback li.sad div:after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--active-tear); /* این متغیر رنگ آبی هست (#76b5e7) */
    border-radius: 50%;
    top: 15px;
    transform: scale(0);
}

.feedback li.sad div:before {
    left: 9px;
}

.feedback li.sad div:after {
    left: 25px;
}

.feedback li.sad.active div:before,
.feedback li.sad.active div:after {
    background: var(--active-tear); /* تاکید مجدد روی رنگ آبی */
}

/* Ok */
.feedback li.ok div:before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--normal-eye);
    border-radius: 50%;
    top: 17px;
    left: 12px;
    box-shadow: 12px 0 0 var(--normal-eye);
}

.feedback li.ok div:after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background: var(--normal-mouth);
    border-radius: 1px;
    top: 26px;
    left: 13px;
}

/* Good */
.feedback li.good div:before {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--normal-mouth);
    border-radius: 50%;
    top: 22px;
    left: 11px;
    box-shadow: 16px 0 0 var(--normal-mouth);
    opacity: 0.5;
    filter: blur(2px);
    z-index: 0;
    transition: background 0.4s, box-shadow 0.4s;
}

.feedback li.good div svg.eye {
    top: 15px;
    transform: scale(-1);
    stroke-dasharray: 4.55;
    stroke-dashoffset: 8.15;
    transition: stroke 0.4s;
}

.feedback li.good div svg.mouth {
    top: 22px;
    transform: scale(-1); /* این ثابت می‌مونه */
    stroke-dasharray: 13.3;
    stroke-dashoffset: 23.75;
    transition: stroke 0.4s;
}

.feedback li.good.active div:before {
    background: var(--active-mouth);
    box-shadow: 16px 0 0 var(--active-mouth);
}

.feedback li.good.active div svg.eye {
    stroke: var(--active-eye);
}

.feedback li.good.active div svg.mouth {
    stroke: var(--active-mouth);
}

/* حذف تمام انیمیشن‌های اضافی */
.feedback li.good.active div svg.mouth,
.feedback li.good.active div svg.eye,
.feedback li.good.active div:before {
    animation: none !important;
    transform: scale(-1) !important; /* فقط برای mouth */
}

/* حذف هرگونه تغییر transform در انیمیشن‌های عمومی برای good */
.feedback li.good.active div {
    animation: shake-no-mouth 0.8s linear forwards;
}
/* Happy */
.feedback li.happy div:after {
    content: '';
    position: absolute;
    width: 18px;
    height: 8px;
    background: var(--normal-mouth);
    border-radius: 0 0 8px 8px;
    top: 23px;
    left: 11px;
    transition: background 0.4s;
}

.feedback li.happy svg.eye {
    top: 14px;
    transform: scale(-1);
}

/* تغییر رنگ دهان به قرمز در حالت active */
.feedback li.happy.active div:after {
    background: var(--active-mouth); /* این متغیر همون رنگ قرمز هست */
}

/* Active States */
.feedback li.active {
    background: var(--active);
    box-shadow: inset 3px -3px 4px var(--active-shadow);
}

.feedback li.active div svg {
    stroke: var(--active-eye);
}

.feedback li.active div svg.mouth {
    stroke: var(--active-mouth);
}

.feedback li.active div:before,
.feedback li.active div:after {
    background: var(--active-eye);
}

/* Animations */
.feedback li.active div {
    animation: shake 0.8s linear forwards;
}

.feedback li.angry.active {
    animation: angry 1s linear;
}

.feedback li.angry.active div:before {
    animation: toggle 0.8s linear forwards;
}

.feedback li.angry.active div:after {
    animation: toggle 0.8s linear forwards;
}

.feedback li.sad.active div:before,
.feedback li.sad.active div:after {
    animation: tear 0.6s linear forwards;
}

.feedback li.ok.active div:before {
    animation: toggle 0.2s linear forwards;
}

.feedback li.ok.active div:after {
    animation: toggle 0.7s linear forwards;
}

.feedback li.good.active div svg.mouth {
    animation: toggle 0.8s linear forwards;
}

.feedback li.happy.active div:after {
    animation: toggle 0.8s linear forwards;
}
@keyframes shake-no-mouth {
    30% {
        transform: perspective(240px) rotateX(var(--step-1-rx, 0deg)) rotateY(var(--step-1-ry, 0deg)) rotateZ(var(--step-1-rz, 0deg)) translateZ(10px);
    }
    60% {
        transform: perspective(240px) rotateX(var(--step-2-rx, 0deg)) rotateY(var(--step-2-ry, 0deg)) rotateZ(var(--step-2-rz, 0deg)) translateZ(10px);
    }
    100% {
        transform: perspective(240px) translateZ(4px);
    }
}

@keyframes shake {
    30% {
        transform: perspective(240px) rotateX(var(--step-1-rx, 0deg)) rotateY(var(--step-1-ry, 0deg)) rotateZ(var(--step-1-rz, 0deg)) translateZ(10px);
    }
    60% {
        transform: perspective(240px) rotateX(var(--step-2-rx, 0deg)) rotateY(var(--step-2-ry, 0deg)) rotateZ(var(--step-2-rz, 0deg)) translateZ(10px);
    }
    100% {
        transform: perspective(240px) translateZ(4px);
    }
}

@keyframes tear {
    0% {
        opacity: 0;
        transform: translateY(-2px) scale(0) translateZ(0);
    }
    50% {
        transform: translateY(12px) scale(0.6, 1.2) translateZ(0);
    }
    20%, 80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(24px) translateX(4px) rotateZ(-30deg) scale(0.7, 1.1) translateZ(0);
    }
}

@keyframes toggle {
    50% {
        transform: translateY(var(--middle-y, 0)) scale(var(--middle-s-x, var(--middle-s, 1)), var(--middle-s-y, var(--middle-s, 1))) rotate(var(--middle-r, 0deg));
    }
}

@keyframes angry {
    40% {
        background: var(--active);
    }
    45% {
        box-shadow: inset 3px -3px 4px var(--active-shadow), inset 0 8px 10px var(--active-shadow-angry);
    }
}
@keyframes good-mouth {
    50% {
        transform: scale(-1) translateY(2px);
    }
}
.emoji-feedback-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;

    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feedback-header {
    text-align: center;
    margin-bottom: 20px;
}

.feedback-title {
    margin: 0 0 10px;
    font-size: 24px;
    color: #333;
}

.feedback-description {
    color: #666;
    margin: 0;
}

.feedback-question {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9a8;
    border-radius: 6px;
}

.question-text {
    margin: 0 0 15px;
    font-size: 15px;
    color: #0d2748;
    text-align: center;
    font-weight: bold;
    text-transform: capitalize;
}

.feedback-submit {
    text-align: center;
    margin-top: 20px;
}

.submit-feedback {
    background: #1f4564;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 500px;
    cursor: pointer;
    width:100%;
    transition: background 0.3s ease;
}

.submit-feedback:hover {
    background: #135e96;
}

.feedback-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.feedback-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.feedback-question .text-answer {
    margin: 15px 0;
}

.feedback-question .feedback-textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #eceaf3;
    border-radius: 8px;
    background: #ffffff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    resize: vertical;
    transition: all 0.3s ease;
}

.feedback-question .feedback-textarea:focus {
    border-color: #1f4564;
    outline: none;
    box-shadow: 0 0 0 2px rgba(31, 69, 100, 0.1);
}

.feedback-question .feedback-textarea::placeholder {
    color: #9795a4;
}

/* استایل برای حالت hover */
.feedback-question .feedback-textarea:hover {
    border-color: #d9d8e3;
}

/* استایل برای حالت disabled */
.feedback-question .feedback-textarea:disabled {
    background-color: #f9f9f9;
    cursor: not-allowed;
}

/* استایل برای نمایش خطا */
.feedback-question .feedback-textarea.error {
    border-color: #f8d7da;
}

/* انیمیشن برای textarea */
@keyframes textareaFocus {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(0);
    }
}

.feedback-question .feedback-textarea:focus {
    animation: textareaFocus 0.3s ease;
}

/* تنظیمات responsive */
@media (max-width: 768px) {
    .feedback-question .feedback-textarea {
        font-size: 16px; /* برای موبایل بهتره */
        padding: 12px;
    }
}
.feedback-question.unanswered {
    border: 2px solid #ff4444;
    padding: 15px;
    border-radius: 4px;
    background-color: #fff5f5;
    margin-bottom: 20px;
}

.feedback-question.unanswered .question-text {
    color: #dc3545;
}

.feedback-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-weight: bold;
    display: none;
}

.feedback-message.error {
    background-color: #ff4444;
    color: white;
}

.feedback-message.success {
    background-color: #00C851;
    color: white;
}