body.spotlight-open {
  overflow: hidden;
}

#lunrsearchresults {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.spotlight-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  padding-top: 10vh;
  animation: spotlightFadeIn 0.2s ease;
}

@keyframes spotlightFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.spotlight-container {
  width: 680px;
  max-width: 90vw;
  max-height: 70vh;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: spotlightSlideIn 0.25s ease;
}

@keyframes spotlightSlideIn {
  from { opacity: 0; transform: scale(0.96) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.spotlight-header {
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.spotlight-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 12px 16px;
}

.spotlight-icon {
  color: #86868b;
  font-size: 18px;
}

.spotlight-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  color: #1d1d1f;
  outline: none;
}

.spotlight-search-box input::placeholder {
  color: #86868b;
}

.spotlight-shortcut {
  background: rgba(0, 0, 0, 0.06);
  color: #86868b;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 5px;
}

.spotlight-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.spotlight-results-header {
  padding: 8px 20px;
}

.spotlight-category-title {
  font-size: 12px;
  font-weight: 600;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spotlight-category-title i {
  margin-right: 6px;
}

.spotlight-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  font-size: 11px;
}

.spotlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spotlight-item {
  animation: spotlightItemIn 0.2s ease forwards;
  opacity: 0;
}

@keyframes spotlightItemIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.spotlight-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  text-decoration: none;
  transition: background 0.15s ease;
  border-radius: 8px;
  margin: 0 8px;
}

.spotlight-item a:hover {
  background: rgba(3, 168, 124, 0.1);
}

.spotlight-item-icon {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-primary, #03a87c) 0%, var(--color-primary-dark, #028a66) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.spotlight-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-item-icon i {
  color: #fff;
  font-size: 20px;
}

.spotlight-item-content {
  flex: 1;
  min-width: 0;
}

.spotlight-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.spotlight-item-subtitle {
  font-size: 12px;
  color: #6e6e73;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-item-meta {
  font-size: 11px;
  color: #86868b;
  margin-top: 2px;
}

.spotlight-item-action {
  color: #c7c7cc;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.spotlight-item a:hover .spotlight-item-action {
  opacity: 1;
}

.spotlight-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: #86868b;
}

.spotlight-empty i {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.spotlight-footer {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.spotlight-footer span {
  font-size: 11px;
  color: #86868b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.spotlight-close {
  cursor: pointer;
}

.spotlight-close:hover {
  color: var(--color-primary, #03a87c);
}

.search-trigger-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}

.search-trigger-wrapper:hover {
  background: rgba(3, 168, 124, 0.06);
  border-color: rgba(3, 168, 124, 0.2);
}

.search-trigger-icon {
  color: #86868b;
  font-size: 14px;
}

.search-trigger-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 14px;
  color: #86868b;
  cursor: pointer;
  box-shadow: none !important;
  min-width: 0;
}

.search-trigger-shortcut {
  background: rgba(0, 0, 0, 0.06);
  color: #86868b;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.search-trigger-mobile {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-primary, #03a87c);
  width: 100%;
  min-height: 2.25rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-trigger-mobile:hover {
  background: rgba(3, 168, 124, 0.1);
  border-color: rgba(3, 168, 124, 0.2);
}

.search-trigger-mobile__icon {
  color: #86868b;
  font-size: 14px;
  flex-shrink: 0;
}

.search-trigger-mobile__text {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 14px;
  color: #86868b;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .spotlight-container {
    background: rgba(30, 30, 32, 0.95);
  }

  .spotlight-search-box {
    background: rgba(255, 255, 255, 0.08);
  }

  .spotlight-search-box input,
  .spotlight-item-title {
    color: #f5f5f7;
  }

  .spotlight-item-subtitle {
    color: #a1a1a6;
  }

  .spotlight-footer {
    background: rgba(255, 255, 255, 0.03);
    border-top-color: rgba(255, 255, 255, 0.08);
  }
}
