.star-rating-widget {
  position: relative;
  text-align: center;
  padding: 38px 28px;
  margin: 64px auto;
  background: linear-gradient(180deg, #fff8ef 0%, #ffeed9 100%);
  border-radius: 18px;
  border: 2px solid #ffb347;
  box-shadow: 0 4px 0 #ffb347;
  overflow: hidden;
  max-width: 480px;
}

.star-rating-widget .star-rating-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #ff6b35;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.star-rating-widget .star-rating-prompt {
  font-size: 21px !important;
  font-weight: 700 !important;
  color: #4a2c0f !important;
  margin: 4px 0 24px !important;
}

.star-rating-widget .star-rating-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.star-rating-widget .star-btn {
  width: 56px;
  height: 56px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.star-rating-widget .star-btn.idle {
  animation: idleBounce 2.2s ease-in-out infinite;
}

.star-rating-widget .star-btn.idle:nth-child(1) { animation-delay: 0s; }
.star-rating-widget .star-btn.idle:nth-child(2) { animation-delay: 0.1s; }
.star-rating-widget .star-btn.idle:nth-child(3) { animation-delay: 0.2s; }
.star-rating-widget .star-btn.idle:nth-child(4) { animation-delay: 0.3s; }
.star-rating-widget .star-btn.idle:nth-child(5) { animation-delay: 0.4s; }

@keyframes idleBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.star-rating-widget .star-shape {
  fill: #ffe0b3;
  stroke: #ffb347;
  stroke-width: 1.5;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.star-rating-widget .star-btn.filled .star-shape {
  fill: #ff6b35;
  stroke: #e8500f;
}

.star-rating-widget .star-btn.filled {
  transform: scale(1.1);
  animation: none;
}

.star-rating-widget .star-btn.selected {
  animation: starPop 0.45s ease;
}

@keyframes starPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4) rotate(-10deg); }
  100% { transform: scale(1.1) rotate(0deg); }
}

.star-rating-widget .star-rating-hint {
  font-size: 14px;
  font-weight: 600;
  color: #b5651d;
  margin: 0;
  transition: opacity 0.2s ease;
}

.star-rating-widget .star-rating-average {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #7a4a1e !important;
  margin: 10px 0 0 !important;
}

.star-rating-widget .star-rating-thanks {
  font-size: 16px;
  font-weight: 700;
  color: #d94a0a;
  margin: 0;
  display: none;
}

@media (max-width: 420px) {
  .star-rating-widget {
    padding: 30px 18px;
  }
  .star-rating-widget .star-btn {
    width: 44px;
    height: 44px;
  }
  .star-rating-widget .star-rating-prompt {
    font-size: 18px !important;
  }
}
