/* ===== DOCK CONTAINER ===== */
#dock-container {
  position: fixed;
  bottom: 5px;
  width: 100%;
  text-align: center;
  z-index: 9999;
  pointer-events: none; /* Prevent accidental clicks outside icons */
}

#dock-container * {
  pointer-events: auto; /* Keep dock items clickable */
}

/* ===== LIQUID GLASS DOCK ===== */
#dock {
  position: relative;
  display: inline-flex;
  padding: 12px 25px;
  border-radius: 30px;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);

  /* Core glass transparency */
  background: rgba(255, 255, 255, 0.12);

  /* Multiple layered gradients for depth */
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2), transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));

  /* Borders and soft glow */
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.3), /* outer shadow */
    inset 0 0 20px rgba(255, 255, 255, 0.1), /* inner highlight */
    inset 0 0 40px rgba(255, 255, 255, 0.05);

  /* Remove overflow so icons can pop out */
  overflow: visible;

  z-index: 1;
}

/* ===== LIQUID RIPPLE ANIMATION ===== */
#dock::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
  transform: translate(-25%, -25%) scale(1.2);
  animation: ripple 14s infinite ease-in-out;
  opacity: 0.5;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ===== MOVING LIGHT SHIMMER ===== */
#dock::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 80%
  );
  /*animation: shimmer 10s infinite linear;*/
  pointer-events: none;
  z-index: 0;
  border-radius: 30px;
  mix-blend-mode: screen;
}

/* ===== ICON CONTAINER ===== */
#dock ul {
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  gap: 12px;
}

#dock li {
  list-style-type: none;
  position: relative;
  z-index: 5;
  text-align: center;
  transition: transform 0.3s ease;
}

/* ===== ICON STYLES ===== */
#dock li img {
  width: 48px;
  height: 48px;
  transition: all 0.3s ease;
  transform-origin: 50% 100%;
  position: relative;
  z-index: 10;
}

#dock li:hover img {
  transform: scale(2);
  margin: 0 1em;
}

/* Neighboring icons effect */
#dock li:hover + li img,
#dock li.prev img {
  transform: scale(1.5);
  margin: 0 1.5em;
}
/* ===== TOOLTIP ===== */
#dock li span {
  display: none;
  position: absolute;
  bottom: 210%; /* Position above the icon */
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 12px;

  /* Glass tooltip style */
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: #094158;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);

  /* Ensure tooltip is on top of everything */
  z-index: 50;
}

#dock li:hover span {
  display: block;
}

/* ===== Animations ===== */
@keyframes shimmer {
  0% { transform: rotate(25deg) translateX(-20%); }
  100% { transform: rotate(25deg) translateX(20%); }
}

@keyframes ripple {
  0%, 100% { transform: translate(-25%, -25%) scale(1.2); }
  50% { transform: translate(-20%, -30%) scale(1.4); }
}

/* Responsive dock scrolling */
@media (max-width: 600px) {
  #dock-container {
    overflow-x: auto;      /* Enable horizontal scrolling */
    overflow-y: visible;   /* Allow hover popups above */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
  }

  #dock {
    display: inline-flex;
    min-width: max-content;  /* Prevent icons from squishing */
    padding: 12px 15px;       /* Slightly smaller padding for mobile */
  }

  #dock ul {
    gap: 20px; /* Wider gaps so hover scale won’t overlap too much */
  }
}
