.commands-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 7rem 0 3rem;
}

.commands-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;

  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;

  padding: 1.25rem;
}

.commands-sidebar h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.category-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;

  background: transparent;
  border: none;

  color: hsl(var(--foreground));

  padding: 0.85rem 1rem;

  border-radius: 10px;

  cursor: pointer;

  transition: 0.2s;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.category-btn.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.category-count {
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.commands-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.search-box {
  position: sticky;
  top: 90px;

  z-index: 50;

  background: hsl(var(--background));

  padding-bottom: 0.5rem;
}

.search-box input {
  width: 100%;

  background: hsl(var(--card));

  border: 1px solid hsl(var(--border));

  border-radius: 12px;

  padding: 1rem 1.2rem;

  color: white;

  font-size: 1rem;

  outline: none;

  transition: 0.25s;
}

.search-box input:focus {
  border-color: hsl(var(--primary));

  box-shadow: 0 0 0 4px hsl(var(--primary) / 0.15);
}

.command-card {
  background: hsl(var(--card));

  border: 1px solid hsl(var(--border));

  border-radius: 14px;

  overflow: hidden;

  transition: 0.25s;
}

.command-card:hover {
  border-color: hsl(var(--primary));
}

.command-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 1.2rem 1.4rem;

  cursor: pointer;
}

.command-left {
  display: flex;

  gap: 1rem;

  align-items: center;
}

.command-icon {
  width: 42px;

  height: 42px;

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.08);

  display: flex;

  align-items: center;

  justify-content: center;

  font-weight: 700;

  color: hsl(var(--primary));
}

.command-name {
  font-size: 1.2rem;

  font-weight: 700;
}

.command-description {
  margin-top: 0.3rem;

  color: hsl(var(--muted-foreground));

  font-size: 0.95rem;
}

.command-arrow {
  transition: 0.25s;
}

.command-card.open .command-arrow {
  transform: rotate(180deg);
}

.command-body {
  display: none;

  padding: 0 1.5rem 1.5rem;

  border-top: 1px solid hsl(var(--border));
}

.command-card.open .command-body {
  display: block;
}

.command-section {
  margin-top: 1rem;
}

.command-section h4 {
  margin-bottom: 0.45rem;

  font-size: 0.9rem;

  color: hsl(var(--primary));
}

.command-code {
  display: block;

  background: hsl(var(--background));

  border: 1px solid hsl(var(--border));

  padding: 0.9rem 1rem;

  border-radius: 10px;

  font-family: Consolas, monospace;

  word-break: break-word;
}

.alias-list {
  display: flex;

  flex-wrap: wrap;

  gap: 0.5rem;
}

.alias {
  background: rgba(255, 255, 255, 0.08);

  padding: 0.35rem 0.7rem;

  border-radius: 999px;

  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .commands-layout {
    grid-template-columns: 1fr;
  }

  .commands-sidebar {
    position: relative;

    top: 0;
  }
}
