/* Custom Scrollbar Styling */
:root {
  /* Customizable scrollbar colors - matches WorthZen theme */
  --scrollbar-track: rgba(240, 242, 245, 0.8);
  --scrollbar-thumb: #667eea;
  --scrollbar-thumb-hover: #4e67d1;
  --scrollbar-width: 10px;
  --scrollbar-border-radius: 5px;
  --scrollbar-shadow: 0 0 6px rgba(102, 126, 234, 0.25);
}

/* Webkit Browsers - Chrome, Safari, Opera */
::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: var(--scrollbar-border-radius);
  margin: 5px 0;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--scrollbar-border-radius);
  box-shadow: var(--scrollbar-shadow);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Enhanced Scroll-To-Top Button */
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 25px;
  bottom: 25px;
  z-index: 999;
  background: var(--scrollbar-thumb);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: all 0.4s;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.scroll-top i {
  font-size: 24px;
  color: #fff;
  line-height: 0;
}

.scroll-top:hover {
  background: var(--scrollbar-thumb-hover);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  animation: bounce 2s infinite 3s;
}

/* Dark theme support */
body.dark-mode {
  --scrollbar-track: rgba(30, 32, 35, 0.8);
  --scrollbar-thumb: #4e67d1;
  --scrollbar-thumb-hover: #667eea;
}

/* Subtle bounce animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

/* Progress indicator on scrollbar */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 9999;
  background: transparent;
  overflow: hidden;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #667eea, #764ba2);
  transition: width 0.1s ease;
  box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

body.dark-mode .scroll-progress-bar {
  background: linear-gradient(to right, #4e67d1, #5d3b87);
}