/* 知识图谱样式 */
.knowledge-graph-container {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 48px auto 0;
  padding: 0 20px 40px;
}

.knowledge-graph-chart-wrapper {
  position: relative;
  width: 100%;
  height: calc(100vh - 400px);
  min-height: 600px;
  background: 
    linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(20, 20, 20, 0.2) 100%),
    url('/images/dragon.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 128, 0, 0.1) inset,
    0 0 60px rgba(255, 128, 0, 0.1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.knowledge-graph-chart-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/dragon.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

#knowledge-graph-chart {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  background: transparent;
}

.knowledge-graph-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 20, 0.75) 100%);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.9);
  transition: opacity 0.4s ease, visibility 0.4s ease;
  border: 1px solid rgba(255, 128, 0, 0.15);
}

.knowledge-graph-loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.knowledge-graph-loading p {
  margin-top: 20px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.loading-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ff8000;
  border-right-color: #ff8000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
  box-shadow: 0 0 20px rgba(255, 128, 0, 0.3);
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 128, 0, 0.2);
  border-top-color: rgba(255, 128, 0, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.knowledge-graph-info {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(40, 40, 40, 0.98) 100%);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 128, 0, 0.4);
  border-radius: 20px;
  padding: 0;
  z-index: 1000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 128, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.knowledge-graph-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px;
  border-bottom: 1px solid rgba(255, 128, 0, 0.2);
  background: linear-gradient(90deg, rgba(255, 128, 0, 0.1) 0%, transparent 100%);
}

.knowledge-graph-info-header h3 {
  margin: 0;
  font-size: 26px;
  color: #ff8000;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(255, 128, 0, 0.3);
  letter-spacing: 0.5px;
}

.knowledge-graph-info-close {
  background: rgba(255, 128, 0, 0.1);
  border: 1px solid rgba(255, 128, 0, 0.3);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.knowledge-graph-info-close:hover {
  background: rgba(255, 128, 0, 0.2);
  border-color: rgba(255, 128, 0, 0.5);
  color: #ff8000;
  transform: rotate(90deg);
}

.knowledge-graph-info-content {
  padding: 28px 36px;
  overflow-y: auto;
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

.knowledge-graph-info-content::-webkit-scrollbar {
  width: 8px;
}

.knowledge-graph-info-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.knowledge-graph-info-content::-webkit-scrollbar-thumb {
  background: rgba(255, 128, 0, 0.3);
  border-radius: 4px;
}

.knowledge-graph-info-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 128, 0, 0.5);
}

.knowledge-graph-info-content p {
  margin: 14px 0;
  font-size: 15px;
}

.knowledge-graph-info-content strong {
  color: #ff8000;
  font-weight: 600;
  margin-right: 8px;
}

.knowledge-graph-info-content ul {
  margin-top: 12px;
  padding-left: 0;
  list-style-type: none;
}

.knowledge-graph-info-content ul li {
  margin-bottom: 10px;
  padding-left: 0;
  position: relative;
  line-height: 1.7;
}

.knowledge-graph-list-item {
  user-select: none;
}

.knowledge-graph-list-item:active {
  transform: translateX(2px) !important;
  background: rgba(255, 128, 0, 0.15) !important;
}

/* 移动端适配 */
@media (max-width: 991.98px) {
  .knowledge-graph-container {
    margin-top: 32px;
  }

  .knowledge-graph-chart-wrapper {
    height: calc(100vh - 350px);
    min-height: 550px;
  }
}

@media (max-width: 767.98px) {
  .knowledge-graph-container {
    padding: 0 16px 32px;
    margin-top: 24px;
  }

  .knowledge-graph-chart-wrapper {
    height: calc(100vh - 280px);
    min-height: 500px;
    border-radius: 12px;
    box-shadow: 
      0 4px 16px rgba(0, 0, 0, 0.3),
      0 0 0 1px rgba(255, 128, 0, 0.1) inset;
  }

  .knowledge-graph-loading {
    border-radius: 12px;
  }

  .loading-spinner {
    width: 48px;
    height: 48px;
    border-width: 3px;
  }

  .loading-spinner::after {
    width: 32px;
    height: 32px;
    border-width: 2px;
  }

  .knowledge-graph-loading p {
    font-size: 14px;
    margin-top: 16px;
  }

  .knowledge-graph-info {
    width: 95%;
    max-height: 85vh;
    border-radius: 16px;
  }

  .knowledge-graph-info-header {
    padding: 20px 24px;
  }

  .knowledge-graph-info-header h3 {
    font-size: 20px;
  }

  .knowledge-graph-info-content {
    padding: 20px 24px;
  }

  .knowledge-graph-info-content p {
    font-size: 14px;
  }

  .knowledge-graph-list-item {
    padding: 12px !important;
  }

  .knowledge-graph-list-item > div:first-child {
    font-size: 14px !important;
  }

  .knowledge-graph-list-item > div:last-child {
    display: none !important; /* 移动端隐藏"点击查看详情"提示 */
  }
}







