.index-manager {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.section {
  background: rgb(10, 10, 25);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 20px;
}

.index-list {
  flex: 1;
  max-width: 300px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 15px;
  display: flex;
  flex-direction: column;
}

.index-content {
  flex: 2;
  overflow-y: auto;
  padding-right: 10px;
}

.create-index {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  background: #2196F3;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.create-index:hover {
  background: #1976D2;
}

.index-entries {
  overflow-y: auto;
  flex-grow: 1;
}

.index-entry {
  padding: 10px;
  margin: 5px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.05);
}

.index-entry:hover {
  background: rgba(255, 255, 255, 0.1);
}

.index-entry.selected {
  background: #2196F3;
  border-color: #1976D2;
  color: white;
}

.index-metadata {
  margin-bottom: 20px;
}

.index-metadata input {
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #f0f0f0;
  font-size: 0.95rem;
}

.index-metadata input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.content-section {
  margin: 15px 0;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.content-section h3 {
  margin-bottom: 15px;
  font-size: 1.1em;
  color: #f0f0f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.split-view {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  min-height: 400px;
  max-height: 600px;
}

.available-items, .selected-items {
  flex: 1;
  background: rgb(10, 10, 25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.available-items h4, .selected-items h4 {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f0f0f0;
  font-size: 1rem;
  flex-shrink: 0;
}

.search-box {
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #f0f0f0;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.search-box:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.category-group {
  margin-bottom: 15px;
}

.category-title {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 5px;
}

.item-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: all 0.2s;
}

.item-entry:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.item-entry .name {
  flex: 1;
  color: #f0f0f0;
}

.item-entry .version {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9em;
  margin: 0 10px;
  font-family: 'SF Mono', 'Consolas', monospace;
}

.item-entry button {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.item-entry button.add {
  color: #4CAF50;
}

.item-entry button.remove {
  color: #f44336;
}

.item-entry button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.no-items {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* Scrollbar styling */
.item-list::-webkit-scrollbar,
.index-content::-webkit-scrollbar,
.index-entries::-webkit-scrollbar {
  width: 8px;
}

.item-list::-webkit-scrollbar-track,
.index-content::-webkit-scrollbar-track,
.index-entries::-webkit-scrollbar-track {
  background: rgba(10, 10, 25, 0.95);
}

.item-list::-webkit-scrollbar-thumb,
.index-content::-webkit-scrollbar-thumb,
.index-entries::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 10px;
  border: 2px solid rgba(10, 10, 25, 0.95);
}

.item-list::-webkit-scrollbar-thumb:hover,
.index-content::-webkit-scrollbar-thumb:hover,
.index-entries::-webkit-scrollbar-thumb:hover {
  background-color: #444;
}
