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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background: linear-gradient(135deg, #005500 0%, #228822 100%);
  min-height: 100vh;
  padding: 20px;
  color: #1a2b1a;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

header {
  background: linear-gradient(135deg, #005500 0%, #228822 100%);
  color: #fff;
  padding: 40px 30px;
  text-align: center;
  border-radius: 12px 12px 0 0;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  font-size: 1.1em;
  opacity: 0.9;
}

.controls {
  padding: 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.input-group label {
  font-weight: 600;
  color: #495057;
}

#gistUrl {
  flex: 1;
  min-width: 250px;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s;
}

#gistUrl:focus {
  outline: none;
  border-color: #005500;
}

#loadBtn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #005500 0%, #228822 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

#loadBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 85, 0, 0.25);
}

#loadBtn:active {
  transform: translateY(0);
}

.search-group {
  display: flex;
  gap: 10px;
}

#searchInput {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s;
}

#searchInput:focus {
  outline: none;
  border-color: #005500;
}

.error {
  margin: 20px 30px;
  padding: 15px;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
}

.loading {
  margin: 20px 30px;
  padding: 20px;
  text-align: center;
  font-size: 1.1em;
  color: #005500;
}

.hidden {
  display: none;
}

.recommendations {
  padding: 30px;
}

.section {
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
}

.section-header {
  background: #f8f9fa;
  padding: 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s;
}

.section-header:hover {
  background: #e9ecef;
}

.section-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5em;
  color: #495057;
}

.toggle-icon {
  display: inline-block;
  transition: transform 0.3s;
  font-size: 0.8em;
}

.toggle-icon.collapsed {
  transform: rotate(-90deg);
}

.count {
  font-size: 0.6em;
  color: #6c757d;
  font-weight: normal;
}

.section-content {
  max-height: 600px;
  overflow-y: auto;
  transition:
    max-height 0.3s ease-out,
    overflow-y 0s;
}

.section-content.collapsed {
  max-height: 0;
  overflow-y: hidden;
  transition:
    max-height 0.3s ease-out,
    overflow-y 0s 0.3s;
}

.recommendation-list {
  padding: 20px;
}

.recommendation-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  transition:
    box-shadow 0.3s,
    transform 0.2s;
}

.recommendation-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.recommendation-card.hidden {
  display: none;
}

.recommendation-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.recommendation-name {
  font-size: 1.3em;
  font-weight: 700;
  color: #005500;
}

.recommendation-date {
  color: #6c757d;
  font-size: 0.9em;
}

.recommendation-relationship,
.recommendation-title,
.recommendation-company {
  color: #495057;
  margin-bottom: 8px;
}

.recommendation-relationship {
  font-style: italic;
}

.recommendation-title {
  font-weight: 600;
}

.recommendation-text {
  margin-top: 15px;
  line-height: 1.6;
  color: #1a2b1a;
  padding: 15px;
  background: #eafbe6;
  border-radius: 6px;
  border-left: 4px solid #005500;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-size: 1.1em;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2em;
  }

  .input-group {
    flex-direction: column;
    align-items: stretch;
  }

  #loadBtn {
    width: 100%;
  }

  .recommendation-header {
    flex-direction: column;
  }
}
