:root {
  --primary-color: #8110a2;
  --text-color: #333;
  --background-color: #f9f9f9;
  --card-color: #ffffff;
  --secondary-text-color: #555;
  --border-radius: 12px;
  --box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

html,
body,
h1,
h2,
h3,
h4,
input {
  margin: 0;
  padding: 0;
}

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

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

header {
  background-color: var(--primary-color);
  color: white;
  padding: 20px;
  text-align: center;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

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

.api-card {
  background: var(--card-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--box-shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.api-card:hover {
  transform: translateY(-2px);
}

.api-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-family: ui-rounded;
}

.api-card p {
  color: var(--secondary-text-color);
  font-size: 0.9em;
}

.search-bar {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 16px;
}

.language-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 100;
}

/* Markdown content styles */
/* .markdown-content {
  padding: 20px;
  background: var(--card-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
} */

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  color: var(--primary-color);
  margin: 1em 0 0.5em;
  font-family: ui-rounded;
}

.markdown-content h4 {
  font-family: ui-rounded;
}

.markdown-content code {
  background: #f4f4f4;
  /* padding: 2px 5px; */
  border-radius: 4px;
  word-wrap: break-word;
}

.markdown-content pre {
  background: #f4f4f4;
  /* padding: 15px; */
  border-radius: 8px;
  overflow-x: auto;
}

.example-link {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  text-decoration: none;
  /* margin-top: 20px; */
}

header h1 {
  padding: 0 60px;
  font-family: ui-rounded;
}

/* 添加响应式样式 */
@media (max-width: 768px) {
  header {
    padding: 15px;
  }

  header h1 {
    font-size: 1.5em;
    padding: 0 40px;
  }

  .language-switch {
    top: 15px;
    right: 15px;
    padding: 4px 6px;
    font-size: 0.6em;
    border-radius: 6px;
  }

  .search-bar {
    margin: 15px auto;
    padding: 8px 15px;
    font-size: 14px;
  }

  .api-card {
    padding: 15px;
  }

  .api-card h3 {
    font-size: 1.2em;
  }

  /* .markdown-content {
    padding: 15px;
  } */
}