/* Material You 风格主色 */
:root {
  --primary: #675DD7;
  --sidebar-bg: #f6f6f6;
  --sidebar-border: #dbdbdb;
  --sidebar-active: #e4e4e4;
  --text-main: #222;
  --text-secondary: #888;
  --nav-bg: #fff;
  --nav-border: #e0e0e0;
}

body {
  background: #f8f9fb;
  color: var(--text-main);
  font-family: 'Roboto', 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  margin: 0;
  overflow-x: hidden;
}

.DIX AI-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 270px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 0 0 32px 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.logo-box {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  gap: 12px;
  background: #f6f6f6;
  position: sticky;
  top: 0;
  z-index: 2;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px #675dd71a;
}

.logo-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.menu {
  flex: 1;
  padding: 0 12px;
}

.menu ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.menu li {
  margin-top: 4px;
}

.menu-section {
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  margin: 8px 0 18px 0;
}

.menu-section > ul {
  margin-left: 0;
  padding-left: 0;
  font-weight: 400;
}

.menu a {
  display: block;
  padding: 8px 18px;
  border-radius: 4px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.menu a.active, .menu a:hover {
  background: var(--sidebar-active);
  color: var(--primary);
  font-weight: 400;
}

.menu ul ul {
  margin-left: 18px;
  border-left: 2px solid var(--sidebar-active);
  padding-left: 10px;
}

.main-content {
  margin-left: 270px;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  min-width: 0;
  height: 100vh;
  position: relative;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  height: auto;
  margin-right: 280px;
}

.content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
}

.content h2 {
  font-size: 1.3rem;
  color: #222;
  margin-top: 32px;
  margin-bottom: 12px;
}

.content h3 {
  font-size: 1.1rem;
  color: #4b43b6;
  margin-top: 24px;
  margin-bottom: 12px;
}

.content h4 {
  font-size: 1rem;
  color: #4b43b6;
  margin-top: 18px;
  margin-bottom: 12px;
}

.content ul, .content ol {
  padding-left: 20px;
  line-height: 2;
  font-size: 0.9rem;
  color: #444444;
}

.content ul li {
  line-height: 2;
}

.content p {
  font-size: 0.9rem;
  color: #444444;
  margin-bottom: 12px;
  line-height: 2;
}

.content span.highlight {
  color: #4b43b6;
  font-weight: 600;
}

.content img {
  max-width: 80%;
  height: auto;
  margin: 12px 0;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  overflow-x: auto;
  display: block;
}

td, th {
  padding: 18px 20px !important;
  vertical-align: middle;
  font-size: 0.85rem;
}

.page-anchor-nav {
  position: fixed;
  top: 20px;
  right: 10px;
  width: 240px;
  background: #fff;
  z-index: 200;
  font-size: 0.9rem;
  color: var(--primary);
  padding: 16px;
}

.page-anchor-nav h3 {
  font-size: 0.9rem;
  font-weight: 600;
}

.page-anchor-nav ul {
  list-style: none;
  padding-left: 0;
  line-height: 2.4;
}

.page-anchor-nav ul li {
  line-height: 2.4;
}

.page-anchor-nav ul li a {
  color: #222;
  text-decoration: none;
}

.page-anchor-nav ul li a:hover {
  color: var(--primary);
}

/* 移动端适配 */
@media (max-width: 1200px) {
  .page-anchor-nav {
    display: none;
  }
  
  .content {
    margin-right: 0;
  }
}

@media (max-width: 900px) {
  .DIX AI-container {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--sidebar-border);
  }

  .logo-box {
    position: static;
    padding: 10px;
  }

  .menu {
    padding: 10px;
  }

  .menu ul ul {
    margin-left: 10px;
  }

  .main-content {
    margin-left: 0;
    height: auto;
    min-height: 0;
  }

  .content {
    padding: 20px 15px;
    margin-right: 0;
  }

  .content h1 {
    font-size: 1.8rem;
  }

  .content h2 {
    font-size: 1.2rem;
  }

  .content h3 {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {
  .sidebar {
    overflow-y: auto;
    max-height: 300px;
  }

  .content {
    padding: 15px 10px;
  }

  .content h1 {
    font-size: 1.5rem;
  }

  .content img {
    width: 80%;
  }

  table {
    font-size: 0.8rem;
  }

  td, th {
    padding: 10px !important;
  }
}

/* 添加移动端菜单切换按钮 */
.menu-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 25px;
  background: var(--primary);
  color: white;
  text-align: center;
  line-height: 50px;
  z-index: 1000;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .sidebar.collapsed {
    display: none;
  }
}

/* 优化移动端的滚动体验 */
.content::-webkit-scrollbar {
  width: 6px;
}

.content::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 3px;
}

.content::-webkit-scrollbar-track {
  background-color: rgba(0,0,0,0.1);
}

/* 优化代码块在移动端的显示 */
pre {
  overflow-x: auto;
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 1rem 0;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

/* 优化图片显示 */
.content figure {
  margin: 1rem 0;
  text-align: center;
}

.content figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content figure figcaption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.DIX AI-contact-box {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  width: 540px;
}
.DIX AI-contact-box .contact-text {
  flex: 1;
  min-width: 180px;
  font-size: 0.9em;
  color: #444;
  padding-left: 18px;
}
.DIX AI-contact-box .contact-qr {
  min-width: 120px;
  text-align: center;
}
.DIX AI-contact-box .contact-qr img {
  width: 200px;
  border-radius: 8px;
  background: #fff;
}
@media (max-width: 700px) {
  .DIX AI-contact-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 8px 16px 8px;
  }
  .DIX AI-contact-box .contact-qr img {
    width: 140px;
  }
}
.alert {
    font-size: 0.9rem;
}
.alert ul{
    font-size: 0.9rem;
}
badage{
  font-size: 0.8rem;
  color: #fff;
  background-color: #675DD7;
  padding: 2px 4px;
  border-radius: 4px;
  margin-left: 4px;
}