/**
 * Icon Clicks Statistics Styling
 * Beautiful rainbow gradient effects for click counts
 */

/* Click count display styling */
.click-count {
  display: inline-block;
  font-family: "Digital Numbers", "Orbitron", sans-serif !important;
  font-size: 16px;
  background: #000000 !important;
  color: #00f2ff !important;
  -webkit-text-fill-color: #00f2ff !important;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid #00f2ff;
  box-shadow:
    inset 0 0 5px rgba(0, 242, 255, 0.3),
    0 0 8px rgba(0, 0, 0, 0.5);
  text-shadow: 0 0 5px rgba(0, 242, 255, 0.8) !important;
  margin-top: 8px;
  text-align: center;
  letter-spacing: 2px;
  opacity: 1 !important;
}

/* Rainbow gradient text animation */
.rainbow-text {
  background: linear-gradient(
    90deg,
    #ff0000,
    #ff7f00,
    #ffff00,
    #00ff00,
    #0000ff,
    #4b0082,
    #9400d3,
    #ff0000
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow-flow 3s linear infinite;
}

/* Rainbow flowing animation */
@keyframes rainbow-flow {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* Click pulse animation */
.click-pulse {
  animation: pulse-effect 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulse-effect {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Floating +1 animation */
.floating-plus-one {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: bold;
  color: #00ff00;
  text-shadow:
    0 0 10px rgba(0, 255, 0, 0.8),
    0 0 20px rgba(0, 255, 0, 0.6),
    0 0 30px rgba(0, 255, 0, 0.4);
  pointer-events: none;
  z-index: 1000;
  animation: float-up 1s ease-out forwards;
}

@keyframes float-up {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 0.8;
    transform: translate(-50%, -80px) scale(1.2);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -120px) scale(0.8);
  }
}

/* Icon item hover enhancement */
.icon-item {
  position: relative;
  transition: all 0.3s ease;
}

.icon-item:hover .click-count {
  transform: scale(1.1);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Glow effect on click count */
.rainbow-text::before {
  content: attr(data-count);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  filter: blur(10px);
  opacity: 0.5;
  z-index: -1;
}

/* Loading state */
.click-count.loading {
  opacity: 0.5;
  animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.7;
  }
}

/* Sparkle effect */
@keyframes sparkle {
  0%,
  100% {
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.8),
      0 0 20px rgba(255, 255, 255, 0.6),
      0 0 30px rgba(255, 255, 255, 0.4);
  }

  50% {
    text-shadow:
      0 0 20px rgba(255, 255, 255, 1),
      0 0 30px rgba(255, 255, 255, 0.8),
      0 0 40px rgba(255, 255, 255, 0.6);
  }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .click-count {
    font-size: 13px !important;
    letter-spacing: 1px !important;
    padding: 2px 4px !important;
    margin-top: 4px !important;
    text-shadow: none !important;
  }

  .floating-plus-one {
    font-size: 20px;
  }
}

/* Specific iPad/Tablet Adjustment to remove glow */
@media screen and (max-width: 1366px) {
  .click-count {
    text-shadow: none !important;
  }
}

@media (max-width: 768px) {
  .click-count {
    font-size: 16px;
  }

  .floating-plus-one {
    font-size: 20px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .click-count {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rainbow-text {
    animation: none;
    background: linear-gradient(90deg, #ff0000, #ffff00, #0000ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .click-pulse,
  .floating-plus-one {
    animation: none;
  }
}

@keyframes digit-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
    border-color: #fff;
  }
  100% {
    transform: scale(1);
  }
}

.digit-update {
  animation: digit-pop 0.3s ease-out;
}
