/* Universal Reset Isolation for the Badge */
.mstr-credit-badge {
  display: flex;
  align-items: center;
  padding: 3rem;
  justify-content: center;
  gap: 12px;
  margin: 10px auto 10px auto;
  width: 100%;
  background-color: black;
  overflow: hidden;
}

.mstr-credit-badge a {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Outfit', monospace !important;
  font-weight: 200 !important;
  font-size: 0.7rem !important;
  letter-spacing: 1px !important;
  min-width: max-content;
  text-transform: capitalize !important;
  background: rgba(0, 0, 0, 0.05);
  color: white;
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 2s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 2;
}

.mstr-credit-badge__separator {
  opacity: 1;
  color: purple;
}

/* Micro-Interaction Animation */
.mstr-credit-badge a:hover {
  background: #000000;
  color: #ffffff;
  transition: all 2s cubic-bezier(0.25, 1, 0.5, 1);
  border-color: purple;
  transform: translateY(-1px);
  box-shadow: 0 0px 10px purple;
}

.mstr-credit-badge a:active {
  background: #000000;
  color: #ffffff;
  border-color: rgb(170, 145, 0);
  transition: 0.05s;
  transform: translateY(-1px);
  box-shadow: 0 0px 40px gold;
}

/* Shapes Container & Base Styles */
.mstr-shapes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mstr-shape {
  opacity: 0;
  transition: all ease 1.5s;
  color: white;
}

.mstr-credit-badge:has(a:hover) .mstr-shape {
  color: purple !important;
}

.mstr-credit-badge:has(a:active) .mstr-shape {
  color: gold !important;
  transition: 0.05s;
}

/* Shape Geometry */
.mstr-line { width: 6px; height: 1px; background: currentColor; }
.mstr-circle { width: 12px; height: 12px; border-radius: 50%; border: 1px solid currentColor; background: transparent; }
.mstr-diamond { width: 12px; height: 12px; transform: rotate(45deg); border: 1px solid currentColor; background: transparent; }
.mstr-vertical-line-1 { width: 1px; height: 6px; background: currentColor; }
.mstr-vertical-line-2 { width: 1px; height: 12px; background: currentColor; }
.mstr-vertical-line-3 { width: 1px; height: 18px; background: currentColor; }

.mstr-shape-complex-1 {
  width: 46px;
  height: 16px;
  position: relative;
  background: 
    linear-gradient(currentColor, currentColor) no-repeat left center / 40px 1px,
    linear-gradient(currentColor, currentColor) no-repeat 10px center / 1px 6px,
    linear-gradient(currentColor, currentColor) no-repeat 20px center / 1px 11px,
    linear-gradient(currentColor, currentColor) no-repeat 30px center / 1px 16px;
}

.mstr-shape-complex-1::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: black;
  box-sizing: border-box;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.mstr-shape-complex-2 {
  width: 46px;
  height: 16px;
  position: relative;
  background: 
    linear-gradient(currentColor, currentColor) no-repeat right center / 40px 1px,
    linear-gradient(currentColor, currentColor) no-repeat calc(100% - 10px) center / 1px 6px,
    linear-gradient(currentColor, currentColor) no-repeat calc(100% - 20px) center / 1px 11px,
    linear-gradient(currentColor, currentColor) no-repeat calc(100% - 30px) center / 1px 16px;
}

.mstr-shape-complex-2::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  background: black;
  box-sizing: border-box;
  left: 1px; 
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.mstr-credit-badge.is-visible .mstr-shape {
  animation: energyWave 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
  animation-delay: calc(var(--i) * 0.3s);
}

/* Fixed Line-End Targetting & Progressive Growth Pattern */
.mstr-line-last {
  width: 12px; 
  height: 1px; 
  background: currentColor;
  opacity: 0;
}

.mstr-credit-badge.is-visible .mstr-line-last {
  animation: energyWaveLine 5s infinite cubic-bezier(0.4, 0, 0.2, 1);
  animation-delay: calc(var(--i) * 0.3s);
}

@keyframes energyWave {
  0% { opacity: 0; }
  40% { opacity: 1; border-color: currentColor; }
  60% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes energyWaveLine {
  0% { opacity: 0; width: 12px; }
  40% { opacity: 1; width: 45px; }
  60% { opacity: 1; width: 45px; }
  100% { opacity: 0; width: 12px; }
}

/* Fullscreen Redirection Overlay Styles */
.mstr-redirect-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.mstr-redirect-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.mstr-redirect-text {
  color: white;
  font-family: 'Outfit', monospace;
  font-weight: 300;
  letter-spacing: 1px;
  font-size: 1rem;
  text-transform:capitalize;
  transition: opacity 2s ease;
}

.mstr-redirect-text.fade-out {
  opacity: 0;
}


@media screen and (min-width: 1200px) {
  .mstr-credit-badge a {
    font-size: 1rem !important;
  }
  .mstr-redirect-text {
    font-size: 1.5rem;

  }
}


.mstr-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  text-align: center;
  padding: 20px;
}

.mstr-overlay-buttons {
  display: none; /* Hidden on desktop during auto-sequence */
  gap: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Triggered on mobile device detection flow */
.mstr-redirect-overlay.show-buttons .mstr-overlay-buttons {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.mstr-btn {
  all: unset;
  cursor: pointer;
  font-family: monospace, Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: Capitalize;
  padding: 10px 15px;
  border: 1px solid currentColor;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-sizing: border-box;
}

.mstr-btn-visit {
  color: white;
  border-color: purple;
}

.mstr-btn-visit:hover {
  background: purple;
  color: black;
  box-shadow: 0 0 15px purple;
}

.mstr-btn-back {
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.mstr-btn-back:hover {
  border-color: white;
  background: white;
  color: black;
}