.aily-mermaid-viewer {
  border-radius: 5px;
  background-color: #3a3a3a;
  max-height: 500px;
  overflow: auto;

  &:hover {
    background-color: #3f3f3f;
  }

  // 错误卡片
  .error-card {
    padding: 16px;

    .error-content {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;

      .error-text {
        color: #999;
      }
    }
  }

  // Mermaid 图表卡片
  .mermaid-card {
    padding: 16px;
    border-radius: 8px;
    height: 100%;
    overflow: auto;

    .mermaid-container {
      position: relative;
      min-height: 200px;
      cursor: pointer;
      user-select: none;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 100%;
      transition: opacity 0.2s ease;

      &:hover {
        opacity: 0.8;
      }

      ::ng-deep {

        // 确保 SVG 正确显示
        svg {
          max-width: 100% !important;
          height: auto !important;
          display: block !important;
          margin: 0 auto;
          background: transparent !important;
        }

        .label-container {
          fill: #333 !important;
        }
      }
    }
  }
}

// 全屏模态框样式
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 999999;
  display: flex;
  justify-content: center;
  align-items: center;

  .fullscreen-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: grab;

    &:active {
      cursor: grabbing;
    }

    .fullscreen-chart {
      position: absolute;
      top: 50%;
      left: 50%;
      transform-origin: center center;
      transition: transform 0.1s ease-out;

      ::ng-deep {
        svg {
          max-width: none !important;
          height: auto !important;
          display: block !important;
          background: transparent !important;
        }
      }
    }

    .operation-hints {
      position: absolute;
      bottom: 20px;
      right: 20px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      opacity: 0.7;
      pointer-events: none;

      .hint {
        background-color: rgba(0, 0, 0, 0.6);
        color: #ccc;
        padding: 6px 12px;
        border-radius: 4px;
        font-size: 12px;
        text-align: center;
        backdrop-filter: blur(4px);
      }
    }
  }
}