:root {
  --github-widget-bg: #3c89f9;
  --github-widget-bg-hover: #1355b6;
  --github-widget-text: #f5f5f5;
  --github-widget-hover: rgba(255, 255, 255, 0.1);
  --github-widget-radius: 4px;
  --github-widget-offset: 0px;
  --github-widget-height-desktop: 70px;
  --github-widget-height-mobile: 90px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.github-widget {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate3d(-50%, calc(var(--github-widget-offset, 0px) * -1), 0);
  width: calc(100% - 20px);
  max-width: 320px;
  z-index: 1000;
  display: none;
  transition: transform 0.2s linear;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.github-widget.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.github-widget.closing {
  animation: fadeOut 0.3s ease forwards;
}

.github-star-widget {
  display: flex;
  align-items: center;
  background: var(--github-widget-bg);
  border: 1px solid transparent;
  border-radius: var(--github-widget-radius);
  padding: 12px 20px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.github-star-text {
  margin: 0;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 12px;
  gap: 12px;
  width: 100%;
  justify-content: center;
  color: var(--github-widget-text);
}

.github-star-text svg {
  width: 24px;
  height: 24px;
  color: var(--github-widget-text);
}

.github-star-button {
  display: flex;
  align-items: center;
  height: 28px;
  width: 125px;
}

.github-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 4px;
  border: none;
  background: none;
  color: var(--github-widget-text);
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.github-close svg {
  width: 16px;
  height: 16px;
  display: block;
}

.main-wrapper {
  padding-bottom: var(--github-widget-height-desktop);
}

@media screen and (max-width: 360px) {
  .github-widget {
    width: calc(100% - 32px);
    max-width: 200px;
  }

  .github-star-text {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .github-star-text svg {
    display: none;
  }

  .main-wrapper {
  padding-bottom: var(--github-widget-height-mobile);
}
}

@media (hover: hover) {
  .github-close:hover {
    background-color: var(--github-widget-hover);
  }
}
