.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
}

.app-icon:hover {
  transform: translateY(-1px);
}

.app-icon:active {
  transform: scale(0.98);
}

.app-icon__badge {
  --app-icon-theme: linear-gradient(180deg, #eeeeef, #dcdcdf);
  position: relative;
  width: min(13vw, 58px);
  height: min(13vw, 58px);
  min-width: 48px;
  min-height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 0;
  background: var(--app-icon-theme);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.app-icon__badge::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 38%;
  border-radius: 15px 15px 10px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.app-icon__badge--custom {
  padding: 0;
  background: transparent;
}

.app-icon__badge--custom::before {
  display: none;
}

.app-icon__svg {
  position: relative;
  z-index: 1;
  width: 74%;
  height: 74%;
  color: rgba(64, 66, 72, 0.9);
}

.app-icon__art {
  transform-origin: center;
}

.app-icon__custom-image-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.app-icon__custom-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.notification-dot {
  position: absolute;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff3b30;
  box-shadow:
    0 0 0 2px #ffffff,
    0 3px 10px rgba(255, 59, 48, 0.42);
  z-index: 8;
  pointer-events: none;
}

.notification-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: rgba(255, 59, 48, 0.18);
  animation: notification-dot-pulse 1.8s ease-out infinite;
}

.notification-dot--app,
.app-icon__notification-dot {
  top: -3px;
  right: -3px;
}

.notification-dot--list {
  top: 1px;
  right: 1px;
}

@keyframes notification-dot-pulse {
  0% {
    opacity: 0.72;
    transform: scale(0.78);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.65);
  }
}

.app-icon__label {
  width: 100%;
  padding: 0 2px;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 500;
  color: #111111;
  text-shadow: none;
}

.dark-mode.mingyue-desktop-night .app-icon__label {
  color: rgba(255, 255, 255, 0.94);
  text-shadow:
    0 1px 3px rgba(3, 8, 22, 0.72),
    0 0 12px rgba(186, 209, 255, 0.34);
}

.dark-mode.mingyue-desktop-night .app-icon__badge {
  box-shadow:
    0 6px 18px rgba(2, 8, 24, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  filter: saturate(0.92) brightness(0.94);
}

.dark-mode.mingyue-desktop-night .app-icon__badge::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(178, 201, 255, 0));
}

.dark-mode.mingyue-desktop-night .app-icon__svg {
  color: rgba(34, 38, 52, 0.9);
}

.dock .app-icon {
  gap: 0;
}

.dock .app-icon__badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dock .app-icon__svg {
  width: 72%;
  height: 72%;
}

.dock .app-icon__label {
  display: none;
}

@media (max-width: 420px) {
  .app-icon__badge {
    width: min(14vw, 54px);
    height: min(14vw, 54px);
    min-width: 44px;
    min-height: 44px;
    border-radius: 14px;
  }

  .app-icon__label {
    font-size: 10px;
  }

  .dock .app-icon__badge {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}
