/* 日间模式 */
.command-menu {
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  max-height: 55vh;
  width: 480px;
  overflow: hidden;
  pointer-events: none;
  text-align: left;
  position: fixed;
  bottom: 50%;
  left: 50%;
  z-index: 9999;
  opacity: 0;
  box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
  transform: translate3d(-50%, calc(50% + 0.5rem), 0) scale(0.95);
  transform-origin: 50% 0;
  animation: fadeInOut 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  display: none;
}

/* 遮罩层样式 */
.command-menu-overlay {
  display: none; /* 默认不显示 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(1, 1, 1, 0.4);
  z-index: 9998; /* 确保它位于命令菜单下方 */
}


@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate3d(-50%, calc(50% + 0.5rem), 0) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translate3d(-50%, 50%, 0) scale(1);
  }
}

.command-menu.visible {
  opacity: 1;
  transform: translate3d(-50%, 50%, 0) scale(1);
}

.command-menu:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 50%, 0) scale(1);
}

.list-reset {
  list-style-type: none;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
}

.group-option-link {
  display: block;
  border-radius: 0.75rem;
  text-decoration: none;
  color: rgb(82 82 82);
  width: 100%;
  display: flex;
  align-items: center;
  text-align: center;
  gap: 1rem;
  font-family: var(--font-family-title);
  font-size: .9rem;
  height: 40px;
}

.group-option a {
  text-decoration: none !important;
}

.command-menu-search {
  border-radius: 0.75rem 0.75rem 0 0;
  border-width: 0;
  display: block;
  font: inherit;
  padding: 1rem 1.5rem;
  width: 100%;
}

.command-menu-header {
  flex: 0 0 100%;
}

.command-menu-content {
  flex: auto;
  overflow-y: auto;
  scroll-padding-top: 3rem;
  scroll-padding-bottom: 3rem;
}

.group {
  padding: 0.75rem;
}

.group-label {
  display: block;
  font-size: 0.85rem;
  text-align: left;
  color: #9e9e9e;
  margin: 8px 16px;
}

.command-menu {
  background-color: hsla(0,0%,100%,.9);
  /* border: 1px solid #666666; */
  box-shadow: 0px 0px 0px 1px rgba(25,37,50,.05),0px 3px 7px -3px rgba(25,37,50,.1),0px 6px 12px -2px rgba(25,37,50,.1),inset 0 0 0 1px hsla(0,0%,100%,.05);

  -webkit-backdrop-filter: saturate(140%) blur(20px);
  backdrop-filter: saturate(140%) blur(20px);
}

.command-menu-header {
  border-bottom: 1px solid #666666;
}

.command-menu-search {
  background-color: transparent;
  color: #cccccc;
}

.command-menu-search:focus {
  outline: 0;
}

.group-option-link:focus-visible {
  outline: 0;
}

.group-option-link:not(:hover):focus {
  color: rgb(82 82 82);
  outline: none;
  position: relative;
  text-decoration: underline;
}

.shortcuts {
  display: flex;
  margin-left: auto;
  gap: 8px;
  /* background: #363636; */
  border-radius: 6px
}

kbd {
  font-size: .85rem;
  width: 22px;
  padding: 4px;
  height: 22px;
  border-radius: var(--radius-inner);
  color: rgb(82 82 82);
  /* background: rgba(102, 102, 102, 0.8); */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  border: 1px solid rgba(17,24,39,.1);
}

li.group-option {
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: rgb(82 82 82);
}

li.group-option:hover,
.command-menu .focused {
  background-color: rgba(64,64,64,.1);
  color: rgb(38 38 38);
  border-radius: var(--radius-inner);
}

.group-option:hover a ,.group-option:hover > .cmdk-icon {
  color: rgb(38 38 38);
  text-decoration: none;
}

.kbd-btn {
  font-size: 14px;
  color: inherit;
  gap: 4px;
  display: flex;
  align-items: center;
}

.cmdk-icon {
  color: inherit;
}


