/* Command Palette overlay — glassmorphic retro terminal look */
.cmd-palette {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(18, 16, 15, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(60px, 15vh, 120px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.cmd-palette.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-box {
  width: 100%;
  max-width: 600px;
  background: rgba(26, 22, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: scale(0.96) translateY(-10px);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--font-ui), sans-serif;
}

.cmd-palette.is-open .cmd-box {
  transform: scale(1) translateY(0);
}

/* Header / Search bar */
.cmd-search-wrap {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cmd-search-icon {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.35);
  margin-right: 14px;
  line-height: 1;
}

.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  color: #fff;
  padding: 0;
}

.cmd-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.cmd-esc-hint {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Results / Options list */
.cmd-results {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-group-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  padding: 12px 16px 6px;
}

.cmd-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  color: rgba(255, 255, 255, 0.65);
}

.cmd-option.is-active,
.cmd-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.cmd-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmd-option-icon {
  font-size: 0.9rem;
  opacity: 0.5;
  width: 16px;
  text-align: center;
}

.cmd-option.is-active .cmd-option-icon,
.cmd-option:hover .cmd-option-icon {
  opacity: 0.9;
}

.cmd-option-label {
  font-size: 0.9rem;
  font-weight: 450;
}

.cmd-option-shortcut {
  font-size: 0.65rem;
  font-family: var(--font-mono), monospace;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

/* Scrollbar styling */
.cmd-results::-webkit-scrollbar {
  width: 6px;
}
.cmd-results::-webkit-scrollbar-track {
  background: transparent;
}
.cmd-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.cmd-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
  .cmd-palette {
    padding-top: 40px;
    align-items: flex-start;
  }

  .cmd-box {
    max-width: 95%;
    margin: 0 10px;
  }

  .cmd-search-wrap {
    padding: 14px 16px;
  }

  .cmd-results {
    max-height: 260px;
  }

  .cmd-option {
    padding: 10px 14px;
  }

  .cmd-option-shortcut {
    display: none;
  }
}
