:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --text-color: #1f2937;
  --background-color: #f9fafb;
  --card-bg: #ffffff;
  --hover-color: #dbeafe;
  
  /* Card theme colors */
  --search-color: #3b82f6;
  --search-bg: #eff6ff;
  --evaluation-color: #10b981;
  --evaluation-bg: #ecfdf5;
  --development-color: #8b5cf6;
  --development-bg: #f5f3ff;
  --torchserve-color: #ef4444;
  --torchserve-bg: #fef2f2;
  --legacy-color: #f59e0b;
  --legacy-bg: #fffbeb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.4;
  color: var(--text-color);
  background-color: var(--background-color);
  padding: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.3rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

h2 {
  font-size: 0.95rem;
  margin-top: 0.6rem;
  margin-bottom: 0.4rem;
  color: var(--section-color, var(--secondary-color));
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 0.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* First h2 in a section should have less top margin */
.section h2:first-of-type {
  margin-top: 0.3rem;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  background-color: var(--card-bg);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
  font-size: 0.85rem;
  max-height: none;
  overflow: visible;
  width: 100%;
  max-width: 900px;
}

.section:hover {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}



/* Dynamic section colors - limited to headings and elements */
.section h1 {
  color: var(--section-color, var(--primary-color));
  border-color: var(--section-color, var(--primary-color));
}

.section .desc {
  color: var(--section-desc-color, rgba(55, 65, 81, 0.8));
}

.section a:hover {
  color: var(--section-color, var(--primary-color));
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-right: 0.4rem;
}

a {
  color: rgba(20, 20, 20, 0.9);
  text-decoration: none;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 0.25rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

a:hover {
  background-color: #ffffff;
  transform: translateX(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: var(--section-color, var(--primary-color));
  font-weight: 600;
}

.desc {
  font-size: 0.7rem;
  color: rgba(100, 100, 100, 0.7);
  margin-left: 0.4rem;
  padding-bottom: 0.1rem;
  display: block;
  font-style: italic;
  margin-bottom: 0.2rem;
  border-bottom: none;
  opacity: 0.85;
  font-weight: 400;
}

/* Add border to descriptions except the last one in each links section */
.desc:not(:last-child) {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.section > .links:last-child .desc:last-child {
  margin-bottom: 0;
}

/* Remove section-specific desc colors */
.search .desc,
.evaluation .desc,
.development .desc,
.torchserve .desc,
.random .desc,
.legacy .desc {
  color: rgba(80, 80, 80, 0.8);
}

.search a:hover {
  color: var(--search-color);
}

.evaluation a:hover {
  color: var(--evaluation-color);
}

.development a:hover {
  color: var(--development-color);
}

.torchserve a:hover {
  color: var(--torchserve-color);
}

.legacy a:hover {
  color: var(--legacy-color);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  max-width: 900px;
  margin: 0 auto 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: #000000;
}

.external-icon {
  width: 14px;
  height: 14px;
  vertical-align: text-bottom;
  margin-right: 4px;
  border-radius: 2px;
}

/* Adjust link padding for icons */
a.with-icon {
  display: flex;
  align-items: center;
}

/* Two-column layout for wider sections */
.section.wide {
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.section.wide h1 {
  grid-column: 1 / -1;
}

/* Special rule for legacy section with lots of content */
.section.legacy {
  max-height: none;
  overflow: visible;
}

@media (max-width: 768px) {
  .section.wide {
    grid-template-columns: 1fr;
  }
  
  body {
    padding: 0.5rem;
  }
} 