@charset "utf-8";
/* CSS Document */

.checkbox-wrapper {
  --checkbox-shadow: rgba(0, 255, 136, 0.3);
  --checkbox-border: rgba(0, 255, 136, 0.7);
  --checkbox-size: 25px;
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  padding: 10px;
}

.checkbox-wrapper input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-wrapper .checkmark {
  position: relative;
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  border: 2px solid transparent; /* 边框透明 */
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.checkbox-wrapper .checkmark::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg, 
    #B0BEC5,
    #4A90E2,
    #0075BF,
    #0075BF,
    #4A90E2,
    #B0BEC5
  );
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform: scale(0) rotate(-45deg);
}

.checkbox-wrapper input:checked ~ .checkmark::before {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.checkbox-wrapper .checkmark svg {
  width: 0;
  height: 0;
  color: #fff;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.checkbox-wrapper input:checked ~ .checkmark svg {
  width: 18px;
  height: 18px;
  transform: rotate(360deg);
}

.checkbox-wrapper:hover .checkmark {
  border-color: transparent; /* 悬停时边框透明 */
  transform: scale(1.1);
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.5),
    0 0 40px rgba(255, 255, 255, 0.5),
    inset 0 0 10px rgba(255, 255, 255, 0.5);
}

.checkbox-wrapper input:checked ~ .checkmark {
  animation: pulse 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  }
  50% {
    transform: scale(0.9);
    box-shadow:
      0 0 30px rgba(255, 255, 255, 0.5),
      0 0 50px rgba(255, 255, 255, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  }
}

.checkbox-wrapper .label {
  font-family: "Segoe UI", sans-serif;
  font-size: 3em;
  background: linear-gradient(
    45deg, 
    #B0BEC5,
    #4A90E2,
    #0075BF,
    #0075BF,
    #4A90E2,
    #B0BEC5
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; /* 使文本填充透明 */
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  opacity: 0.9;
  transition: all 0.3s;
}

.checkbox-wrapper:hover .label {
  opacity: 1;
  transform: translateX(5px);
}

/* Glowing dots animation */
.checkbox-wrapper::after,
.checkbox-wrapper::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4A90E2; /* 初始点颜色 */
  opacity: 0;
  transition: all 0.5s;
}

.checkbox-wrapper::before {
  top: 50%;
}

.checkbox-wrapper::after {
  right: 0px;
  top: 50%;
}

.checkbox-wrapper:hover::before {
  opacity: 1;
  transform: translateX(-10px);
  box-shadow: 0 0 10px #4A90E2; /* 点的发光效果 */
}

.checkbox-wrapper:hover::after {
  opacity: 1;
  transform: translateX(10px);
  box-shadow: 0 0 10px #4A90E2;
}
