/* ============================================
   Koa3 CLI 文档样式文件
   修改此文件来调整文档的外观样式
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2c3e50;
  background: #fff;
}

/* 顶部导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.6rem;
  background: #fff;
  border-bottom: 1px solid #eaecef;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: #3eaf7c;
  text-decoration: none;
}

/* 侧边栏 */
.sidebar {
  position: fixed;
  top: 3.6rem;
  left: 0;
  bottom: 0;
  width: 20rem;
  background: #fff;
  border-right: 1px solid #eaecef;
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 100;
}

.sidebar-group {
  margin-bottom: 1.5rem;
}

.sidebar-group-title {
  padding: 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.sidebar-link {
  display: block;
  padding: 0.35rem 1.5rem;
  color: #2c3e50;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  color: #3eaf7c;
}

.sidebar-link.active {
  color: #3eaf7c;
  border-left-color: #3eaf7c;
  font-weight: 600;
}

/* 主内容区 */
.main {
  margin-left: 20rem;
  margin-top: 3.6rem;
  padding: 2rem;
  min-height: calc(100vh - 3.6rem);
}

.content {
  max-width: 740px;
  margin: 0 auto;
}

/* 首页样式 */
.home {
  text-align: center;
  padding: 1rem 0;
}

.hero {
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.hero p {
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 2rem;
}

.hero p.info-text {
  font-size: 1rem;
  color: #666;
}

.action-button {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #3eaf7c;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 500;
  transition: background 0.3s;
}

.action-button:hover {
  background: #2d8f5f;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature {
  text-align: left;
}

.feature h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.feature p {
  color: #666;
  font-size: 0.95rem;
}

/* 文档内容样式 */
h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #eaecef;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eaecef;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

ul,
ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  color: #e83e8c;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

pre {
  background: #282c34;
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  background: transparent;
  padding: 0;
  color: #abb2bf;
  font-size: 0.9rem;
}

blockquote {
  border-left: 4px solid #3eaf7c;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #666;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th,
td {
  border: 1px solid #eaecef;
  padding: 0.75rem;
  text-align: left;
}

th {
  background: #f6f8fa;
  font-weight: 600;
}

a {
  color: #3eaf7c;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 响应式 */
@media (max-width: 959px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .navbar {
    padding-left: 3.5rem;
  }

  .menu-toggle {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 1001;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2c3e50;
  }
}

.menu-toggle {
  display: none;
}

@media (max-width: 959px) {
  .menu-toggle {
    display: block;
  }
}

/* 隐藏内容 */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}
