/**
 * Hello-Agents 智能体学习平台样式文件
 * 实现了侧边栏导航和内容区域的布局设计
 * 包含深色主题配色方案和响应式布局
 */

/* 全局样式重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 主容器样式：整个页面的根容器 */
.cyber-college {
  display: flex;
  align-items: flex-start;
  background: #18181b;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimHei, Arial, Helvetica, sans-serif;
}

/* 左侧导航栏容器：包含Logo和菜单列表 */
.logo-menus {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  background: #1d1d1f;
  padding: 48px 24px;
  height: 100vh;
  gap: 48px;
  min-width: 250px;
  flex-shrink: 0;
}

/* Logo区域样式：品牌标识和名称的容器 */
.logo-container {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  align-self: stretch;
  gap: 12px;
  margin-right: 11px;
}

/* Logo图标样式 */
.logo {
  flex-shrink: 0;
  width: 41px;
  height: 32px;
  overflow: hidden;
}

/* 品牌名称文字样式 */
.hello-agents {
  flex-shrink: 0;
  width: 138px;
  letter-spacing: 0;
  color: #ffffff;
  font-family: ABeeZee, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimHei, Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: normal;
}

/* 菜单列表容器：包含所有章节导航项 */
.menus {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-items: flex-start;
  align-self: stretch;
  gap: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  padding-right: 8px;
  padding-bottom: 40px;
}

/* 自定义滚动条样式 */
.menus::-webkit-scrollbar {
  width: 6px;
}

.menus::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.menus::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.menus::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* 可点击菜单项的通用样式 */
.clickable-menu {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0;
  position: relative;
  overflow: hidden;
}

/* 可点击菜单项的悬停效果 */
.clickable-menu:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 可点击菜单项的点击效果 */
.clickable-menu:active {
  transform: translateX(1px) scale(0.99);
  transition: all 0.1s ease;
}

/* 活跃菜单项样式 */
.clickable-menu.active-menu {
  background: linear-gradient(135deg, #ffde00 0%, #ffd700 50%, #ffcc00 100%);
  color: #000000;
  box-shadow: 0 6px 20px rgba(255, 222, 0, 0.3);
  border: 1px solid rgba(255, 222, 0, 0.4);
}

.clickable-menu.active-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.clickable-menu.active-menu:hover {
  transform: translateX(2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(255, 222, 0, 0.4);
}

.clickable-menu.active-menu .menu-text,
.clickable-menu.active-menu .menu-text-normal,
.clickable-menu.active-menu .menu-text-special {
  color: #000000;
  font-weight: 500;
}

/* 前言菜单项样式 */
.menu {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  align-self: stretch;
  cursor: pointer;
  padding: 12px 16px;
  min-height: 44px;
  gap: 12px;
}

/* 前言菜单内容容器 */
.menu-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* 菜单图标容器 */
.menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* 图标包装器 - 四点图标布局 */
.icon-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  align-items: center;
  justify-items: center;
  width: 14px;
  height: 14px;
}

/* 向量图标元素 */
.vector {
  width: 3px;
  height: 3px;
  background: #ffffff;
  border-radius: 50%;
}

/* 菜单文字样式 */
.menu-text {
  flex-grow: 1;
  letter-spacing: 0;
  color: #ffffff;
  font-family: ABeeZee, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimHei, Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: normal;
}

/* 普通菜单项样式 */
.menu-item {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  align-self: stretch;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 44px;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* 框架类型菜单项样式 */
.menu-item-frame {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  align-self: stretch;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 44px;
}

.menu-item-frame:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* 特殊菜单项样式 */
.menu-item-special {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  align-self: stretch;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 44px;
}

.menu-item-special:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* 菜单图标图片样式 */
.menu-icon-img {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* 框架图标样式 */
.frame-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  overflow: hidden;
}

/* 普通菜单文字样式 */
.menu-text-normal {
  flex-grow: 1;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.8);
  font-family: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimHei, Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: normal;
}

/* 特殊菜单文字样式 */
.menu-text-special {
  flex-grow: 1;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.8);
  font-family: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimHei, Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: normal;
}

/* 右侧内容区域样式 */
.content-area {
  flex: 1;
  height: 100vh;
  background: #18181b;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 内容容器样式 */
#content-container {
  padding: 24px;
  max-width: none;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

/* 内容文字样式 */
.content-text {
  text-align: left;
  line-height: 1.6;
  letter-spacing: 0;
  color: #ffffff;
  font-family: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimHei, Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: normal;
  background: transparent;
}

/* 自定义滚动条样式 - 右侧内容区域 */
.content-area::-webkit-scrollbar {
  width: 8px;
}

.content-area::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.content-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* 响应式设计：适配不同屏幕尺寸 */
@media (max-width: 1200px) {
  .logo-menus {
    min-width: 200px;
    padding: 24px 16px;
  }
  
  .content-area {
    padding: 0 16px;
  }
}

@media (max-width: 768px) {
  .cyber-college {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  
  .logo-menus {
    width: 100%;
    height: auto;
    min-height: auto;
    padding: 16px;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
  
  .logo-container {
    justify-content: center;
    margin-right: 0;
  }
  
  .menus {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    max-height: none;
    justify-content: center;
    padding-right: 0;
  }
  
  .menu-item,
  .menu-item-frame,
  .menu-item-special,
  .menu {
    flex: 0 0 auto;
    min-width: auto;
    padding: 8px 12px;
    margin: 2px;
    border-radius: 20px;
    font-size: 12px;
  }
  
  .menu-content {
    width: auto;
    min-width: auto;
    padding: 8px 12px;
    height: auto;
  }
  
  .menu-text,
  .menu-text-normal,
  .menu-text-special {
    font-size: 12px;
    width: auto;
  }
  
  .content-area {
    height: auto;
    min-height: calc(100vh - 200px);
    padding: 0;
  }
}

@media (max-width: 480px) {
  .logo-menus {
    padding: 12px;
    gap: 16px;
  }
  
  .hello-agents {
    font-size: 14px;
    width: auto;
  }
  
  .menus {
    gap: 6px;
  }
  
  .menu-item,
  .menu-item-frame,
  .menu-item-special,
  .menu {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .menu-content {
    padding: 6px 10px;
  }
  
  .menu-text,
  .menu-text-normal,
  .menu-text-special {
    font-size: 11px;
  }
  
  #content-container {
    padding: 16px;
  }
}