/* Apinference Platform Matching Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #e5e7eb;
  background: #0f0f0f;
  min-height: 100vh;
}

/* Header Styles - Dark theme to match dev platform */
.site-header {
  background: #1a1a1a;
  color: #e5e7eb;
  padding: 1.5rem 0;
  border-bottom: 1px solid #2a2a2a;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
}

.logo-icon:hover {
  transform: scale(1.1);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e5e7eb;
  margin: 0;
}

.header-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.secondary-btn, .start-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  font-size: 0.875rem;
}

.secondary-btn {
  background: transparent;
  color: #9ca3af;
  border-color: #374151;
}

.secondary-btn:hover {
  background: #374151;
  color: #e5e7eb;
  text-decoration: none;
}

.start-btn {
  background: #8b5cf6;
  color: white;
  font-weight: 600;
}

.start-btn:hover {
  background: #7c3aed;
  text-decoration: none;
}

/* Hero Section - Dark theme */
.hero-section {
  text-align: center;
  margin: 3rem 0 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #9ca3af;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.tagline {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Examples Section */
.examples-section {
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding: 0 2rem;
  text-align: center;
}

.examples-title {
  font-size: 2rem;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 2rem;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.example-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 2rem;
  text-align: left;
  transition: all 0.3s ease;
}

.example-card:hover {
  transform: translateY(-4px);
  border-color: #8b5cf6;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.example-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.example-card h4 {
  color: #f9fafb;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.example-card p {
  color: #d1d5db;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  font-style: italic;
}

.example-tools {
  color: #8b5cf6;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid #8b5cf6;
}

/* Controls - Dark theme */
.controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto 1rem;
  padding: 0 2rem;
}

#searchInput {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 0.875rem;
}

#searchInput::placeholder {
  color: #6b7280;
}

#searchInput:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 1px #8b5cf6;
}

#categoryDropdown {
  padding: 0.75rem 1rem;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #1f2937;
  color: #e5e7eb;
  font-size: 0.875rem;
}

#categoryDropdown option {
  background: #1f2937;
  color: #e5e7eb;
}

#resetButton {
  padding: 0.75rem 1rem;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #374151;
  color: #e5e7eb;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

#resetButton:hover {
  background: #4b5563;
}

#resultsText {
  text-align: center;
  color: #9ca3af;
  font-weight: 500;
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* Main Content - Dark theme */
main {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.servers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.server-card {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #2a2a2a;
  transition: all 0.3s ease;
}

.server-card:hover {
  transform: translateY(-2px);
  border-color: #8b5cf6;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.1);
}

.server-card h3 {
  color: #f9fafb;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.server-card h3 a {
  color: #f9fafb;
  text-decoration: none;
}

.server-card h3 a:hover {
  color: #8b5cf6;
}

.server-card p {
  color: #9ca3af;
  margin-bottom: 1rem;
  line-height: 1.5;
  font-size: 0.875rem;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: #374151;
  color: #d1d5db;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag:first-child {
  background: #8b5cf6;
  color: white;
}

/* Footer Pagination - Dark theme */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 3rem auto 2rem;
  padding: 0 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

#rangeText {
  color: #6b7280;
  font-weight: 500;
  font-size: 0.875rem;
}

footer > div {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#prevButton, #nextButton {
  padding: 0.5rem 1rem;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #1f2937;
  color: #e5e7eb;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

#prevButton:hover, #nextButton:hover {
  background: #374151;
  border-color: #8b5cf6;
}

#prevButton:disabled, #nextButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #2a2a2a;
  color: #6b7280;
}

#prevButton:disabled:hover, #nextButton:disabled:hover {
  background: #1f2937;
  border-color: #2a2a2a;
}

#paginationText {
  color: #d1d5db;
  font-weight: 500;
  font-size: 0.875rem;
}

/* Site Footer - Dark theme */
.site-footer {
  background: #111111;
  color: #9ca3af;
  margin-top: 4rem;
  padding: 3rem 0 1rem;
  border-top: 1px solid #2a2a2a;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-inner h3, .footer-inner h4 {
  color: #f9fafb;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.footer-inner p, .footer-inner a {
  color: #9ca3af;
  line-height: 1.6;
  font-size: 0.875rem;
}

.footer-inner a:hover {
  color: #8b5cf6;
  text-decoration: none;
}

.footer-links, .social-links {
  list-style: none;
}

.footer-links li, .social-links li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #2a2a2a;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
}

.footer-bottom p {
  color: #6b7280;
  font-size: 0.75rem;
}

/* Loading state */
.loading-state {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
}

.empty-state h3 {
  color: #9ca3af;
  margin-bottom: 1rem;
  font-weight: 600;
}

.empty-state p {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  #searchInput {
    min-width: auto;
  }
  
  .servers {
    grid-template-columns: 1fr;
  }
  
  .examples-grid {
    grid-template-columns: 1fr;
  }
  
  .examples-title {
    font-size: 1.75rem;
  }
  
  footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Animation */
@keyframes spin-to-right {
  from { transform: rotateY(-180deg); }
  to { transform: rotateY(0deg); }
}

.logo-icon {
  animation: spin-to-right 1s ease-out forwards;
}

/* Focus states for accessibility */
button:focus, 
input:focus, 
select:focus, 
a:focus {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
}