/* --- MODERN WEBSITE STANDARDS & ENHANCEMENTS --- */

/* 1. Custom Premium Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--tag, #F8FAFC);
}
::-webkit-scrollbar-thumb {
  background: var(--glas-linie-dunkel, #333C44);
  border-radius: 10px;
  border: 3px solid var(--tag, #F8FAFC);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--akzent, #1D4FA8);
}

/* 2. Modern Selection Color */
::selection {
  background: var(--akzent, #1D4FA8);
  color: #fff;
}

/* 3. Smooth Page Load Transition */
body {
  animation: pageFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 4. Global Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--akzent-hell, #7FA3E8), var(--akzent, #1D4FA8));
  z-index: 99999;
  pointer-events: none;
  transition: width 0.1s ease-out;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* 5. Back to Top Floating Action Button */
#btt-btn {
  position: fixed;
  bottom: 30px;
  left: 30px; /* Positioned left to avoid clashing with chat widgets on the right */
  width: 48px;
  height: 48px;
  background: var(--akzent, #1D4FA8);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9000;
  box-shadow: 0 4px 14px rgba(29, 79, 168, 0.4);
}
#btt-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
#btt-btn:hover {
  transform: translateY(-5px) scale(1.08);
  background: var(--akzent-tief, #163C82);
  box-shadow: 0 8px 24px rgba(29, 79, 168, 0.6);
}

/* 6. Magnetic Button Physics Wrapper */
.btn--primary {
  /* Allows transform to be smoothly overridden by JS */
  will-change: transform;
}