/* 暗黑模式 */
@media (prefers-color-scheme: dark) {  
  .command-menu {
        border-radius: 1rem;
        display: flex;
        flex-direction: column;
        max-height: 55vh;
        width: 480px;
        overflow: hidden;
        pointer-events: none;
        text-align: left;
        position: fixed;
        bottom: 50%;
        left: 50%;
        z-index: 9999;
        opacity: 0;
        box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
        transform: translate3d(-50%, calc(50% + 0.5rem), 0) scale(0.95);
        transform-origin: 50% 0;
        animation: fadeInOut 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        display: none;
      }

      @keyframes fadeInOut {
        0% {
          opacity: 0;
          transform: translate3d(-50%, calc(50% + 0.5rem), 0) scale(0.95);
        }

        100% {
          opacity: 1;
          transform: translate3d(-50%, 50%, 0) scale(1);
        }
      }

      .command-menu.visible {
        opacity: 1;
        transform: translate3d(-50%, 50%, 0) scale(1);
      }

      .command-menu:not([hidden]) {
        opacity: 1;
        pointer-events: auto;
        transform: translate3d(-50%, 50%, 0) scale(1);
      }

      .list-reset {
        list-style-type: none;
        margin-top: 0;
        margin-bottom: 0;
        padding-left: 0;
      }

      .group-option-link {
        display: block;
        border-radius: 0.75rem;
        text-decoration: none;
        color: rgb(155 155 155);
        width: 100%;
        display: flex;
        align-items: center;
        text-align: center;
        gap: 1rem;
        font-family: var(--font-family-title);
        font-size: .9rem;
        height: 40px;
      }

      .group-option a {
        text-decoration: none !important;
      }

      .command-menu-search {
        border-radius: 0.75rem 0.75rem 0 0;
        border-width: 0;
        display: block;
        font: inherit;
        padding: 1rem 1.5rem;
        width: 100%;
      }

      .command-menu-header {
        flex: 0 0 100%;
      }

      .command-menu-content {
        flex: auto;
        overflow-y: auto;
        scroll-padding-top: 3rem;
        scroll-padding-bottom: 3rem;
      }

      .group {
        padding: 0.75rem;
      }

      .group-label {
        display: block;
        font-size: 0.85rem;
        text-align: left;
        color: #9e9e9e;
        margin: 8px 16px;
      }

      .command-menu {
        background-color: rgba(38,38,38,.95);
        /* border: 1px solid #666666; */
        box-shadow: 0 0 0 1px #222222;

        -webkit-backdrop-filter: saturate(140%) blur(20px);
        backdrop-filter: saturate(140%) blur(20px);
      }

      .command-menu-header {
        border-bottom: 1px solid #666666;
      }

      .command-menu-search {
        background-color: transparent;
        color: #cccccc;
      }

      .command-menu-search:focus {
        outline: 0;
      }

      .group-option-link:focus-visible {
        outline: 0;
      }

      .group-option-link:not(:hover):focus {
        color: rgb(155 155 155);
        outline: none;
        position: relative;
        text-decoration: underline;
      }

      /*.group-option-link:not(:hover):focus:after {
        border-radius: 0.75rem;
        content: '';
        display: block;
        position: absolute;
        inset: 0;
      }*/

      .shortcuts {
        display: flex;
        margin-left: auto;
        gap: 8px;
        /* background: #363636; */
        border-radius: 6px
      }

      kbd {
        font-size: .85rem;
        width: 22px;
        padding: 4px;
        height: 22px;
        border-radius: var(--radius-inner);
        color: rgb(155 155 155);
        /* background: rgba(102, 102, 102, 0.8); */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
        border: 1px solid hsla(0, 0%, 100%, .1);
      }

      li.group-option {
        display: flex;
        align-items: center;
        padding: 0 15px;
      }

      li.group-option:hover,
      .command-menu .focused {
        background-color: hsla(0,0%,100%,.1);
        color: rgba(46, 14, 14, 0.95);
        border-radius: var(--radius-inner);
      }

      .group-option:hover a ,.group-option:hover > .cmdk-icon {
        color: rgb(223 223 222);
        text-decoration: none;
      }

      .cmdk-icon {
        color: inherit;
      }
}

