/* 右侧导航栏样式 */
.sidebar {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0 0 0;
  text-align: center;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #eee;
  box-shadow: -2px 0 8px rgba(0,0,0,0.03);
  padding: 40px 0 10px 0;
  text-align: left;
  z-index: 100;
  transition: width 0.3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sidebar.expanded {
  width: 180px;
  padding-left: 10px;
  padding-right: 10px;
}
.sidebar.expanded h3 {
  writing-mode: horizontal-tb;
  transform: none;
  margin-bottom: 10px;
  margin-left: 0;
}
.sidebar.expanded ul {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 768px) {
  .sidebar {
    width: 140px !important;
    padding: 40px 10px 10px 10px !important;
    overflow: auto;
    transition: right 0.3s cubic-bezier(.4,0,.2,1), width 0.3s cubic-bezier(.4,0,.2,1);
    right: -140px;
  }
  .sidebar.expanded {
    right: 0;
  }
  .sidebar h3 {
    writing-mode: horizontal-tb;
    transform: none;
    margin-bottom: 10px;
    margin-left: 0;
  }
  .sidebar ul {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}
/* 右侧导航栏样式 */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 180px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #eee;
  box-shadow: -2px 0 8px rgba(0,0,0,0.03);
  padding: 40px 10px 10px 10px;
  text-align: left;
  z-index: 100;
}
.sidebar h3 {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}
.sidebar ul {
  list-style: none;
  padding: 0;
}
.sidebar li {
  margin: 10px 0;
}
.sidebar a {
  color: #337ab7;
  text-decoration: none;
  font-size: 14px;
}
.sidebar a:hover {
  text-decoration: underline;
}
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 40px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #eee;
  box-shadow: -2px 0 8px rgba(0,0,0,0.03);
  padding: 40px 0 10px 0;
  text-align: left;
  z-index: 100;
  transition: width 0.3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sidebar:hover {
  width: 180px;
  padding-left: 10px;
  padding-right: 10px;
}
.sidebar h3 {
}

/* 手机端导航栏固定宽度，不动态 */
@media (max-width: 768px) {
  .sidebar {
    width: 140px !important;
    padding: 40px 10px 10px 10px !important;
    overflow: auto;
    transition: none;
  }
  .sidebar h3 {
    writing-mode: horizontal-tb;
    transform: none;
    margin-bottom: 10px;
    margin-left: 0;
  }
  .sidebar ul {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}
.sidebar:hover {
  width: 180px;
  padding-left: 10px;
  padding-right: 10px;
}
.sidebar h3 {
}

img {
  border-radius: 15px;
  width: 100%;
  max-width: 700px;
  max-height: 70vh;
  height: auto;
  display: block;
  margin: 20px auto;
  object-fit: contain;
}
.sidebar:hover h3 {
  writing-mode: horizontal-tb;
  transform: none;
  margin-bottom: 10px;
  margin-left: 0;
}
.sidebar ul {
  border-radius: 15px;
  width: 100%;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  max-width: 700px;
.sidebar:hover ul {
  opacity: 1;
  pointer-events: auto;
}
.sidebar li {
  max-height: 70vh;
  white-space: nowrap;
  height: auto;
  display: block;
  margin: 20px auto;
  object-fit: contain;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 20px;
  }
  
  .sidebar li {
    margin: 10px 0;
    white-space: nowrap;
  }

  /* 响应式设计 */
  img {
    width: 100%;
  }
}
