.radio-inputs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), var(--surface-2));
  box-sizing: border-box;
  box-shadow:
    5px 5px 15px rgba(0, 0, 0, 0.15),
    -5px -5px 15px rgba(255, 255, 255, 0.8);
  padding: 0.5rem;
  width: 300px;
  font-size: 14px;
  gap: 0.5rem;
}

.radio-inputs .radio {
  flex: 1 1 auto;
  text-align: center;
  position: relative;
}

.radio-inputs .radio input {
  display: none;
}

.radio-inputs .radio .name {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  border: none;
  padding: 0.7rem 0;
  color: var(--text);
  font-weight: 500;
  font-family: inherit;
  background: linear-gradient(145deg, var(--surface-2), rgba(255, 255, 255, 0.85));
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.1),
    -3px -3px 6px rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
  overflow: hidden;
}

.radio-inputs .radio input:checked + .name {
  background: linear-gradient(145deg, var(--brand-900), var(--brand-700));
  color: white;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.2),
    inset -2px -2px 5px rgba(255, 255, 255, 0.1),
    3px 3px 8px rgba(45, 90, 39, 0.3);
  transform: translateY(2px);
}

/* Hover effect */
.radio-inputs .radio:hover .name {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), var(--surface-2));
  transform: translateY(-1px);
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.1),
    -4px -4px 8px rgba(255, 255, 255, 0.8);
}

.radio-inputs .radio:hover input:checked + .name {
  transform: translateY(1px);
}

/* Animation */
.radio-inputs .radio input:checked + .name {
  animation: select 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Particles */
.radio-inputs .radio .name::before,
.radio-inputs .radio .name::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.radio-inputs .radio input:checked + .name::before,
.radio-inputs .radio input:checked + .name::after {
  animation: particles 0.8s ease-out forwards;
}

.radio-inputs .radio .name::before {
  background: #a8d5a8;
  box-shadow: 0 0 6px rgba(168, 213, 168, 0.8);
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.radio-inputs .radio .name::after {
  background: rgba(74, 124, 89, 0.7);
  box-shadow: 0 0 8px rgba(74, 124, 89, 0.7);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* Sparkles */
.radio-inputs .radio .name::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(74, 124, 89, 0.35) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.radio-inputs .radio input:checked + .name::after {
  opacity: 1;
  animation: sparkle-bg 1s ease-out forwards;
}

/* Multiple particles */
.radio-inputs .radio input:checked + .name {
  overflow: visible;
}

.radio-inputs .radio input:checked + .name::before {
  box-shadow:
    0 0 6px rgba(168, 213, 168, 0.8),
    10px -10px 0 rgba(168, 213, 168, 0.8),
    -10px -10px 0 rgba(168, 213, 168, 0.8);
  animation: multi-particles-top 0.8s ease-out forwards;
}

.radio-inputs .radio input:checked + .name::after {
  box-shadow:
    0 0 8px rgba(74, 124, 89, 0.7),
    10px 10px 0 rgba(74, 124, 89, 0.7),
    -10px 10px 0 rgba(74, 124, 89, 0.7);
  animation: multi-particles-bottom 0.8s ease-out forwards;
}

@keyframes select {
  0% {
    transform: scale(0.95) translateY(2px);
  }
  50% {
    transform: scale(1.05) translateY(-1px);
  }
  100% {
    transform: scale(1) translateY(2px);
  }
}

@keyframes multi-particles-top {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  40% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0);
    box-shadow:
      0 0 6px transparent,
      20px -20px 0 transparent,
      -20px -20px 0 transparent;
  }
}

@keyframes multi-particles-bottom {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  40% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0);
    box-shadow:
      0 0 8px transparent,
      20px 20px 0 transparent,
      -20px 20px 0 transparent;
  }
}

@keyframes sparkle-bg {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(2);
  }
}

/* Ripple effect */
.radio-inputs .radio .name::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, 0.5) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.radio-inputs .radio input:checked + .name::before {
  animation: ripple 0.8s ease-out;
}

@keyframes ripple {
  0% {
    opacity: 1;
    transform: scale(0.2);
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: scale(2.5);
  }
}

/* Glowing border */
.radio-inputs .radio input:checked + .name {
  position: relative;
}

.radio-inputs .radio input:checked + .name::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    45deg,
    rgba(45, 90, 39, 0.5),
    rgba(74, 124, 89, 0.5)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-glow 1.5s ease-in-out infinite alternate;
}

@keyframes border-glow {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
