
.taskbar {
  position: fixed;
  bottom: 10px;
  left: 12px;
  right: 12px;
  height: 52px;
  background: rgba(10, 15, 26, 0.60);
  border: 1px solid rgba(140, 180, 255, 0.16);
  border-radius: 16px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(130, 184, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  z-index: 4500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  user-select: none;
  overflow: hidden;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
}

/* auto-hide the taskbar while a window is fullscreen-maximized;
   it slides back up only when the pointer hits the bottom edge */
body.has-maximized .taskbar {
  transform: translateY(calc(100% + 16px));
  opacity: 0;
  pointer-events: none;
}
body.has-maximized.taskbar-peek .taskbar {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* invisible bottom-edge strip that reveals the hidden taskbar */
#taskbar-reveal-zone {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  z-index: 4490;
  display: none;
}
body.has-maximized #taskbar-reveal-zone {
  display: block;
}

.taskbar-start-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  flex-shrink: 0;
}

.taskbar-start-btn:hover,
.taskbar-start-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* search bar */
.taskbar-search-wrap {
  position: relative;
  width: min(420px, 40vw);
  min-width: 120px;
  height: 32px;
  flex-shrink: 1;
}

.taskbar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.taskbar-search-input {
  width: 100%;
  height: 100%;
  background: var(--accent-soft);
  border: none;
  border-radius: 8px;
  padding: 0 12px 0 32px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: background 120ms ease;
}

.taskbar-search-input::placeholder {
  color: var(--dim);
}

.taskbar-search-input:focus {
  background: var(--accent-soft);
}

/* pinned apps row */
.taskbar-pinned-apps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
  min-width: 0;
  flex-shrink: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.taskbar-pinned-apps::-webkit-scrollbar {
  display: none;
}

.taskbar-app-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease, color 120ms ease;
}

.taskbar-app-btn:hover {
  background: var(--accent-soft);
  transform: scale(1.06);
  color: var(--accent);
}

.taskbar-app-dot {
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 150ms ease;
}

.taskbar-app-btn.is-running .taskbar-app-dot {
  opacity: 1;
}

.taskbar-app-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(10, 14, 24, 0.92);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease 400ms, transform 150ms ease 400ms;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 5000;
}

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


.start-menu {
  position: fixed;
  bottom: 74px;
  left: 12px;
  width: 260px;
  max-width: calc(100vw - 24px);
  max-height: min(340px, calc(100vh - 180px));
  max-height: min(340px, calc(100dvh - 180px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  background: var(--window);
  border: 1px solid var(--border);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  padding: 6px;
  z-index: 4600;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: translateY(6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 150ms cubic-bezier(0.16, 1, 0.3, 1), opacity 150ms ease;
}
.start-menu::-webkit-scrollbar {
  width: 6px;
}
.start-menu::-webkit-scrollbar-track {
  background: transparent;
}
.start-menu::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.start-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.start-menu-item {
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition: background 100ms ease, color 100ms ease;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.start-menu-item:hover,
.start-menu-item.selected {
  background: var(--accent-soft);
  color: var(--accent);
}

.start-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}


.taskbar-search-results {
  position: fixed;
  bottom: 74px;
  left: 60px;
  width: min(420px, 40vw);
  background: var(--window);
  border: 1px solid var(--border);
  border-radius: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  padding: 6px;
  z-index: 4600;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: translateY(6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 150ms cubic-bezier(0.16, 1, 0.3, 1), opacity 150ms ease;
}

.taskbar-search-results.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.search-no-results {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--dim);
}
