/* ===========================
   BACK TO TOP BUTTON
   =========================== */

#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 8888;
  width: 56px;
  height: 56px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
}

/* ---- SVG RING ---- */
.btt-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.btt-track {
  fill: none;
  stroke: rgba(249,115,22,0.15);
  stroke-width: 3;
}

.btt-progress {
  fill: none;
  stroke: #f97316;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 163.36;
  stroke-dashoffset: 163.36;
  transition: stroke-dashoffset 0.3s ease;
  filter: drop-shadow(0 0 4px rgba(249,115,22,0.6));
}

/* ---- INNER BUTTON ---- */
.btt-inner {
  position: absolute;
  inset: 6px;
  background: linear-gradient(135deg, #f97316, #ea6100);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(249,115,22,0.4);
  transition: box-shadow 0.3s ease;
  gap: 1px;
}

#back-to-top:hover .btt-inner {
  box-shadow: 0 8px 30px rgba(249,115,22,0.6);
}

/* ---- ARROW ---- */
.btt-arrow {
  color: white;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.3s ease;
}

#back-to-top:hover .btt-arrow {
  transform: translateY(-2px);
  animation: arrowBounce 0.6s ease;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---- COUNTER ---- */
.btt-count {
  font-size: 9px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.3px;
  line-height: 1;
  opacity: 0.9;
}

/* ---- TOOLTIP ---- */
.btt-tooltip {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 10px;
  background: rgba(10,22,40,0.9);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border: 1px solid rgba(249,115,22,0.2);
}

.btt-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: rgba(10,22,40,0.9);
}

#back-to-top:hover .btt-tooltip {
  opacity: 1;
}

/* ---- COUNTING ANIMATION ---- */
.btt-count.counting {
  animation: countDown 0.1s ease;
}

@keyframes countDown {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-3px); opacity: 0.5; }
  100% { transform: translateY(0); opacity: 1; }
}
