:root {
  
  --background-color: #1a1a1a; 
  --surface-color: #2c2c2c; 
  --text-color: #f0f0f0; 
  --secondary-text-color: #999999; 
  --primary-accent-color: #5d5dff; 
  --secondary-accent-color: #f0f0f0; 
  --border-color: #3e3e3e; 
  --font-family: 'Poppins', sans-serif;
  --border-radius: 8px;
  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  --hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);

  
  --light-background-color: #f6f6f6;
  --light-surface-color: #ffffff;
  --light-text-color: #2c2f42;
  --light-secondary-text-color: #6a718c;
  --light-border-color: #e3e7f0;
}


body.light-mode {
  --background-color: var(--light-background-color);
  --surface-color: var(--light-surface-color);
  --text-color: var(--light-text-color);
  --secondary-text-color: var(--light-secondary-text-color);
  --border-color: var(--light-border-color);
  --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  background-color: var(--background-color);
  color: var(--text-color);
  padding: 4rem 0;
  text-align: center;
  border-bottom: none; 
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.engini-logo {
  max-width: 80px;
  margin-bottom: 1.5rem;
  transition: filter 0.3s ease;
}


.header-title {
  font-size: 3.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--text-color);
  letter-spacing: -1.2px;
}

.tagline {
  font-size: 1.15rem;
  font-weight: 400;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
  color: var(--secondary-text-color);
}

main {
  padding: 3rem 0;
  flex-grow: 1;
}

.view-active {
  display: block;
  animation: fadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.view-inactive {
  display: none;
}

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

.search-export-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.5rem;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 550px;
}

.search-box i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-text-color);
  font-size: 1.1rem;
}

#searchInput {
  width: 100%;
  padding: 14px 20px 14px 55px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
  background-color: var(--surface-color);
  color: var(--text-color);
}

#searchInput::placeholder {
  color: var(--secondary-text-color);
}

#searchInput:focus {
  outline: none;
  border-color: var(--primary-accent-color);
  box-shadow: 0 0 0 4px rgba(93, 93, 255, 0.2);
}

.instruction {
  text-align: center;
  margin-bottom: 2.5rem;
  font-style: italic;
  color: var(--secondary-text-color);
  font-size: 1rem;
}

.sidebar-filters {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 1.5rem;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 3rem;
}

.filter-item {
  padding: 10px 22px;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  text-decoration: none;
  color: var(--secondary-text-color);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: var(--surface-color);
  white-space: nowrap;
}

.filter-item:hover {
  background-color: var(--border-color);
  color: var(--text-color);
  border-color: var(--secondary-accent-color);
}

.filter-item.active {
  background-color: var(--primary-accent-color);
  color: var(--light-color);
  border-color: var(--primary-accent-color);
  box-shadow: var(--card-shadow);
}

.agent-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.agent-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  text-align: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
}

.agent-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-accent-color);
}

.agent-card:hover .lucide-icon,
.agent-card:hover img {
  transform: scale(1.1);
}

.agent-card .lucide-icon,
.agent-card img {
  width: 70px;
  height: 70px;
  margin-bottom: 1.5rem;
  object-fit: contain;
  display: block;
  background-color: var(--background-color);
  border-radius: 10px;
  padding: 6px;
  color: rgb(99, 184, 187);
  transition: all 0.4s ease;
}

.agent-card .agent-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.agent-category {
  font-size: 0.9rem;
  color: var(--secondary-text-color);
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

.use-cases-display {
  padding: 3rem;
  background: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.agent-details-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.agent-details-header .icon-container {
  width: 90px;
  height: 90px;
  margin-right: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-details-header .icon-container .lucide-icon {
  width: 100%;
  height: 100%;
  margin-right: 0;
  color: var(--primary-accent-color);
}

.agent-details-description {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.use-case-section h3, .related-systems-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: var(--primary-accent-color);
  border-left: 5px solid var(--primary-accent-color);
  padding-left: 15px;
}

#useCasesList {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

#useCasesList li {
  background: var(--background-color);
  border-left: 4px solid var(--primary-accent-color);
  padding: 12px 20px;
  margin-bottom: 0;
  border-radius: 8px;
  font-size: 1rem;
  color: var(--secondary-text-color);
}

#relatedSystemsList {
  font-size: 1rem;
  font-weight: 400;
  color: var(--secondary-text-color);
  background: var(--background-color);
  border-left: 4px solid var(--primary-accent-color);
  padding: 12px 20px;
  border-radius: 8px;
}

.back-to-catalog {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  padding: 12px 24px;
}

.back-to-catalog i {
  margin-right: 10px;
}

.btn {
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-secondary {
  background-color: var(--surface-color);
  color: var(--primary-accent-color);
  border: 1px solid var(--primary-accent-color);
}

.btn-secondary:hover {
  background-color: var(--primary-accent-color);
  color: var(--light-color);
  box-shadow: 0 4px 10px rgba(93, 93, 255, 0.3);
}

footer {
  background-color: var(--dark-color);
  color: var(--secondary-text-color);
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .header-title {
    font-size: 2.5rem;
  }
  .tagline {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .sidebar-filters {
    padding: 1rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar-filters::-webkit-scrollbar {
    display: none;
  }
  .search-export-container {
    flex-direction: column;
    gap: 1rem;
  }
  .agent-details-header {
    flex-direction: column;
    text-align: center;
    padding-bottom: 1rem;
  }
  .agent-details-header .icon-container {
    margin: 0 0 1rem 0;
  }
  .agent-details-description {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
}


.theme-toggle {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 20%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--border-color);
}

.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
  width: 20px;
  height: 20px;
  color: var(--text-color);
  transition: all 0.3s ease;
}

body.light-mode .theme-toggle .icon-moon {
  display: block;
}

body:not(.light-mode) .theme-toggle .icon-sun {
  display: block;
}

body.light-mode .theme-toggle .icon-sun,
body:not(.light-mode) .theme-toggle .icon-moon {
  display: none;
}


.theme-toggle svg.lucide-moon {
    display: none; 
}

body.light-mode .theme-toggle svg.lucide-sun {
    display: none; 
}

body.light-mode .theme-toggle svg.lucide-moon {
    display: block; 
}
.theme-toggle svg.lucide-sun {
  color: #ffffff;
}
