/* Base Styles */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #4b5563;
    --secondary-hover: #374151;
    --background-color: #f9fafb;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-background: #ffffff;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --transition: all 0.2s ease-in-out;
  }

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

  html {
    font-size: 16px;
    scroll-behavior: smooth;
  }

  body {
    font-family: var(--font-sans);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
  }

  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  /* Typography */
  h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  p {
    margin-bottom: 1rem;
  }

  a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
  }

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

  /* Buttons */
  .btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
  }

  .btn-primary {
    background-color: var(--primary-color);
    color: white;
  }

  .btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
  }

  .btn-secondary {
    background-color: var(--secondary-color);
    color: white;
  }

  .btn-secondary:hover {
    background-color: var(--secondary-hover);
    color: white;
  }

  /* Header Styles */
  .site-header {
    background-color: lightgray;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
  }

  .site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo h1 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--primary-color);
  }

  .main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .main-nav li:not(:last-child) {
    margin-right: 1.5rem;
  }

  .main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
  }

  .main-nav a:hover,
  .main-nav a.active {
    color: var(--primary-color);
  }

  .main-nav a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: var(--primary-color);
  }

  /* Hero Section */
  .hero {
    padding: 5rem 0;
    background: linear-gradient(120deg, #2563eb, #4f46e5);
    color: white;
    text-align: center;
  }

  .hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
  }

  /* API Directory */
  .api-directory {
    padding: 4rem 0;
    background-color: lightgray;
  }

  .api-directory h2 {
    text-align: center;
    margin-bottom: 3rem;
  }

  .api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }

  .api-card {
    background-color: lightblue;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    border: 1px solid var(--border-color); /* Add this line for the border */
  }

  /* Optional: You can change the border color on hover for a nice effect */
  .api-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color); /* Change border color on hover */
  }

  .api-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }

  .api-card-header h3 {
    margin: 0;
  }

  .api-version {
    display: inline-block;
    background-color: #ecfdf5;
    color: var(--success-color);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
  }

  .api-card p {
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1.5rem;
  }

  .api-versions-container {
    margin-bottom: 1.5rem;
  }

  .api-versions {
    background-color: var(--background-color);
    border-radius: var(--radius-md);
    padding: 1rem;
  }

  .api-versions span {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .api-versions ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
  }

  .api-versions li {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
  }

  .api-versions a {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e5e7eb;
    color: var(--text-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
  }

  .api-versions a:hover {
    background-color: #d1d5db;
  }

  /* Getting Started */
  .getting-started {
    padding: 4rem 0;
    background-color: #f3f4f6;
  }

  .getting-started h2 {
    text-align: center;
    margin-bottom: 3rem;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
  }

  .step {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--card-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }

  .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
  }

  .step h3 {
    margin-bottom: 1rem;
  }

  .step p {
    color: var(--text-muted);
    font-size: 0.875rem;
  }

  /* Footer */
  .site-footer {
    background-color: #1f2937;
    color: white;
    padding: 4rem 0 2rem;
  }

  .footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
  }

  .footer-logo h2 {
    margin: 0;
    font-size: 2rem;
  }

  .footer-links h3 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .footer-links ul {
    list-style: none;
    padding: 0;
  }

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

  .footer-links a {
    color: #e5e7eb;
    transition: var(--transition);
  }

  .footer-links a:hover {
    color: white;
  }

  .copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    font-size: 0.875rem;
    color: #9ca3af;
  }

  /* API Viewer Page */
  .api-viewer-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .api-selector-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .selector-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .selector-group label {
    font-weight: 600;
    color: var(--text-muted);
  }

  .api-selector-nav select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    font-family: var(--font-sans);
    background-color: white;
  }

  /* Swagger UI Customization */
  #swagger-ui {
    flex: 1;
    margin-top: 1rem;
  }

  /* Override Swagger UI styles for better integration */
  .swagger-ui .topbar {
    display: none;
  }

  .swagger-ui .info {
    margin: 30px 0;
  }

  .swagger-ui .info .title {
    font-family: var(--font-sans);
    font-weight: 700;
  }

  .swagger-ui .scheme-container {
    padding: 20px 0;
    background-color: white;
  }

  /* Media Queries */
  @media (max-width: 768px) {
    .api-selector-nav {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.75rem;
    }

    .selector-group {
      width: 100%;
    }

    .selector-group select {
      flex-grow: 1;
    }

    .footer-content {
      flex-direction: column;
      gap: 2rem;
    }

    .api-card {
      min-height: auto;
    }
  }

  @media (max-width: 576px) {
    .hero h1 {
      font-size: 2rem;
    }

    .hero p {
      font-size: 1rem;
    }

    .steps {
      grid-template-columns: 1fr;
    }

    .site-header .container {
      flex-direction: column;
      gap: 1rem;
    }
  }
