/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #141414;
  color: #ffffff;
  line-height: 1.5;
}

/* 顶部导航栏样式 - 根据MainLayout.module.css更新 */
.header {
  width: 100%;
  z-index: 1000;
  background: rgba(18, 18, 18, 0.9) !important;
  backdrop-filter: blur(10px);
  padding: 0;
  height: 80px;
  line-height: 80px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.headerContent {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  line-height: 1;
}

.logoImage {
  width: 80px;
  margin-top: 10px;
}

.logo:hover {
  text-shadow: 0 0 20px rgba(30, 214, 255, 0.5);
}

.navContainer {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: 48px;
}

.menu {
  background: transparent;
  border: none;
  flex: 1;
  display: flex;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  list-style: none;
  height: 80px;
}

.menu::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.menu-item {
  padding: 0 20px;
  margin: 0 4px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}

.menu-item:hover {
  color: #1ED6FF;
  transform: translateY(-2px);
}

.menu-item-selected {
  color: #1ED6FF;
  background: transparent;
  position: relative;
}

.menu-item-selected::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  width: auto;
  height: 3px;
  background: #1ED6FF;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.userArea {
  margin-left: auto;
  flex: 0 0 auto;
}

/* 主内容区域 - 添加顶部margin以避免被固定导航栏遮挡 */
.container {
  max-width: 1200px;
  margin: 20px auto 0; /* 增加上边距，避免被固定导航栏遮挡 */
  padding: 40px 20px;
}

.page-header {
  margin-bottom: 40px;
}

.title-container {
  width: 100%;
}

.title-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.page-title {
  font-size: 28px;
  font-weight: 500;
  color: #ffffff;
}

.subject-button {
  background: rgba(30, 214, 255, 0.1);
  color: #1ED6FF;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 214, 255, 0.3);
  white-space: nowrap;
}

.subject-button:hover {
  background: rgba(30, 214, 255, 0.2);
  transform: translateY(-2px);
}

.description {
  color: rgba(255, 255, 255, 0.45);
  font-size: 16px;
}

/* 专业分类卡片 */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.category-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid #303030;
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.08);
  border-color: #1ED6FF;
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(30, 214, 255, 0.1);
  margin-bottom: 20px;
}

.category-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #ffffff;
}

.category-description {
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
}

.arrow-icon {
  position: absolute;
  top: 24px;
  right: 24px;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.category-card:hover .arrow-icon {
  opacity: 1;
  transform: translateX(3px);
}

/* 目录样式 */
.toc-container {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 40px;
}

.toc-section {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid #303030;
  padding: 30px;
  transition: all 0.3s ease;
}

.toc-section:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(30, 214, 255, 0.3);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #1ED6FF;
  border-bottom: 1px solid rgba(30, 214, 255, 0.2);
  padding-bottom: 10px;
}

.topic-list {
  list-style-type: none;
}

.topic-list li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 20px;
}

.topic-list li:before {
  content: '•';
  position: absolute;
  left: 0;
  color: #1ED6FF;
  font-size: 16px;
}

.topic-list li:last-child {
  margin-bottom: 0;
}

.topic-list a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  line-height: 1.5;
}

.topic-list a:hover {
  color: #1ED6FF;
  transform: translateX(3px);
} 
 /* 浮动目录样式 */
    .floating-menu {
      position: fixed;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(18, 18, 18, 0.95);
      border-radius: 0 8px 8px 0;
      padding: 15px;
      box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
      z-index: 1000;
      border: 1px solid rgba(30, 214, 255, 0.2);
      border-left: none;
      transition: all 0.3s ease;
      max-width: 300px;
      overflow: hidden;
      white-space: nowrap;
    }
    
    .floating-menu-title {
      color: #1ED6FF;
      font-size: 16px;
      font-weight: bold;
      margin-bottom: 12px;
      text-align: center;
    }
    
    .floating-menu-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: block;
    }
    
    .floating-menu-item {
      padding: 8px 0;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .floating-menu-item:first-child {
      border-top: none;
    }
    
    .floating-menu-item a {
      color: rgba(255, 255, 255, 0.8);
      text-decoration: none;
      font-size: 14px;
      transition: all 0.2s ease;
      display: block;
    }
    
    .floating-menu-item a:hover {
      color: #1ED6FF;
      transform: translateX(5px);
    }