/* SPIDEY OS TASKBAR - Futuristic Spider-Man Dock */

#taskbar-root {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  width: auto;
  max-width: calc(100vw - 16px);
}

.spidey-taskbar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(10,10,12,0.72);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  box-shadow: 
    0 12px 40px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 28px rgba(225,6,0,0.12),
    0 1px 0 rgba(255,255,255,0.06) inset;
  position: relative;
  overflow: visible;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
}

.spidey-taskbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01));
  pointer-events: none;
}

.spidey-taskbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(225,6,0,0.5), transparent);
  opacity: 0.7;
}

.spidey-taskbar:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 16px 48px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 36px rgba(225,6,0,0.18);
}

.spidey-taskbar-divider {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.12), transparent);
  margin: 0 6px;
  flex-shrink: 0;
}

/* App Icon Button */
.taskbar-app {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16,1,0.3,1);
  flex-shrink: 0;
  overflow: visible;
}

.taskbar-app img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
  border-radius: 6px;
}

.taskbar-app .taskbar-icon-fallback {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.taskbar-app:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-4px) scale(1.06);
  box-shadow: 
    0 8px 20px rgba(0,0,0,0.4),
    0 0 18px rgba(225,6,0,0.22);
}

.taskbar-app:hover img,
.taskbar-app:hover .taskbar-icon-fallback {
  transform: scale(1.1);
}

.taskbar-app:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.08s;
}

.taskbar-app.active {
  background: rgba(225,6,0,0.12);
  border-color: rgba(225,6,0,0.22);
  box-shadow: 
    0 0 0 1px rgba(225,6,0,0.15) inset,
    0 4px 16px rgba(225,6,0,0.18);
}

.taskbar-app.active::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 10px;
  background: var(--spidey-red, #e10600);
  box-shadow: 0 0 10px rgba(225,6,0,0.8), 0 0 20px rgba(225,6,0,0.4);
  animation: activePulse 2.2s ease-in-out infinite;
}

.taskbar-app.focused {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
}

.taskbar-app.focused.active::after {
  width: 22px;
  background: #ff1a1a;
  box-shadow: 0 0 12px rgba(255,20,20,0.9), 0 0 24px rgba(255,20,20,0.5);
}

@keyframes activePulse {
  0%,100% { opacity: 1; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scaleX(0.85); }
}

/* Tooltip */
.taskbar-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(12,12,14,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f0f0f0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100;
}

.taskbar-app:hover .taskbar-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Spider web accent */
.taskbar-app::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(120px circle at 50% 0%, rgba(225,6,0,0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.taskbar-app:hover::before {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  #taskbar-root {
    bottom: 8px;
    width: calc(100vw - 12px);
  }
  .spidey-taskbar {
    padding: 6px 8px;
    gap: 4px;
    border-radius: 16px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }
  .spidey-taskbar::-webkit-scrollbar { display: none; }
  .taskbar-app {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }
  .taskbar-app img, .taskbar-app .taskbar-icon-fallback {
    width: 22px;
    height: 22px;
  }
  .taskbar-tooltip { display: none; }
}

@media (max-width: 420px) {
  .spidey-taskbar { gap: 2px; padding: 5px 6px; }
  .taskbar-app { width: 38px; height: 38px; }
}
