/* ======= shortcuts.css ======= */

/* 快捷键卡片样式 */
.shortcuts-card,
.command-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb; /* Tailwind gray-200 */
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.shortcuts-card:hover,
.command-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.shortcuts-card::after,
.command-card::after {
  content: "";
  position: absolute;
  inset: auto -20% 0 -20%;
  height: 60%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shortcuts-card:hover::after,
.command-card:hover::after {
  opacity: 1;
}

.command-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.command-code {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-weight: 600;
  color: #0ea5e9;
  word-break: break-all;
  flex: 1;
}

.command-desc {
  font-size: 0.95rem;
  color: #334155;
}

/* 快捷键复制按钮 */
.copy-btn {
  background: none;
  border: none;
  color: #6b7280; /* Tailwind gray-500 */
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  transition: color 0.2s ease;
}

.copy-btn:hover {
  color: #3b82f6; /* Tailwind blue-500 */
}

/* 搜索与筛选工具条 */
.shortcuts-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem auto 1.5rem;
  max-width: 960px;
}

.shortcuts-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.shortcuts-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.shortcuts-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #64748b;
}

.platform-toggle {
  display: inline-flex;
  gap: 0.35rem;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 999px;
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn.is-active {
  background: #0ea5e9;
  color: #ffffff;
}

select#shortcuts-software {
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  background: #fff;
}

.ghost-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: #475569;
  transition: all 0.2s ease;
}

.ghost-btn:hover {
  border-color: #38bdf8;
  color: #0ea5e9;
}

/* 搜索框样式 */
#shortcuts-search {
  border-radius: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  box-shadow: 0 0 0 2px transparent;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 600px;
  margin: 0;
  display: block;
  flex: 1 1 320px;
}

#shortcuts-search:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* 分类标题折叠按钮 */
.shortcuts-section-header {
  background-color: #f9fafb;
  padding: 0.75rem 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
  gap: 0.75rem;
}

.shortcuts-section-header:hover {
  background-color: #f3f4f6;
}

.command-section-meta {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-left: auto;
  white-space: nowrap;
}

.shortcuts-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0 0.75rem;
  color: #1f2937;
}

.shortcuts-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* 每个软件块的容器 */
.shortcuts-section {
  margin-bottom: 2rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* 分类标签 */
.category-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background-color: #eff6ff;
  color: #2563eb;
  border-radius: 9999px;
  margin-right: 0.5rem;
}

/* 无结果提示 */
.no-results {
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  margin-top: 2rem;
  font-size: 0.95rem;
}

.search-hit {
  background: #fef3c7;
  color: #92400e;
  padding: 0 0.2rem;
  border-radius: 0.25rem;
}

@media screen and (max-width: 768px) {
  .shortcuts-toolbar {
    padding: 0 1rem;
  }

  #shortcuts-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.2;
    height: 2.25rem;
  }

  .shortcuts-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .shortcuts-filters {
    width: 100%;
    justify-content: space-between;
  }

  .shortcuts-filters select,
  .shortcuts-filters .ghost-btn,
  .platform-toggle {
    flex: 1 1 140px;
  }

  .platform-toggle {
    justify-content: center;
    width: 100%;
  }

  .shortcuts-meta {
    width: 100%;
    justify-content: space-between;
  }
}
